Question

There is one simulator available using pySNMP called SNMP simulator.

It sets a default context name value. Is there anyway to set custom context name value for snmpv3 ?

Here is an extract from snmpsimd.py where i tried to give context name value.

config.addContext(snmpEngine, '')

Giving value as custom parameter is not setting value there.

Was it helpful?

Solution

If you are building an Agent, you should register your contextName at SnmpContext class instance. See examples here and here.

If your app is a Manager based on pysnmp's high-level API, you should pass contextName to getCmd/setCmd(). See example an here (search for contextName).

Please clarify your task if my suggestions do not help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top