summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncio/manager/ntfrcv/v2c-multiple-interfaces.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/asyncio/manager/ntfrcv/v2c-multiple-interfaces.py')
-rw-r--r--examples/v3arch/asyncio/manager/ntfrcv/v2c-multiple-interfaces.py42
1 files changed, 22 insertions, 20 deletions
diff --git a/examples/v3arch/asyncio/manager/ntfrcv/v2c-multiple-interfaces.py b/examples/v3arch/asyncio/manager/ntfrcv/v2c-multiple-interfaces.py
index a5fa241..30dc511 100644
--- a/examples/v3arch/asyncio/manager/ntfrcv/v2c-multiple-interfaces.py
+++ b/examples/v3arch/asyncio/manager/ntfrcv/v2c-multiple-interfaces.py
@@ -1,23 +1,25 @@
-#
-# Notification Receiver
-#
-# Receive SNMP TRAP/INFORM messages with the following options:
-#
-# * SNMPv1/SNMPv2c
-# * with SNMP community "public"
-# * over IPv4/UDP, listening at 127.0.0.1:162
-# over IPv4/UDP, listening at 127.0.0.1:2162
-# * using Asyncio framework for network transport
-# * print received data on stdout
-#
-# Either of the following Net-SNMP's commands will send notifications to this
-# receiver:
-#
-# $ snmptrap -v2c -c public 127.0.0.1:162 123 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.5.0 s test
-# $ snmpinform -v2c -c public 127.0.0.1:2162 123 1.3.6.1.6.3.1.1.5.1
-#
-# Requires Python 3.4 and later!
-#
+"""
+Serving multiple network interfaces
++++++++++++++++++++++++++++++++++++
+
+Receive SNMP TRAP/INFORM messages with the following options:
+
+* SNMPv1/SNMPv2c
+* with SNMP community "public"
+* over IPv4/UDP, listening at 127.0.0.1:162
+ over IPv4/UDP, listening at 127.0.0.1:2162
+* using Asyncio framework for network transport
+* print received data on stdout
+
+Either of the following Net-SNMP commands will send notifications to this
+receiver:
+
+| $ snmptrap -v2c -c public 127.0.0.1:162 123 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.5.0 s test
+| $ snmpinform -v2c -c public 127.0.0.1:2162 123 1.3.6.1.6.3.1.1.5.1
+
+Requires Python 3.4 and later!
+
+"""#
from pysnmp.entity import engine, config
from pysnmp.carrier.asyncio.dgram import udp
from pysnmp.entity.rfc3413 import ntfrcv