The below (mostly taken from one of the examples)
handles requests.
int
request_handler(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests) {
while (requests) {
netsnmp_variable_list *var =
requests->requestvb;
char buf[SPRINT_MAX_LEN];
snprint_objid(buf, sizeof(buf), var->name,
var->name_length);
DEBUGMSGTL(("agenty", " oidStr: %s\n", buf));
...
When I send in a request like:
snmpget localhost 1.3.6.1.4.1.7755.1000.42.1.1.0
the oidStr =
"SNMPv2-SMI::enterprises.7755.1000.42.1.1.0"
Is there function to convert that to the numeric form:
1.3.6.1.4.1.7755.1000.42.1.1.0
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders