diff options
author | elie <elie> | 2014-06-15 12:45:12 +0000 |
---|---|---|
committer | elie <elie> | 2014-06-15 12:45:12 +0000 |
commit | bfd8265873b24d0124bfa23eec615bf4fc85ddad (patch) | |
tree | 04a92937bd236e0b834e7d55d886dc0cfc6b33ea /examples | |
parent | fb2b229bfca8464dc9584c3235dd541d7d1859c7 (diff) | |
download | pysnmp-git-bfd8265873b24d0124bfa23eec615bf4fc85ddad.tar.gz |
echo back an OCTET STRING, not request values
Diffstat (limited to 'examples')
-rw-r--r-- | examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py b/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py index e78b05d3..bc2d87c5 100644 --- a/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py +++ b/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py @@ -13,7 +13,7 @@ # # The following Net-SNMP's command will send GET request to this Agent: # -# $ snmpget -v3 -u usr-none-none -l noAuthNoPriv -n my-context 127.0.0.1 sysDescr.0 +# $ snmpget -v3 -u usr-none-none -l noAuthNoPriv -n my-context -Ir 127.0.0.1 sysDescr.0 # from pysnmp.entity import engine, config from pysnmp.entity.rfc3413 import cmdrsp, context @@ -51,7 +51,7 @@ snmpContext = context.SnmpContext(snmpEngine) # always echos request var-binds in response. class EchoMibInstrumController(instrum.AbstractMibInstrumController): def readVars(self, vars, acInfo=(None, None)): - return vars + return [ (ov[0], v2c.OctetString('You queried OID %s' % ov[0])) for ov in vars] # Create a custom Management Instrumentation Controller and register at # SNMP Context under ContextName 'my-context' |