diff options
Diffstat (limited to 'examples/v3arch/asyncore/agent/cmdrsp/listen-on-multiple-interfaces.py')
-rw-r--r-- | examples/v3arch/asyncore/agent/cmdrsp/listen-on-multiple-interfaces.py | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/examples/v3arch/asyncore/agent/cmdrsp/listen-on-multiple-interfaces.py b/examples/v3arch/asyncore/agent/cmdrsp/listen-on-multiple-interfaces.py index 8d67802c..25beef3f 100644 --- a/examples/v3arch/asyncore/agent/cmdrsp/listen-on-multiple-interfaces.py +++ b/examples/v3arch/asyncore/agent/cmdrsp/listen-on-multiple-interfaces.py @@ -1,19 +1,21 @@ -# -# Command Responder -# -# Listen and respond to SNMP GET/SET/GETNEXT/GETBULK queries with -# the following options: -# -# * SNMPv2c -# * with SNMP community "public" -# * allow access to SNMPv2-MIB objects (1.3.6.1.2.1) -# * over IPv4/UDP, listening at 127.0.0.1:161 and 127.0.0.2:161 interfaces -# -# Either of the following Net-SNMP's commands will walk this Agent: -# -# $ snmpwalk -v2c -c public 127.0.0.1 .1.3.6 -# $ snmpwalk -v2c -c public 127.0.0.2 .1.3.6 -# +""" +Listen on multiple network interfaces ++++++++++++++++++++++++++++++++++++++ + +Listen and respond to SNMP GET/SET/GETNEXT/GETBULK queries with +the following options: + +* SNMPv2c +* with SNMP community "public" +* allow access to SNMPv2-MIB objects (1.3.6.1.2.1) +* over IPv4/UDP, listening at 127.0.0.1:161 and 127.0.0.2:161 interfaces + +Either of the following Net-SNMP commands will walk this Agent: + +| $ snmpwalk -v2c -c public 127.0.0.1 .1.3.6 +| $ snmpwalk -v2c -c public 127.0.0.2 .1.3.6 + +"""# from pysnmp.entity import engine, config from pysnmp.entity.rfc3413 import cmdrsp, context from pysnmp.carrier.asyncore.dgram import udp |