⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc2262.txt

📁 RFC 的详细文档!
💻 TXT
📖 第 1 页 / 共 5 页
字号:
   the Dispatcher.

3.1.  messageProcessingModel

   The value of messageProcessingModel identifies a Message Processing
   Model.  A Message Processing Model describes the version-specific
   procedures for extracting data from messages, generating messages,
   calling upon a securityModel to apply its security services to
   messages, for converting data from a version-specific message format
   into a generic format usable by the Dispatcher, and for converting
   data from Dispatcher format into a version-specific message format.

3.2.  pduVersion

   The value of pduVersion represents a specific version of protocol
   operation and its associated PDU formats, such as SNMPv1 or SNMPv2
   [RFC1905].  The values of pduVersion are specific to the version of
   the PDU contained in a message, and the PDUs processed by
   applications. The Dispatcher does not use the value of pduVersion
   directly.

   An application specifies the pduVersion when it requests the PDU
   Dispatcher to send a PDU to another SNMP engine. The Dispatcher
   passes the pduVersion to a Message Processing Model, so it knows how
   to handle the PDU properly.



Case, et. al.               Standards Track                     [Page 6]

RFC 2262               SNMPv3 Management Protocol           January 1998


   For incoming messages, pduVersion is provided to the Dispatcher by a
   version-specific Message Processing module. The PDU Dispatcher passes
   the pduVersion to the application so it knows how to handle the PDU
   properly.  For example, a command responder application needs to know
   whether to use [RFC1905] elements of procedure and syntax instead of
   those specified for SNMPv1.

3.3.  pduType

   A value of pduType represents a specific type of protocol operation.
   The values of pduType are specific to the version of the PDU
   contained in a message.

   Applications register to support particular pduTypes for particular
   contextEngineIDs.

   For incoming messages, pduType is provided to the Dispatcher by a
   version-specific Message Processing module. It is subsequently used
   to dispatch the PDU to the application which registered for the
   pduType for the contextEngineID of the associated scopedPDU.

3.4.  sendPduHandle

   This handle is generated for coordinating the processing of requests
   and responses between the SNMP engine and an application. The handle
   must be unique across all version-specific Message Processing Models,
   and is of local significance only.

4.  Dispatcher Elements of Procedure

   This section describes the procedures followed by the Dispatcher when
   generating and processing SNMP messages.

4.1.  Sending an SNMP Message to the Network

   This section describes the procedure followed by an SNMP engine
   whenever it sends an SNMP message.

4.1.1.  Sending a Request or Notification

   The following procedures are followed by the Dispatcher when an
   application wants to send an SNMP PDU to another (remote)
   application, i.e., to initiate a communication by originating a
   message, such as one containing a request or a trap.

   1) The application requests this using the abstract service
      primitive:




Case, et. al.               Standards Track                     [Page 7]

RFC 2262               SNMPv3 Management Protocol           January 1998


       statusInformation =              -- sendPduHandle if success
                                        -- errorIndication if failure
         sendPdu(
         IN   transportDomain           -- transport domain to be used
         IN   transportAddress          -- destination network address
         IN   messageProcessingModel    -- typically, SNMP version
         IN   securityModel             -- Security Model to use
         IN   securityName              -- on behalf of this principal
         IN   securityLevel             -- Level of Security requested
         IN   contextEngineID           -- data from/at this entity
         IN   contextName               -- data from/in this context
         IN   pduVersion                -- the version of the PDU
         IN   PDU                       -- SNMP Protocol Data Unit
         IN   expectResponse            -- TRUE or FALSE
              )

   2) If the messageProcessingModel value does not represent a Message
      Processing Model known to the Dispatcher, then an errorIndication
      (implementation-dependent) is returned to the calling application.
      No further processing is performed.

   3) The Dispatcher generates a sendPduHandle to coordinate
      subsequent processing.

   4) The Message Dispatcher sends the request to the version-specific
      Message Processing module identified by messageProcessingModel
      using the abstract service primitive:

      statusInformation =              - success or error indication
        prepareOutgoingMessage(
        IN   transportDomain           -- as specified by application
        IN   transportAddress          -- as specified by application
        IN   messageProcessingModel    -- as specified by application
        IN   securityModel             -- as specified by application
        IN   securityName              -- as specified by application
        IN   securityLevel             -- as specified by application
        IN   contextEngineID           -- as specified by application
        IN   contextName               -- as specified by application
        IN   pduVersion                -- the version of the PDU
        IN   PDU                       -- as specified by application
        IN   expectResponse            -- as specified by application
        IN   sendPduHandle             -- as determined in step 3.
        OUT  destTransportDomain       -- destination transport domain
        OUT  destTransportAddress      -- destination transport address
        OUT  outgoingMessage           -- the message to send
        OUT  outgoingMessageLength     -- the message length
             )




Case, et. al.               Standards Track                     [Page 8]

RFC 2262               SNMPv3 Management Protocol           January 1998


   5) If the statusInformation indicates an error, the errorIndication
      is returned to the calling application.  No further processing is
      performed.

   6) If the statusInformation indicates success, the sendPduHandle is
      returned to the application, and the outgoingMessage is sent via
      the transport specified by the transportDomain to the address
      specified by the transportAddress.

   Outgoing Message Processing is complete.

4.1.2.  Sending a Response to the Network

   The following procedure is followed when an application wants to
   return a response back to the originator of an SNMP Request.

   1) An application can request this using the abstract service
      primitive:

      returnResponsePDU(
       IN   messageProcessingModel   -- typically, SNMP version
       IN   securityModel            -- Security Model in use
       IN   securityName             -- on behalf of this principal
       IN   securityLevel            -- same as on incoming request
       IN   contextEngineID          -- data from/at this SNMP entity
       IN   contextName              -- data from/in this context
       IN   pduVersion               -- the version of the PDU
       IN   PDU                      -- SNMP Protocol Data Unit
       IN   maxSizeResponseScopedPDU -- maximum size of Response PDU
       IN   stateReference           -- reference to state information
                                     -- as presented with the request
       IN   statusInformation        -- success or errorIndication
       )                             -- (error counter OID and value
                                     -- when errorIndication)

   2) The Message Dispatcher sends the request to the appropriate
      Message Processing Model indicated by the received value of
      messageProcessingModel using the abstract service primitive:

      result =                        -- SUCCESS or errorIndication
       prepareResponseMessage(
       IN   messageProcessingModel   -- specified by application
       IN   securityModel            -- specified by application
       IN   securityName             -- specified by application
       IN   securityLevel            -- specified by application
       IN   contextEngineID          -- specified by application
       IN   contextName              -- specified by application
       IN   pduVersion               -- specified by application



Case, et. al.               Standards Track                     [Page 9]

RFC 2262               SNMPv3 Management Protocol           January 1998


       IN   PDU                      -- specified by application
       IN   maxSizeResponseScopedPDU -- specified by application
       IN   stateReference           -- specified by application
       IN   statusInformation        -- specified by application
       OUT  destTransportDomain      -- destination transport domain
       OUT  destTransportAddress     -- destination transport address
       OUT  outgoingMessage          -- the message to send
       OUT  outgoingMessageLength    -- the message length
            )

   3) If the result is an errorIndication, the errorIndication is
      returned to the calling application.  No further processing is
      performed.

   4) If the result is success, the outgoingMessage is sent over the
      transport specified by the transportDomain to the address
      specified by the transportAddress.

   Message Processing is complete.

4.2.  Receiving an SNMP Message from the Network

   This section describes the procedure followed by an SNMP engine
   whenever it receives an SNMP message.

   Please note, that for the sake of clarity and to prevent the text
   from being even longer and more complicated, some details were
   omitted from the steps below.  In particular, The elements of
   procedure do not always explicitly indicate when state information
   needs to be released. The general rule is that if state information
   is available when a message is to be "discarded without further
   processing", then the state information must also be released at that
   same time.

4.2.1.  Message Dispatching of received SNMP Messages

   1) The snmpInPkts counter [RFC1907] is incremented.

   2) The version of the SNMP message is determined in an
      implementation-dependent manner.  If the packet cannot be
      sufficiently parsed to determine the version of the SNMP message,
      then the snmpInASNParseErrs [RFC1907] counter is incremented, and
      the message is discarded without further processing.  If the
      version is not supported, then the snmpInBadVersions [RFC1907]
      counter is incremented, and the message is discarded without
      further processing.





Case, et. al.               Standards Track                    [Page 10]

RFC 2262               SNMPv3 Management Protocol           January 1998


   3) The origin transportDomain and origin transportAddress are
      determined.

   4) The message is passed to the version-specific Message Processing
      Model which returns the abstract data elements required by the
      Dispatcher.  This is performed using the abstract service
      primitive:

      result =                        -- SUCCESS or errorIndication
        prepareDataElements(
        IN   transportDomain          -- origin as determined in step 3.
        IN   transportAddress         -- origin as determined in step 3.
        IN   wholeMsg                 -- as received from the network
        IN   wholeMsgLength           -- as received from the network
        OUT  messageProcessingModel   -- typically, SNMP version
        OUT  securityModel            -- Security Model to use
        OUT  securityName             -- on behalf of this principal
        OUT  securityLevel            -- Level of Security requested
        OUT  contextEngineID          -- data from/at this entity
        OUT  contextName              -- data from/in this context
        OUT  pduVersion               -- the version of the PDU
        OUT  PDU                      -- SNMP Protocol Data Unit
        OUT  pduType                  -- SNMP PDU type
        OUT  sendPduHandle            -- handle for a matched request
        OUT  maxSizeResponseScopedPDU -- maximum size of Response PDU
        OUT  statusInformation        -- success or errorIndication
                                      -- (error counter OID and value
                                      -- when errorIndication)
        OUT  stateReference           -- reference to state information
                                      -- to be used for a possible
             )                        -- Response

   5) If the result is a FAILURE errorIndication, the message is
      discarded without further processing.

   6) At this point, the abstract data elements have been prepared and
      processing continues as described in Section 4.2.2, PDU
      Dispatching for Incoming Messages.

4.2.2.  PDU Dispatching for Incoming Messages

   The elements of procedure for the dispatching of PDUs depends on the
   value of sendPduHandle.  If the value of sendPduHandle is <none>,
   then this is a request or notification and the procedures specified
   in Section 4.2.2.1 apply.  If the value of snmpPduHandle is not
   <none>, then this is a response and the procedures specified in
   Section 4.2.2.2 apply.




Case, et. al.               Standards Track                    [Page 11]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -