I've been trying to build an AgentX subagent that registers a single row
instance inside a table. I'm using net-snmp 5.4

While debugging, I ran the subagent with -DALL, and then looked at all
the agentx, dumph_send, dumpv_send, dumpx_send, dumph_recv,
dumpv_recv, and dumpx_recv debug lines, along with a copy of RFC2471,
to watch what the subagent tells the snmpd.

I found something that confuses me, and I think it might be a bug in
net-snmp's client or server AgentX routines.

The oids instance row I want to register are, I think,
netSnmp.netSnmpExperimental.netSnmpPlaypen.mraMIB. mraObjects
netSnmp.netSnmpExperimental.netSnmpPlaypen.mraMIB. mraObjects

That's .[3-5].42.1.69
The [1-2] range covers the OID of the indexes of the table.

{Do I want to register the whole [1-5] range of the instance row
instead of just [3-5]?}

The AgentX-Register-PDU sent was
range_subid = 13
{shouldn't this be 14?}
n_subid = 12 prefix = 4
include = 0
suboids = 1.8072.9999.9999.947.
range = 5

The AgentX-Response-PDU received was
n_subid = 12 prefix = 4
include = 0
suboids = 1.8072.9999.9999.947.
n_subid = 12 prefix = 4
include = 1 { according to RFC2741 line 725,
shouldnt this should always be zero? }
suboids = 1.8072.9999.9999.947.
{ shouldnt this be 1.8072.9999.9999.947. }

So am understanding what I want to register? Which I register a
instance row, do I want to register just the part that has data, or
also the not-accessible index variables as well?

Is the range_subid in this case supposed to be 13 or 14?

Is the "include" in the second oid of the response varbindlist
supposed to be 0 or 1?

Isn't that a searchrange? If it is a searchrange, and its supposed to
be zero, that means its supposed to be *beyond* the end of my
registered instances.

If that's the case, what should it's OID value be, given that some
other subagent could also register a row in this table, with some
other value for the indexes?

Interestingly, my reading of the RFC doesnt say that these two OIDS
should be part of the AgentX-Response-PDU at all. Is that a bug as
well? It's certainly useful...

Mark Atwood When you do things right, people won't be sure
me@mark.atwood.name you've done anything at all.
http://mark.atwood.name/ http://fallenpegasus.livejournal.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.
Net-snmp-coders mailing list