summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncore/agent/cmdrsp/alternative-mib-tree.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/asyncore/agent/cmdrsp/alternative-mib-tree.py')
-rw-r--r--examples/v3arch/asyncore/agent/cmdrsp/alternative-mib-tree.py38
1 files changed, 20 insertions, 18 deletions
diff --git a/examples/v3arch/asyncore/agent/cmdrsp/alternative-mib-tree.py b/examples/v3arch/asyncore/agent/cmdrsp/alternative-mib-tree.py
index eabb989a..fa3bc6b5 100644
--- a/examples/v3arch/asyncore/agent/cmdrsp/alternative-mib-tree.py
+++ b/examples/v3arch/asyncore/agent/cmdrsp/alternative-mib-tree.py
@@ -1,21 +1,23 @@
-#
-# Command Responder
-#
-# Listen and respond to SNMP GET/SET/GETNEXT/GETBULK queries with
-# the following options:
-#
-# * SNMPv3
-# * with USM username usr-md5-none
-# * using alternative set of Managed Objects addressed by
-# contextEngineId: 8000000001020304, contextName: my-context
-# * allow access to SNMPv2-MIB objects (1.3.6.1.2.1)
-# * over IPv4/UDP, listening at 127.0.0.1:161
-#
-# Either of the following Net-SNMP's commands will walk this Agent:
-#
-# $ snmpwalk -v3 -u usr-md5-none -l authNoPriv -A authkey1 -E 8000000001020304 -n my-context 127.0.0.1 .1.3.6
-# $ snmpwalk -v3 -u usr-md5-none -l authNoPriv -A authkey1 -E 8000000001020304 127.0.0.1 .1.3.6
-#
+"""
+Serve non-default MIB tree
+++++++++++++++++++++++++++
+
+Listen and respond to SNMP GET/SET/GETNEXT/GETBULK queries with
+the following options:
+
+* SNMPv3
+* with USM username usr-md5-none
+* using alternative set of Managed Objects addressed by
+ contextEngineId: 8000000001020304, contextName: my-context
+* allow access to SNMPv2-MIB objects (1.3.6.1.2.1)
+* over IPv4/UDP, listening at 127.0.0.1:161
+
+Either of the following Net-SNMP commands will walk this Agent:
+
+| $ snmpwalk -v3 -u usr-md5-none -l authNoPriv -A authkey1 -E 8000000001020304 -n my-context 127.0.0.1 .1.3.6
+| $ snmpwalk -v3 -u usr-md5-none -l authNoPriv -A authkey1 -E 8000000001020304 127.0.0.1 .1.3.6
+
+"""#
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413 import cmdrsp, context
from pysnmp.carrier.asyncore.dgram import udp