I modified snmpdemoapp.c to use the MIB extensions I created. The changes are as below:
diff /mnt/cdrom/net-snmp/toolkit/snmpdemoapp.c snmpdemoapp.c 6c6 < #define DEMO_USE_SNMP_VERSION_3 --- > #undef DEMO_USE_SNMP_VERSION_3 18,19c18,21 < oid anOID[MAX_OID_LEN]; < size_t anOID_len = MAX_OID_LEN; --- > // oid anOID[MAX_OID_LEN]; > // size_t anOID_len = MAX_OID_LEN; > oid anOID[12] = {1,3,6,1,4,1,103,8,16,2,5,0}; > size_t anOID_len = 12; 34c36 < session.peername = strdup("test.net-snmp.org"); --- > session.peername = strdup("localhost"); 74c76 < session.version = SNMP_VERSION_1; --- > session.version = SNMP_VERSION_2c; 77c79 < session.community = "demopublic"; --- > session.community = "public"; 99c101 < read_objid(".1.3.6.1.2.1.1.1.0", anOID, &anOID_len); --- > // read_objid(".1.3.6.1.4.1.103.8.16.2.5.0", anOID, &anOID_len); It works fine with version 5.1.2 but with 5.2 I get the message snmpget: Too long Running Ethereal shows that an SNMP get message is not even being generated. If I run the same code linked with the 5.1.2 libraries but running the 5.2 agent it also works. So that tells me there is a problem in the libraries somewhere. Does anyone have any ideas on what is wrong? ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users