diff options
author | elie <elie> | 2013-05-05 11:11:51 +0000 |
---|---|---|
committer | elie <elie> | 2013-05-05 11:11:51 +0000 |
commit | 552d7336aa19f847c619c058881c9558e7d573f4 (patch) | |
tree | d713480581769fccbf3f76a0386e0c50afd327f9 /examples/v3arch/asyncore/agent | |
parent | 04c1a577a81f912655b1dc17e6783aa6f940dcbf (diff) | |
download | pysnmp-git-552d7336aa19f847c619c058881c9558e7d573f4.tar.gz |
Fix and significant logic rework of snmpCommunityTable to make it working
in both Generator and Responder modes and better follow RFC2576 requirements on sequential entries lookup and selection. As a side effect,
untagged snmpCommunityTable entries will *not* match tagged
snmpTargetAddrTable entries and vice versa.
Diffstat (limited to 'examples/v3arch/asyncore/agent')
9 files changed, 11 insertions, 10 deletions
diff --git a/examples/v3arch/asyncore/agent/ntforg/multiple-different-notifications-at-once.py b/examples/v3arch/asyncore/agent/ntforg/multiple-different-notifications-at-once.py index 655c4741..7b1be811 100644 --- a/examples/v3arch/asyncore/agent/ntforg/multiple-different-notifications-at-once.py +++ b/examples/v3arch/asyncore/agent/ntforg/multiple-different-notifications-at-once.py @@ -27,7 +27,7 @@ snmpEngine = engine.SnmpEngine() # SNMPv2c: # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds-1', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/asyncore/agent/ntforg/send-inform-to-multiple-managers.py b/examples/v3arch/asyncore/agent/ntforg/send-inform-to-multiple-managers.py index 82181955..e118bf1b 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-inform-to-multiple-managers.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-inform-to-multiple-managers.py @@ -23,7 +23,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/asyncore/agent/ntforg/send-notification-over-ipv4-and-ipv6.py b/examples/v3arch/asyncore/agent/ntforg/send-notification-over-ipv4-and-ipv6.py index 1a9aa65d..15725973 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-notification-over-ipv4-and-ipv6.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-notification-over-ipv4-and-ipv6.py @@ -22,7 +22,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/asyncore/agent/ntforg/send-packet-from-specific-address.py b/examples/v3arch/asyncore/agent/ntforg/send-packet-from-specific-address.py index c0b3504f..c4773dda 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-packet-from-specific-address.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-packet-from-specific-address.py @@ -20,7 +20,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv1 -> 0) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 0) diff --git a/examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py b/examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py index 562f465f..34aaac13 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py @@ -23,7 +23,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/asyncore/agent/ntforg/v1-trap.py b/examples/v3arch/asyncore/agent/ntforg/v1-trap.py index 62974ed0..d9e0269b 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v1-trap.py +++ b/examples/v3arch/asyncore/agent/ntforg/v1-trap.py @@ -28,7 +28,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv1 -> 0) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 0) diff --git a/examples/v3arch/asyncore/agent/ntforg/v2c-inform.py b/examples/v3arch/asyncore/agent/ntforg/v2c-inform.py index 00542111..7a27e3d8 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v2c-inform.py +++ b/examples/v3arch/asyncore/agent/ntforg/v2c-inform.py @@ -21,8 +21,9 @@ from pysnmp.proto.api import v2c # Create SNMP engine instance snmpEngine = engine.SnmpEngine() -# SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +# SecurityName <-> CommunityName mapping (+ transport binding) +config.addV1System(snmpEngine, 'my-area', 'public', + transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/asyncore/agent/ntforg/v2c-trap-via-notification-type.py b/examples/v3arch/asyncore/agent/ntforg/v2c-trap-via-notification-type.py index ab7a2a50..b86569a6 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v2c-trap-via-notification-type.py +++ b/examples/v3arch/asyncore/agent/ntforg/v2c-trap-via-notification-type.py @@ -66,7 +66,7 @@ mibInstrumCtl.mibBuilder.exportSymbols( # # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) diff --git a/examples/v3arch/asyncore/agent/ntforg/v2c-trap.py b/examples/v3arch/asyncore/agent/ntforg/v2c-trap.py index c5bc9330..337c3766 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v2c-trap.py +++ b/examples/v3arch/asyncore/agent/ntforg/v2c-trap.py @@ -22,7 +22,7 @@ from pysnmp.proto.api import v2c snmpEngine = engine.SnmpEngine() # SecurityName <-> CommunityName mapping -config.addV1System(snmpEngine, 'my-area', 'public') +config.addV1System(snmpEngine, 'my-area', 'public', transportTag='all-my-managers') # Specify security settings per SecurityName (SNMPv2c -> 1) config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 1) |