[SNMP4J] Help with GetBulk Request SNMPv3
Frank Fock
fock at agentpp.com
Thu Jun 30 23:57:37 CEST 2005
Hello Ramsey,
To access the maxRepetitions and nonRepeaters you can
use the corresponding Getter/Setter methods of PDU:
PDU pdu = new PDU();
pdu.add(new VariableBinding(new OID("1.3.6")));
pdu.add(new VariableBinding(new OID("1.3.6.1.4")));
pdu.setType(PDU.GETBULK);
pdu.setMaxRepetitions(50);
pdu.setNonRepeaters(1);
Please note, that you need to create a ScopedPDU for SNMPv3.
Thus replace the first line above with:
ScopedPDU pdu = new ScopedPDU();
When using TableUtils to retrieve a table, nonRepeaters is always
zero. To modify the maxRepetitions value, you call
TableUtils.setMaxNumRowsPerPDU(int i)
Best regards,
Frank
Ramsey Hage wrote:
>Hello,
>
>Environment: SNMP4J v1.5, JDK5.0
>
>Do you have an example of how to use GetBulk request?
>
>I am using SNMP ver. 3, and would like to issue a GetBulk.
>How can I access "non-repeaters" and "max-repetitions"
>for the request?
>
>I believe users can use Snmp.getBulk(...) method or
>create a TableUtils object. In either case, how to specify
>the repeaters and max-repetitions?? What are differences?
>
>Thanks in advance.
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>
>
More information about the SNMP4J
mailing list