diff options
Diffstat (limited to 'examples/v3arch/asyncio/agent/cmdrsp/multiple-usm-users.py')
-rw-r--r-- | examples/v3arch/asyncio/agent/cmdrsp/multiple-usm-users.py | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/examples/v3arch/asyncio/agent/cmdrsp/multiple-usm-users.py b/examples/v3arch/asyncio/agent/cmdrsp/multiple-usm-users.py index cdc264b5..b0b7e5bd 100644 --- a/examples/v3arch/asyncio/agent/cmdrsp/multiple-usm-users.py +++ b/examples/v3arch/asyncio/agent/cmdrsp/multiple-usm-users.py @@ -1,25 +1,28 @@ -# -# Command Responder -# -# Listen and respond to SNMP GET/SET/GETNEXT/GETBULK queries with -# the following options: -# -# * SNMPv3 -# * with USM user 'usr-md5-des', auth: MD5, priv DES or -# with USM user 'usr-sha-none', auth: SHA, no privacy -# with USM user 'usr-sha-aes128', auth: SHA, priv AES -# * allow access to SNMPv2-MIB objects (1.3.6.1.2.1) -# * over IPv4/UDP, listening at 127.0.0.1:161 -# * using asyncio network transport (available since Python 3.4) -# -# Either of the following Net-SNMP's commands will walk this Agent: -# -# $ snmpwalk -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 localhost .1.3.6 -# $ snmpwalk -v3 -u usr-sha-none -l authNoPriv -a SHA -A authkey1 localhost .1.3.6 -# $ snmpwalk -v3 -u usr-sha-aes128 -l authPriv -a SHA -A authkey1 -x AES -X privkey1 localhost .1.3.6 -# -# Requires Python 3.4 and later! -# +""" +Multiple SNMP USM users ++++++++++++++++++++++++ + +Listen and respond to SNMP GET/SET/GETNEXT/GETBULK queries with +the following options: + +* SNMPv3 +* with USM user: + - 'usr-md5-des', auth: MD5, priv DES or + - 'usr-sha-none', auth: SHA, no privacy + - 'usr-sha-aes128', auth: SHA, priv AES +* allow access to SNMPv2-MIB objects (1.3.6.1.2.1) +* over IPv4/UDP, listening at 127.0.0.1:161 +* using asyncio network transport (available since Python 3.4) + +Either of the following Net-SNMP commands will walk this Agent: + +| $ snmpwalk -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 localhost .1.3.6 +| $ snmpwalk -v3 -u usr-sha-none -l authNoPriv -a SHA -A authkey1 localhost .1.3.6 +| $ snmpwalk -v3 -u usr-sha-aes128 -l authPriv -a SHA -A authkey1 -x AES -X privkey1 localhost .1.3.6 + +Requires Python 3.4 and later! + +"""# from pysnmp.entity import engine, config from pysnmp.entity.rfc3413 import cmdrsp, context from pysnmp.carrier.asyncio.dgram import udp |