• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

snmp4j variable bindings  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to use snmp4j to send traps to a client.
I want to associate the bindings to the trap in a way that i can have a name for each value i'm passing along with the type of the value.

Previously i was doing this using an arraylist and appending the command to it.. which was being run by the process builder. The command looked like this:

command.add(mibName + "::" + "notificationID");
command.add("i");
command.add(""
+ perfConseqNotificationRel.getPerfnotificationid().getId()
+ "");

In this 'notificationID' is the name of the attribute.
'i' is the type i.e. integer value
and 'perfConseqNotificationRel.getPerfnotificationid().getId()' is the value i will b getting.


I'm trying to do the same with snmp4j, in the following way

pdu.add(new VariableBinding(oid, new OctetString("Notification Id value")));

But in the above, i am only able to bind the value of the variable to an OID, whereas I want to bind it to a name.
Can the above be done in snmp4j ??
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!