summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncore
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/asyncore')
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/custom-contextengineid-and-contextname.py6
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/custom-timeout-and-retries.py6
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py6
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/getbulk-multiple-oids-to-eom.py6
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py6
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py6
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/send-packets-from-specific-interface.py10
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/set-multiple-scalar-values.py10
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/usm-sha-aes128.py6
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/usm-sha-none.py8
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/v1-get.py6
-rw-r--r--examples/v3arch/asyncore/manager/cmdgen/v2c-set.py8
12 files changed, 42 insertions, 42 deletions
diff --git a/examples/v3arch/asyncore/manager/cmdgen/custom-contextengineid-and-contextname.py b/examples/v3arch/asyncore/manager/cmdgen/custom-contextengineid-and-contextname.py
index 1309c760..7bbf316c 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/custom-contextengineid-and-contextname.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/custom-contextengineid-and-contextname.py
@@ -6,12 +6,12 @@
# for MIB instance identified by contextEngineId: 8000000001020304,
# contextName: my-context
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# for an OID in tuple form
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpget -v3 -l authNoPriv -u usr-md5-none -A authkey1 -E 8000000001020304 -n my-context -ObentU 127.0.0.1:161 1.3.6.1.2.1.1.1.0
+# $ snmpget -v3 -l authNoPriv -u usr-md5-none -A authkey1 -E 8000000001020304 -n my-context -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.1.0
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -45,7 +45,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/custom-timeout-and-retries.py b/examples/v3arch/asyncore/manager/cmdgen/custom-timeout-and-retries.py
index f8523271..4b740aca 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/custom-timeout-and-retries.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/custom-timeout-and-retries.py
@@ -4,13 +4,13 @@
# Send a SNMP GET request
# with SNMPv2c, community 'public'
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# wait 3 seconds for response, retry 5 times (plus one initial attempt)
# for an OID in tuple form
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpget -v2c -c public -ObentU -r 5 -t 1 127.0.0.1 1.3.6.1.2.1.1.1.0
+# $ snmpget -v2c -c public -ObentU -r 5 -t 1 195.218.195.228 1.3.6.1.2.1.1.1.0
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -42,7 +42,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds',
timeout=300, # in 1/100 sec
retryCount=5
diff --git a/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py b/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py
index a9be86ec..3a625d34 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/getbulk-fetch-scalar-and-table-variables.py
@@ -4,14 +4,14 @@
# Send a series of SNMP GETBULK requests
# with SNMPv3 with user 'usr-md5-des', MD5 auth and DES privacy protocols
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# with values non-repeaters = 1, max-repetitions = 25
# for two OIDs in tuple form (first OID is non-repeating)
# stop on end-of-mib condition for both OIDs
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpbulkwalk -v3 -l authPriv -u usr-md5-des -A authkey1 -X privkey1 -C n1 -C r25 -ObentU 127.0.0.1 1.3.6.1.2.1.1 1.3.6.1.4.1.1
+# $ snmpbulkwalk -v3 -l authPriv -u usr-md5-des -A authkey1 -X privkey1 -C n1 -C r25 -ObentU 195.218.195.228 1.3.6.1.2.1.1 1.3.6.1.4.1.1
#
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413 import cmdgen
@@ -45,7 +45,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/getbulk-multiple-oids-to-eom.py b/examples/v3arch/asyncore/manager/cmdgen/getbulk-multiple-oids-to-eom.py
index 58a02325..6d862343 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/getbulk-multiple-oids-to-eom.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/getbulk-multiple-oids-to-eom.py
@@ -4,14 +4,14 @@
# Send a series of SNMP GETBULK requests
# with SNMPv2c, community 'public'
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# with values non-repeaters = 0, max-repetitions = 25
# for two OIDs in tuple form
# stop on end-of-mib condition for both OIDs
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpbulkwalk -v2c -c public -C n0 -C r25 -ObentU 127.0.0.1 1.3.6.1.2.1.1 1.3.6.1.4.1.1
+# $ snmpbulkwalk -v2c -c public -C n0 -C r25 -ObentU 195.218.195.228 1.3.6.1.2.1.1 1.3.6.1.4.1.1
#
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413 import cmdgen
@@ -43,7 +43,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py b/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
index b2cf9ad0..ca767461 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/getnext-multiple-oids-to-eom.py
@@ -4,13 +4,13 @@
# Send a series of SNMP GETNEXT requests
# with SNMPv1, community 'public'
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# for two OIDs in tuple form
# stop on end-of-mib condition for both OIDs
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpwalk -v1 -c public -ObentU 127.0.0.1 1.3.6.1.2.1.1 1.3.6.1.4.1.1
+# $ snmpwalk -v1 -c public -ObentU 195.218.195.228 1.3.6.1.2.1.1 1.3.6.1.4.1.1
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -42,7 +42,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py b/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py
index e026eda3..5d647b16 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/pull-subtree.py
@@ -4,13 +4,13 @@
# Send a series of SNMP GETNEXT requests
# with SNMPv3 with user 'usr-none-none', no auth and no privacy protocols
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# for an OID in string form
# stop whenever received OID goes out of initial prefix (it may be a table)
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpwalk -v3 -l noAuthNoPriv -u usr-none-none -ObentU 127.0.0.1:161 1.3.6.1.2.1.1
+# $ snmpwalk -v3 -l noAuthNoPriv -u usr-none-none -ObentU 195.218.195.228:161 1.3.6.1.2.1.1
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -46,7 +46,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/send-packets-from-specific-interface.py b/examples/v3arch/asyncore/manager/cmdgen/send-packets-from-specific-interface.py
index 9d31305a..0668a061 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/send-packets-from-specific-interface.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/send-packets-from-specific-interface.py
@@ -4,14 +4,14 @@
# Send a series of SNMP GETNEXT requests
# with SNMPv2c, community 'public'
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
-# sending packets from local interface 127.0.0.1, local port 1024
+# to an Agent at 195.218.195.228:161
+# sending packets from primary local interface 0.0.0.0, local port 1024
# for two OIDs in tuple 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 127.0.0.1 1.3.6.1.2.1.1 1.3.6.1.4.1.1
+# $ snmpwalk -v2c -c public -ObentU 195.218.195.228 1.3.6.1.2.1.1 1.3.6.1.4.1.1
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -39,11 +39,11 @@ config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 0)
config.addSocketTransport(
snmpEngine,
udp.domainName,
- udp.UdpSocketTransport().openClientMode(('127.0.0.1', 1024))
+ udp.UdpSocketTransport().openClientMode(('0.0.0.0', 1024))
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/set-multiple-scalar-values.py b/examples/v3arch/asyncore/manager/cmdgen/set-multiple-scalar-values.py
index 8a894c92..c663b602 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/set-multiple-scalar-values.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/set-multiple-scalar-values.py
@@ -4,12 +4,12 @@
# Send a SNMP SET request
# with SNMPv1 with community name 'private'
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# for OIDs in tuple form and an integer and string-typed values
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpset -v1 -c private -ObentU 127.0.0.1:161 1.3.6.1.2.1.1.1.0 s 'my value' 1.3.6.1.2.1.1.7.0 i 123
+# $ snmpset -v1 -c private -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.9.1.3.1 s 'my value' 1.3.6.1.2.1.1.9.1.4.1 t 123
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -42,7 +42,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
@@ -68,8 +68,8 @@ def cbFun(sendRequestHandle,
cmdgen.SetCommandGenerator().sendReq(
snmpEngine,
'my-router',
- ( ((1,3,6,1,2,1,1,1,0), rfc1902.OctetString('my value')),
- ((1,3,6,1,2,1,1,7,0), rfc1902.Integer(123)) ),
+ ( ((1,3,6,1,2,1,1,9,1,3,1), rfc1902.OctetString('my value')),
+ ((1,3,6,1,2,1,1,9,1,4,1), rfc1902.Integer(123)) ),
cbFun
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/usm-sha-aes128.py b/examples/v3arch/asyncore/manager/cmdgen/usm-sha-aes128.py
index dde6a766..70b1326a 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/usm-sha-aes128.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/usm-sha-aes128.py
@@ -4,12 +4,12 @@
# Send a SNMP GET request
# with SNMPv3 with user 'usr-sha-aes', SHA auth and AES128 privacy protocols
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# for an OID in tuple form
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpget -v3 -l authPriv -u usr-sha-aes -a SHA -A authkey1 -x AES -X privkey1 -ObentU 127.0.0.1:161 1.3.6.1.2.1.1.1.0
+# $ snmpget -v3 -l authPriv -u usr-sha-aes -a SHA -A authkey1 -x AES -X privkey1 -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.1.0
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -43,7 +43,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/usm-sha-none.py b/examples/v3arch/asyncore/manager/cmdgen/usm-sha-none.py
index ebcf7561..d9e970c8 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/usm-sha-none.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/usm-sha-none.py
@@ -4,12 +4,12 @@
# Send a SNMP SET request
# with SNMPv3 with user 'usr-sha-none', SHA auth and no privacy protocols
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# for an OID in tuple form and a string-typed value
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpset -v3 -l authNoPriv -u usr-sha-none -a SHA -A authkey1 -ObentU 127.0.0.1:161 1.3.6.1.2.1.1.1.0 s 'my new value'
+# $ snmpset -v3 -l authNoPriv -u usr-sha-none -a SHA -A authkey1 -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.9.1.3.1 s 'my new value'
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -43,7 +43,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
@@ -67,7 +67,7 @@ def cbFun(sendRequestHandle,
cmdgen.SetCommandGenerator().sendReq(
snmpEngine,
'my-router',
- ( ((1,3,6,1,2,1,1,1,0), rfc1902.OctetString('my new value')), ),
+ ( ((1,3,6,1,2,1,1,9,1,3,1), rfc1902.OctetString('my new value')), ),
cbFun
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/v1-get.py b/examples/v3arch/asyncore/manager/cmdgen/v1-get.py
index 2713cf4d..ed6f716c 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/v1-get.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/v1-get.py
@@ -4,12 +4,12 @@
# Send a SNMP GET request
# with SNMPv1, community 'public'
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# for an OID in tuple form
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpget -v1 -c public -ObentU 127.0.0.1 1.3.6.1.2.1.1.1.0
+# $ snmpget -v1 -c public -ObentU 195.218.195.228 1.3.6.1.2.1.1.1.0
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -41,7 +41,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
diff --git a/examples/v3arch/asyncore/manager/cmdgen/v2c-set.py b/examples/v3arch/asyncore/manager/cmdgen/v2c-set.py
index 8a7ceb73..2f3268f5 100644
--- a/examples/v3arch/asyncore/manager/cmdgen/v2c-set.py
+++ b/examples/v3arch/asyncore/manager/cmdgen/v2c-set.py
@@ -4,12 +4,12 @@
# Send a SNMP SET request
# with SNMPv2c with community name 'private'
# over IPv4/UDP
-# to an Agent at 127.0.0.1:161
+# to an Agent at 195.218.195.228:161
# for an OID in tuple form and an integer-typed value
#
# This script performs similar to the following Net-SNMP command:
#
-# $ snmpset -v2c -c private -ObentU 127.0.0.1:161 1.3.6.1.2.1.1.7.0 i 123
+# $ snmpset -v2c -c private -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.9.1.4.1 t 123
#
from pysnmp.entity import engine, config
from pysnmp.carrier.asynsock.dgram import udp
@@ -42,7 +42,7 @@ config.addSocketTransport(
)
config.addTargetAddr(
snmpEngine, 'my-router',
- udp.domainName, ('127.0.0.1', 161),
+ udp.domainName, ('195.218.195.228', 161),
'my-creds'
)
@@ -66,7 +66,7 @@ def cbFun(sendRequestHandle,
cmdgen.SetCommandGenerator().sendReq(
snmpEngine,
'my-router',
- ( ((1,3,6,1,2,1,1,7,0), rfc1902.Integer(123)), ),
+ ( ((1,3,6,1,2,1,1,9,1,4,1), rfc1902.Integer(123)), ),
cbFun
)