Is it possible to use a custom OID in the library #SNMP (https://sharpsnmp.com/)? If so, how can a custom OID variable/subtree be added/registered with #SNMP so it is possible to read and write to those variables?
I would like to extend/configure the agent deamon (snmpd) so it can read custom OIDs like iso.org.dod.internet.private.enterprise.XXX (1.3.6.1.4.1.XXX)
For testing purposes let's say a "fake" OID will be used (something like 1.3.6.1.4.1.99999.0).
What would be necessary to do in the #SNMP snmpd example agent so the program can read the values (snmpget, snmpgetnext...) of that OID?
According to the #SNMP Documentation (Documentation->Agent Development) when a handler tries to do a typical SNMP operation, it looks into the ObjectStore object to locate the specified object.
So in order to use a custom OID does it need to be added to the ObjectStore?
If you see into snmpd
sample, you can see the ObjectStore
is initialized in Program.Main
for simplicity,
https://github.com/lextudio/sharpsnmplib-samples
If you follow the convention to insert your custom objects, you get what you want.