diff options
Diffstat (limited to 'examples/hlapi/asyncore/agent')
4 files changed, 16 insertions, 13 deletions
diff --git a/examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py b/examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py index 8f48dbe9..43dddce8 100644 --- a/examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py +++ b/examples/hlapi/asyncore/agent/ntforg/default-v1-trap.py @@ -17,13 +17,7 @@ using the following options: Functionally similar to: -| $ snmptrap -v1 -c public demo.snmplabs.com \ -| 1.3.6.1.4.1.20408.4.1.1.2 \ -| 0.0.0.0 \ -| 1 \ -| 0 \ -| 0 -| '1.3.6.1.2.1.1.1.0' s 'my system' +| $ snmptrap -v1 -c public demo.snmplabs.com 1.3.6.1.4.1.20408.4.1.1.2 0.0.0.0 1 0 0 '1.3.6.1.2.1.1.1.0' s 'my system' """# from pysnmp.hlapi.asyncore import * diff --git a/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py b/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py index 05cad09b..d6c21c20 100644 --- a/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py +++ b/examples/hlapi/asyncore/agent/ntforg/multiple-informs-at-once.py @@ -12,6 +12,9 @@ Send multiple SNMP notifications at once using the following options: * with TRAP ID 'coldStart' specified as a MIB symbol * include managed object information specified as var-bind objects pair +| $ snmpinform -v2c -c public demo.snmplabs.com 123 1.3.6.1.6.3.1.1.5.1 +| $ snmpinform -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 demo.snmplabs.com 123 1.3.6.1.6.3.1.1.5.1 + """# from pysnmp.hlapi.asyncore import * @@ -19,13 +22,13 @@ from pysnmp.hlapi.asyncore import * # ( ( authData, transportTarget ), ... ) targets = ( # 1-st target (SNMPv2c over IPv4/UDP) - ( CommunityData('public'), - UdpTransportTarget(('demo.snmplabs.com', 162)), - ContextData() ), + (CommunityData('public'), + UdpTransportTarget(('demo.snmplabs.com', 162)), + ContextData()), # 2-nd target (SNMPv3 over IPv4/UDP) - ( UsmUserData('usr-md5-des', 'authkey1', 'privkey1'), - UdpTransportTarget(('demo.snmplabs.com', 162)), - ContextData() ), + (UsmUserData('usr-md5-des', 'authkey1', 'privkey1'), + UdpTransportTarget(('demo.snmplabs.com', 162)), + ContextData()), ) def cbFun(snmpEngine, sendRequestHandle, errorIndication, diff --git a/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py b/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py index 40175d11..7b9c877f 100644 --- a/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py +++ b/examples/hlapi/asyncore/agent/ntforg/multiple-traps-at-once.py @@ -13,6 +13,9 @@ wait for responses asynchronously: * with TRAP ID 'coldStart' specified as a MIB symbol * include managed object information specified as var-bind objects pair +| $ snmptrap -v1 -c public demo.snmplabs.com 1.3.6.1.4.1.20408.4.1.1.2 195.218.195.228 6 432 12345 1.3.6.1.2.1.1.1.0 s 'my system' +| $ snmptrap -v2c -c public demo.snmplabs.com 123 1.3.6.1.6.3.1.1.5.1 + """# from pysnmp.hlapi.asyncore import * diff --git a/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py b/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py index 80e7f2c2..9078873e 100644 --- a/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py +++ b/examples/hlapi/asyncore/agent/ntforg/running-multiple-snmp-engines-at-once.py @@ -25,6 +25,9 @@ data packet should be handed over. The selection criteria we employ here is based on peer's UDP port number. Other selection criterias are also possible. +| $ snmpinform -v2c -c public demo.snmplabs.com:1162 123 1.3.6.1.6.3.1.1.5.1 +| $ snmpinform -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 demo.snmplabs.com 123 1.3.6.1.6.3.1.1.5.1 + """# from pysnmp.hlapi.asyncore import * from pysnmp.carrier.asyncore.dispatch import AsyncoreDispatcher |