From 2f24177c361ba4d9deba2d7378f84aa96111db80 Mon Sep 17 00:00:00 2001 From: elie Date: Mon, 14 Sep 2015 05:20:24 +0000 Subject: * synchronous oneliner apps redesigned to offer Python generator-based API along with a more comprehensive set of accepted parameters. * massively documented (in Sphinx, NumPy style) --- .../cmdgen/getnext-v2c-from-specific-address.py | 39 ++++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'examples/v3arch/asyncio/manager/cmdgen/getnext-v2c-from-specific-address.py') diff --git a/examples/v3arch/asyncio/manager/cmdgen/getnext-v2c-from-specific-address.py b/examples/v3arch/asyncio/manager/cmdgen/getnext-v2c-from-specific-address.py index e50eac8..10a97eb 100644 --- a/examples/v3arch/asyncio/manager/cmdgen/getnext-v2c-from-specific-address.py +++ b/examples/v3arch/asyncio/manager/cmdgen/getnext-v2c-from-specific-address.py @@ -1,21 +1,24 @@ -# -# GETNEXT Command Generator -# -# Send a series of SNMP GETNEXT requests -# with SNMPv2c, community 'public' -# using Asyncio framework for network transport -# over IPv4/UDP -# to an Agent at 195.218.195.228:161 -# sending packets from any local interface (0.0.0.0), local port 61024 -# for two OIDs in string form -# stop on end-of-mib condition for both OIDs -# -# This script performs similar to the following Net-SNMP command: -# -# $ snmpwalk -v2c -c public -ObentU 195.218.195.228 1.3.6.1.2.1.1 1.3.6.1.4.1.1 -# -# Requires Python 3.4 and later! -# +""" +Send packets from specific local interface +++++++++++++++++++++++++++++++++++++++++++ + +Send a series of SNMP GETNEXT requests with the following options: + +* with SNMPv2c, community 'public' +* using Asyncio framework for network transport +* over IPv4/UDP +* to an Agent at 195.218.195.228:161 +* sending packets from any local interface (0.0.0.0), local port 61024 +* for two OIDs in string form +* stop on end-of-mib condition for both OIDs + +This script performs similar to the following Net-SNMP command: + +| $ snmpwalk -v2c -c public -ObentU 195.218.195.228 1.3.6.1.2.1.1 1.3.6.1.4.1.1 + +Requires Python 3.4 and later! + +"""# from pysnmp.entity import engine, config from pysnmp.proto import rfc1905 from pysnmp.entity.rfc3413.asyncio import cmdgen -- cgit v1.2.1