Reputation: 53
I am using SNMP4J Framework and it implements and makes possible the standard SET, GET, GET-NEXT, etc. messages.
For example, with a SET, I can update the value of the MIB OID "1.3.6.1.2.50.0". This works perfectly for me. I can do that using org.snmp4j.Snmp.set(PDU pdu, Target target)
What I want to do now is to CREATE a custom MIB OID (as "1.3.6.1.2.100.0") FROM the client and assign a value to it and not simply update an existing MIB OID value.
Is there any standard SNMP way to do that easily ?
Upvotes: 0
Views: 1074
Reputation: 4970
Yes.
But it doesn't make sense in the context of SNMP to "create" a new scalar out of thin air; normally you are setting one already defined with a pre-defined OID, and that OID will usually be shared agent -> manager via a MIB file. Its OID will be the 0th instance (e.g., sysDescr.0).
You can however add/remove rows in a SNMP table (its rows and cells will have OIDs at instance 1, instance 2, etc.); and that SNMP table may have zero rows. The cells in the table can have values.
Here is some background info on SNMP tables.
Upvotes: 1