Okay, so I've implemented a sub-agent using the pass_persist mechanism in net-SNMP. Testing with snmpget, I can get the values expected. Testing with snmpgetnext, I get the value of the "next" OID. Here's a sample, slightly anonymized:
1004 $ snmpget -On -v 2c -c xxx dev1 1.3.6.1.4.1.59.1.5.3.1.1.1 .1.3.6.1.4.1.59.1.5.3.1.1.1 = INTEGER: 1 1004 $ snmpgetnext -On -v 2c -c xxx dev1 1.3.6.1.4.1.59.1.5.3.1.1.1 .1.3.6.1.4.1.59.1.5.3.1.1.2 = STRING: "91" 1005 $ snmpgetnext -On -v 2c -c xxx dev1 1.3.6.1.4.1.59.1.5.3.1.1.2 .1.3.6.1.4.1.59.1.5.3.1.1.3 = STRING: "42" As I say, the types and values for those responses appear to be correct. Now I try an snmpwalk 1006 $ snmpwalk -On -v 2c -c copan psmdev1 1.3.6.1.4.1.59.1.5.3.1.1.2 .1.3.6.1.4.1.59.1.5.3.1.1.2 = STRING: "91" Observe that it gets back only one reply, which is unexpected. At least to me. Reading the FAQ, I see a suggestion made about "what if I can't see anything from the agent": http://www.net-snmp.org/docs/FAQ.html#Why_can_t_I_see_anything_from_the_agent_ Looking at that, I tried my walk with -d, and got this: 1010 $ snmpwalk -d -On -v 2c -c copan psmdev1 1.3.6.1.4.1.59.1.5.3.1.1.2 No log handling enabled - using stderr logging Sending 46 bytes to UDP: [10.9.0.41]:161->[0.0.0.0]:0 0000: 30 2C 02 01 01 04 05 63 6F 70 61 6E A1 20 02 04 0,.....copan. .. 0016: 13 AD 0D D0 02 01 00 02 01 00 30 12 30 10 06 0C ..........0.0... 0032: 2B 06 01 04 01 3B 01 05 03 01 01 02 05 00 +....;........ Received 48 byte packet from UDP: [10.9.0.41]:161->[0.0.0.0]:37913 0000: 30 2E 02 01 01 04 05 63 6F 70 61 6E A2 22 02 04 0......copan.".. 0016: 13 AD 0D D0 02 01 00 02 01 00 30 14 30 12 06 0C ..........0.0... 0032: 2B 06 01 04 01 3B 01 05 03 01 01 03 04 02 34 32 +....;........42 Sending 46 bytes to UDP: [10.9.0.41]:161->[0.0.0.0]:0 0000: 30 2C 02 01 01 04 05 63 6F 70 61 6E A0 20 02 04 0,.....copan. .. 0016: 13 AD 0D D1 02 01 00 02 01 00 30 12 30 10 06 0C ..........0.0... 0032: 2B 06 01 04 01 3B 01 05 03 01 01 02 05 00 +....;........ Received 48 byte packet from UDP: [10.9.0.41]:161->[0.0.0.0]:37913 0000: 30 2E 02 01 01 04 05 63 6F 70 61 6E A2 22 02 04 0......copan.".. 0016: 13 AD 0D D1 02 01 00 02 01 00 30 14 30 12 06 0C ..........0.0... 0032: 2B 06 01 04 01 3B 01 05 03 01 01 02 04 02 39 31 +....;........91 .1.3.6.1.4.1.59.1.5.3.1.1.2 = STRING: "91" This appears to fit the FAQs -- an A1 A0 followed by an A2 A0. From the FAQ, it appears this is a sign that my agent is "not doing what was expected". My question is: "okay, what was expected?" Feel free to tell me I've missed something fundamental, as I an very new at building SNMP agents. -- Charles R. (Charlie) Martin Senior Software Engineer SGI logo 1900 Pike Road Longmont, CO 80501 Phone: 303-532-0209 E-Mail: crmar...@sgi.com <mailto:crmar...@sgi.com> Website: www.sgi.com <http://www.sgi.com> ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders