From 12003152baf736001bb710acd5c0bd5d4d7b1fe0 Mon Sep 17 00:00:00 2001 From: elie Date: Tue, 4 Sep 2012 20:56:02 +0000 Subject: updates --- docs/pysnmp-tutorial.html | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'docs') diff --git a/docs/pysnmp-tutorial.html b/docs/pysnmp-tutorial.html index 2ff5f30..ec73863 100644 --- a/docs/pysnmp-tutorial.html +++ b/docs/pysnmp-tutorial.html @@ -362,7 +362,7 @@ applications are Manager, Agent and Proxy (

-PySNMP stands for a pure-Python SNMP implementation. This software deals with +PySNMP is a pure-Python SNMP engine implementation. This software deals with the darkest corners of SNMP specifications all in Python programming language.

@@ -383,8 +383,8 @@ functionality are available:

The most ancient and low-level is SNMPv1/v2c protocol scope. Here programmer is supposed to build/parse SNMP messages and their -payload -- Protocol Data Unit (PDU), handle protocol-level -errors, transport issues and so on. +payload -- Protocol Data Unit (PDU), +handle protocol-level errors, transport issues and so on.

@@ -423,7 +423,7 @@ start with.

The Applications API further simplifies Programmer's job by hiding LCD management issues (contrary to SNMPv3 engine level). This API could be -exploited in a one-liner fashion, for quick and simple prototyping. +exploited in a oneliner fashion, for quick and simple prototyping.

@@ -538,15 +538,15 @@ receiver in Manager Applications.

-As of this writing, one-liner Applications support generating Manager-side +As of this writing, oneliner Applications support generating Manager-side GET/SET/GETNEXT/GETBULK and issuing Agent-side TRAP/INFORM messages. Agent and Manager side responders are more complex and rarely used to fit -them into the concise one-liner API so these should be implemented on top of +them into the concise oneliner API so these should be implemented on top of standard SNMP Applications API.

-There're two kinds of APIs to one-line Applications: synchronous and +There're two kinds of APIs to oneline Applications: synchronous and asynchronous. They are very similar in terms of their API and behaviour, both are implemented by the pysnmp.entity.rfc3413.oneliner.cmdgen module. The @@ -1314,7 +1314,7 @@ if errorIndication:

-Asynchronous API to one-line Applications is actually a foundation for +Asynchronous API to oneliner Applications is actually a foundation for Synchronous version, so they're very similar. This Asynchronous API is useful for purposes such as running multiple, possibly different, SNMP Applications at the same time or handling other @@ -1578,7 +1578,7 @@ this example are the same for all targets. So the GETNEXT operation is performed

  • using SNMP v3
  • with SNMPv3 with user 'usr-md5-des', MD5 auth and DES privacy protocols
  • over IPv4/UDP -
  • against an Agents listening at 127.0.0.1, 192.168.1.1, 10.40.1.1 (port 161) +
  • against Agents listening at 127.0.0.1, 192.168.1.1, 10.40.1.1 (port 161)
  • for the SNMPv2-MIB::system subtree

    @@ -1807,13 +1807,14 @@ the same for all targets.
  • using SNMP v2c
  • with SNMPv2c community 'public'
  • over IPv4/UDP -
  • against an Agents listening at 127.0.0.1, 127.0.0.2, 127.0.0.3 (port 162) +
  • against Managers listening at 127.0.0.1, 127.0.0.2, 127.0.0.3 (port 162)

     from pysnmp.entity.rfc3413.oneliner import ntforg
    +from pysnmp.proto import rfc1902
     
     def cbFun(sendRequestHandle, errorIndication, cbCtx):
         if errorIndication:
    @@ -1830,22 +1831,30 @@ for target in ( ntforg.UdpTransportTarget(('127.0.0.1', 162)),
             ntforg.CommunityData('public'),
             target,
             'inform',
    -        '1.3.6.1.6.3.1.1.5.2',
    -        ( ntforg.MibVariable('SNMPv2-MIB', 'coldStart'), ),
    +        ntforg.MibVariable('SNMPv2-MIB', 'coldStart'),
    +        ( ('1.3.6.1.2.1.1.5.0', rfc1902.OctetString('system name')), ),
             (cbFun, None)
         )
     
    -ntforg.snmpEngine.transportDispatcher.runDispatcher()
    +ntfOrg.snmpEngine.transportDispatcher.runDispatcher()
     
    +

    +The above script terminates as all queries are either acknowledged +or timed out. With default timeout and retries settings, this will happen +in no longer than 6 seconds regardless of Managers avialability and +responsiveness. + +

    +

    2.1.3 Security configuration

    -Calls to one-line Applications API require Security Parameters and +Calls to oneliner Applications API require Security Parameters and Transport configuration objects as input parameters. These classes serve as convenience shortcuts to SNMP engine configuration facilities and for keeping persistent authentication/transport configuration @@ -2024,7 +2033,7 @@ of succesive request retries (5 times). On the protocol level, a Managed Object Instance is represented by a pair of Name and Value items collectively called a Variable-Binding. -In PySNMP one-liner API, a Managed Object Instance is represented by a +In PySNMP oneliner API, a Managed Object Instance is represented by a two-component sequence of two objects -- one represents Managed Object Name or Managed Object Instance Name, and the other - Managed Object Instance Value. The types of these objects may vary, details follow. @@ -2038,7 +2047,7 @@ Value. The types of these objects may vary, details follow. Managed Object or Managed Object Instance Name is an instance of ObjectName class which is derived from PyASN1 ObjectIdentifier. -In most cases, PySNMP one-liner API will automatically create an instance of +In most cases, PySNMP oneliner API will automatically create an instance of ObjectName class from its initialization value which can be:

    -- cgit v1.2.1