Reputation: 31226
Using net-snmp, table code generated by mib2c -c mib2c.iterate.conf fooBarTable
and then heavily hacked.
Unfortunately the table is defined with an Entry of 2 instead of the normal 1. (I didn't do this, I'm trying to make this fit into an existing situation.) The MIB looks something like this:
fooBarTable OBJECT-TYPE
SYNTAX SEQUENCE OF FooBarEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "blah"
::= { fooMIBObjects 8 }
fooBarEntry OBJECT-TYPE
SYNTAX FooBarEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Stuff."
INDEX { ifIndex }
::= { fooBarTable 2 }
When you register the table with net-snmp, you just give it an OID like "...,1,8" (i.e. up to fooBarTable, but not including the Entry). Net-snmp implicitly tacks the .1 to the table OID and then columns, indices, etc.
Is there a semi-supported way to force that entry value to 2? (I.e. without resorting to hacking the bits out of the objects that are passed in to the handler.)
Upvotes: 2
Views: 306
Reputation: 22262
No, sorry: there is no supported way to do that. In part because the MIB you're staring at is not legal under SMIv2.
To implement it, you'd either need to change multiple spots in the agent/helper directory (starting near line 328 of table.c and probably other places) or implement a table entirely from scratch without using the helper modules at all.
But nothing mib2c gives you will solve this for you.
Upvotes: 2