pysnmp
pysnmp copied to clipboard
nextCMD, Incorrect index conversion?
Hello guys,
I've been using pysnmp.hlapi.asyncio.nextCmd like this to access tables:
(errorIndication, errorStatus, errorIndex, varBinds) = await pysnmp.hlapi.asyncio.nextCmd(
self.snmpEngine,
pysnmp.hlapi.auth.CommunityData(communityIndex=self.__community, mpModel=self.__version),
pysnmp.hlapi.asyncio.transport.UdpTransportTarget((self.__host, 161)),
pysnmp.hlapi.context.ContextData(),
*varBinds,
lookupNames=True, lookupValues=True, lexicographicMode=False
)
I'm able to access IF-MIB perfectly fine with these varBinds:
But getting an error on IP-MIB::ipAddressTable using these:
Error:
An snmptable command reveals: snmptable -Ob -Ci -v 2c -c public localhost IP-MIB::ipAddressTable
Indexes: 1.4.10.0.0.1 1.4.10.0.0.255 etc...
Is this a bug in the pysnmp library, or am I accessing the table wrong?