Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextCMD, Incorrect index conversion? #369

Open
x-stride opened this issue Jun 19, 2020 · 0 comments
Open

nextCMD, Incorrect index conversion? #369

x-stride opened this issue Jun 19, 2020 · 0 comments

Comments

@x-stride
Copy link

x-stride commented Jun 19, 2020

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:
image

But getting an error on IP-MIB::ipAddressTable using these:
image

Error:
image

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant