On Sun, 2005-08-21 at 07:28 -0700, Alaios wrote: > Hi to everyone!!! I have written this simple code... > can u plz help figure out why i always get 0 return?
Several reasons: - Because you haven't initialised the library. There needs to be a call to 'init_snmp' before calling 'read_objid' - Because you haven't declared any memory for the 'myoid' variable. This needs to be an array (of size 'length'), rather than a pointer. - Because you've specified an invalid OID. Try with ".iso.org.dod...." instead. Dave ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders