home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / rfc / 3 / rfc2262.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  86.2 KB  |  2,186 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                            J. Case
  8. Request for Comments: 2262                           SNMP Research, Inc.
  9. Category: Standards Track                                  D. Harrington
  10.                                                  Cabletron Systems, Inc.
  11.                                                               R. Presuhn
  12.                                                       BMC Software, Inc.
  13.                                                                B. Wijnen
  14.                                                IBM T. J. Watson Research
  15.                                                             January 1998
  16.  
  17.  
  18.                Message Processing and Dispatching for the
  19.                Simple Network Management Protocol (SNMP)
  20.  
  21. Status of this Memo
  22.  
  23.    This document specifies an Internet standards track protocol for the
  24.    Internet community, and requests discussion and suggestions for
  25.    improvements.  Please refer to the current edition of the "Internet
  26.    Official Protocol Standards" (STD 1) for the standardization state
  27.    and status of this protocol.  Distribution of this memo is unlimited.
  28.  
  29. Copyright Notice
  30.  
  31.    Copyright (C) The Internet Society (1997).  All Rights Reserved.
  32.  
  33. Abstract
  34.  
  35.    This document describes the Message Processing and Dispatching for
  36.    SNMP messages within the SNMP architecture [RFC2261].  It defines the
  37.    procedures for dispatching potentially multiple versions of SNMP
  38.    messages to the proper SNMP Message Processing Models, and for
  39.    dispatching PDUs to SNMP applications.  This document also describes
  40.    one Message Processing Model - the SNMPv3 Message Processing Model.
  41.  
  42. Table of Contents
  43.  
  44.    1. Introduction ...............................................    2
  45.    2. Overview ...................................................    3
  46.    2.1. The Dispatcher. ..........................................    5
  47.    2.2. Message Processing Subsystem .............................    5
  48.    3. Elements of Message Processing and Dispatching .............    6
  49.    3.1. messageProcessingModel ...................................    6
  50.    3.2. pduVersion ...............................................    6
  51.    3.3. pduType ..................................................    7
  52.    3.4. sendPduHandle ............................................    7
  53.    4. Dispatcher Elements of Procedure ...........................    7
  54.    4.1. Sending an SNMP Message to the Network ...................    7
  55.  
  56.  
  57.  
  58. Case, et. al.               Standards Track                     [Page 1]
  59.  
  60. RFC 2262               SNMPv3 Management Protocol           January 1998
  61.  
  62.  
  63.    4.1.1. Sending a Request or Notification ......................    7
  64.    4.1.2. Sending a Response to the Network ......................    9
  65.    4.2. Receiving an SNMP Message from the Network ...............   10
  66.    4.2.1. Message Dispatching of received SNMP Messages ..........   10
  67.    4.2.2. PDU Dispatching for Incoming Messages ..................   11
  68.    4.2.2.1. Incoming Requests and Notifications ..................   12
  69.    4.2.2.2. Incoming Responses ...................................   13
  70.    4.3. Application Registration for Handling PDU types ..........   14
  71.    4.4. Application Unregistration for Handling PDU Types ........   14
  72.    5. Definitions ................................................   15
  73.    5.1. Definitions for SNMP Message Processing and Dispatching ..   15
  74.    6. The SNMPv3 Message Format ..................................   18
  75.    6.1. msgVersion ...............................................   19
  76.    6.2. msgID ....................................................   19
  77.    6.3. msgMaxSize ...............................................   19
  78.    6.4. msgFlags .................................................   20
  79.    6.5. msgSecurityModel .........................................   22
  80.    6.6. msgSecurityParameters ....................................   22
  81.    6.7. scopedPduData ............................................   22
  82.    6.8. scopedPDU ................................................   22
  83.    6.8.1. contextEngineID ........................................   22
  84.    6.8.2. contextName ............................................   23
  85.    6.8.3. data ...................................................   23
  86.    7. Elements of Procedure for v3MP .............................   23
  87.    7.1. Prepare an Outgoing SNMP Message .........................   24
  88.    7.2. Prepare Data Elements from an Incoming SNMP Message ......   29
  89.    8. Intellectual Property ......................................   34
  90.    9. Acknowledgements ...........................................   35
  91.    10. Security Considerations ...................................   36
  92.    11. References ................................................   36
  93.    12. Editors' Addresses ........................................   38
  94.    13. Full Copyright Statement ..................................   39
  95.  
  96. 1.  Introduction
  97.  
  98.    The Architecture for describing Internet Management Frameworks
  99.    [RFC2261] describes that an SNMP engine is composed of:
  100.  
  101.         1) a Dispatcher
  102.         2) a Message Processing Subsystem,
  103.         3) a Security Subsystem, and
  104.         4) an Access Control Subsystem.
  105.  
  106.    Applications make use of the services of these subsystems.
  107.  
  108.    It is important to understand the SNMP architecture and its
  109.    terminology to understand where the Message Processing Subsystem and
  110.    Dispatcher described in this document fit into the architecture and
  111.  
  112.  
  113.  
  114. Case, et. al.               Standards Track                     [Page 2]
  115.  
  116. RFC 2262               SNMPv3 Management Protocol           January 1998
  117.  
  118.  
  119.    interact with other subsystems within the architecture.  The reader
  120.    is expected to have read and understood the description of the SNMP
  121.    architecture, defined in [RFC2261].
  122.  
  123.    The Dispatcher in the SNMP engine sends and receives SNMP messages.
  124.    It also dispatches SNMP PDUs to SNMP applications. When an SNMP
  125.    message needs to be prepared or when data needs to be extracted from
  126.    an SNMP message, the Dispatcher delegates these tasks to a message
  127.    version-specific Message Processing Model within the Message
  128.    Processing Subsystem.
  129.  
  130.    A Message Processing Model is responsibile for processing a SNMP
  131.    version-specific message and for coordinating the interaction with
  132.    the Security Subsystem to ensure proper security is applied to the
  133.    SNMP message being handled.
  134.  
  135.    Interactions between the Dispatcher, the Message Processing
  136.    Subsystem, and applications are modelled using abstract data elements
  137.    and abstract service interface primitives defined by the SNMP
  138.    architecture.
  139.  
  140.    Similarly, interactions between the Message Processing Subsystem and
  141.    the Security Subsystem are modelled using abstract data elements and
  142.    abstract service interface primitives as defined by the SNMP
  143.    architecture.
  144.  
  145.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  146.    "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this
  147.    document are to be interpreted as described in RFC 2119.
  148.  
  149. 2.  Overview
  150.  
  151.    The following illustration depicts the Message Processing in relation
  152.    to  SNMP applications, the Security Subsystem and Transport Mappings.
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Case, et. al.               Standards Track                     [Page 3]
  171.  
  172. RFC 2262               SNMPv3 Management Protocol           January 1998
  173.  
  174.  
  175.    +-------------------------------------------------------------------+
  176.    | SNMP Entity                                                       |
  177.    |                                                                   |
  178.    | +---------------------------------------------------------------+ |
  179.    | | Applications                                                  | |
  180.    | | +-----------+  +--------------+                               | |
  181.    | | | Command   |  | Notification |                               | |
  182.    | | | Generator |  | Originator   | +-----------+ +--------------+| |
  183.    | | +-----------+  +--------------+ | Proxy     | | Other         | |
  184.    | | +-----------+  +--------------+ | Forwarder | |Application(s)|| |
  185.    | | | Command   |  | Notification | +-----------+ +--------------+| |
  186.    | | | Responder |  | Receiver     |                               | |
  187.    | | +-----------+  +--------------+                               | |
  188.    | +---------------------------------------------------------------+ |
  189.    |        ^                ^               ^           ^             |
  190.    |        |                |               |           |             |
  191.    |        v                v               v           v             |
  192.    |        +--------+-------+---------------+-----------+             |
  193.    |                 ^                                                 |
  194.    |                 |    +---------------------+  +-----------------+ |
  195.    |                 |    | Message Processing  |  | Security        | |
  196.    | Dispatcher      v    | Subsystem           |  | Subsystem       | |
  197.    | +------------------+ |     +------------+  |  |                 | |
  198.    | | PDU Dispatcher   | |  +->| v1MP     * |<--->| +-------------+ | |
  199.    | |                  | |  |  +------------+  |  | | Other       | | |
  200.    | |                  | |  |  +------------+  |  | | Security    | | |
  201.    | |                  | |  +->| v2cMP    * |<--->| | Model       | | |
  202.    | | Message          | |  |  +------------+  |  | +-------------+ | |
  203.    | | Dispatcher  <-------->+                  |  |                 | |
  204.    | |                  | |  |  +------------+  |  | +-------------+ | |
  205.    | |                  | |  +->| v3MP     * |<--->| | User-based  | | |
  206.    | | Transport        | |  |  +------------+  |  | | Security    | | |
  207.    | | Mapping          | |  |  +------------+  |  | | Model       | | |
  208.    | | (e.g RFC1906)    | |  +->| otherMP  * |<--->| +-------------+ | |
  209.    | +------------------+ |     +------------+  |  |                 | |
  210.    |          ^           +---------------------+  +-----------------+ |
  211.    |          |                                                        |
  212.    +----------|--------------------------------------------------------+
  213.               v
  214.      +------------------+
  215.      |   Network        |
  216.      +------------------+
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Case, et. al.               Standards Track                     [Page 4]
  227.  
  228. RFC 2262               SNMPv3 Management Protocol           January 1998
  229.  
  230.  
  231. 2.1.  The Dispatcher.
  232.  
  233.    The Dispatcher is a key piece of an SNMP engine. There is only one in
  234.    an SNMP engine, and its job is to dispatch tasks to the multiple
  235.    version-specific Message Processing Models, and to dispatch PDUs to
  236.    various applications.
  237.  
  238.    For outgoing messages, an application provides a PDU to be sent, plus
  239.    the data needed to prepare and send the message, and the application
  240.    specifies which version-specific Message Processing Model will be
  241.    used to prepare the message with the desired security processing.
  242.    Once the message is prepared, the Dispatcher sends the message.
  243.  
  244.    For incoming messages, the Dispatcher determines the SNMP version of
  245.    the incoming message and passes the message to the version-specific
  246.    Message Processing Model to extract the components of the message and
  247.    to coordinate the processing of security services for the message.
  248.    After version-specific processing, the PDU Dispatcher determines
  249.    which application, if any, should receive the PDU for processing and
  250.    forwards it accordingly.
  251.  
  252.    The Dispatcher, while sending and receiving SNMP messages, collects
  253.    statistics about SNMP messages and the behavior of the SNMP engine in
  254.    managed objects to make them accessible to remote SNMP entities.
  255.    This document defines these managed objects, the MIB module which
  256.    contains them, and how these managed objects might be used to provide
  257.    useful management.
  258.  
  259. 2.2.  Message Processing Subsystem
  260.  
  261.    The SNMP Message Processing Subsystem is the part of an SNMP engine
  262.    which interacts with the Dispatcher to handle the version-specific
  263.    SNMP messages. It contains one or more Message Processing Models.
  264.  
  265.    This document describes one Message Processing Model, the SNMPv3
  266.    Message Processing Model, in Section 6. The SNMPv3 Message Processing
  267.    Model is defined in a separate section to show that multiple
  268.    (independent) Message Processing Models can exist at the same time
  269.    and that such Models can be described in different documents. The
  270.    SNMPv3 Message Processing Model can be replaced or supplemented with
  271.    other Message Processing Models in the future. Two Message Processing
  272.    Models which are expected to be developed in the future are the
  273.    SNMPv1 message format [RFC1157] and the SNMPv2c message format
  274.    [RFC1901].  Others may be developed as needed.
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Case, et. al.               Standards Track                     [Page 5]
  283.  
  284. RFC 2262               SNMPv3 Management Protocol           January 1998
  285.  
  286.  
  287. 3.  Elements of Message Processing and Dispatching
  288.  
  289.    See [RFC2261] for the definitions of
  290.            contextEngineID
  291.            contextName
  292.            scopedPDU
  293.            maxSizeResponseScopedPDU
  294.            securityModel
  295.            securityName
  296.            securityLevel
  297.            messageProcessingModel
  298.  
  299.    For incoming messages, a version-specific message processing module
  300.    provides these values to the Dispatcher. For outgoing messages, an
  301.    application provides these values to the Dispatcher.
  302.  
  303.    For some version-specific processing, the values may be extracted
  304.    from received messages; for other versions, the values may be
  305.    determined by algorithm, or by an implementation-defined mechanism.
  306.    The mechanism by which the value is determined is irrelevant to the
  307.    Dispatch   2.2. Message Pwing additional or expanded definitions are for use within
  308.    the Dispatcher.
  309.  
  310. 3.1.  messageProcessingModel
  311.  
  312.    The value of messageProcessingModel identifies a Message Processing
  313.    Model.  A Message Processing Model describes the version-specific
  314.    procedures for extracting data from messages, generating messages,
  315.    calling upon a securityModel to apply its security services to
  316.    messages, for converting data from a version-specific message format
  317.    into a generic format usable by the Dispatcher, and for converting
  318.    data from Dispatcher format into a version-specific message format.
  319.  
  320. 3.2.  pduVersion
  321.  
  322.    The value of pduVersion represents a specific version of protocol
  323.    operation and its associated PDU formats, such as SNMPv1 or SNMPv2
  324.    [RFC1905].  The values of pduVersion are specific to the version of
  325.    the PDU contained in a message, and the PDUs processed by
  326.    applications. The Dispatcher does not use the value of pduVersion
  327.    directly.
  328.  
  329.    An application specifies the pduVersion when it requests the PDU
  330.    Dispatcher to send a PDU to another SNMP engine. The Dispatcher
  331.    passes the pduVersion to a Message Processing Model, so it knows how
  332.    to handle the PDU properly.
  333.  
  334.  
  335.  
  336. Case, et. al.               Standards Track                     [Page 6]
  337.  
  338. RFC 2262               SNMPv3 Management Protocol           January 1998
  339.  
  340.  
  341.    For incoming messages, pduVersion is provided to the Dispatcher by a
  342.    version-specific Message Processing module. The PDU Dispatcher passes
  343.    the pduVersion to the application so it knows how to handle the PDU
  344.    properly.  For example, a command responder application needs to know
  345.    whether to use [RFC1905] elements of procedure and syntax instead of
  346.    those specified for SNMPv1.
  347.  
  348. 3.3.  pduType
  349.  
  350.    A value of pduType represents a specific type of protocol operation.
  351.    The values of pduType are specific to the version of the PDU
  352.    contained in a message.
  353.  
  354.    Applications register to support particular pduTypes for particular
  355.    contextEngineIDs.
  356.  
  357.    For incoming messages, pduType is provided to the Dispatcher by a
  358.    version-specific Message Processing module. It is subsequently used
  359.    to dispatch the PDU to the application which registered for the
  360.    pduType for the contextEngineID of the associated scopedPDU.
  361.  
  362. 3.4.  sendPduHandle
  363.  
  364.    This handle is generated for coordinating the processing of requests
  365.    and responses between the SNMP engine and an application. The handle
  366.    must be unique across all version-specific Message Processing Models,
  367.    and is of local significance only.
  368.  
  369. 4.  Dispatcher Elements of Procedure
  370.  
  371.    This section describes the procedures followed by the Dispatcher when
  372.    generating and processing SNMP messages.
  373.  
  374. 4.1.  Sending an SNMP Message to the Network
  375.  
  376.    This section describes the procedure followed by an SNMP engine
  377.    whenever it sends an SNMP message.
  378.  
  379. 4.1.1.  Sending a Request or Notification
  380.  
  381.    The following procedures are followed by the Dispatcher when an
  382.    application wants to send an SNMP PDU to another (remote)
  383.    application, i.e., to initiate a communication by originating a
  384.    message, such as one containing a request or a trap.
  385.  
  386.    1) The application requests this using the abstract service
  387.       primitive:
  388.  
  389.  
  390.  
  391.  
  392. Case, et. al.               Standards Track                     [Page 7]
  393.  
  394. RFC 2262               SNMPv3 Management Protocol           January 1998
  395.  
  396.  
  397.        statusInformation =              -- sendPduHandle if success
  398.                                         -- errorIndication if failure
  399.          sendPdu(
  400.          IN   transportDomain           -- transport domain to be used
  401.          IN   transportAddress          -- destination network address
  402.          IN   messageProcessingModel    -- typically, SNMP version
  403.          IN   securityModel             -- Security Model to use
  404.          IN   securityName              -- on behalf of this principal
  405.          IN   securityLevel             -- Level of Security requested
  406.          IN   contextEngineID           -- data from/at this entity
  407.          IN   contextName               -- data from/in this context
  408.          IN   pduVersion                -- the version of the PDU
  409.          IN   PDU                       -- SNMP Protocol Data Unit
  410.          IN   expectResponse            -- TRUE or FALSE
  411.               )
  412.  
  413.    2) If the messageProcessingModel value does not represent a Message
  414.       Processing Model known to the Dispatcher, then an errorIndication
  415.       (implementation-dependent) is returned to the calling application.
  416.       No further processing is performed.
  417.  
  418.    3) The Dispatcher generates a sendPduHandle to coordinate
  419.       subsequent processing.
  420.  
  421.    4) The Message Dispatcher sends the request to the version-specific
  422.       Message Processing module identified by messageProcessingModel
  423.       using the abstract service primitive:
  424.  
  425.       statusInformation =              - success or error indication
  426.         prepareOutgoingMessage(
  427.         IN   transportDomain           -- as specified by application
  428.         IN   transportAddress          -- as specified by application
  429.         IN   messageProcessingModel    -- as specified by application
  430.         IN   securityModel             -- as specified by application
  431.         IN   securityName              -- as specified by application
  432.         IN   securityLevel             -- as specified by application
  433.         IN   contextEngineID           -- as specified by application
  434.         IN   contextName               -- as specified by application
  435.         IN   pduVersion                -- the version of the PDU
  436.         IN   PDU                       -- as specified by application
  437.         IN   expectResponse            -- as specified by application
  438.         IN   sendPduHandle             -- as determined in step 3.
  439.         OUT  destTransportDomain       -- destination transport domain
  440.         OUT  destTransportAddress      -- destination transport address
  441.         OUT  outgoingMessage           -- the message to send
  442.         OUT  outgoingMessageLength     -- the message length
  443.              )
  444.  
  445.  
  446.  
  447.  
  448. Case, et. al.               Standards Track                     [Page 8]
  449.  
  450. RFC 2262               SNMPv3 Management Protocol           January 1998
  451.  
  452.  
  453.    5) If the statusInformation indicates an error, the errorIndication
  454.       is returned to the calling application.  No further processing is
  455.       performed.
  456.  
  457.    6) If the statusInformation indicates success, the sendPduHandle is
  458.       returned to the application, and the outgoingMessage is sent via
  459.       the transport specified by the transportDomain to the address
  460.       specified by the transportAddress.
  461.  
  462.    Outgoing Message Processing is complete.
  463.  
  464. 4.1.2.  Sending a Response to the Network
  465.  
  466.    The following procedure is followed when an application wants to
  467.    return a response back to the originator of an SNMP Request.
  468.  
  469.    1) An application can request this using the abstract service
  470.       primitive:
  471.  
  472.       returnResponsePDU(
  473.        IN   messageProcessingModel   -- typically, SNMP version
  474.        IN   securityModel            -- Security Model in use
  475.        IN   securityName             -- on behalf of this principal
  476.        IN   securityLevel            -- same as on incoming request
  477.        IN   contextEngineID          -- data from/at this SNMP entity
  478.        IN   contextName              -- data from/in this context
  479.        IN   pduVersion               -- the version of the PDU
  480.        IN   PDU                      -- SNMP Protocol Data Unit
  481.        IN   maxSizeResponseScopedPDU -- maximum size of Response PDU
  482.        IN   stateReference           -- reference to state information
  483.                                      -- as presented with the request
  484.        IN   statusInformation        -- success or errorIndication
  485.        )                             -- (error counter OID and value
  486.                                      -- when errorIndication)
  487.  
  488.    2) The Message Dispatcher sends the request to the appropriate
  489.       Message Processing Model indicated by the received value of
  490.       messageProcessingModel using the abstract service primitive:
  491.  
  492.       result =                        -- SUCCESS or errorIndication
  493.        prepareResponseMessage(
  494.        IN   messageProcessingModel   -- specified by application
  495.        IN   securityModel            -- specified by application
  496.        IN   securityName             -- specified by application
  497.        IN   securityLevel            -- specified by application
  498.        IN   contextEngineID          -- specified by application
  499.        IN   contextName              -- specified by application
  500.        IN   pduVersion               -- specified by application
  501.  
  502.  
  503.  
  504. Case, et. al.               Standards Track                     [Page 9]
  505.  
  506. RFC 2262               SNMPv3 Management Protocol           January 1998
  507.  
  508.  
  509.        IN   PDU                      -- specified by application
  510.        IN   maxSizeResponseScopedPDU -- specified by application
  511.        IN   stateReference           -- specified by application
  512.        IN   statusInformation        -- specified by application
  513.        OUT  destTransportDomain      -- destination transport domain
  514.        OUT  destTransportAddress     -- destination transport address
  515.        OUT  outgoingMessage          -- the message to send
  516.        OUT  outgoingMessageLength    -- the message length
  517.             )
  518.  
  519.    3) If the result is an errorIndication, the errorIndication is
  520.       returned to the calling application.  No further processing is
  521.       performed.
  522.  
  523.    4) If the result is success, the outgoingMessage is sent over the
  524.       transport specified by the transportDomain to the address
  525.       specified by the transportAddress.
  526.  
  527.    Message Processing is complete.
  528.  
  529. 4.2.  Receiving an SNMP Message from the Network
  530.  
  531.    This section describes the procedure followed by an SNMP engine
  532.    whenever it receives an SNMP message.
  533.  
  534.    Please note, that for the sake of clarity and to prevent the text
  535.    from being even longer and more complicated, some details were
  536.    omitted from the steps below.  In particular, The elements of
  537.    procedure do not always explicitly indicate when state information
  538.    needs to be released. The general rule is that if state information
  539.    is available when a message is to be "discarded without further
  540.    processing", then the state information must also be released at that
  541.    same time.
  542.  
  543. 4.2.1.  Message Dispatching of received SNMP Messages
  544.  
  545.    1) The snmpInPkts counter [RFC1907] is incremented.
  546.  
  547.    2) The version of the SNMP message is determined in an
  548.       implementation-dependent manner.  If the packet cannot be
  549.       sufficiently parsed to determine the version of the SNMP message,
  550.       then the snmpInASNParseErrs [RFC1907] counter is incremented, and
  551.       the message is discarded without further processing.  If the
  552.       version is not supported, then the snmpInBadVersions [RFC1907]
  553.       counter is incremented, and the message is discarded without
  554.       further processing.
  555.  
  556.  
  557.  
  558.  
  559.  
  560. Case, et. al.               Standards Track                    [Page 10]
  561.  
  562. RFC 2262               SNMPv3 Management Protocol           January 1998
  563.  
  564.  
  565.    3) The origin transportDomain and origin transportAddress are
  566.       determined.
  567.  
  568.    4) The message is passed to the version-specific Message Processing
  569.       Model which returns the abstract data elements required by the
  570.       Dispatcher.  This is performed using the abstract service
  571.       primitive:
  572.  
  573.       result =                        -- SUCCESS or errorIndication
  574.         prepareDataElements(
  575.         IN   transportDomain          -- origin as determined in step 3.
  576.         IN   transportAddress         -- origin as determined in step 3.
  577.         IN   wholeMsg                 -- as received from the network
  578.         IN   wholeMsgLength           -- as received from the network
  579.         OUT  messageProcessingModel   -- typically, SNMP version
  580.         OUT  securityModel            -- Security Model to use
  581.         OUT  securityName             -- on behalf of this principal
  582.         OUT  securityLevel            -- Level of Security requested
  583.         OUT  contextEngineID          -- data from/at this entity
  584.         OUT  contextName              -- data from/in this context
  585.         OUT  pduVersion               -- the version of the PDU
  586.         OUT  PDU                      -- SNMP Protocol Data Unit
  587.         OUT  pduType                  -- SNMP PDU type
  588.         OUT  sendPduHandle            -- handle for a matched request
  589.         OUT  maxSizeResponseScopedPDU -- maximum size of Response PDU
  590.         OUT  statusInformation        -- success or errorIndication
  591.                                       -- (error counter OID and value
  592.                                       -- when errorIndication)
  593.         OUT  stateReference           -- reference to state information
  594.                                       -- to be used for a possible
  595.              )                        -- Response
  596.  
  597.    5) If the result is a FAILURE errorIndication, the message is
  598.       discarded without further processing.
  599.  
  600.    6) At this point, the abstract data elements have been prepared and
  601.       processing continues as described in Section 4.2.2, PDU
  602.       Dispatching for Incoming Messages.
  603.  
  604. 4.2.2.  PDU Dispatching for Incoming Messages
  605.  
  606.    The elements of procedure for the dispatching of PDUs depends on the
  607.    value of sendPduHandle.  If the value of sendPduHandle is <none>,
  608.    then this is a request or notification and the procedures specified
  609.    in Section 4.2.2.1 apply.  If the value of snmpPduHandle is not
  610.    <none>, then this is a response and the procedures specified in
  611.    Section 4.2.2.2 apply.
  612.  
  613.  
  614.  
  615.  
  616. Case, et. al.               Standards Track                    [Page 11]
  617.  
  618. RFC 2262               SNMPv3 Management Protocol           January 1998
  619.  
  620.  
  621. 4.2.2.1.  Incoming Requests and Notifications
  622.  
  623.    The following procedures are followed for the dispatching of PDUs
  624.    when the value of sendPduHandle is <none>, indicating this is a
  625.    request or notification.
  626.  
  627.    1) The combination of contextEngineID and pduType is used to
  628.       determine which application has registered for this request or
  629.       notification.
  630.  
  631.    2) If no application has registered for the combination, then
  632.  
  633.       a) The snmpUnknownPDUHandlers counter is incremented.
  634.  
  635.       b) A Response message is generated using the abstract service
  636.          primitive:
  637.  
  638.          result =                         -- SUCCESS or FAILURE
  639.          prepareResponseMessage(
  640.          IN   messageProcessingModel    -- as provided by MP module
  641.          IN   securityModel             -- as provided by MP module
  642.          IN   securityName              -- as provided by MP module
  643.          IN   securityLevel             -- as provided by MP module
  644.          IN   contextEngineID           -- as provided by MP module
  645.          IN   contextName               -- as provided by MP module
  646.          IN   pduVersion                -- as provided by MP module
  647.          IN   PDU                       -- as provided by MP module
  648.          IN   maxSizeResponseScopedPDU  -- as provided by MP module
  649.          IN   stateReference            -- as provided by MP module
  650.          IN   statusInformation         -- errorIndication plus
  651.                                         -- snmpUnknownPDUHandlers OID
  652.                                         -- value pair.
  653.          OUT  transportDomain           -- destination transportDomain
  654.          OUT  transportAddress          -- destination transportAddress
  655.          OUT  outgoingMessage           -- the message to send
  656.          OUT  outgoingMessageLength     -- its length
  657.          )
  658.  
  659.       c) If the result is SUCCESS, then the prepared message is sent to
  660.          the originator of the request as identified by the
  661.          transportDomain and transportAddress.
  662.  
  663.       d) The incoming message is discarded without further processing.
  664.          Message Processing for this message is complete.
  665.  
  666.    3) The PDU is dispatched to the application, using the abstract
  667.       service primitive:
  668.  
  669.  
  670.  
  671.  
  672. Case, et. al.               Standards Track                    [Page 12]
  673.  
  674. RFC 2262               SNMPv3 Management Protocol           January 1998
  675.  
  676.  
  677.       processPdu(                     -- process Request/Notification
  678.         IN   messageProcessingModel   -- as provided by MP module
  679.         IN   securityModel            -- as provided by MP module
  680.         IN   securityName             -- as provided by MP module
  681.         IN   securityLevel            -- as provided by MP module
  682.         IN   contextEngineID          -- as provided by MP module
  683.         IN   contextName              -- as provided by MP module
  684.         IN   pduVersion               -- as provided by MP module
  685.         IN   PDU                      -- as provided by MP module
  686.         IN   maxSizeResponseScopedPDU -- as provided by MP module
  687.         IN   stateReference           -- as provided by MP module
  688.                                       -- needed when sending response
  689.              )
  690.  
  691.       Message processing for this message is complete.
  692.  
  693. 4.2.2.2.  Incoming Responses
  694.  
  695.    The following procedures are followed for the dispatching of PDUs
  696.    when the value of sendPduHandle is not <none>, indicating this is a
  697.    response.
  698.  
  699.       1) The value of sendPduHandle is used to determine, in an
  700.          implementation-defined manner, which application is waiting for
  701.          a response PDU associated with this sendPduHandle.
  702.  
  703.       2) If no waiting application is found, the message is discarded
  704.          without further processing, and the stateReference is released.
  705.          The snmpUnknownPDUHandlers counter is incremented.  Message
  706.          Processing is complete for this message.
  707.  
  708.       3) Any cached information, including stateReference, about the
  709.          message is discarded.
  710.  
  711.       4) The response is dispatched to the application using the
  712.          abstract service primitive:
  713.  
  714.          processResponsePdu(              -- process Response PDU
  715.            IN   messageProcessingModel    -- provided by the MP module
  716.            IN   securityModel             -- provided by the MP module
  717.            IN   securityName              -- provided by the MP module
  718.            IN   securityLevel             -- provided by the MP module
  719.            IN   contextEngineID           -- provided by the MP module
  720.            IN   contextName               -- provided by the MP module
  721.            IN   pduVersion                -- provided by the MP module
  722.            IN   PDU                       -- provided by the MP module
  723.  
  724.  
  725.  
  726.  
  727.  
  728. Case, et. al.               Standards Track                    [Page 13]
  729.  
  730. RFC 2262               SNMPv3 Management Protocol           January 1998
  731.  
  732.  
  733.            IN   statusInformation         -- provided by the MP module
  734.            IN   sendPduHandle             -- provided by the MP module
  735.                 )
  736.  
  737.          Message Processing is complete for this message.
  738.  
  739. 4.3.  Application Registration for Handling PDU types
  740.  
  741.    Applications that want to process certain PDUs must register with the
  742.    PDU Dispatcher. Applications specify the combination of
  743.    contextEngineID and pduType(s) for which they want to take
  744.    responsibility
  745.  
  746.    1) An application registers according to the abstract interface
  747.       primitive:
  748.  
  749.       statusInformation =           -- success or errorIndication
  750.         registerContextEngineID(
  751.         IN   contextEngineID        -- take responsibility for this one
  752.         IN   pduType                -- the pduType(s) to be registered
  753.              )
  754.  
  755.       Note: implementations may provide a means of requesting
  756.       registration for simultaneous multiple contextEngineID values,
  757.       e.g., all contextEngineID values, and may also provide means for
  758.       requesting simultaneous registration for multiple values of
  759.       pduType.
  760.  
  761.    2) The parameters may be checked for validity; if they are not, then
  762.       an errorIndication (invalidParameter) is returned to the
  763.       application.
  764.  
  765.    3) Each combination of contextEngineID and pduType can be registered
  766.       only once.  If another application has already registered for the
  767.       specified combination, then an errorIndication (alreadyRegistered)
  768.       is returned to the application.
  769.  
  770.    4) Otherwise, the registration is saved so that SNMP PDUs can be
  771.       dispatched to this application.
  772.  
  773. 4.4.  Application Unregistration for Handling PDU Types
  774.  
  775.    Applications that no longer want to process certain PDUs must
  776.    unregister with the PDU Dispatcher.
  777.  
  778.    1) An application unregisters using the abstract service primitive:
  779.  
  780.  
  781.  
  782.  
  783.  
  784. Case, et. al.               Standards Track                    [Page 14]
  785.  
  786. RFC 2262               SNMPv3 Management Protocol           January 1998
  787.  
  788.  
  789.       unregisterContextEngineID(
  790.        IN   contextEngineID        -- give up responsibility for this
  791.        IN   pduType                -- the pduType(s) to be unregistered
  792.              )
  793.       Note: implementations may provide means for requesting
  794.       unregistration for simultaneous multiple contextEngineID values,
  795.       e.g., all contextEngineID values, and may also provide means for
  796.       requesting simultaneous unregistration for multiple values of
  797.       pduType.
  798.  
  799.    2) If the contextEngineID and pduType combination has been
  800.       registered, then the registration is deleted.
  801.  
  802.       If no such registration exists, then the request is ignored.
  803.  
  804. 5.  Definitions
  805.  
  806. 5.1.  Definitions for SNMP Message Processing and Dispatching
  807.  
  808.    SNMP-MPD-MIB DEFINITIONS ::= BEGIN
  809.  
  810.    IMPORTS
  811.        MODULE-COMPLIANCE, OBJECT-GROUP         FROM SNMPv2-CONF
  812.        MODULE-IDENTITY, OBJECT-TYPE,
  813.        snmpModules, Counter32                  FROM SNMPv2-SMI;
  814.  
  815.    snmpMPDMIB MODULE-IDENTITY
  816.        LAST-UPDATED "9711200000Z"              -- 20 November 1997
  817.        ORGANIZATION "SNMPv3 Working Group"
  818.        CONTACT-INFO "WG-email:   snmpv3@tis.com
  819.                      Subscribe:  majordomo@tis.com
  820.                                  In message body:  subscribe snmpv3
  821.  
  822.                      Chair:      Russ Mundy
  823.                                  Trusted Information Systems
  824.                      postal:     3060 Washington Road
  825.                                  Glenwood, MD 21738
  826.                                  USA
  827.                      email:      mundy@tis.com
  828.                      phone:      +1 301-854-6889
  829.  
  830.                      Co-editor:  Jeffrey Case
  831.                                  SNMP Research, Inc.
  832.                      postal:     3001 Kimberlin Heights Road
  833.                                  Knoxville, TN 37920-9716
  834.                                  USA
  835.                      email:      case@snmp.com
  836.                      phone:      +1 423-573-1434
  837.  
  838.  
  839.  
  840. Case, et. al.               Standards Track                    [Page 15]
  841.  
  842. RFC 2262               SNMPv3 Management Protocol           January 1998
  843.  
  844.  
  845.                      Co-editor   Dave Harrington
  846.                                  Cabletron Systems, Inc.
  847.                      postal:     Post Office Box 5005
  848.                                  MailStop: Durham
  849.                                  35 Industrial Way
  850.                                  Rochester, NH 03867-5005
  851.                                  USA
  852.                      email:      dbh@ctron.com
  853.                      phone:      +1 603-337-7357
  854.  
  855.                      Co-editor:  Randy Presuhn
  856.                                  BMC Software, Inc.
  857.                      postal:     1190 Saratoga Ave, Suite 190
  858.                                  San Jose, CA 95120
  859.                                  USA
  860.                      email:      rpresuhn@bmc.com
  861.                      phone:      +1 408-556-0720
  862.  
  863.                      Co-editor:  Bert Wijnen
  864.                                  IBM T. J. Watson Research
  865.                      postal:     Schagen 33
  866.                                  3461 GL Linschoten
  867.                                  Netherlands
  868.                      email:      wijnen@vnet.ibm.com
  869.                      phone:      +31 348-432-794
  870.  
  871.                     "
  872.        DESCRIPTION  "The MIB for Message Processing and Dispatching"
  873.        ::= { snmpModules 3 }
  874.  
  875.    -- Administrative assignments ***************************************
  876.  
  877.    snmpMPDAdmin           OBJECT IDENTIFIER ::= { snmpMPDMIB 1 }
  878.    snmpMPDMIBObjects      OBJECT IDENTIFIER ::= { snmpMPDMIB 2 }
  879.    snmpMPDMIBConformance  OBJECT IDENTIFIER ::= { snmpMPDMIB 3 }
  880.  
  881.    -- Statistics for SNMP Messages *************************************
  882.  
  883.    snmpMPDStats           OBJECT IDENTIFIER ::= { snmpMPDMIBObjects 1 }
  884.  
  885.    snmpUnknownSecurityModels OBJECT-TYPE
  886.        SYNTAX       Counter32
  887.        MAX-ACCESS   read-only
  888.        STATUS       current
  889.        DESCRIPTION "The total number of packets received by the SNMP
  890.                     engine which were dropped because they referenced a
  891.                     securityModel that was not known to or supported by
  892.                     the SNMP engine.
  893.  
  894.  
  895.  
  896. Case, et. al.               Standards Track                    [Page 16]
  897.  
  898. RFC 2262               SNMPv3 Management Protocol           January 1998
  899.  
  900.  
  901.                    "
  902.        ::= { snmpMPDStats 1 }
  903.  
  904.    snmpInvalidMsgs OBJECT-TYPE
  905.        SYNTAX       Counter32
  906.        MAX-ACCESS   read-only
  907.        STATUS       current
  908.        DESCRIPTION "The total number of packets received by the SNMP
  909.                     engine which were dropped because there were invalid
  910.                     or inconsistent components in the SNMP message.
  911.                    "
  912.        ::= { snmpMPDStats 2 }
  913.  
  914.    snmpUnknownPDUHandlers OBJECT-TYPE
  915.        SYNTAX       Counter32
  916.        MAX-ACCESS   read-only
  917.        STATUS       current
  918.        DESCRIPTION "The total number of packets received by the SNMP
  919.                     engine which were dropped because the PDU contained
  920.                     in the packet could not be passed to an application
  921.                     responsible for handling the pduType, e.g. no SNMP
  922.                     application had registered for the proper
  923.                     combination of the contextEngineID and the pduType.
  924.                    "
  925.        ::= { snmpMPDStats 3 }
  926.  
  927.    -- Conformance information ******************************************
  928.  
  929.    snmpMPDMIBCompliances OBJECT IDENTIFIER ::= {snmpMPDMIBConformance 1}
  930.    snmpMPDMIBGroups      OBJECT IDENTIFIER ::= {snmpMPDMIBConformance 2}
  931.  
  932.    -- Compliance statements
  933.  
  934.    snmpMPDCompliance MODULE-COMPLIANCE
  935.        STATUS       current
  936.        DESCRIPTION "The compliance statement for SNMP entities which
  937.                     implement the SNMP-MPD-MIB.
  938.                    "
  939.  
  940.        MODULE    -- this module
  941.  
  942.            MANDATORY-GROUPS { snmpMPDGroup }
  943.  
  944.        ::= { snmpMPDMIBCompliances 1 }
  945.  
  946.    snmpMPDGroup OBJECT-GROUP
  947.        OBJECTS {
  948.                  snmpUnknownSecurityModels,
  949.  
  950.  
  951.  
  952. Case, et. al.               Standards Track                    [Page 17]
  953.  
  954. RFC 2262               SNMPv3 Management Protocol           January 1998
  955.  
  956.  
  957.                  snmpInvalidMsgs,
  958.                  snmpUnknownPDUHandlers
  959.                }
  960.        STATUS       current
  961.        DESCRIPTION "A collection of objects providing for remote
  962.                     monitoring of the SNMP Message Processing and
  963.                     Dispatching process.
  964.                    "
  965.        ::= { snmpMPDMIBGroups 1 }
  966.  
  967.    END
  968.  
  969. 6.  The SNMPv3 Message Format
  970.  
  971.    This section defines the SNMPv3 message format and the corresponding
  972.    SNMP version 3 Message Processing Model (v3MP).
  973.  
  974.    SNMPv3MessageSyntax DEFINITIONS IMPLICIT TAGS ::= BEGIN
  975.  
  976.        SNMPv3Message ::= SEQUENCE {
  977.            -- identify the layout of the SNMPv3Message
  978.            -- this element is in same position as in SNMPv1
  979.            -- and SNMPv2c, allowing recognition
  980.            msgVersion INTEGER { snmpv3 (3) },
  981.            -- administrative parameters
  982.            msgGlobalData HeaderData,
  983.            -- security model-specific parameters
  984.            -- format defined by Security Model
  985.            msgSecurityParameters OCTET STRING,
  986.            msgData  ScopedPduData
  987.        }
  988.  
  989.        HeaderData ::= SEQUENCE {
  990.            msgID      INTEGER (0..2147483647),
  991.            msgMaxSize INTEGER (484..2147483647),
  992.  
  993.            msgFlags   OCTET STRING (SIZE(1)),
  994.                       --  .... ...1   authFlag
  995.                       --  .... ..1.   privFlag
  996.                       --  .... .1..   reportableFlag
  997.                       --              Please observe:
  998.                       --  .... ..00   is OK, means noAuthNoPriv
  999.                       --  .... ..01   is OK, means authNoPriv
  1000.                       --  .... ..10   reserved, must NOT be used.
  1001.                       --  .... ..11   is OK, means authPriv
  1002.  
  1003.            msgSecurityModel INTEGER (0..2147483647)
  1004.        }
  1005.  
  1006.  
  1007.  
  1008. Case, et. al.               Standards Track                    [Page 18]
  1009.  
  1010. RFC 2262               SNMPv3 Management Protocol           January 1998
  1011.  
  1012.  
  1013.        ScopedPduData ::= CHOICE {
  1014.            plaintext    ScopedPDU,
  1015.            encryptedPDU OCTET STRING  -- encrypted scopedPDU value
  1016.        }
  1017.  
  1018.        ScopedPDU ::= SEQUENCE {
  1019.            contextEngineID  OCTET STRING,
  1020.            contextName      OCTET STRING,
  1021.            data             ANY -- e.g., PDUs as defined in RFC1905
  1022.        }
  1023.    END
  1024.  
  1025. 6.1.  msgVersion
  1026.  
  1027.    The msgVersion field is set to snmpv3(3) and identifies the message
  1028.    as an SNMP version 3 Message.
  1029.  
  1030. 6.2.  msgID
  1031.  
  1032.    The msgID is used between two SNMP entities to coordinate request
  1033.    messages and responses, and by the v3MP to coordinate the processing
  1034.    of the message by different subsystem models within the architecture.
  1035.  
  1036.    Values for msgID should be generated in a manner that avoids re-use
  1037.    of any outstanding values.  Doing so provides protection against some
  1038.    replay attacks.  One possible implementation strategy would be to use
  1039.    the low-order bits of snmpEngineBoots [RFC2261] as the high-order
  1040.    portion of the msgID value and a monotonically increasing integer for
  1041.    the low-order portion of msgID.
  1042.  
  1043.    Note that the request-id in a PDU is used by SNMP applications to
  1044.    identify the PDU; the msgID is used by the engine to identify the
  1045.    message which carries a PDU. The engine may need to identify the
  1046.    message even if decrypting of the PDU (and request-id) fails. No
  1047.    assumption should be made that the value of the msgID and the value
  1048.    of the request-id are equivalent.
  1049.  
  1050. 6.3.  msgMaxSize
  1051.  
  1052.    The msgMaxSize field of the message conveys the maximum message size
  1053.    supported by the sender of the message, i.e., the maximum message
  1054.    size that the sender can accept when another SNMP engine sends an
  1055.    SNMP message (be it a response or any other message) to the sender of
  1056.    this message.
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064. Case, et. al.               Standards Track                    [Page 19]
  1065.  
  1066. RFC 2262               SNMPv3 Management Protocol           January 1998
  1067.  
  1068.  
  1069.    When an SNMP message is being generated, the msgMaxSize is provided
  1070.    by the SNMP engine which generates the message.  At the receiving
  1071.    SNMP engine, the msgMaxSize is used to determine how big the Response
  1072.    to a Request message can be.
  1073.  
  1074. 6.4.  msgFlags
  1075.  
  1076.    The msgFlags field of the message contains several bit fields which
  1077.    control processing of the message.
  1078.  
  1079.    When the reportableFlag is one, a Report PDU must be returned to the
  1080.    sender under those conditions which can cause the generation of
  1081.    Report PDUs.  When the reportableFlag is zero, then a Report PDU must
  1082.    not be sent.  The reportableFlag must always be zero when the message
  1083.    contains a Report PDU, a response-type PDU (such as a Response PDU),
  1084.    or an unacknowledged notification-type PDU (such as an SNMPv2-trap
  1085.    PDU).  The reportableFlag must always be one for a request-type PDU
  1086.    (such as a Get PDU) and an acknowledged notification-type PDU (such
  1087.    as an Inform PDU).
  1088.  
  1089.    If the reportableFlag is set to one for a message containing a Report
  1090.    PDU, a response-type PDU (such as a Response PDU), or an
  1091.    unacknowledged notification-type PDU (such as an SNMPv2-trap PDU),
  1092.    then the receiver of that message must process it as though the
  1093.    reportableFlag had been set to zero.
  1094.  
  1095.    If the reportableFlag is set to zero for a message containing a
  1096.    request-type PDU (such as a Get PDU) or an acknowledged notification-
  1097.    type PDU (such as an Inform PDU), then the receiver of that message
  1098.    must process it as though the reportableFlag had been set to one.
  1099.  
  1100.    Report PDUs are engine-to-engine communications and are processed
  1101.    directly by the SNMPv3 Message Processing Model, and are generally
  1102.    not passed to applications for processing, unlike all other PDU
  1103.    types.
  1104.  
  1105.    Note that the reportableFlag is a secondary aid in determining
  1106.    whether a Report PDU must be sent.  It is only used in cases where
  1107.    the PDU portion of a message cannot be decoded, due to, for example,
  1108.    an incorrect ecryption key.  If the PDU can be decoded, the PDU type
  1109.    forms the basis for decisions on sending Report PDUs.
  1110.  
  1111.    The authFlag and privFlag portions of the msgFlags field are set by
  1112.    the sender to indicate the securityLevel that was applied to the
  1113.    message before it was sent on the wire.  The receiver of the message
  1114.    must apply the same securityLevel when the message is received and
  1115.    the contents are being processed.
  1116.  
  1117.  
  1118.  
  1119.  
  1120. Case, et. al.               Standards Track                    [Page 20]
  1121.  
  1122. RFC 2262               SNMPv3 Management Protocol           January 1998
  1123.  
  1124.  
  1125.    There are three securityLevels, namely noAuthNoPriv, which is less
  1126.    than authNoPriv, which is in turn less than authPriv.  See the SNMP
  1127.    architecture document [RFC2261] for details about the securityLevel.
  1128.  
  1129.    a) authFlag
  1130.  
  1131.       If the authFlag is set to one, then the securityModel used by the
  1132.       SNMP engine which sent the message must identify the securityName
  1133.       on whose behalf the SNMP message was generated and must provide,
  1134.       in a securityModel-specific manner, sufficient data for the
  1135.       receiver of the message to be able to authenticate that
  1136.       identification.  In general, this authentication will allow the
  1137.       receiver to determine with reasonable certainty that the message
  1138.       was:
  1139.  
  1140.       -  sent on behalf of the principal associated with the
  1141.          securityName,
  1142.  
  1143.       -  was not redirected,
  1144.  
  1145.       -  was not modified in transit, and
  1146.  
  1147.       -  was not replayed.
  1148.  
  1149.       If the authFlag is zero, then the securityModel used by the SNMP
  1150.       engine which sent the message must identify the securityName on
  1151.       whose behalf the SNMP message was generated but it does not need
  1152.       to provide sufficient data for the receiver of the message to
  1153.       authenticate the identification, as there is no need to
  1154.       authenticate the message in this case.
  1155.  
  1156.    b) privFlag
  1157.  
  1158.       If the privFlag is set, then the securityModel used by the SNMP
  1159.       engine which sent the message must also protect the scopedPDU in
  1160.       an SNMP message from disclosure, i.e., must encrypt/decrypt the
  1161.       scopedPDU. If the privFlag is zero, then the securityModel in use
  1162.       does not need to protect the data from disclosure.
  1163.  
  1164.       It is an explicit requirement of the SNMP architecture that if
  1165.       privacy is selected, then authentication is also required.  That
  1166.       means that if the privFlag is set, then the authFlag must also be
  1167.       set to one.
  1168.  
  1169.       The combination of the authFlag and the privFlag comprises a Level
  1170.       of Security as follows:
  1171.  
  1172.          authFlag zero, privFlag zero -> securityLevel is noAuthNoPriv
  1173.  
  1174.  
  1175.  
  1176. Case, et. al.               Standards Track                    [Page 21]
  1177.  
  1178. RFC 2262               SNMPv3 Management Protocol           January 1998
  1179.  
  1180.  
  1181.          authFlag zero, privFlag one  -> invalid combination
  1182.          authFlag one,  privFlag zero -> securityLevel is authNoPriv
  1183.          authFlag one,  privFlag one  -> securityLevel is authPriv
  1184.  
  1185. 6.5.  msgSecurityModel
  1186.  
  1187.    The v3MP supports the concurrent existence of multiple Security
  1188.    Models to provide security services for SNMPv3 messages.  The
  1189.    msgSecurityModel field in an SNMPv3 Message identifies which Security
  1190.    Model was used by the sender to generate the message and therefore
  1191.    which securityModel must be used by the receiver to perform security
  1192.    processing for the message.  The mapping to the appropriate
  1193.    securityModel implementation within an SNMP engine is accomplished in
  1194.    an implementation-dependent manner.
  1195.  
  1196. 6.6.  msgSecurityParameters
  1197.  
  1198.    The msgSecurityParameters field of the SNMPv3 Message is used for
  1199.    communication between the Security Model modules in the sending and
  1200.    receiving SNMP engines. The data in the msgSecurityParameters field
  1201.    is used exclusively by the Security Model, and the contents and
  1202.    format of the data is defined by the Security Model.  This OCTET
  1203.    STRING is not interpreted by the v3MP, but is passed to the local
  1204.    implementation of the Security Model indicated by the
  1205.    msgSecurityModel field in the message.
  1206.  
  1207. 6.7.  scopedPduData
  1208.  
  1209.    The scopedPduData field represents either the plain text scopedPDU if
  1210.    the privFlag in the msgFlags is zero, or it represents an
  1211.    encryptedPDU (encoded as an OCTET STRING) which must be decrypted by
  1212.    the securityModel in use to produce a plaintext scopedPDU.
  1213.  
  1214. 6.8.  scopedPDU
  1215.  
  1216.    The scopedPDU contains information to identify an administratively
  1217.    unique context and a PDU. The object identifiers in the PDU refer to
  1218.    managed objects which are (expected to be) accessible within the
  1219.    specified context.
  1220.  
  1221. 6.8.1.  contextEngineID
  1222.  
  1223.    The contextEngineID in the SNMPv3 message, uniquely identifies,
  1224.    within an administrative domain, an SNMP entity that may realize an
  1225.    instance of a context with a particular contextName.
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232. Case, et. al.               Standards Track                    [Page 22]
  1233.  
  1234. RFC 2262               SNMPv3 Management Protocol           January 1998
  1235.  
  1236.  
  1237.    For incoming messages, the contextEngineID is used to determine to
  1238.    which application the scopedPDU will be sent for processing.
  1239.  
  1240.    For outgoing messages, the v3MP sets the contextEngineID to the value
  1241.    provided by the application in the request for a message to be sent.
  1242.  
  1243. 6.8.2.  contextName
  1244.  
  1245.    The contextName field in an SNMPv3 message, in conjunction with the
  1246.    contextEngineID field, identifies the particular context associated
  1247.    with the management information contained in the PDU portion of the
  1248.    message.  The contextName is unique within the SNMP entity specified
  1249.    by the contextEngineID, which may realize the managed objects
  1250.    referenced within the PDU.  An application which originates a message
  1251.    provides the value for the contextName field and this value may be
  1252.    used during processing by an application at the receiving SNMP
  1253.    Engine.
  1254.  
  1255. 6.8.3.  data
  1256.  
  1257.    The data field of the SNMPv3 Message contains the PDU.  Among other
  1258.    things, the PDU contains the PDU type that is used by the v3MP to
  1259.    determine the type of the incoming SNMP message.  The v3MP specifies
  1260.    that the PDU must be one of those specified in [RFC1905].
  1261.  
  1262. 7.  Elements of Procedure for v3MP
  1263.  
  1264.    This section describes the procedures followed by an SNMP engine when
  1265.    generating and processing SNMP messages according to the SNMPv3
  1266.    Message Processing Model.
  1267.  
  1268.    Please note, that for the sake of clarity and to prevent the text
  1269.    from being even longer and more complicated, some details were
  1270.    omitted from the steps below.
  1271.  
  1272.       a) Some steps specify that when some error conditions are
  1273.          encountered when processing a received message, a message
  1274.          containing a Report PDU is generated and the received message
  1275.          is discarded without further processing.  However, a Report-PDU
  1276.          must not be generated unless the reportableFlag is set in the
  1277.          received message.
  1278.  
  1279.       b) The elements of procedure do not always explicitly indicate
  1280.          when state information needs to be released. The general rule
  1281.          is that if state information is available when a message is to
  1282.          be "discarded without further processing", then the state
  1283.          information must also be released at that same time.
  1284.  
  1285.  
  1286.  
  1287.  
  1288. Case, et. al.               Standards Track                    [Page 23]
  1289.  
  1290. RFC 2262               SNMPv3 Management Protocol           January 1998
  1291.  
  1292.  
  1293. 7.1.  Prepare an Outgoing SNMP Message
  1294.  
  1295.    This section describes the procedure followed to prepare an SNMPv3
  1296.    message from the data elements passed by the Message Dispatcher.
  1297.  
  1298.    1) The Message Dispatcher may request that an SNMPv3 message
  1299.       containing a GetRequest-PDU, GetNextRequest-PDU, GetBulkRequest-
  1300.       PDU, SetRequest-PDU, InformRequest-PDU, or SNMPv2-Trap-PDU be
  1301.       prepared for sending.
  1302.  
  1303.       a) It makes such a request according to the abstract service
  1304.          primitive:
  1305.  
  1306.          statusInformation =           -- success or errorIndication
  1307.            prepareOutgoingMessage(
  1308.            IN   transportDomain        -- requested transport domain
  1309.            IN   transportAddress       -- requested destination address
  1310.            IN   messageProcessingModel -- typically, SNMP version
  1311.            IN   securityModel          -- Security Model to use
  1312.            IN   securityName           -- on behalf of this principal
  1313.            IN   securityLevel          -- Level of Security requested
  1314.            IN   contextEngineID        -- data from/at this entity
  1315.            IN   contextName            -- data from/in this context
  1316.            IN   pduVersion             -- version of the PDU
  1317.            IN   PDU                    -- SNMP Protocol Data Unit
  1318.            IN   expectResponse         -- TRUE or FALSE
  1319.            IN   sendPduHandle          -- the handle for matching
  1320.                                        -- incoming responses
  1321.            OUT  destTransportDomain    -- destination transport domain
  1322.            OUT  destTransportAddress   -- destination transport address
  1323.            OUT  outgoingMessage        -- the message to send
  1324.            OUT  outgoingMessageLength  -- the length of the message
  1325.            )
  1326.  
  1327.       b) A unique msgID is generated.  The number used for msgID should
  1328.          not have been used recently, and must not be the same as was
  1329.          used for any outstanding request.
  1330.  
  1331.          * SNMPv3 does not use the values of expectResponse or
  1332.          pduVersion.
  1333.  
  1334.    2) The Message Dispatcher may request that an SNMPv3 message
  1335.       containing a Response-PDU or Report-PDU be prepared for sending.
  1336.  
  1337.       a) It makes such a request according to the abstract service
  1338.          primitive:
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344. Case, et. al.               Standards Track                    [Page 24]
  1345.  
  1346. RFC 2262               SNMPv3 Management Protocol           January 1998
  1347.  
  1348.  
  1349.          result =                        -- SUCCESS or FAILURE
  1350.          prepareResponseMessage(
  1351.           IN   messageProcessingModel   -- typically, SNMP version
  1352.           IN   securityModel            -- same as on incoming request
  1353.           IN   securityName             -- same as on incoming request
  1354.           IN   securityLevel            -- same as on incoming request
  1355.           IN   contextEngineID          -- data from/at this SNMP entity
  1356.           IN   contextName              -- data from/in this context
  1357.           IN   pduVersion               -- version of the PDU
  1358.           IN   PDU                      -- SNMP Protocol Data Unit
  1359.           IN   maxSizeResponseScopedPDU -- maximum size of Response PDU
  1360.           IN   stateReference           -- reference to state
  1361.                                         -- information presented with
  1362.                                         -- the request
  1363.           IN   statusInformation        -- success or errorIndication
  1364.                                         -- error counter OID and value
  1365.                                         -- when errorIndication
  1366.           OUT  transportDomain          -- destination transport domain
  1367.           OUT  transportAddress         -- destination transport address
  1368.           OUT  outgoingMessage          -- the message to send
  1369.           OUT  outgoingMessageLength    -- the length of the message
  1370.           )
  1371.  
  1372.       b) The cached information for the original request is retrieved
  1373.          via the stateReference, including
  1374.  
  1375.                   - msgID,
  1376.                   - contextEngineID,
  1377.                   - contextName,
  1378.                   - securityModel,
  1379.                   - securityName,
  1380.                   - securityLevel,
  1381.                   - securityStateReference,
  1382.                   - reportableFlag,
  1383.                   - transportDomain, and
  1384.                   - transportAddress.
  1385.  
  1386.          The SNMPv3 Message Processing Model does not allow cached data
  1387.          to be overridden, except by error indications as detailed in
  1388.          (3) below.
  1389.  
  1390.    3) If statusInformation contains values for an OID/value combination
  1391.       (potentially also containing a securityLevel value,
  1392.       contextEngineID value, or contextName value), then
  1393.  
  1394.       a) If reportableFlag is zero, then the original message is
  1395.          discarded, and no further processing is done. A result of
  1396.          FAILURE is returned. SNMPv3 Message Processing is complete.
  1397.  
  1398.  
  1399.  
  1400. Case, et. al.               Standards Track                    [Page 25]
  1401.  
  1402. RFC 2262               SNMPv3 Management Protocol           January 1998
  1403.  
  1404.  
  1405.       b) If a PDU is provided, it is the PDU from the original request.
  1406.          If possible, extract the request-id.
  1407.  
  1408.       c) A Report PDU is prepared:
  1409.  
  1410.          1) the varBindList is set to contain the OID and value from the
  1411.             statusInformation
  1412.  
  1413.          2) error-status is set to 0
  1414.  
  1415.          3) error-index is set to 0.
  1416.  
  1417.          4) request-id is set to the value extracted in step b)
  1418.             Otherwise, request-id is set to 0
  1419.  
  1420.       d) The errorIndication in statusInformation may be accompanied by
  1421.          a securityLevel value, a contextEngineID value, or a
  1422.          contextName value.
  1423.  
  1424.          1) If statusInformation contains a value for securityLevel,
  1425.             then securityLevel is set to that value, otherwise it is set
  1426.             to noAuthNoPriv.
  1427.  
  1428.          2) If statusInformation contains a value for contextEngineID,
  1429.             then contextEngineID is set to that value, otherwise it is
  1430.             set to the value of this entity's snmpEngineID.
  1431.  
  1432.          3) If statusInformation contains a value for contextName, then
  1433.             contextName is set to that value, otherwise it is set to the
  1434.             default context of "" (zero-length string).
  1435.  
  1436.       e) PDU is set to refer to the new Report-PDU.  The old PDU is
  1437.          discarded.
  1438.  
  1439.       f) Processing continues with step 6) below.
  1440.  
  1441.    4) If contextEngineID is not yet determined, then the contextEngineID
  1442.       is determined, in an implementation-dependent manner, possibly
  1443.       using the transportDomain and transportAddress.
  1444.  
  1445.    5) If the contextName is not yet determined, the contextName is set
  1446.       to the default context.
  1447.  
  1448.    6) A scopedPDU is prepared from the contextEngineID, contextName, and
  1449.       PDU.
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. Case, et. al.               Standards Track                    [Page 26]
  1457.  
  1458. RFC 2262               SNMPv3 Management Protocol           January 1998
  1459.  
  1460.  
  1461.    7) msgGlobalData is constructed as follows
  1462.  
  1463.       a) The msgVersion field is set to snmpv3(3).
  1464.  
  1465.       b) msgID is set as determined in step 1 or 2 above.
  1466.  
  1467.       c) msgMaxSize is set to an implementation-dependent value.
  1468.  
  1469.       d) msgFlags are set as follows:
  1470.  
  1471.          -  If securityLevel specifies noAuthNoPriv, then authFlag and
  1472.             privFlag are both set to zero.
  1473.  
  1474.          -  If securityLevel specifies authNoPriv, then authFlag is set
  1475.             to one and privFlag is set to zero.
  1476.  
  1477.          -  If securityLevel specifies authPriv, then authFlag is set to
  1478.             one and privFlag is set to one.
  1479.  
  1480.          -  If the PDU is a Response-PDU, Report-PDU or SNMPv2-Trap-PDU,
  1481.             then the reportableFlag is set to zero.
  1482.  
  1483.          -  If the PDU is a GetRequest-PDU, GetNextRequest-PDU,
  1484.             GetBulkRequest-PDU, SetRequest-PDU, or InformRequest-PDU
  1485.             then the reportableFlag is set to one.
  1486.  
  1487.          -  All other msgFlags bits are set to zero.
  1488.  
  1489.       e) msgSecurityModel is set to the value of securityModel
  1490.  
  1491.    8) If the PDU is a Response-PDU or Report-PDU, then
  1492.  
  1493.       a) The specified Security Model is called to generate the message
  1494.          according to the primitive:
  1495.  
  1496.          statusInformation =
  1497.            generateResponseMsg(
  1498.            IN   messageProcessingModel -- SNMPv3 Message Processing
  1499.                                        -- Model
  1500.            IN   globalData             -- msgGlobalData from step 7
  1501.            IN   maxMessageSize         -- from msgMaxSize (step 7c)
  1502.            IN   securityModel          -- as determined in step 7e
  1503.            IN   securityEngineID       -- the value of snmpEngineID
  1504.            IN   securityName           -- on behalf of this principal
  1505.            IN   securityLevel          -- for the outgoing message
  1506.            IN   scopedPDU              -- as prepared in step 6)
  1507.            IN   securityStateReference -- as determined in step 2
  1508.            OUT  securityParameters     -- filled in by Security Module
  1509.  
  1510.  
  1511.  
  1512. Case, et. al.               Standards Track                    [Page 27]
  1513.  
  1514. RFC 2262               SNMPv3 Management Protocol           January 1998
  1515.  
  1516.  
  1517.            OUT  wholeMsg               -- complete generated message
  1518.            OUT  wholeMsgLength         -- length of generated message
  1519.            )
  1520.  
  1521.          If, upon return from the Security Model, the statusInformation
  1522.          includes an errorIndication, then any cached information about
  1523.          the outstanding request message is discarded, and an
  1524.          errorIndication is returned, so it can be returned to the
  1525.          calling application. SNMPv3 Message Processing is complete.
  1526.  
  1527.       b) A SUCCESS result is returned. SNMPv3 Message Processing is
  1528.          complete.
  1529.  
  1530.    9) If the PDU is a GetRequest-PDU, GetNextRequest-PDU,
  1531.       GetBulkRequest-PDU, SetRequest-PDU, InformRequest-PDU, or or
  1532.       SNMPv2-Trap-PDU, then
  1533.  
  1534.       a) If the PDU is an SNMPv2-Trap-PDU, then securityEngineID is set
  1535.          to the value of this entity's snmpEngineID.
  1536.  
  1537.          Otherwise, the snmpEngineID of the target entity is determined,
  1538.          in an implementation-dependent manner, possibly using
  1539.          transportDomain and transportAddress.  The value of
  1540.          securityEngineID is set to the value of the target entity's
  1541.          snmpEngineID.
  1542.  
  1543.       b) The specified Security Model is called to generate the message
  1544.          according to the primitive:
  1545.  
  1546.          statusInformation =
  1547.           generateRequestMsg(
  1548.           IN  messageProcessingModel -- SNMPv3 Message Processing Model
  1549.           IN  globalData             -- msgGlobalData, from step 7
  1550.           IN  maxMessageSize         -- from msgMaxSize in step 7 c)
  1551.           IN  securityModel          -- as provided by caller
  1552.           IN  securityEngineID       -- authoritative SNMP entity
  1553.           IN  securityName           -- as provided by caller
  1554.           IN  securityLevel          -- as provided by caller
  1555.           IN  snmpEngineID           -- as determined in step 9 a)
  1556.           IN  scopedPDU              -- as prepared in step 6
  1557.           OUT securityParameters     -- filled in by Security Module
  1558.           OUT wholeMsg               -- complete generated message
  1559.           OUT wholeMsgLength         -- length of the generated message
  1560.           )
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568. Case, et. al.               Standards Track                    [Page 28]
  1569.  
  1570. RFC 2262               SNMPv3 Management Protocol           January 1998
  1571.  
  1572.  
  1573.          If, upon return from the Security Model, the statusInformation
  1574.          includes an errorIndication, then the message is discarded, and
  1575.          the errorIndication is returned, so it can be returned to the
  1576.          calling application, and no further processing is done.
  1577.          SNMPv3 Message Processing is complete.
  1578.  
  1579.       c) Information about the outgoing message is cached, and a
  1580.          stateReference is created (implementation-specific).
  1581.          Information to be cached includes the values of:
  1582.  
  1583.                       - sendPduHandle
  1584.                       - msgID
  1585.                       - snmpEngineID
  1586.                       - securityModel
  1587.                       - securityName
  1588.                       - securityLevel
  1589.                       - contextEngineID
  1590.                       - contextName
  1591.  
  1592.       d) A SUCCESS result is returned.  SNMPv3 Message Processing is
  1593.          complete.
  1594.  
  1595. 7.2.  Prepare Data Elements from an Incoming SNMP Message
  1596.  
  1597.    This section describes the procedure followed to extract data from an
  1598.    SNMPv3 message, and to prepare the data elements required for further
  1599.    processing of the message by the Message Dispatcher.
  1600.  
  1601.    1) The message is passed in from the Message Dispatcher according to
  1602.       the abstract service primitive:
  1603.  
  1604.        result =                         -- SUCCESS or errorIndication
  1605.          prepareDataElements(
  1606.          IN  transportDomain          -- origin transport domain
  1607.          IN  transportAddress         -- origin transport address
  1608.          IN  wholeMsg                 -- as received from the network
  1609.          IN  wholeMsgLength           -- as received from the network
  1610.          OUT messageProcessingModel   -- typically, SNMP version
  1611.          OUT securityModel            -- Security Model to use
  1612.          OUT securityName             -- on behalf of this principal
  1613.          OUT securityLevel            -- Level of Security requested
  1614.          OUT contextEngineID          -- data from/at this entity
  1615.          OUT contextName              -- data from/in this context
  1616.          OUT pduVersion               -- version of the PDU
  1617.          OUT PDU                      -- SNMP Protocol Data Unit
  1618.          OUT pduType                  -- SNMP PDU type
  1619.          OUT sendPduHandle            -- handle for matched request
  1620.          OUT maxSizeResponseScopedPDU -- maximum size of Response PDU
  1621.  
  1622.  
  1623.  
  1624. Case, et. al.               Standards Track                    [Page 29]
  1625.  
  1626. RFC 2262               SNMPv3 Management Protocol           January 1998
  1627.  
  1628.  
  1629.          OUT statusInformation        -- success or errorIndication
  1630.                                       -- error counter OID and value
  1631.                                       -- when errorIndication
  1632.          OUT stateReference           -- reference to state information
  1633.                                       -- to be used for a possible
  1634.          )                            -- Response
  1635.  
  1636.    2) If the received message is not the serialization (according to
  1637.       the conventions of [RFC1906]) of an SNMPv3Message value, then the
  1638.       snmpInASNParseErrs counter [RFC1907] is incremented, the message
  1639.       is discarded without further processing, and a FAILURE result is
  1640.       returned. SNMPv3 Message Processing is complete.
  1641.  
  1642.    3) The values for msgVersion, msgID, msgMaxSize, msgFlags,
  1643.       msgSecurityModel, msgSecurityParameters, and msgData are extracted
  1644.       from the message.
  1645.  
  1646.    4) If the value of the msgSecurityModel component does not match a
  1647.       supported securityModel, then the snmpUnknownSecurityModels
  1648.       counter is incremented, a Report PDU is generated, the message is
  1649.       discarded without further processing, and a FAILURE result is
  1650.       returned. SNMPv3 Message Processing is complete.
  1651.  
  1652.    5) The securityLevel is determined from the authFlag and the
  1653.       privFlag bits of the msgFlags component as follows:
  1654.  
  1655.       a) If the authFlag is not set and the privFlag is not set, then
  1656.          securityLevel is set to noAuthNoPriv.
  1657.  
  1658.       b) If the authFlag is set and the privFlag is not set, then
  1659.          securityLevel is set to authNoPriv.
  1660.  
  1661.       c) If the authFlag is set and the privFlag is set, then
  1662.          securityLevel is set to authPriv.
  1663.  
  1664.       d) If the authFlag is not set and privFlag is set, then the
  1665.          snmpInvalidMsgs counter is incremented, a Report PDU is
  1666.          generated, the message is discarded without further processing,
  1667.          and a FAILURE result is returned. SNMPv3 Message Processing is
  1668.          complete.
  1669.  
  1670.    6) The security module implementing the Security Model as specified
  1671.       by the securityModel component is called for authentication and
  1672.       privacy services.  This is done according to the abstract service
  1673.       primitive:
  1674.  
  1675.        statusInformation =            -- errorIndication or success
  1676.                                       -- error counter OID and
  1677.  
  1678.  
  1679.  
  1680. Case, et. al.               Standards Track                    [Page 30]
  1681.  
  1682. RFC 2262               SNMPv3 Management Protocol           January 1998
  1683.  
  1684.  
  1685.                                       -- value if error
  1686.          processIncomingMsg(
  1687.          IN  messageProcessingModel   -- SNMPv3 Message Processing Model
  1688.          IN  expectResponse           -- TRUE or FALSE
  1689.          IN  maxMessageSize           -- of the sending SNMP entity
  1690.          IN  securityParameters       -- for the received message
  1691.          IN  securityModel            -- for the received message
  1692.          IN  securityLevel            -- Level of Security
  1693.          IN  wholeMsg                 -- as received on the wire
  1694.          IN  wholeMsgLength           -- length as received on the wire
  1695.          OUT securityEngineID         -- authoritative SNMP entity
  1696.          OUT securityName             -- identification of the principal
  1697.          OUT scopedPDU,               -- message (plaintext) payload
  1698.          OUT maxSizeResponseScopedPDU -- maximum size of Response PDU
  1699.          OUT securityStateReference   -- reference to security state
  1700.          )                            -- information, needed for
  1701.                                       -- response
  1702.  
  1703.       If an errorIndication is returned by the security module, then
  1704.  
  1705.       a) If statusInformation contains values for an OID/value pair,
  1706.          then a Report PDU is generated.
  1707.  
  1708.          1) If the scopedPDU has been returned from ProcessIncomingMsg
  1709.             then determine contextEngineID, contextName, and PDU.
  1710.  
  1711.          2) Information about the message is cached and a
  1712.             stateReference is created (implementation-specific).
  1713.             Information to be cached includes the values of:
  1714.  
  1715.                           msgVersion,
  1716.                           msgID,
  1717.                           securityLevel,
  1718.                           msgFlags,
  1719.                           msgMaxSize,
  1720.                           securityModel,
  1721.                           maxSizeResponseScopedPDU,
  1722.                           securityStateReference
  1723.  
  1724.          3) Request that a Report-PDU be prepared and sent, according
  1725.             to the abstract service primitive:
  1726.  
  1727.              result =                     -- SUCCESS or FAILURE
  1728.              returnResponsePDU(
  1729.              IN  messageProcessingModel   -- SNMPv3(3)
  1730.              IN  securityModel            -- same as on incoming request
  1731.              IN  securityName             -- from ProcessIncomingMsg
  1732.              IN  securityLevel            -- same as on incoming request
  1733.  
  1734.  
  1735.  
  1736. Case, et. al.               Standards Track                    [Page 31]
  1737.  
  1738. RFC 2262               SNMPv3 Management Protocol           January 1998
  1739.  
  1740.  
  1741.              IN  contextEngineID          -- from step 6 a) 1)
  1742.              IN  contextName              -- from step 6 a) 1)
  1743.              IN  pduVersion               -- SNMPv2-PDU
  1744.              IN  PDU                      -- from step 6 a) 1)
  1745.              IN  maxSizeResponseScopedPDU -- from ProcessIncomingMsg
  1746.              IN  stateReference           -- from step 6 a) 2)
  1747.              IN  statusInformation        -- from ProcessIncomingMsg
  1748.              OUT transportDomain          -- destination's transport
  1749.                                           -- domain
  1750.              OUT transportAddress         -- destination's transport
  1751.                                           -- address
  1752.              OUT outgoingMessage          -- the message to send
  1753.              OUT outgoingMessageLength    -- the length of the message
  1754.              )
  1755.  
  1756.       b) The incoming message is discarded without further processing,
  1757.          and a FAILURE result is returned. SNMPv3 Message Processing is
  1758.          complete.
  1759.  
  1760.    7) The scopedPDU is parsed to extract the contextEngineID, the
  1761.       contextName and the PDU.  If any parse error occurs, then the
  1762.       snmpInASNParseErrs counter [RFC1907] is incremented, the security
  1763.       state information is discarded, the message is discarded without
  1764.       further processing, and a FAILURE result is returned. SNMPv3
  1765.       Message Processing is complete.
  1766.  
  1767.    8) The pduVersion is set to an SNMPv2-PDU.
  1768.  
  1769.    9) The pduType is determined, in an implementation-dependent manner,
  1770.       to be:
  1771.  
  1772.                - a GetRequest-PDU,
  1773.                - a GetNextRequest-PDU,
  1774.                - a GetBulkRequest-PDU,
  1775.                - a SetRequest-PDU,
  1776.                - an InformRequest-PDU,
  1777.                - an SNMPv2-Trap-PDU,
  1778.                - a Response-PDU, or
  1779.                - a Report-PDU.
  1780.  
  1781.    10) If the pduType is a Response-PDU or Report-PDU, then
  1782.  
  1783.        a) The value of the msgID component is used to find the cached
  1784.           information for a corresponding outstanding Request message.
  1785.           If no such outstanding Request message is found, then the
  1786.           security state information is discarded, the message is
  1787.           discarded without further processing, and a FAILURE result is
  1788.           returned. SNMPv3 Message Processing is complete.
  1789.  
  1790.  
  1791.  
  1792. Case, et. al.               Standards Track                    [Page 32]
  1793.  
  1794. RFC 2262               SNMPv3 Management Protocol           January 1998
  1795.  
  1796.  
  1797.        b) sendPduHandle is retrieved from the cached information.
  1798.  
  1799.        Otherwise, sendPduHandle is set to <none>, an implementation
  1800.        defined value.
  1801.  
  1802.    11) If the pduType is a Report-PDU, then
  1803.  
  1804.        a) statusInformation is created using the contents of the
  1805.           Report-PDU, in an implementation-dependent manner. This
  1806.           statusInformation will be forwarded to the application
  1807.           associated with the sendPduHandle.
  1808.  
  1809.        b) Any cached information about the outstanding Request message
  1810.           message is discarded.
  1811.  
  1812.        c) The security state information for this incoming message is
  1813.           discarded.
  1814.  
  1815.        d) stateReference is set to <none>
  1816.  
  1817.        e) A SUCCESS result is returned. SNMPv3 Message Processing is
  1818.            complete.
  1819.  
  1820.    12) If the pduType is a Response-PDU, then
  1821.  
  1822.        a) The cached data for the outstanding request, referred to by
  1823.           stateReference, is retrieved, including
  1824.  
  1825.                        - snmpEngineID
  1826.                        - securityModel
  1827.                        - securityName
  1828.                        - securityLevel
  1829.                        - contextEngineID
  1830.                        - contextName
  1831.  
  1832.        b) If the values extracted from the incoming message differ from
  1833.           the cached data, then the security state information is
  1834.           discarded, any cached information about the outstanding
  1835.           Request message is discarded, the incoming message is
  1836.           discarded without further processing, and a FAILURE result is
  1837.           returned.  SNMPv3 Message Processing is complete.
  1838.  
  1839.        c) Otherwise, any cached information about the outstanding
  1840.           Request message is discarded, and stateReference is set to
  1841.           <none>.
  1842.  
  1843.        d) A SUCCESS result is returned. SNMPv3 Message Processing is
  1844.           complete.
  1845.  
  1846.  
  1847.  
  1848. Case, et. al.               Standards Track                    [Page 33]
  1849.  
  1850. RFC 2262               SNMPv3 Management Protocol           January 1998
  1851.  
  1852.  
  1853.    13) If the pduType is a GetRequest-PDU, GetNextRequest-PDU,
  1854.        GetBulkRequest-PDU, SetRequest-PDU, or InformRequest-PDU, then
  1855.  
  1856.        a) If the value of securityEngineID is not equal to the value of
  1857.           snmpEngineID, then the security state information is
  1858.           discarded, any cached information about the outstanding
  1859.           Request message is discarded, the incoming message is
  1860.           discarded without further processing, and a FAILURE result is
  1861.           returned.  SNMPv3 Message Processing is complete.
  1862.  
  1863.        b) Information about the message is cached and a stateReference
  1864.           is created (implementation-specific).  Information to be
  1865.           cached includes the values of:
  1866.  
  1867.                         msgVersion,
  1868.                         msgID,
  1869.                         securityLevel,
  1870.                         msgFlags,
  1871.                         msgMaxSize,
  1872.                         securityModel,
  1873.                         maxSizeResponseScopedPDU,
  1874.                         securityStateReference
  1875.  
  1876.        c) A SUCCESS result is returned. SNMPv3 Message Processing is
  1877.           complete.
  1878.  
  1879.    14) If the pduType is an SNMPv2-Trap-PDU, then A SUCCESS result is
  1880.        returned. SNMPv3 Message Processing is complete.
  1881.  
  1882. 8.  Intellectual Property
  1883.  
  1884.    The IETF takes no position regarding the validity or scope of any
  1885.    intellectual property or other rights that might be claimed to
  1886.    pertain to the implementation or use of the technology described in
  1887.    this document or the extent to which any license under such rights
  1888.    might or might not be available; neither does it represent that it
  1889.    has made any effort to identify any such rights.  Information on the
  1890.    IETF's procedures with respect to rights in standards-track and
  1891.    standards-related documentation can be found in BCP-11.  Copies of
  1892.    claims of rights made available for publication and any assurances of
  1893.    licenses to be made available, or the result of an attempt made to
  1894.    obtain a general license or permission for the use of such
  1895.    proprietary rights by implementors or users of this specification can
  1896.    be obtained from the IETF Secretariat.
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904. Case, et. al.               Standards Track                    [Page 34]
  1905.  
  1906. RFC 2262               SNMPv3 Management Protocol           January 1998
  1907.  
  1908.  
  1909.    The IETF invites any interested party to bring to its attention any
  1910.    copyrights, patents or patent applications, or other proprietary
  1911.    rights which may cover technology that may be required to practice
  1912.    this standard.  Please address the information to the IETF Executive
  1913.    Director.
  1914.  
  1915. 9.  Acknowledgements
  1916.  
  1917.    This document is the result of the efforts of the SNMPv3 Working
  1918.    Group.  Some special thanks are in order to the following SNMPv3 WG
  1919.    members:
  1920.  
  1921.       Dave Battle (SNMP Research, Inc.)
  1922.       Uri Blumenthal (IBM T.J. Watson Research Center)
  1923.       Jeff Case (SNMP Research, Inc.)
  1924.       John Curran (BBN)
  1925.       T. Max Devlin (Hi-TECH Connections)
  1926.       John Flick (Hewlett Packard)
  1927.       David Harrington (Cabletron Systems Inc.)
  1928.       N.C. Hien (IBM T.J. Watson Research Center)
  1929.       Dave Levi (SNMP Research, Inc.)
  1930.       Louis A Mamakos (UUNET Technologies Inc.)
  1931.       Paul Meyer (Secure Computing Corporation)
  1932.       Keith McCloghrie (Cisco Systems)
  1933.       Russ Mundy (Trusted Information Systems, Inc.)
  1934.       Bob Natale (ACE*COMM Corporation)
  1935.       Mike O'Dell (UUNET Technologies Inc.)
  1936.       Dave Perkins (DeskTalk)
  1937.       Peter Polkinghorne (Brunel University)
  1938.       Randy Presuhn (BMC Software, Inc.)
  1939.       David Reid (SNMP Research, Inc.)
  1940.       Shawn Routhier (Epilogue)
  1941.       Juergen Schoenwaelder (TU Braunschweig)
  1942.       Bob Stewart (Cisco Systems)
  1943.       Bert Wijnen (IBM T.J. Watson Research Center)
  1944.  
  1945.    The document is based on recommendations of the IETF Security and
  1946.    Administrative Framework Evolution for SNMP Advisory Team.  Members
  1947.    of that Advisory Team were:
  1948.  
  1949.       David Harrington (Cabletron Systems Inc.)
  1950.       Jeff Johnson (Cisco Systems)
  1951.       David Levi (SNMP Research Inc.)
  1952.       John Linn (Openvision)
  1953.       Russ Mundy (Trusted Information Systems) chair
  1954.       Shawn Routhier (Epilogue)
  1955.       Glenn Waters (Nortel)
  1956.       Bert Wijnen (IBM T. J. Watson Research Center)
  1957.  
  1958.  
  1959.  
  1960. Case, et. al.               Standards Track                    [Page 35]
  1961.  
  1962. RFC 2262               SNMPv3 Management Protocol           January 1998
  1963.  
  1964.  
  1965.    As recommended by the Advisory Team and the SNMPv3 Working Group
  1966.    Charter, the design incorporates as much as practical from previous
  1967.    RFCs and drafts. As a result, special thanks are due to the authors
  1968.    of previous designs known as SNMPv2u and SNMPv2*:
  1969.  
  1970.    Jeff Case (SNMP Research, Inc.)
  1971.    David Harrington (Cabletron Systems Inc.)
  1972.    David Levi (SNMP Research, Inc.)
  1973.    Keith McCloghrie (Cisco Systems)
  1974.    Brian O'Keefe (Hewlett Packard)
  1975.    Marshall T. Rose (Dover Beach Consulting)
  1976.    Jon Saperia (BGS Systems Inc.)
  1977.    Steve Waldbusser (International Network Services)
  1978.    Glenn W. Waters (Bell-Northern Research Ltd.)
  1979.  
  1980. 10.  Security Considerations
  1981.  
  1982.    The Dispatcher coordinates the processing of messages to provide a
  1983.    level of security for management messages and to direct the SNMP PDUs
  1984.    to the proper SNMP application(s).
  1985.  
  1986.    A Message Processing Model, and in particular the V3MP defined in
  1987.    this document, interacts as part of the Message Processing with
  1988.    Security Models in the Security Subsystem via the abstract service
  1989.    interface primitives defined in [RFC2261] and elaborated above.
  1990.  
  1991.    The level of security actually provided is primarily determined by
  1992.    the specific Security Model implementation(s) and the specific SNMP
  1993.    application implementation(s) incorporated into this framework.
  1994.    Applications have access to data which is not secured. Applications
  1995.    should take reasonable steps to protect the data from disclosure, and
  1996.    when they send data across the network, they should obey the
  1997.    securityLevel and call upon the services of an Access Control Model
  1998.    as they apply access control.
  1999.  
  2000.    The values for the msgID element used in communication between SNMP
  2001.    entities must be chosen to avoid replay attacks.  The values do not
  2002.    need to be unpredictable; it is sufficient that they not repeat.
  2003.  
  2004. 11.  References
  2005.  
  2006.    [RFC1901] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2007.       "Introduction to Community-based SNMPv2",
  2008.       RFC 1901, January 1996.
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016. Case, et. al.               Standards Track                    [Page 36]
  2017.  
  2018. RFC 2262               SNMPv3 Management Protocol           January 1998
  2019.  
  2020.  
  2021.    [RFC1902] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2022.       "Structure of Management Information for
  2023.       Version  2 of the Simple Network Management Protocol (SNMPv2)",
  2024.       RFC 1902, January 1996.
  2025.  
  2026.    [RFC1905] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2027.       "Protocol Operations for Version 2 of the
  2028.       Simple Network Management Protocol (SNMPv2)", RFC 1905, January
  2029.       1996.
  2030.  
  2031.    [RFC1906] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2032.       "Transport Mappings for Version 2 of the
  2033.       Simple Network Management Protocol (SNMPv2)", RFC 1906, January
  2034.       1996.
  2035.  
  2036.    [RFC1907] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2037.       "Management Information Base for Version 2
  2038.       of the Simple Network Management Protocol (SNMPv2)", RFC 1907
  2039.       January 1996.
  2040.  
  2041.    [RFC1908] Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
  2042.       "Coexistence between Version 1 and Version
  2043.       2 of the Internet-standard Network Management Framework", RFC
  2044.       1908, January 1996.
  2045.  
  2046.    [RFC 2028] Hovey, R., and S. Bradner, "The Organizations Involved in
  2047.       the IETF Standards Process", BCP 11, RFC 2028, October 1996.
  2048.  
  2049.    [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  2050.       Requirement Levels", RFC 2119, BCP 14, March 1997.
  2051.  
  2052.    [RFC2261] Harrington, D., Presuhn, R., and B. Wijnen, "An
  2053.       Architecture for describing SNMP Management Frameworks",
  2054.       RFC 2261, January 1998.
  2055.  
  2056.    [RFC2264] Blumenthal, U., and B. Wijnen, "The User-Based
  2057.       Security Model for Version 3 of the Simple Network
  2058.       Management Protocol (SNMPv3)", RFC 2264, January 1998.
  2059.  
  2060.    [RFC2265] Wijnen, B., Presuhn, R., and K. McCloghrie,
  2061.       "View-based Access Control Model for the Simple
  2062.       Network Management Protocol (SNMP)", RFC 2265, January 1998.
  2063.  
  2064.    [RFC2263] Levi, D., Meyer, P., and B. Stewart, "SNMPv3
  2065.       Applications", RFC 2263, January 1998.
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072. Case, et. al.               Standards Track                    [Page 37]
  2073.  
  2074. RFC 2262               SNMPv3 Management Protocol           January 1998
  2075.  
  2076.  
  2077. 12.  Editors' Addresses
  2078.  
  2079.    Jeffrey Case
  2080.    SNMP Research, Inc.
  2081.    3001 Kimberlin Heights Road
  2082.    Knoxville, TN 37920-9716
  2083.    USA
  2084.  
  2085.    Phone:     +1 423-573-1434
  2086.    EMail:     case@snmp.com
  2087.  
  2088.  
  2089.    Dave Harrington
  2090.    Cabletron Systems, Inc
  2091.    Post Office Box 5005
  2092.    Mail Stop: Durham
  2093.    35 Industrial Way
  2094.    Rochester, NH 03867-5005
  2095.    USA
  2096.  
  2097.    Phone:      +1 603-337-7357
  2098.    EMail:      dbh@ctron.com
  2099.  
  2100.  
  2101.    Randy Presuhn
  2102.    BMC Software, Inc.
  2103.    1190 Saratoga Avenue
  2104.    Suite 130
  2105.    San Jose, CA 95129
  2106.    USA
  2107.  
  2108.    Phone:      +1 408-556-0720
  2109.    EMail:      rpresuhn@bmc.com
  2110.  
  2111.  
  2112.    Bert Wijnen
  2113.    IBM T. J. Watson Research
  2114.    Schagen 33
  2115.    3461 GL Linschoten
  2116.    Netherlands
  2117.  
  2118.    Phone:      +31 348-432-794
  2119.    EMail:      wijnen@vnet.ibm.com
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128. Case, et. al.               Standards Track                    [Page 38]
  2129.  
  2130. RFC 2262               SNMPv3 Management Protocol           January 1998
  2131.  
  2132.  
  2133. 13.  Full Copyright Statement
  2134.  
  2135.    Copyright (C) The Internet Society (1997).  All Rights Reserved.
  2136.  
  2137.    This document and translations of it may be copied and furnished to
  2138.    others, and derivative works that comment on or otherwise explain it
  2139.    or assist in its implementation may be prepared, copied, published
  2140.    and distributed, in whole or in part, without restriction of any
  2141.    kind, provided that the above copyright notice and this paragraph are
  2142.    included on all such copies and derivative works.  However, this
  2143.    document itself may not be modified in any way, such as by removing
  2144.    the copyright notice or references to the Internet Society or other
  2145.    Internet organizations, except as needed for the purpose of
  2146.    developing Internet standards in which case the procedures for
  2147.    copyrights defined in the Internet Standards process must be
  2148.    followed, or as required to translate it into languages other than
  2149.    English.
  2150.  
  2151.    The limited permissions granted above are perpetual and will not be
  2152.    revoked by the Internet Society or its successors or assigns.
  2153.  
  2154.    This document and the information contained herein is provided on an
  2155.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  2156.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  2157.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  2158.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  2159.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184. Case, et. al.               Standards Track                    [Page 39]
  2185.  
  2186.