[SNMP4J] can't do "get" for Counter64 variable

Tzahi Bergman tzahi at alcarmel.com
Mon Jun 2 16:30:00 CEST 2008


hi,
i made a method that do get from an agent and it works great, the only
problem i got is that for some reason it returns "null" when it comes to
COUNTER64 variables.
Can anyone help me with that?

Here is my code for the "get":

Address address = new UdpAddress(ip + "/161");
VariableBinding binding = new VariableBinding(oid);
PDU request = new PDU();
request.add(binding);
Target target = new CommunityTarget(address, new OctetString("public"));
Snmp session = initSession();
ResponseEvent event = session.get(request, target);
PDU response = event.getResponse();
return response.get(0);





More information about the SNMP4J mailing list