I am using net-snmp-5.2.1 in linux environmrnt and implemented the
private MIBS in the snmp agent.

I am having an issue while implementing table type oids. I wanted to
implement POWER-ETHERNET-MIB in my agent.
I compiled the MIB using mib2c.create-dataset.conf and implemented my
own structure to handle read-write columns alone.

The oid is like .1.3.6.1.2.1.105.1.1.1.3.1.1,
.1.3.6.1.2.1.105.1.1.1.4.1.1 etc., tableinfo->colnum is returning
values like 3,4 etc., from the given oids.

So using the result of tableinfo->colnum in switch.. case .. I have
coded snmpget,snmpset,reserve1 etc.,

But if I do snmpget with single oid say

"snmpget -v1 -c public 192.168.9.1 .1.3.6.1.2.1.105.1.1.1.3.1.1" I am
getting the result.

If I do snmpget with multiple oids say,

"snmpget -v1 -c public 192.168.9.1 .1.3.6.1.2.1.105.1.1.1.3.1.1
.1.3.6.1.2.1.105.1.1.1.4.1.1"

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: POWER-ETHERNET-MIB::pethPsePortPowerPairsControlAbility.1.1

POWER-ETHERNET-MIB::pethPsePortAdminEnable.1.1 1


ie., Only the result of first oid is shown and for the second oid "No
Such name in the MIB" is
displayed.

Could anyone show me the way to implement the table type oid and that
has to work
for snmpget with multiple oids.

Pls see the attached C file I am using.

Thanks

Attachment: pethPsePortTable.c
Description: Binary data

Reply via email to