[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Agentx] Some confusion, while watching AgentX-Register-PDU in net-snmp 5.4



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 back and forth IO, 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.  Or it might just be
me not understanding the RFC.

The oids instance row I want to register are, I think, 
  from 
     netSnmp.netSnmpExperimental.netSnmpPlaypen.mraMIB.mraObjects
       .mraOneTable.mraOneEntry.mraOneNum.42."E"
    .1.3.6.1.4.1.8072.9999.9999.947.17.61.1.3.42.1.69
                                            ^
  to
     netSnmp.netSnmpExperimental.netSnmpPlaypen.mraMIB.mraObjects
      .mraOneTable.mraOneEntry.mraOneStr.42."E"
    .1.3.6.1.4.1.8072.9999.9999.947.17.61.1.5.42.1.69
                                            ^

That's .1.3.6.1.4.1.8072.9999.9999.947.17.61.1.[3-5].42.1.69
It's not [1-5] because the [1-2] range covers the OID of the
not-accessable 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
  flags = 0x01 (INSTANCE_REGISTRATION, !NETWORK_BYTE_ORDER)
  range_subid = 13
    {shouldn't this be 14?}
  oid
    n_subid = 12   prefix = 4
    suboids = 1.8072.9999.9999.947.17.61.1.3.42.1.69
  range = 5

The AgentX-Response-PDU received was
  flags = 0x01 (INSTANCE_REGISTRATION, !NETWORK_BYTE_ORDER)
  oid
    n_subid = 12   prefix = 4
    include = 0
    suboids = 1.8072.9999.9999.947.17.61.1.3.42.1.69
  oid
    n_subid = 12   prefix = 4
    include = 1 { according to RFC2741 line 725,
                  shouldnt this should always be zero? }
    suboids = 1.8072.9999.9999.947.17.61.5.3.42.1.69
                                        ^^^^^
      { shouldnt this be 1.8072.9999.9999.947.17.61.1.5.42.1.69 }
                                                   ^^^^^


Am I correctly understanding what I want to register?
That is, when 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 at mark.atwood.name         you've done anything at all.
http://mark.atwood.name/   http://fallenpegasus.livejournal.com/