I follow the snmpdemoapp.c and modify the code a litle to get more
than one oid. All works fine so I add more oids but I get errors with
this oid ".1.3.6.1.2.1.33.1.3.3.1.2.1". The error says that oid is not
defined in the mib file, so I try an snmpget command :
snmpget –v 1 –c public 192.168.x.x .1.3.6.1.2.1.33.1.3.3.1.2.1
and works fine. So the question is … any have any idea why the program
is crashing?
This is the code I change from the tutorial
/*
* Create the PDU for the data for our request.
* 1) We're going to GET the system.sysDescr.0 node.
*/
pdu = snmp_pdu_create(SNMP_MSG_GET);
read_objid(".1.3.6.1.2.1.33.1.1.1.0", anOID, &anOID_len);
snmp_add_null_var(pdu, anOID, anOID_len);
read_objid(".1.3.6.1.2.1.33.1.1.2.0", anOID, &anOID_len);
snmp_add_null_var(pdu, anOID, anOID_len);
read_objid("1.3.6.1.2.1.33.1.3.3.1.2.1", anOID, &anOID_len);
snmp_add_null_var(pdu, anOID, anOID_len);
thanks for all
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders