home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-snmpv3-v3mpc-model-03.txt < prev    next >
Text File  |  1997-07-31  |  85KB  |  2,423 lines

  1.  
  2.  
  3.  
  4.  
  5.                Message Processing and Dispatching for the
  6.                 Simple Network Management Protocol (SNMP)
  7.  
  8.                               1 August 1997
  9.  
  10.                                  J. Case
  11.                            SNMP Research Inc.
  12.                               case@snmp.com
  13.  
  14.                               D. Harrington
  15.                          Cabletron Systems, Inc.
  16.                             dbh@cabletron.com
  17.  
  18.                                 B. Wijnen
  19.                         IBM T. J. Watson Research
  20.                            wijnen@vnet.ibm.com
  21.  
  22.  
  23.  
  24.                   <draft-ietf-snmpv3-v3mpc-model-03.txt>
  25.  
  26.  
  27.                            Status of this Memo
  28.  
  29. This document is an Internet-Draft. Internet-Drafts are working
  30. documents of the Internet Engineering Task Force (IETF), its areas, and
  31. its working groups. Note that other groups may also distribute working
  32. documents as Internet-Drafts.
  33.  
  34. Internet-Drafts are draft documents valid for a maximum of six months
  35. and may be updated, replaced, or obsoleted by other documents at any
  36. time. It is inappropriate to use Internet- Drafts as reference material
  37. or to cite them other than as ``work in progress.''
  38.  
  39. To learn the current status of any Internet-Draft, please check the
  40. ``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow
  41. Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe),
  42. ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
  43.  
  44.  
  45.                              Abstract
  46.  
  47. This document describes the Message Processing and Dispatching for
  48. SNMP messages within the SNMP architecture [SNMP-ARCH]. It defines the
  49. procedures for dispatching potentially multiple versions of SNMP
  50. messages to the proper SNMP Message Processing Models, and for
  51. dispatching PDUs to SNMP applications. This document also describes
  52. one Message Processing Model - the SNMPv3 Message Processing Model.
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Case/Harrington/Wijnen       Expires  February 1998           [Page  1]
  59.  
  60. Draft       Message Processing and Dispatching for SNMP     August 1997
  61.  
  62.  
  63. 0. Issues
  64.  
  65. 0.1. Resolved Issues
  66.  . contextEngineID in reportPDU = snmpEngineID of report generator
  67.  . returnResponsePDU - are all parameters needed? overrides allowed?
  68.     all parameters kept for future flexibility
  69.     overrides not supported by SNMPv3
  70.  . use of IN/OUT indicators in primitives accepted
  71.  . NT/Unix-like access control - can be defined as future model
  72.  . user-friendly names? yes, but with limits
  73.  . SnmpAdminString as index? yes, but restrict sizes
  74.  . need both MMS and maxSizeResponseScopedPDU? yes.
  75.  . synchronous vs. asynchronous primitives? synchronous preferred
  76.  . should we change MIB naming? no, it is acceptable
  77.  . is it ok that USM is bound to SNMPv3? while undesirable, it is
  78.    acceptable. A cleaner model may be defined in the future.
  79.  . should securityModel "any" be supported? for ACM use, not SNMPv3
  80.  . what defines SNMPv3? a document will be published after Munich
  81.  . Is an application-level handle needed for request/response matching?
  82.    yes. create sendPduhandle
  83.  . Is wildcard conextEngineID/pduType registration needed? No. This is
  84.    an internal interface, and wildcarding can be supported by an
  85.    implementation, but is not required in the standard.
  86.  . Should indices be integers or SnmpAdminStrings? SnmpAdminStrings
  87.    is the consensus.
  88.  . Should protocols be identified as OIDs or Integers? OIDs
  89.  . terminology:
  90.     securityLevel rather than LoS
  91.     msgXXXX to identify message fields in SNMPv3
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. Case/Harrington/Wijnen       Expires  February 1998           [Page  2]
  118.  
  119. Draft       Message Processing and Dispatching for SNMP     August 1997
  120.  
  121.  
  122. 0.2. Change Log
  123.  
  124. [version 4.12]
  125.  . formatting
  126.  . pagination
  127. [version 4.11]
  128.  . moved Issues to resolved following consensus, as listed above
  129.  . remove expectResponse from processIncomingMsg (it doesn't work)
  130.  . add securityEngineID
  131.  . acknowldgements
  132.  . references
  133.  . ordered security, editors, acknowledgements, references sections
  134.  . checked line lengths
  135. [version 4.10]
  136.  . deTab
  137.  . checked MIB using SMICng
  138. [version 4.9]
  139.  . editorial changes
  140.  . rename processMsg to processIncomingMsg
  141.  . returnResponsePDU - to allow application to override cache (futures)
  142.  . generateResponseMsg passes globalData to reduce binding between MP
  143.    and SEC
  144.  . generateRequestMsg passes globalData to reduce binding between MP
  145.    and SEC
  146.  . expectResponse in processIncomingMessage to address Levi concern
  147.  .  acknowledgements
  148.  . posted to snmpv3 mailing list
  149. [version 4.8]
  150.  . spell checking
  151.  . corrected SNMPv3 Message Processing Model
  152. [version 4.7]
  153.  . editorial changes (dbh)
  154. [version 4.4]
  155.  . editorial changes (bert)
  156. . renamed document to Message Processing and Dispatching for SNMP
  157. . reworked Multi-Lingual Model into Dispatcher and Message Processing
  158. . Adapted Primitives to latest set defined in ARCH
  159.  
  160. [version 4.3]
  161.  . removed tabs
  162. [version 4.2]
  163.  . modified elements of procedure for Multi-Lingual Model
  164. [version 4.0]
  165.  . Multi-Lingual Message Processing Model initial version
  166. [version 3.6]
  167.  . editorial fixups by jdc
  168.  . corrected overview diagram
  169.  . changed Message definition to SNMPv3Message
  170. [version 3.5]
  171.  . change LoS to securityLevel
  172. [version 3.4]
  173.  
  174.  
  175.  
  176. Case/Harrington/Wijnen       Expires  February 1998           [Page  3]
  177.  
  178. Draft       Message Processing and Dispatching for SNMP     August 1997
  179.  
  180.  
  181.  . engine, not Message Processing, interacts with network
  182.  . editorial changes
  183.  . registration is per PDU type
  184.  . fields in MsgFlags modified and discussed
  185.  . Changes as to address comments by dbh
  186.  . Changes to get Primitives inline with latest list
  187.  . ran MIB through SMICng
  188.  . updated picture in Overview
  189.  . update primitives to match editors' discussions
  190.  . updates addresses to international format
  191.  . removed editors' notes as appropriate
  192.  . converted editors' notes into Issues as appropriate
  193.  . modified text as per editors' discussions
  194.  . posted to snmpv3 mailing list
  195. [version 3.3]
  196.  . spelling changes
  197.  . elements of procedure expanded
  198.  . changes snmpMPCxxxx to snmpV3xxxx in MIB
  199. [version 3.2]
  200.  . updated change log
  201. [version 3.1]
  202.  . changes as a result of 2nd interim meeting
  203.      . adopt to new abstract service interface primitives
  204.       . use new agreed upon names for things
  205.       . add a new overview of Message Processing Subsystem
  206.       . Remove MP Model selection descriptions
  207.       . Remove Multiplexing layer descriptions
  208.       . Rewrite all the elements of procedure
  209.       . Redo the SNMPv3-MIB
  210.       . Removed security threats section.
  211.       . Did a quick spell check on AIX
  212.    . Message Processing and Control changed to Message Processing
  213.    . change orangelets to applications
  214.    . stats counters should be in the module where they make sense
  215.    . statistics counters moved between documents on a case-by-case
  216.      basic, according to where they make the most sense
  217.    . modified to match consistent terminology
  218.    . improved pictures
  219.    . added elements of procedure
  220.    . changed snmpv3Message to Message
  221.    . modified naming of msgFlags
  222.    . securityParameters size limitation removed
  223.    . removed limits on lengths of contextEngineID and contextName
  224.    . new names for the application types
  225.    . more bullets to make it easier to read
  226.    . primitives have consistent format with expanded comments
  227.    . glossary (not filled in) removed
  228. [version 3.0]
  229.  . published as draft-ietf-snmpv3-mpc-model-01.txt
  230. [version 2.1]
  231.     . ?? not sure if there were any changes
  232.  
  233.  
  234.  
  235. Case/Harrington/Wijnen       Expires  February 1998           [Page  4]
  236.  
  237. Draft       Message Processing and Dispatching for SNMP     August 1997
  238.  
  239.  
  240. [version 2.0]
  241.     . changes as a result of 1st interim meeting
  242.       . some new wording in introduction
  243.       . reword in overview with a drawing
  244.       . added reportFlag to msgFlags
  245.       . describe overall MPC model: MPC Selection mechanism
  246.       . describe overall MPC model: MPC Multiplexing Layer
  247.       . describe v3MPC model.
  248.       . added the abstract interface definitions for interacting
  249.         with SNMPv3 USEC Model
  250.       . added the abstract interface definitions for interacting
  251.         with applications
  252.       . added MIB definitions for error Counters (statistics)
  253.       . removed references to LPM and Access Control
  254. [version 1.2]
  255.     . add text regarding security threats
  256.     . add text regarding access control
  257.     . remove text regarding agent installation of views
  258.     . removed Naming-Scope
  259.     . removed discussion of MPC determining to which application a
  260.       message/request should be forwarded.
  261.     . added Issues section
  262.     . added sending a notification for an application
  263.     . spell-check, renumber, paginate
  264. [version 1.1]
  265.     . separated architecture from Message Processing and Control
  266.       Model for SNMPv3
  267.     . clarified snmpV3Message definition
  268.     . rewrote introduction and overviews
  269.     . wrote transport mappings
  270.     . documented snmpV3Message format
  271.     . changed Quality of Service (QoS) to Level of Security (LoS)
  272.     . changed end-user to security entity
  273.     . Tried to clarify MMS of engine versus MMS of message.
  274.     . change security entity to securityIdentity
  275. [version 1.0]
  276.     . Initial document, with SNMPng architecture and MPCv3 merged.
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294. Case/Harrington/Wijnen       Expires  February 1998           [Page  5]
  295.  
  296. Draft       Message Processing and Dispatching for SNMP     August 1997
  297.  
  298.  
  299. 1. Introduction
  300.  
  301. The Architecture for describing Internet Management Frameworks
  302. [SNMP-ARCH] describes that an SNMP engine is composed of:
  303.  
  304.      1) a Dispatcher
  305.      2) a Message Processing Subsystem,
  306.      3) a Security Subsystem, and
  307.      4) an Access Control Subsystem.
  308.  
  309. Applications make use of the services of these subsystems.
  310.  
  311. It is important to understand the SNMP architecture and its terminology
  312. to understand where the Message Processing and Dispatching described in
  313. this document fits into the architecture and interacts with other
  314. subsystems within the architecture.  The reader is expected to have
  315. read and understood the description of the SNMP architecture, as
  316. defined in [SNMP-ARCH].
  317.  
  318. The Dispatcher in the SNMP engine sends and receives SNMP messages. It
  319. also dispatches SNMP PDUs to SNMP applications. When an SNMP
  320. message needs to be prepared or when data needs to be extracted from
  321. an SNMP message, then the Dispatcher delegates these tasks to a message
  322. version specific Message Processing Model.
  323.  
  324. A Message Processing Model has the responsibility for processing a
  325. SNMP version specific message and for coordinating the interaction with
  326. the Security Subsystem to ensure proper security is applied to the SNMP
  327. message being handled.
  328.  
  329. The interactions between the Dispatcher, the Message Processing
  330. Subsystem and applications are performed using abstract data elements
  331. and abstract service interface primitives as defined by the SNMP
  332. architecture.
  333.  
  334. Similarly, the interactions between the Message Processing Subsystem
  335. and the Security Subsystem are performed using abstract data elements
  336. and abstract service interface primitives as defined by the SNMP
  337. architecture.
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353. Case/Harrington/Wijnen       Expires  February 1998           [Page  6]
  354.  
  355. Draft       Message Processing and Dispatching for SNMP     August 1997
  356.  
  357.  
  358. 2. Overview
  359.  
  360. The following illustration depicts the Message Processing in relation
  361. to SNMP applications, the Security Subsystem and Transport Mappings.
  362.  
  363.  +--------------------------------------------------------------------+
  364.  | SNMP Entity                                                        |
  365.  |                                                                    |
  366.  | +----------------------------------------------------------------+ |
  367.  | | Applications                                                   | |
  368.  | | +------------+  +--------------+                               | |
  369.  | | | Command    |  | Notification |                               | |
  370.  | | | Generator  |  | Originator   | +-----------+ +--------------+| |
  371.  | | +------------+  +--------------+ | Proxy     | | Other         | |
  372.  | | +------------+  +--------------+ | Forwarder | |Application(s)|| |
  373.  | | | Command    |  | Notification | +-----------+ +--------------+| |
  374.  | | | Responder  |  | Receiver     |                               | |
  375.  | | +------------+  +--------------+                               | |
  376.  | +----------------------------------------------------------------+ |
  377.  |        ^                 ^               ^           ^             |
  378.  |        |                 |               |           |             |
  379.  |        v                 v               v           v             |
  380.  |        +--------+--------+---------------+-----------+             |
  381.  |                 ^                                                  |
  382.  |                 |     +---------------------+  +-----------------+ |
  383.  |                 |     | Message Processing  |  | Security        | |
  384.  | Dispatcher      v     | Subsystem           |  | Subsystem       | |
  385.  | +-------------------+ |     +------------+  |  |                 | |
  386.  | | PDU Dispatcher    | |  +->| v1MP     * |<--->| +-------------+ | |
  387.  | |                   | |  |  +------------+  |  | | Other       | | |
  388.  | |                   | |  |  +------------+  |  | | Security    | | |
  389.  | |                   | |  +->| v2cMP    * |<--->| | Model       | | |
  390.  | | Message           | |  |  +------------+  |  | +-------------+ | |
  391.  | | Dispatcher  <--------->+                  |  |                 | |
  392.  | |                   | |  |  +------------+  |  | +-------------+ | |
  393.  | |                   | |  +->| v3MP     * |<--->| | User-based  | | |
  394.  | | Transport         | |  |  +------------+  |  | | Security    | | |
  395.  | | Mapping           | |  |  +------------+  |  | | Model       | | |
  396.  | | (e.g RFC1906)     | |  +->| otherMP  * |<--->| +-------------+ | |
  397.  | +-------------------+ |     +------------+  |  |                 | |
  398.  |          ^            +---------------------+  +-----------------+ |
  399.  |          |                                                         |
  400.  +----------|---------------------------------------------------------+
  401.             v
  402.    +-------------------+
  403.    |   Network         |
  404.    +-------------------+
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412. Case/Harrington/Wijnen       Expires  February 1998           [Page  7]
  413.  
  414. Draft       Message Processing and Dispatching for SNMP     August 1997
  415.  
  416.  
  417. 2.1. The Dispatcher.
  418.  
  419. The Dispatcher is a key piece of an SNMP engine. There is only one
  420. in an SNMP engine, and its job is to dispatch tasks to the multiple
  421. version-specific Message Processing Models, and to dispatch PDUs to
  422. various applications.
  423.  
  424. For incoming messages, the Dispatcher determines the SNMP version of
  425. the incoming message and passes the message to the version-specific
  426. Message Processing Model to extract the components of the message and
  427. to coordinate the processing of security services for the message.
  428. After version-specific processing, the PDU Dispatcher determines to
  429. which application the PDU should be sent for processing.
  430.  
  431. For outgoing messages, an application provides a PDU to be sent, plus
  432. the data needed to prepare and send the message, and the application
  433. specifies which version-specific Message Processing Model should be
  434. used to prepare the message with the desired security processing.
  435. Once the message is prepared, the Dispatcher sends the message.
  436.  
  437. The Dispatcher, while sending and receiving SNMP messages, collects
  438. statistics about SNMP messages and the behavior of the SNMP engine
  439. in managed objects to make them accessible to remote SNMP entities.
  440. This document defines these managed objects, the MIB module which
  441. contains them, and how these managed objects might be used to provide
  442. useful management.
  443.  
  444. 2.2. Message Processing Subsystem
  445.  
  446. The SNMP Message Processing Subsystem is the part of an SNMP engine
  447. which interacts with the Dispatcher to handle the version specific
  448. SNMP messages. It contains one or more Message Processing Models.
  449.  
  450. This document describes one Message Processing Model, the SNMPv3
  451. Message Processing Model, in section 6. The SNMPv3 Message Processing
  452. Model is defined in a separate section to show that multiple
  453. (independent) Message Processing Models can exist at the same time and
  454. that such Models can be described in different documents. The SNMPv3
  455. Message Processing Model can be replaced or supplemented with other
  456. Message Processing Models in the future. Two Message Processing Models
  457. which are expected to be developed in the future are the SNMPv1
  458. message format [RFC1157] and the SNMPv2c message format [RFC1901].
  459. Others may be developed as needed.
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471. Case/Harrington/Wijnen       Expires  February 1998           [Page  8]
  472.  
  473. Draft       Message Processing and Dispatching for SNMP     August 1997
  474.  
  475.  
  476. 3. Elements of Message Processing
  477.  
  478. See [SNMP-ARCH] for the definitions of
  479.         contextEngineID
  480.         contextName
  481.         scopedPDU
  482.         maxSizeResponseScopedPDU
  483.         securityModel
  484.         securityName
  485.         securityLevel
  486.         snmpVersion
  487.  
  488. For incoming messages, a version-specific message processing module
  489. provides these values to the Dispatcher. For outgoing messages, an
  490. application provides these values to the Dispatcher.
  491.  
  492. For some version-specific processing, the values may be extracted
  493. from received messages; for other versions, the values may be
  494. determined by algorithm, or by an implementation-defined mechanism.
  495. How the value is determined is irrelevant to the Dispatcher
  496.  
  497. The following additional or expanded definitions are for use within
  498. the Dispatcher.
  499.  
  500. 3.1. messageProcessingModel
  501.  
  502. The messageProcessingModel identifies a Message Processing Model.
  503. A Model describes the version-specific procedures for extracting data
  504. from messages, generating messages, calling upon a securityModel to
  505. use its security services for a message, and for converting data from
  506. a version-specific message format into a generic format usable by the
  507. Dispatcher, and for converting data from Dispatcher format into a
  508. version-specific message format.
  509.  
  510. 3.2. pduVersion
  511.  
  512. A value which represents a specific version of protocol operation
  513. and its associated PDU formats. The values of pduVersion are specific
  514. to the version of the PDU contained in a message, and the PDUs
  515. processed by applications. The Dispatcher does not use the values of
  516. pduVersion directly.
  517.  
  518. An application can specify the pduVersion when it requests the PDU
  519. Dispatcher to send a PDU to another SNMP engine. The Dispatcher
  520. passes the pduVersion to a Message Processing Model, so it knows how to
  521. handle the PDU properly.
  522.  
  523. For incoming messages, pduVersion is provided to the Dispatcher
  524. by a version-specific Message Processing module. The PDU Dispatcher
  525. passes the pduVersion to the application so it knows how to handle
  526. the PDU properly.
  527.  
  528.  
  529.  
  530. Case/Harrington/Wijnen       Expires  February 1998           [Page  9]
  531.  
  532. Draft       Message Processing and Dispatching for SNMP     August 1997
  533.  
  534.  
  535.  
  536. 3.3. pduType
  537.  
  538. A value which represents a specific type of protocol operation.
  539. The values of pduType are specific to the version of the PDU
  540. contained in a message.
  541.  
  542. Applications register to support particular pduTypes for particular
  543. contextEngineIDs.
  544.  
  545. For incoming messages, pduType is provided to the Dispatcher by a
  546. version-specific Message Processing module. It is subsequently used to
  547. dispatch the PDU to the application which registered for the pduType
  548. for the contextEngineID of the associated scopedPDU.
  549.  
  550. 3.4. sendPduHandle
  551.  
  552. This handle is generated for coordinating the processing of requests
  553. and responses between the SNMP engine and an application. The handle
  554. must be unique across all version-specific Message Processing Models.
  555.  
  556. Implementation Hint: If sendPduhandle is implemented as a 32-bit
  557. integer, its value could be used as a generic unique ID.
  558. For example, the values of an SNMPv3 msgID or an SNMPv1 request-id
  559. could be taken from the sendPduhandle.
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589. Case/Harrington/Wijnen       Expires  February 1998           [Page 10]
  590.  
  591. Draft       Message Processing and Dispatching for SNMP     August 1997
  592.  
  593.  
  594. 4. Elements of Procedure
  595.  
  596. This section describes the procedures followed by the Dispatcher
  597. when generating and processing SNMP messages.
  598.  
  599. 4.1.  Sending an SNMP Message to the Network
  600.  
  601. This section describes the procedure followed by an SNMP engine
  602. whenever it must send an SNMP message.
  603.  
  604. 4.1.1. Sending a Request or Notification
  605.  
  606. An application wants an SNMP PDU to be sent to another (remote)
  607. application.
  608.  
  609. 1) The application requests this using the abstract service primitive:
  610.  
  611.    statusInformation =              -- sendPduHandle if success
  612.                                     -- errorIndication if failure
  613.      sendPdu(
  614.      IN   transportDomain           -- transport domain to be used
  615.      IN   transportAddress          -- destination network address
  616.      IN   messageProcessingModel    -- typically, SNMP version
  617.      IN   securityModel             -- Security Model to use
  618.      IN   securityName              -- on behalf of this principal
  619.      IN   securityLevel             -- Level of Security requested
  620.      IN   contextEngineID           -- data from/at this entity
  621.      IN   contextName               -- data from/in this context
  622.      IN   pduVersion                -- the version of the PDU
  623.      IN   PDU                       -- SNMP Protocol Data Unit
  624.      IN   expectResponse            -- TRUE or FALSE
  625.           )
  626.  
  627. 2) If the messageProcessingModel value does not represent a Message
  628.    Processing Model known to the Dispatcher, then an errorIndication
  629.    (implementation-dependent) is returned to the calling application.
  630.    No further processing is done.
  631.  
  632. 3) The Dispatcher generates a sendPduHandle to coordinate subsequent
  633.    processing.
  634.  
  635. 4) The Message Dispatcher sends the request to the version-specific
  636.    Message Processing module identified by messageProcessingModel
  637.    using the abstract service primitive:
  638.  
  639.    statusInformation =              - success or error indication
  640.      prepareOutgoingMessage(
  641.      IN   transportDomain           -- as specified by application
  642.      IN   transportAddress          -- as specified by application
  643.      IN   messageProcessingModel    -- as specified by application
  644.      IN   securityModel             -- as specified by application
  645.  
  646.  
  647.  
  648. Case/Harrington/Wijnen       Expires  February 1998           [Page 11]
  649.  
  650. Draft       Message Processing and Dispatching for SNMP     August 1997
  651.  
  652.  
  653.      IN   securityName              -- as specified by application
  654.      IN   securityLevel             -- as specified by application
  655.      IN   contextEngineID           -- as specified by application
  656.      IN   contextName               -- as specified by application
  657.      IN   pduVersion                -- the version of the PDU
  658.      IN   PDU                       -- as specified by application
  659.      IN   expectResponse            -- as specified by application
  660.      IN   sendPduHandle             -- as determined in step 3.
  661.      OUT  destTransportDomain       -- destination transport domain
  662.      OUT  destTransportAddress      -- destination transport address
  663.      OUT  outgoingMessage           -- the message to send
  664.      OUT  outgoingMessageLength     -- the message length
  665.           )
  666.  
  667. 5) If the statusInformation indicates an error, the errorIndication
  668.    is returned to the calling application.
  669.  
  670. 6) If the statusInformation indicates success, the sendPduHandle
  671.    is returned to the application, and the outgoingMessage is sent
  672.    over the transport specified by the transportDomain to the address
  673.    specified by the transportAddress.
  674.  
  675.    Outgoing Message Processing is complete.
  676.  
  677. 4.1.2. Sending a Response to the Network
  678.  
  679. An application wants a response to be sent back to the originator
  680. of an SNMP Request.
  681.  
  682. 1) An application can request this using the abstract service
  683.    primitive:
  684.  
  685.    returnResponsePdu(
  686.     IN   messageProcessingModel    -- typically, SNMP version
  687.     IN   securityModel             -- Security Model in use
  688.     IN   securityName              -- on behalf of this principal
  689.     IN   securityLevel             -- same as on incoming request
  690.     IN   contextEngineID           -- data from/at this SNMP entity
  691.     IN   contextName               -- data from/in this context
  692.     IN   pduVersion                -- the version of the PDU
  693.     IN   PDU                       -- SNMP Protocol Data Unit
  694.     IN   maxSizeResponseScopedPDU  -- maximum size of the Response PDU
  695.     IN   stateReference            -- reference to state information
  696.                                    -- as presented with the request
  697.     IN   statusInformation         -- success or errorIndication
  698.     )                              -- error counter OID/value if error
  699.  
  700. 2) The Message Dispatcher sends the request to the version-specific
  701.    protocol specified by messageProcessingModel using the abstract
  702.    service primitive:
  703.  
  704.  
  705.  
  706.  
  707. Case/Harrington/Wijnen       Expires  February 1998           [Page 12]
  708.  
  709. Draft       Message Processing and Dispatching for SNMP     August 1997
  710.  
  711.  
  712.    result =                        -- SUCCESS or errorIndication
  713.      prepareResponseMessage(
  714.      IN   messageProcessingModel   -- as specified by application
  715.      IN   securityModel            -- as specified by application
  716.      IN   securityName             -- as specified by application
  717.      IN   securityLevel            -- as specified by application
  718.      IN   contextEngineID          -- as specified by application
  719.      IN   contextName              -- as specified by application
  720.      IN   pduVersion               -- as specified by application
  721.      IN   PDU                      -- as specified by application
  722.      IN   maxSizeResponseScopedPDU -- as specified by application
  723.      IN   stateReference           -- as specified by application
  724.      IN   statusInformation        -- as specified by application
  725.      OUT  destTransportDomain      -- destination transport domain
  726.      OUT  destTransportAddress     -- destination transport address
  727.      OUT  outgoingMessage          -- the message to send
  728.      OUT  outgoingMessageLength    -- the message length
  729.           )
  730.  
  731. 3) If the result is an errorIndication, the errorIndication is returned
  732.    to the calling application.
  733.  
  734. 4) If the result is success, the outgoingMessage is sent over the
  735.    transport specified by the transportDomain to the address specified
  736.    by the transportAddress.
  737.  
  738.    Message Processing is complete.
  739.  
  740. 4.2.  Receiving an SNMP Message from the Network
  741.  
  742. This section describes the procedure followed by an SNMP engine
  743. whenever it receives an SNMP message.
  744.  
  745. Please note, that for the sake of clarity and to prevent the text from
  746. being even longer and more complicated, some details were omitted from
  747. the steps below.
  748.  
  749.  a) The elements of procedure do not always explicitly indicate when
  750.     state information needs to be released. The general rule is that
  751.     if state information is available when a message is to be
  752.     "discarded without further processing", then the state information
  753.     must also be released at that same time.
  754.  
  755. 4.2.1. Message Dispatching
  756.  
  757. 1) The snmpInPkts counter [RFC1907] is incremented.
  758.  
  759. 2) The version of the SNMP message is determined in an implementation
  760.    dependent manner. If the version cannot be determined, or the
  761.    version is not supported, then the snmpInBadVersions [RFC1907]
  762.    counter is incremented, and the message is discarded without
  763.  
  764.  
  765.  
  766. Case/Harrington/Wijnen       Expires  February 1998           [Page 13]
  767.  
  768. Draft       Message Processing and Dispatching for SNMP     August 1997
  769.  
  770.  
  771.    further processing.
  772.  
  773. 3) The origin transportDomain and origin transportAddress are
  774.    determined.
  775.  
  776. 4) The message is passed to the version-specific Message Processing
  777.    Model which returns the abstract data elements required by the
  778.    Dispatcher. This is done using the abstract service primitive:
  779.  
  780.    result =                        -- SUCCESS or errorIndication
  781.      prepareDataElements(
  782.      IN   transportDomain          -- origin as determined in step 3.
  783.      IN   transportAddress         -- origin as determined in step 3.
  784.      IN   wholeMsg                 -- as received from the network
  785.      IN   wholeMsglength           -- as received from the network
  786.      OUT  messageProcessingModel   -- typically, SNMP version
  787.      OUT  securityModel            -- Security Model to use
  788.      OUT  securityName             -- on behalf of this principal
  789.      OUT  securityLevel            -- Level of Security requested
  790.      OUT  contextEngineID          -- data from/at this entity
  791.      OUT  contextName              -- data from/in this context
  792.      OUT  pduVersion               -- the version of the PDU
  793.      OUT  PDU                      -- SNMP Protocol Data Unit
  794.      OUT  pduType                  -- SNMP PDU type
  795.      OUT  sendPduHandle            -- handle for a matched request
  796.      OUT  maxSizeResponseScopedPDU -- maximum size of the Response PDU
  797.      OUT  statusInformation        -- success or errorIndication
  798.                                    -- error counter OID/value if error
  799.      OUT  stateReference           -- reference to state information
  800.                                    -- to be used for a possible
  801.           )                        -- Response
  802.  
  803. 5) If the result is a FAILURE errorIndication, the message is discarded
  804.    without further processing.
  805.  
  806. 6) The abstract data elements have been prepared now. Continue with
  807.    the section that describes the PDU Dispatching.
  808.  
  809. 4.2.2. PDU Dispatching for Incoming Messages
  810.  
  811. If the value of sendPduhandle is <none>, then this is a request or
  812. notification.
  813.  
  814.   1) The combination of contextEngineID, and pduType are used to
  815.      determine which application has registered for this request or
  816.      notification.
  817.  
  818.   2) If no application has registered for the combination, then
  819.  
  820.      a) The snmpUnknownPDUHandlers counter is incremented.
  821.  
  822.  
  823.  
  824.  
  825. Case/Harrington/Wijnen       Expires  February 1998           [Page 14]
  826.  
  827. Draft       Message Processing and Dispatching for SNMP     August 1997
  828.  
  829.  
  830.      b) A Response message is generated using the abstract service
  831.         primitive:
  832.  
  833.         result =                         -- SUCCESS or FAILURE
  834.         prepareResponseMessage(
  835.         IN   messageProcessingModel    -- as provided by MP module
  836.         IN   securityModel             -- as provided by MP module
  837.         IN   securityName              -- as provided by MP module
  838.         IN   securityLevel             -- as provided by MP module
  839.         IN   contextEngineID           -- as provided by MP module
  840.         IN   contextName               -- as provided by MP module
  841.         IN   pduVersion                -- as provided by MP module
  842.         IN   PDU                       -- as provided by MP module
  843.         IN   maxSizeResponseScopedPDU  -- as provided by MP module
  844.         IN   stateReference            -- as provided by MP module
  845.         IN   statusInformation         -- errorIndication plus
  846.                                        -- snmpUnknownPDUHandlers OID
  847.                                        -- value pair.
  848.         OUT  transportDomain           -- destination transportDomain
  849.         OUT  transportAddress          -- destination transportAddress
  850.         OUT  outgoingMessage           -- the message to send
  851.         OUT  outgoingMessageLength     -- its length
  852.         )
  853.  
  854.      c) If the result is SUCCESS, then the prepared message is sent
  855.         to the originator of the request as identified by the
  856.         transportDomain and transportAddress.
  857.  
  858.      d) The incoming message is discarded without further processing.
  859.         Message Processing for this message is complete.
  860.  
  861.   3) The PDU is dispatched to the application, using the abstract
  862.      service interface:
  863.  
  864.      processPdu(                      -- process Request/Notification
  865.        IN   messageProcessingModel    -- as provided by MP module
  866.        IN   securityModel             -- as provided by MP module
  867.        IN   securityName              -- as provided by MP module
  868.        IN   securityLevel             -- as provided by MP module
  869.        IN   contextEngineID           -- as provided by MP module
  870.        IN   contextName               -- as provided by MP module
  871.        IN   pduVersion                -- as provided by MP module
  872.        IN   PDU                       -- as provided by MP module
  873.        IN   maxSizeResponseScopedPDU  -- as provided by MP module
  874.        IN   stateReference            -- as provided by MP module
  875.             )                         -- needed when sending a response
  876.  
  877.      Message processing for this message is complete.
  878.  
  879. If the value of sendPduHandle is not <none>, then this is a response.
  880.  
  881.  
  882.  
  883.  
  884. Case/Harrington/Wijnen       Expires  February 1998           [Page 15]
  885.  
  886. Draft       Message Processing and Dispatching for SNMP     August 1997
  887.  
  888.  
  889.   1) The value of sendPduHandle is used to determine, in an
  890.      implementation-defined manner, which application is waiting for a
  891.      response PDU associated with this sendPduHandle.
  892.  
  893.   2) If no waiting application is found, the message is discarded
  894.      without further processing, and the stateReference is released.
  895.      Message Processing is complete for this message.
  896.  
  897.   3) Any cached information, including stateReference, about the
  898.      message is discarded.
  899.  
  900.   4) The response is dispatched to the application using the abstract
  901.      service primitive:
  902.  
  903.      processResponsePdu(              -- process Response PDU
  904.        IN   messageProcessingModel    -- as provided by the MP module
  905.        IN   securityModel             -- as provided by the MP module
  906.        IN   securityName              -- as provided by the MP module
  907.        IN   securityLevel             -- as provided by the MP module
  908.        IN   contextEngineID           -- as provided by the MP module
  909.        IN   contextName               -- as provided by the MP module
  910.        IN   pduVersion                -- as provided by the MP module
  911.        IN   PDU                       -- as provided by the MP module
  912.        IN   statusInformation         -- as provided by the MP module
  913.        IN   sendPduHandle             -- as provided by the MP module
  914.             )
  915.  
  916.      Message Processing is complete for this message.
  917.  
  918. 4.3.  Application Registration for Handling PDU types
  919.  
  920. Applications that want to process certain PDUs must register with the
  921. PDU Dispatcher. Applications specify for which combination of
  922. contextEngineID, and pduType(s) they want to take responsibility.
  923.  
  924. 1)  An application registers according to the abstract interface
  925.     primitive:
  926.  
  927.     statusInformation =           -- success or errorIndication
  928.       registerContextEngineID(
  929.       IN   contextEngineID        -- take responsibility for this one
  930.       IN   pduType                -- the pduType(s) to be registered
  931.            )
  932.  
  933. 2)  The parameters may be checked to be valid; if they are not, then an
  934.     errorIndication (invalidParameter) is returned to the application.
  935.  
  936. 3)  Each combination of contextEngineID and pduType can be registered
  937.     only once. If another application has already registered for the
  938.     specified combination, then an errorIndication (alreadyRegistered)
  939.     is returned to the application.
  940.  
  941.  
  942.  
  943. Case/Harrington/Wijnen       Expires  February 1998           [Page 16]
  944.  
  945. Draft       Message Processing and Dispatching for SNMP     August 1997
  946.  
  947.  
  948.  
  949. 4)  Otherwise, the registration is saved so that SNMP PDUs can be
  950.     dispatched to this application.
  951.  
  952.  
  953. 4.3.  Application Unregistration for Handling PDU Types
  954.  
  955. Applications that no longer want to process certain PDUs must
  956. unregister with the PDU Dispatcher.
  957.  
  958. 1)  An application unregisters using the abstract service primitive:
  959.  
  960.     unregisterContextEngineID(
  961.      IN   contextEngineID        -- give up responsibility for this
  962.      IN   pduType                -- the pduType(s) to be unregistered
  963.            )
  964.  
  965. 2)  If the contextEngineID and pduType combination has been registered,
  966.     then the registration is deleted.
  967.  
  968.     If no such registration exists, then the request is ignored.
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002. Case/Harrington/Wijnen       Expires  February 1998           [Page 17]
  1003.  
  1004. Draft       Message Processing and Dispatching for SNMP     August 1997
  1005.  
  1006.  
  1007. 5. Definitions
  1008.  
  1009. 5.1.  Definitions for SNMP Message Processing and Dispatching
  1010.  
  1011. SNMP-MPD-MIB DEFINITIONS ::= BEGIN
  1012.  
  1013. IMPORTS
  1014.     MODULE-COMPLIANCE, OBJECT-GROUP         FROM SNMPv2-CONF
  1015.     MODULE-IDENTITY, OBJECT-TYPE,
  1016.     snmpModules, Counter32                  FROM SNMPv2-SMI;
  1017.  
  1018. snmpMPDMIB MODULE-IDENTITY
  1019.     LAST-UPDATED "9707270000Z"              -- 27 July 1997, midnight
  1020.     ORGANIZATION "SNMPv3 Working Group"
  1021.     CONTACT-INFO "WG-email:   snmpv3@tis.com
  1022.                   Subscribe:  majordomo@tis.com
  1023.                               In message body:  subscribe snmpv3
  1024.  
  1025.                   Chair:      Russ Mundy
  1026.                               Trusted Information Systems
  1027.                   postal:     3060 Washington Road
  1028.                               Glenwood MD 21738
  1029.                               USA
  1030.                   email:      mundy@tis.com
  1031.                   phone:      +1-301-854-6889
  1032.  
  1033.                   Co-editor:  Jeffrey Case
  1034.                               SNMP Research, Inc.
  1035.                   postal:     3001 Kimberlin Heights Road
  1036.                               Knoxville, TN 37920-9716
  1037.                               USA
  1038.                   email:      case@snmp.com
  1039.                   phone:      +1-423-573-1434
  1040.  
  1041.                   Co-editor   Dave Harrington
  1042.                               Cabletron Systems, Inc
  1043.                   postal:     Post Office Box 5005
  1044.                               MailStop: Durham
  1045.                               35 Industrial Way
  1046.                               Rochester NH 03867-5005
  1047.                               USA
  1048.                   email:      dbh@cabletron.com
  1049.                   phone:      +1- 603-337-7357
  1050.  
  1051.                   Co-editor:  Bert Wijnen
  1052.                               IBM T. J. Watson Research
  1053.                   postal:     Schagen 33
  1054.                               3461 GL Linschoten
  1055.                               Netherlands
  1056.                   email:      wijnen@vnet.ibm.com
  1057.                   phone:      +31-348-432-794
  1058.  
  1059.  
  1060.  
  1061. Case/Harrington/Wijnen       Expires  February 1998           [Page 18]
  1062.  
  1063. Draft       Message Processing and Dispatching for SNMP     August 1997
  1064.  
  1065.  
  1066.  
  1067.                  "
  1068.     DESCRIPTION  "The MIB for Message Processing and Dispatching"
  1069.     ::= { snmpModules 8 }  -- check if assignment is OK
  1070.  
  1071. -- Administrative assignments ****************************************
  1072.  
  1073. snmpMPDAdmin           OBJECT IDENTIFIER ::= { snmpMPDMIB 1 }
  1074. snmpMPDMIBObjects      OBJECT IDENTIFIER ::= { snmpMPDMIB 2 }
  1075. snmpMPDMIBConformance  OBJECT IDENTIFIER ::= { snmpMPDMIB 3 }
  1076.  
  1077. -- Statistics for SNMP Messages **************************************
  1078.  
  1079. snmpMPDStats           OBJECT IDENTIFIER ::= { snmpMPDMIBObjects 1 }
  1080.  
  1081. snmpUnknownSecurityModels OBJECT-TYPE
  1082.     SYNTAX       Counter32
  1083.     MAX-ACCESS   read-only
  1084.     STATUS       current
  1085.     DESCRIPTION "The total number of packets received by the SNMP
  1086.                  engine which were dropped because they referenced a
  1087.                  securityModel that was not known to or supported by
  1088.                  the SNMP engine, e.g., was not registered by any
  1089.                  application.
  1090.                 "
  1091.     ::= { snmpMPDStats 1 }
  1092.  
  1093. snmpInvalidMsgs OBJECT-TYPE
  1094.     SYNTAX       Counter32
  1095.     MAX-ACCESS   read-only
  1096.     STATUS       current
  1097.     DESCRIPTION "The total number of packets received by the SNMP
  1098.                  engine which were dropped because there were invalid
  1099.                  or inconsistent components in the SNMP message.
  1100.                 "
  1101.     ::= { snmpMPDStats 2 }
  1102.  
  1103. snmpUnknownPDUHandlers OBJECT-TYPE
  1104.     SYNTAX       Counter32
  1105.     MAX-ACCESS   read-only
  1106.     STATUS       current
  1107.     DESCRIPTION "The total number of packets received by the SNMP
  1108.                  engine which were dropped because the PDU contained
  1109.                  in the packet could not be passed to an application
  1110.                  responsible for handling the pduType, i.e. no SNMP
  1111.                  application had registered for the proper combination
  1112.                  of the messageProcessingModel, the contextEngineID
  1113.                  and the pduType.
  1114.                 "
  1115.     ::= { snmpMPDStats 3 }
  1116.  
  1117.  
  1118.  
  1119.  
  1120. Case/Harrington/Wijnen       Expires  February 1998           [Page 19]
  1121.  
  1122. Draft       Message Processing and Dispatching for SNMP     August 1997
  1123.  
  1124.  
  1125. -- Conformance information *******************************************
  1126.  
  1127. snmpMPDMIBCompliances OBJECT IDENTIFIER ::= { snmpMPDMIBConformance 1 }
  1128. snmpMPDMIBGroups      OBJECT IDENTIFIER ::= { snmpMPDMIBConformance 2 }
  1129.  
  1130. -- Compliance statements
  1131.  
  1132. snmpMPDCompliance MODULE-COMPLIANCE
  1133.     STATUS       current
  1134.     DESCRIPTION "The compliance statement for SNMP entities which
  1135.                  implement the SNMP-MPD-MIB.
  1136.                 "
  1137.  
  1138.     MODULE    -- this module
  1139.         MANDATORY-GROUPS { snmpMPDGroup }
  1140.  
  1141.     ::= { snmpMPDMIBCompliances 1 }
  1142.  
  1143. snmpMPDGroup OBJECT-GROUP
  1144.     OBJECTS {
  1145.               snmpUnknownSecurityModels,
  1146.               snmpInvalidMsgs,
  1147.               snmpUnknownPDUHandlers
  1148.             }
  1149.     STATUS       current
  1150.     DESCRIPTION "A collection of objects providing for remote
  1151.                  monitoring of the SNMP Message Processing and
  1152.                  Dispatching process.
  1153.                 "
  1154.     ::= { snmpMPDMIBGroups 1 }
  1155.  
  1156. END
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179. Case/Harrington/Wijnen       Expires  February 1998           [Page 20]
  1180.  
  1181. Draft       Message Processing and Dispatching for SNMP     August 1997
  1182.  
  1183.  
  1184.  
  1185. 6. The SNMPv3 Message Format
  1186.  
  1187. This section defines the SNMPv3 message format and the corresponding
  1188. SNMP version 3 Message Processing Model (v3MP).
  1189.  
  1190. DEFINITIONS ::= BEGIN
  1191.  
  1192.     SNMPv3Message ::= SEQUENCE {
  1193.         -- administrative parameters
  1194.         msgGlobalData headerData
  1195.  
  1196.         -- security model-specific parameters
  1197.         -- format defined by Security Model
  1198.         msgSecurityParameters OCTET STRING
  1199.  
  1200.         msgData  scopedPduData
  1201.     }
  1202.  
  1203.     headerData ::= SEQUENCE {
  1204.         msgVersion INTEGER { snmpv3 (3) },
  1205.         msgID      INTEGER (0..2147483647),
  1206.         msgMaxSize INTEGER (484..2147483647),
  1207.  
  1208.         msgFlags   OCTET STRING (SIZE(1)),
  1209.                    --  .... ...1   authFlag
  1210.                    --  .... ..1.   privFlag
  1211.                    --  .... .1..   reportableFlag
  1212.                    --  .... 1...   reportFlag
  1213.                    --
  1214.                    --              Please observe:
  1215.                    --  .... ..00   is OK, means noAuthNoPriv
  1216.                    --  .... ..01   is OK, means authNoPriv
  1217.                    --  .... ..10   reserved, must NOT be used.
  1218.                    --  .... ..11   is OK, means authPriv
  1219.  
  1220.         msgSecurityModel INTEGER (0..2147483647)
  1221.     }
  1222.  
  1223.     scopedPduData ::= CHOICE {
  1224.         plaintext    scopedPDU,
  1225.         encryptedPDU OCTET STRING  -- encrypted scopedPDU value
  1226.     }
  1227.  
  1228.     scopedPDU ::= SEQUENCE {
  1229.         contextEngineID  OCTET STRING
  1230.         contextName      OCTET STRING
  1231.         data             ANY -- e.g. PDUs as defined in RFC1905
  1232.     }
  1233. END
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239. Case/Harrington/Wijnen       Expires  February 1998           [Page 21]
  1240.  
  1241. Draft       Message Processing and Dispatching for SNMP     August 1997
  1242.  
  1243.  
  1244. 6.1.  msgVersion
  1245.  
  1246. The msgVersion field is set to snmpv3(3) and identifies the message as
  1247. an SNMP version 3 Message.
  1248.  
  1249. 6.2.  msgID
  1250.  
  1251. The msgID is used between two SNMP entities to coordinate request
  1252. messages and responses, and by the v3MP to coordinate the processing
  1253. of the message by different subsystem models within the architecture.
  1254.  
  1255. Another purpose of msgID is to provide protection against message
  1256. replays. This requires that msgID generated must vary from one
  1257. message to another, and it should be initialized to an unpredictable
  1258. value. A good method would be to initialize msgID when the SNMP
  1259. engine is started and then increase its value monotonically with
  1260. each subsequent message.
  1261.  
  1262. Note that the request-id in a PDU is used by SNMP applications to
  1263. identify the PDU; the msgID is used by the engine to identify the
  1264. message which carries a PDU. The engine may need to identify the
  1265. message even if decrypting of the PDU (and request-id) fails. No
  1266. assumption should be made that the value of the msgID and the value
  1267. of the request-id are equivalent.
  1268.  
  1269. 6.3.  msgMaxSize
  1270.  
  1271. The msgMaxSize field of the message conveys the maximum message size
  1272. supported by the sender of the message, i.e., the maximum message size
  1273. that the sender can accept when another SNMP engine sends an SNMP
  1274. message (be it a response or any other message) to the sender of this
  1275. message.
  1276.  
  1277. When an SNMP message is being generated, the msgMaxSize is provided by
  1278. the SNMP engine which generates the message.  At the receiving SNMP
  1279. engine the msgMaxSize is used to determine how big the Response to a
  1280. Request message can be.
  1281.  
  1282. 6.4.  msgFlags
  1283.  
  1284.  
  1285. The msgFlags field of the message contains several bit fields which
  1286. assist with the processing of the message.
  1287.  
  1288. a) reportableFlag
  1289.  
  1290.    If the reportableFlag is set, then Report PDUs are allowed to be
  1291.    returned to the sender under those conditions which cause the
  1292.    generation of Report PDUs.  If the reportableFlag is zero, then a
  1293.    Report PDU must not be sent.  The reportableFlag should always be
  1294.    zero when the message contains a Report PDU, a Response PDU, or an
  1295.  
  1296.  
  1297.  
  1298. Case/Harrington/Wijnen       Expires  February 1998           [Page 22]
  1299.  
  1300. Draft       Message Processing and Dispatching for SNMP     August 1997
  1301.  
  1302.  
  1303.    SNMPv2-trap PDU.  The reportableFlag should always be set for a
  1304.    Request PDU.
  1305.  
  1306. b) reportFlag
  1307.  
  1308.    The reportFlag indicates whether or not the message contains a
  1309.    Report PDU.
  1310.  
  1311.    Report PDUs are engine-to-engine communications and are processed
  1312.    directly by the SNMPv3 Message Processing Model, and are not passed
  1313.    to applications for processing, unlike all other PDU types.  The
  1314.    reportFlag is set for a message containing a Report PDU so the
  1315.    SNMPv3 Message Processing Model can easily recognize such messages.
  1316.  
  1317. The authFlag and privFlag portions of the msgFlags field are set by the
  1318. sender to indicate the securityLevel that was applied to the message
  1319. before it was sent on the wire.  The receiver of the message should
  1320. apply the same securityLevel when the message is received and the
  1321. contents are being processed.
  1322.  
  1323. There are 3 securityLevels, namely noAuthNoPriv, which is less than
  1324. authNoPriv, which is in turn less than authPriv.  See the SNMP
  1325. architecture document [SNMP-ARCH] for details about the securityLevel.
  1326.  
  1327. a) authFlag
  1328.  
  1329.    If the authFlag is set, then the securityModel used by the SNMP
  1330.    engine which sent the message must identify the securityName on
  1331.    whose behalf the SNMP message was generated and must provide, in a
  1332.    securityModel-specific manner, sufficient data for the receiver of
  1333.    the message to be able to authenticate that identification.  In
  1334.    general, this authentication will allow the receiver to determine
  1335.    with reasonable certainty that the message was:
  1336.    - sent on behalf of the principal associated with the securityName,
  1337.    - was not redirected,
  1338.    - was not modified in transit, and
  1339.    - was not replayed.
  1340.  
  1341.    If the authFlag is not set, then the securityModel used by the
  1342.    SNMP engine which sent the message must identify the securityName
  1343.    on whose behalf the SNMP message was generated but it does not
  1344.    need to provide sufficient data for the receiver of the message
  1345.    to authenticate the identification, as there is no need to
  1346.    authenticate the message in this case.
  1347.  
  1348. b) privFlag
  1349.  
  1350.    If the privFlag is set, then the securityModel used by the SNMP
  1351.    engine which sent the message must also protect the scopedPDU in
  1352.    an SNMP message from disclosure, i.e. must encrypt/decrypt the
  1353.    scopedPDU. If the privFlag is zero, then the securityModel in use
  1354.  
  1355.  
  1356.  
  1357. Case/Harrington/Wijnen       Expires  February 1998           [Page 23]
  1358.  
  1359. Draft       Message Processing and Dispatching for SNMP     August 1997
  1360.  
  1361.  
  1362.    does not need to protect the data from disclosure.
  1363.  
  1364.    It is an explicit requirement of the SNMP architecture that if
  1365.    privacy is selected, then authentication is also required.  That
  1366.    means that if the privFlag is set, then the authFlag should also
  1367.    be set.
  1368.  
  1369. The combination of the authFlag and the privFlag comprises a Level of
  1370. Security as follows:
  1371.  
  1372.    authFlag zero and privFlag zero -> securityLevel is noAuthNoPriv
  1373.    authFlag zero and privFlag one  -> invalid combination
  1374.    authFlag one  and privFlag zero -> securityLevel is authNoPriv
  1375.    authFlag one  and privFlag one  -> securityLevel is authPriv
  1376.  
  1377. 6.5.  msgSecurityModel
  1378.  
  1379. The v3MP supports the concurrent existence of multiple Security Models
  1380. to provide security services for SNMPv3 messages.  The msgSecurityModel
  1381. field in an SNMPv3 Message identifies which Security Model was used by
  1382. the sender to generate the message and therefore which securityModel
  1383. should be used by the receiver to perform security processing for the
  1384. message.  The mapping to the appropriate securityModel implementation
  1385. within an SNMP engine is accomplished in an implementation-dependent
  1386. manner.
  1387.  
  1388. 6.6.  msgSecurityParameters
  1389.  
  1390. The msgSecurityParameters field of the SNMPv3 Message is used for
  1391. communication between the Security Model modules in the sending and
  1392. receiving SNMP engines. The data in the msgSecurityParameters field is
  1393. used exclusively by the Security Model, and the contents and format
  1394. of the data is defined by the Security Model.  This OCTET STRING is
  1395. not interpreted by the v3MP, but is passed to the local implementation
  1396. of the Security Model indicated by the msgSecurityModel field in the
  1397. message.
  1398.  
  1399. 6.7.  scopedPduData
  1400.  
  1401. The scopedPduData field represents either the plain text scopedPDU
  1402. if the privFlag in the msgFlags is zero, or it represents an
  1403. encryptedPDU which must be decrypted by the securityModel in use to
  1404. produce a plaintext scopedPDU.
  1405.  
  1406. 6.8.  scopedPDU
  1407.  
  1408. The scopedPDU contains information to identify an administratively
  1409. unique context and a PDU. The object identifiers in the PDU refer to
  1410. managed objects which are (expected to be) accessible within the
  1411. specified context.
  1412.  
  1413.  
  1414.  
  1415.  
  1416. Case/Harrington/Wijnen       Expires  February 1998           [Page 24]
  1417.  
  1418. Draft       Message Processing and Dispatching for SNMP     August 1997
  1419.  
  1420.  
  1421. 6.8.1. contextEngineID
  1422.  
  1423. The contextEngineID in the SNMPv3 message, uniquely identifies, within
  1424. an administrative domain, an SNMP entity that may realize an instance
  1425. of a context with a particular contextName.
  1426.  
  1427. For incoming messages, the contextEngineID is used to determine to
  1428. which application the scopedPDU should be sent for processing.
  1429.  
  1430. For outgoing messages, the v3MP sets the contextEngineID to the value
  1431. provided by the application in the request for a message to be sent.
  1432.  
  1433. 6.8.2. contextName
  1434.  
  1435. The contextName field in an SNMPv3 message, in conjunction with the
  1436. contextEngineID field, identifies the particular context associated
  1437. with the management information contained in the PDU portion of the
  1438. message.  The contextName is unique within the SNMP entity specified
  1439. by the contextEngineID, which may realize the managed objects
  1440. referenced within the PDU.  An application which originates a message
  1441. provides the value for the contextName field and this value may be
  1442. used during processing by an application at the receiving SNMP Engine.
  1443.  
  1444. 6.8.3. data
  1445.  
  1446. The data field of the SNMPv3 Message contains the PDU.  Among other
  1447. things, the PDU contains the PDU type that is used by the v3MP to
  1448. determine the type of the incoming SNMP message.  The v3MP specifies
  1449. that the PDU must be one of those specified in [RFC1905].
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475. Case/Harrington/Wijnen       Expires  February 1998           [Page 25]
  1476.  
  1477. Draft       Message Processing and Dispatching for SNMP     August 1997
  1478.  
  1479.  
  1480. 7. Elements of Procedure
  1481.  
  1482. This section describes the procedures followed by an SNMP engine when
  1483. generating and processing SNMP messages according to the SNMPv3 Message
  1484. Processing Model.
  1485.  
  1486. Please note, that for the sake of clarity and to prevent the text from
  1487. being even longer and more complicated, some details were omitted from
  1488. the steps below.
  1489.  
  1490.  a) Some steps specify that when some error conditions are encountered
  1491.     when processing a received message, a message containing a Report
  1492.     PDU is generated and the received message is discarded without
  1493.     further processing.  However, a Report-PDU must not be generated
  1494.     unless the reportableFlag is set in the received message.
  1495.  
  1496.  b) The elements of procedure do not always explicitly indicate when
  1497.     state information needs to be released. The general rule is that
  1498.     if state information is available when a message is to be
  1499.     "discarded without further processing", then the state information
  1500.     must also be released at that same time.
  1501.  
  1502. 7.1. Prepare an Outgoing SNMP Message
  1503.  
  1504. This section describes the procedure followed to prepare an SNMPv3
  1505. message from the data elements passed by the Message Dispatcher.
  1506.  
  1507. 1) The Message Dispatcher may request that an SNMPv3 message
  1508.    containing a GetRequest-PDU, a GetNextRequest-PDU, a
  1509.    GetBulkRequest-PDU, a SetRequest-PDU, an InformRequest-PDU,
  1510.    or an SNMPv2-Trap-PDU be prepared for sending.
  1511.  
  1512.    a) It makes such a request according to the abstract service
  1513.       primitive:
  1514.  
  1515.       statusInformation =             -- success or errorIndication
  1516.         prepareOutgoingMessage(
  1517.         IN   transportDomain          -- requested transport domain
  1518.         IN   transportAddress         -- requested destination address
  1519.         IN   messageProcessingModel   -- typically, SNMP version
  1520.         IN   securityModel            -- Security Model to use
  1521.         IN   securityName             -- on behalf of this principal
  1522.         IN   securityLevel            -- Level of Security requested
  1523.         IN   contextEngineID          -- data from/at this entity
  1524.         IN   contextName              -- data from/in this context
  1525.         IN   pduVersion               -- version of the PDU
  1526.         IN   PDU                      -- SNMP Protocol Data Unit
  1527.         IN   expectResponse           -- TRUE or FALSE
  1528.         IN   sendPduHandle            -- the handle for matching
  1529.                                       -- incoming responses
  1530.         OUT  destTransportDomain      -- destination transport domain
  1531.  
  1532.  
  1533.  
  1534. Case/Harrington/Wijnen       Expires  February 1998           [Page 26]
  1535.  
  1536. Draft       Message Processing and Dispatching for SNMP     August 1997
  1537.  
  1538.  
  1539.         OUT  destTransportAddress     -- destination transport address
  1540.         OUT  outgoingMessage          -- the message to send
  1541.         OUT  outgoingMessageLength    -- the length of the message
  1542.         )
  1543.  
  1544.    b) A unique msgID is generated. It is best to use unpredictable
  1545.       numbers for the msgID.
  1546.  
  1547. * SNMPv3 does not use the values of expectResponse or pduVersion.
  1548.  
  1549. 2) The Message Dispatcher may request that an SNMPv3 message
  1550.    containing a Response-PDU or a Report-PDU be prepared for sending.
  1551.  
  1552.    a) It makes such a request according to the abstract service
  1553.       primitive:
  1554.  
  1555.       result =                        -- SUCCESS or FAILURE
  1556.         prepareResponseMessage(
  1557.         IN   messageProcessingModel   -- typically, SNMP version
  1558.         IN   securityModel            -- same as on incoming request
  1559.         IN   securityName             -- same as on incoming request
  1560.         IN   securityLevel            -- same as on incoming request
  1561.         IN   contextEngineID          -- data from/at this SNMP entity
  1562.         IN   contextName              -- data from/in this context
  1563.         IN   pduVersion               -- version of the PDU
  1564.         IN   PDU                      -- SNMP Protocol Data Unit
  1565.         IN   maxSizeResponseScopedPDU -- maximum size of the Response PDU
  1566.         IN   stateReference           -- reference to state information
  1567.                                       -- as presented with the request
  1568.         IN   statusInformation        -- success or errorIndication
  1569.                                       -- error counter OID/value if error
  1570.         OUT  transportDomain          -- destination transport domain
  1571.         OUT  transportAddress         -- destination transport address
  1572.         OUT  outgoingMessage          -- the message to send
  1573.         OUT  outgoingMessageLength    -- the length of the message
  1574.         )
  1575.  
  1576.    b) The cached information for the original request, pointed to
  1577.       by the stateReference, is retrieved, including
  1578.  
  1579.          - msgID,
  1580.          - contextEngineID,
  1581.          - contextName,
  1582.          - securityModel,
  1583.          - securityName,
  1584.          - securityLevel,
  1585.          - securityStateReference,
  1586.          - reportableFlag,
  1587.          - transportDomain, and
  1588.          - transportAddress.
  1589.  
  1590.  
  1591.  
  1592.  
  1593. Case/Harrington/Wijnen       Expires  February 1998           [Page 27]
  1594.  
  1595. Draft       Message Processing and Dispatching for SNMP     August 1997
  1596.  
  1597.  
  1598.        The SNMPv3 Message Processing Model does not allow cached data
  1599.        to be overidden by specified parameters.
  1600.  
  1601. 3) If statusInformation contains values for an OID/value combination,
  1602.    then
  1603.  
  1604.    a) If reportableFlag is zero, then the original message is
  1605.       discarded, and no further processing is done. A result of
  1606.       FAILURE is returned. SNMPv3 Message Processing is complete.
  1607.  
  1608.    b) If a PDU is provided, it is the PDU from the original request.
  1609.       If possible, extract the request-id.
  1610.  
  1611.    c) A Report PDU is prepared:
  1612.       1) the varBindList is set to contain the OID and value from
  1613.          the statusInformation
  1614.       2) error-status is set to 0
  1615.       3) error-index is set to 0.
  1616.       4) request-id is set to the value extracted in step b)
  1617.          Otherwise, request-id is set to 0
  1618.  
  1619.    d) If the errorIndication is NotInTimeWindow, then securityLevel is
  1620.       set to authNoPriv, otherwise securityLevel is set to noAuthNoPriv.
  1621.  
  1622.    e) PDU is set to refer to the new Report-PDU. The old PDU
  1623.       is discarded.
  1624.  
  1625.    f) contextEngineID is set to the value of snmpEngineID
  1626.  
  1627.    g) contextName is set to the default contextName
  1628.  
  1629. 4) If contextEngineID is not yet determined, then the contextEngineID
  1630.    is determined, in an implementation-dependent manner, possibly using
  1631.    the transportDomain and transportAddress.
  1632.  
  1633. 5) If the contextName is not yet determined, the contextName is set
  1634.    to the default context.
  1635.  
  1636. 6) A scopedPDU is prepared from the contextEngineID, contextName,
  1637.    and PDU.
  1638.  
  1639. 7) msgGlobalData is constructed as follows
  1640.  
  1641.    a) The msgVersion field is set to snmpv3(3).
  1642.  
  1643.    b) msgID is set as determined in step 1 or 2.
  1644.  
  1645.    c) msgMaxSize is set to an implementation dependent value.
  1646.  
  1647.    d) msgFlags are set as follows:
  1648.      - If securityLevel specifies noAuthNoPriv, then authFlag
  1649.  
  1650.  
  1651.  
  1652. Case/Harrington/Wijnen       Expires  February 1998           [Page 28]
  1653.  
  1654. Draft       Message Processing and Dispatching for SNMP     August 1997
  1655.  
  1656.  
  1657.      and privFlag are both set to zero.
  1658.      - If securityLevel specifies authNoPriv, then authFlag
  1659.      is set to one and privFlag is set to zero.
  1660.      - If securityLevel specifies authPriv, then authFlag is
  1661.      set to one and privFlag is set to one.
  1662.      - If the PDU is a Response-PDU, a Report-PDU or an SNMPv2-Trap-PDU,
  1663.      then the reportableFlag is set to zero;
  1664.      - If the PDU is a GetRequest-PDU, a GetNextRequest-PDU,
  1665.      a GetBulkRequest-PDU, a SetRequest-PDU, or an InformRequest-PDU
  1666.      then the reportableFlag is set to one.
  1667.      - If the PDU is a Report-PDU, the reportFlag is set to one;
  1668.      otherwise it is set to zero.
  1669.      - All other msgFlags bits are set to zero.
  1670.  
  1671.    e) msgSecurityModel is set to the value of securityModel
  1672.  
  1673. 8) If the PDU is a Response-PDU or a Report-PDU, then
  1674.  
  1675.    a) The specified Security Model is called to generate the message
  1676.       according to the primitive:
  1677.  
  1678.       statusInformation =
  1679.          generateResponseMsg(
  1680.          IN   messageProcessingModel -- SNMPv3 Message Processing Model
  1681.          IN   globalData             -- msgGlobalData from step 7
  1682.          IN   maxMessageSize         -- from msgMaxSize in step 7 c)
  1683.          IN   securityModel          -- as determined in step 7 e)
  1684.          IN   securityEngineID       -- the value of snmpEngineID
  1685.          IN   securityName           -- on behalf of this principal
  1686.          IN   securityLevel          -- for the outgoing message
  1687.          IN   scopedPDU              -- as prepared in step 6)
  1688.          IN   securityStateReference -- as determined in step 2
  1689.          OUT  securityParameters     -- filled in by Security Module
  1690.          OUT  wholeMsg               -- complete generated message
  1691.          OUT  wholeMsgLength         -- length of the generated message
  1692.          )
  1693.  
  1694.       If, upon return from the Security Model, the statusInformation
  1695.       includes an errorIndication, then any cached information about
  1696.       the outstanding request message is discarded, and an
  1697.       errorIndication is returned, so it can be returned to the
  1698.       calling application. SNMPv3 Message Processing is complete.
  1699.  
  1700.    b) A SUCCESS result is returned. SNMPv3 Message Processing is
  1701.       complete.
  1702.  
  1703. 9) If the PDU is a GetRequest-PDU, a GetNextRequest-PDU,
  1704.     a GetBulkRequest-PDU, a SetRequest-PDU, an InformRequest-PDU, or
  1705.     or an SNMPv2-Trap-PDU, then
  1706.  
  1707.    a) If the PDU is an SNMPv2-Trap-PDU, then securityEngineID
  1708.  
  1709.  
  1710.  
  1711. Case/Harrington/Wijnen       Expires  February 1998           [Page 29]
  1712.  
  1713. Draft       Message Processing and Dispatching for SNMP     August 1997
  1714.  
  1715.  
  1716.       is set to the value of this entity's snmpEngineID,
  1717.  
  1718.       Otherwise, the snmpEngineID of the target entity is determined,
  1719.       in an implementation-dependent manner, possibly using
  1720.       transportDomain and transportAddress. securityEngineID is
  1721.       set to the value of the target entity's snmpEngineID.
  1722.  
  1723.    b) The specified Security Model is called to generate the message
  1724.       according to the primitive:
  1725.  
  1726.       statusInformation =
  1727.          generateRequestMsg(
  1728.          IN   messageProcessingModel -- SNMPv3 Message Processing Model
  1729.          IN   globalData             -- msgGlobalData, from step 7
  1730.          IN   maxMessageSize         -- from msgMaxSize in step 7 c)
  1731.          IN   securityModel          -- as provided by caller
  1732.          IN   securityEngineID       -- authoritative SNMP entity
  1733.          IN   securityName           -- as provided by caller
  1734.          IN   securityLevel          -- as provided by caller
  1735.          IN   snmpEngineID           -- as determined in step 9 a)
  1736.          IN   scopedPDU              -- as prepared in step 6
  1737.          OUT  securityParameters     -- filled in by Security Module
  1738.          OUT  wholeMsg               -- complete generated message
  1739.          OUT  wholeMsgLength         -- length of the generated message
  1740.          )
  1741.  
  1742.       If, upon return from the Security Model, the statusInformation
  1743.       includes an errorIndication, then the message is discarded, and
  1744.       the errorIndication is returned, so it can be returned to the
  1745.       calling application, and no further processing is done.
  1746.       SNMPv3 Message Processing is complete.
  1747.  
  1748.    c) Information about the outgoing message is cached, and a
  1749.       stateReference is created (implementation specific).
  1750.       Information to be cached includes the values of:
  1751.  
  1752.              - sendPduHandle
  1753.              - msgID
  1754.              - snmpEngineID
  1755.              - securityModel
  1756.              - securityName
  1757.              - securityLevel
  1758.              - contextEngineID
  1759.              - contextName
  1760.  
  1761.    d) A SUCCESS result is returned.
  1762.       SNMPv3 Message Processing is complete.
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770. Case/Harrington/Wijnen       Expires  February 1998           [Page 30]
  1771.  
  1772. Draft       Message Processing and Dispatching for SNMP     August 1997
  1773.  
  1774.  
  1775. 7.2. Prepare Data Elements from an Incoming SNMP Message
  1776.  
  1777. This section describes the procedure followed to extract data from
  1778. an SNMPv3 message, and to prepare the data elements required for
  1779. further processing of the message by the Message Dispatcher.
  1780.  
  1781. 1) The message is passed in from the Message Dispatcher according to
  1782.    the abstract service primitive:
  1783.  
  1784.    result =                         -- SUCCESS or errorIndication
  1785.      prepareDataElements(
  1786.      IN   transportDomain           -- origin transport domain
  1787.      IN   transportAddress          -- origin transport address
  1788.      IN   wholeMsg                  -- as received from the network
  1789.      IN   wholeMsglength            -- as received from the network
  1790.      OUT  messageProcessingModel    -- typically, SNMP version
  1791.      OUT  securityModel             -- Security Model to use
  1792.      OUT  securityName              -- on behalf of this principal
  1793.      OUT  securityLevel             -- Level of Security requested
  1794.      OUT  contextEngineID           -- data from/at this entity
  1795.      OUT  contextName               -- data from/in this context
  1796.      OUT  pduVersion                -- version of the PDU
  1797.      OUT  PDU                       -- SNMP Protocol Data Unit
  1798.      OUT  pduType                   -- SNMP PDU type
  1799.      OUT  sendPduHandle             -- handle for matched request
  1800.      OUT  maxSizeResponseScopedPDU  -- maximum size of the Response PDU
  1801.      OUT  statusInformation         -- success or errorIndication
  1802.                                     -- error counter OID/value if error
  1803.      OUT  stateReference            -- reference to state information
  1804.                                     -- to be used for a possible
  1805.      )                              -- Response
  1806.  
  1807. 2)  If the received message is not the serialization (according to
  1808.     the conventions of [RFC1906]) of an SNMPv3Message value, then the
  1809.     snmpInASNParseErrs counter [RFC1907] is incremented, the message
  1810.     is discarded without further processing, and a FAILURE result is
  1811.     returned. SNMPv3 Message Processing is complete.
  1812.  
  1813. 3)  The values for msgVersion, msgID, msgMaxSize, msgFlags,
  1814.     msgSecurityModel, msgSecurityParameters, and msgData are extracted
  1815.     from the message.
  1816.  
  1817. 4)  If the value of the msgSecurityModel component does not match a
  1818.     supported securityModel, then the snmpUnknownSecurityModels
  1819.     counter is incremented, a Report PDU is generated, the
  1820.     message is discarded without further processing, and a FAILURE
  1821.     result is returned. SNMPv3 Message Processing is complete.
  1822.  
  1823. 5)  The securityLevel is determined from the authFlag and the privFlag
  1824.     bits of the msgFlags component as follows:
  1825.  
  1826.  
  1827.  
  1828.  
  1829. Case/Harrington/Wijnen       Expires  February 1998           [Page 31]
  1830.  
  1831. Draft       Message Processing and Dispatching for SNMP     August 1997
  1832.  
  1833.  
  1834.     a) If the authFlag is not set and the privFlag is not set, then
  1835.        securityLevel is set to noAuthNoPriv.
  1836.  
  1837.     b) If the authFlag is set and the privFlag is not set, then
  1838.        securityLevel is set to authNoPriv.
  1839.  
  1840.     c) If the authFlag is set and the privFlag is set, then
  1841.        securityLevel is set to authPriv.
  1842.  
  1843.     d) If the authFlag is not set and privFlag is set, then the
  1844.        snmpInvalidMessages counter is incremented, a Report PDU is
  1845.        generated, the message is discarded without further processing,
  1846.        and a FAILURE result is returned. SNMPv3 Message Processing is
  1847.        complete.
  1848.  
  1849. 6)  The security module implementing the Security Model as specified
  1850.     by the securityModel component is called for authentication and
  1851.     privacy services.  This is done according to the abstract service
  1852.     primitive:
  1853.  
  1854.     statusInformation =             -- errorIndication or success
  1855.                                     -- error counter OID/value if error
  1856.       processIncomingMsg(
  1857.       IN   messageProcessingModel   -- SNMPv3 Message Processing Model
  1858.       IN   expectResponse           -- TRUE or FALSE
  1859.       IN   maxMessageSize           -- of the sending SNMP entity
  1860.       IN   securityParameters       -- for the received message
  1861.       IN   securityModel            -- for the received message
  1862.       IN   securityLevel            -- Level of Security
  1863.       IN   wholeMsg                 -- as received on the wire
  1864.       IN   wholeMsgLength           -- length as received on the wire
  1865.       OUT  securityEngineID         -- authoritative SNMP entity
  1866.       OUT  securityName             -- identification of the principal
  1867.       OUT  scopedPDU,               -- message (plaintext) payload
  1868.       OUT  maxSizeResponseScopedPDU -- maximum size of the Response PDU
  1869.       OUT  securityStateReference   -- reference to security state
  1870.       )                             -- information, needed for response
  1871.  
  1872.     If an errorIndication is returned by the security module, then
  1873.  
  1874.     a) If statusInformation contains values for an OID/value pair,
  1875.        then a Report PDU is generated.
  1876.  
  1877.        1) If the scopedPDU has been returned from ProcessIncomingMessage
  1878.           then determine contextEngineID, contextName, and PDU.
  1879.  
  1880.        2) Information about the message is cached and a stateReference
  1881.           is created (implementation specific). Information to be cached
  1882.           includes the values of:
  1883.  
  1884.              msgVersion,
  1885.  
  1886.  
  1887.  
  1888. Case/Harrington/Wijnen       Expires  February 1998           [Page 32]
  1889.  
  1890. Draft       Message Processing and Dispatching for SNMP     August 1997
  1891.  
  1892.  
  1893.              msgID,
  1894.              securityLevel,
  1895.              msgFlags,
  1896.              msgMaxSize,
  1897.              securityModel,
  1898.              maxSizeResponseScopedPDU,
  1899.              securityStateReference
  1900.  
  1901.        3) Request that a Report-PDU be prepared and sent, according to
  1902.           the abstract service primitive:
  1903.  
  1904.         result =                          -- SUCCESS or FAILURE
  1905.         returnResponsePDU(
  1906.         IN   messageProcessingModel    -- SNMPv3(3)
  1907.         IN   securityModel             -- same as on incoming request
  1908.         IN   securityName              -- from ProcessIncomingMessage
  1909.         IN   securityLevel             -- same as on incoming request
  1910.         IN   contextEngineID           -- from step 6 a) 1)
  1911.         IN   contextName               -- from step 6 a) 1)
  1912.         IN   pduVersion                -- SNMPv2-PDU
  1913.         IN   PDU                       -- from step 6 a) 1)
  1914.         IN   maxSizeResponseScopedPDU  -- from ProcessIncomingMessage
  1915.         IN   stateReference            -- from step 6 a) 2)
  1916.         IN   statusInformation         -- from ProcessIncomingMsg
  1917.         OUT  transportDomain           -- destination transport domain
  1918.         OUT  transportAddress          -- destination transport address
  1919.         OUT  outgoingMessage           -- the message to send
  1920.         OUT  outgoingMessageLength     -- the length of the message
  1921.         )
  1922.  
  1923.     b) The incoming message is discarded without further processing,
  1924.        and a FAILURE result is returned. SNMPv3 Message Processing is
  1925.        complete.
  1926.  
  1927. 7)  The scopedPDU is parsed to extract the contextEngineID, the
  1928.     contextName and the PDU.  If any parse error occurs, then the
  1929.     snmpInASNParseErrs counter [RFC1907] is incremented, the security
  1930.     state information is discarded, the message is discarded without
  1931.     further processing, and a FAILURE result is returned. SNMPv3
  1932.     Message Processing is complete.
  1933.  
  1934. 8)  The pduVersion is set to an SNMPv2-PDU.
  1935.  
  1936. 9)  The pduType is determined, in an implementation-dependent manner,
  1937.     to be:
  1938.  
  1939.         - a GetRequest-PDU,
  1940.         - a GetNextRequest-PDU,
  1941.         - a GetBulkRequest-PDU,
  1942.         - a SetRequest-PDU,
  1943.         - an InformRequest-PDU,
  1944.  
  1945.  
  1946.  
  1947. Case/Harrington/Wijnen       Expires  February 1998           [Page 33]
  1948.  
  1949. Draft       Message Processing and Dispatching for SNMP     August 1997
  1950.  
  1951.  
  1952.         - an SNMPv2-Trap-PDU,
  1953.         - a Response-PDU, or
  1954.         - a Report-PDU.
  1955.  
  1956. 10) If the pduType is a Response-PDU or a Report-PDU, then
  1957.  
  1958.     a) The value of the msgID component is used to find the cached
  1959.        information for a corresponding outstanding Request message.
  1960.        If no such outstanding Request message is found, then the
  1961.        security state information is discarded, the message is
  1962.        discarded without further processing, and a FAILURE result
  1963.        is returned. SNMPv3 Message Processing is complete.
  1964.  
  1965.     b) sendPduhandle is retrieved from the cached information.
  1966.  
  1967.     Otherwise, sendPduhandle is set to <none>, an implementation
  1968.     defined value.
  1969.  
  1970. 11) If the pduType is a Report-PDU, then
  1971.  
  1972.     a) statusInformation is created using the contents of the
  1973.        Report-PDU, in an implementation-dependent manner. This
  1974.        statusInformation will be forwarded to the application
  1975.        associated with the sendPduHandle.
  1976.  
  1977.     b) Any cached information about the outstanding Request message
  1978.        message is discarded.
  1979.  
  1980.     c) The security state information for this incoming message
  1981.        is discarded.
  1982.  
  1983.     d) stateReference is set to <none>
  1984.  
  1985.     e) A SUCCESS result is returned. SNMPv3 Message Processing is
  1986.        complete.
  1987.  
  1988. 12) If the pduType is a Response-PDU, then
  1989.  
  1990.     a) The cached data for the outstanding request, referred to
  1991.        by stateReference, is retrieved, including
  1992.  
  1993.             - snmpEngineID
  1994.             - securityModel
  1995.             - securityName
  1996.             - securityLevel
  1997.             - contextEngineID
  1998.             - contextName
  1999.  
  2000.     b) If the values extracted from the incoming message differ
  2001.        from the cached data, then the security state information
  2002.        is discarded, any cached information about the outstanding
  2003.  
  2004.  
  2005.  
  2006. Case/Harrington/Wijnen       Expires  February 1998           [Page 34]
  2007.  
  2008. Draft       Message Processing and Dispatching for SNMP     August 1997
  2009.  
  2010.  
  2011.        Request message is discarded, the incoming message is discarded
  2012.        without further processing, and a FAILURE result is returned.
  2013.        SNMPv3 Message Processing is complete.
  2014.  
  2015.     c) Otherwise, any cached information about the outstanding Request
  2016.        message is discarded, and stateReference is set to <none>.
  2017.  
  2018.     d) A SUCCESS result is returned. SNMPv3 Message Processing is
  2019.        complete.
  2020.  
  2021. 13) If the pduType is a GetRequest-PDU, a GetNextRequest-PDU,
  2022.     a GetBulkRequest-PDU, a SetRequest-PDU, an InformRequest-PDU,
  2023.     then
  2024.  
  2025.     a) If the value of securityEngineID is not equal to the value of
  2026.        snmpEngineID, then the security state information is discarded,
  2027.        any cached information about the outstanding Request message
  2028.        is discarded, the incoming message is discarded without further
  2029.        processing, and a FAILURE result is returned.
  2030.        SNMPv3 Message Processing is complete.
  2031.  
  2032.     b) Information about the message is cached and a stateReference
  2033.        is created (implementation specific). Information to be cached
  2034.        includes the values of:
  2035.  
  2036.              msgVersion,
  2037.              msgID,
  2038.              securityLevel,
  2039.              msgFlags,
  2040.              msgMaxSize,
  2041.              securityModel,
  2042.              maxSizeResponseScopedPDU,
  2043.              securityStateReference
  2044.  
  2045.     c) A SUCCESS result is returned. SNMPv3 Message Processing is
  2046.        complete.
  2047.  
  2048. 14)  If the pduType is an SNMPv2-Trap-PDU, then
  2049.  
  2050.      A SUCCESS result is returned. SNMPv3 Message Processing is
  2051.      complete.
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065. Case/Harrington/Wijnen       Expires  February 1998           [Page 35]
  2066.  
  2067. Draft       Message Processing and Dispatching for SNMP     August 1997
  2068.  
  2069.  
  2070. 8. Security Considerations
  2071.  
  2072. The Multi-Lingual Message Processing Model coordinates the processing
  2073. of messages to provide a level of security for management messages and
  2074. to direct the SNMP PDUs to the proper SNMP application(s).
  2075.  
  2076. The level of security actually provided is primarily determined by
  2077. the specific Security Model implementation(s) and the specific
  2078. SNMP application implementation(s) incorporated into this framework.
  2079. Applications have access to data which is not secured. Applications
  2080. should take reasonable steps to protect the data from disclosure, and
  2081. when they send data across the network, they should obey the
  2082. securityLevel and call upon the services of an Access Control Model
  2083. to apply access control.
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124. Case/Harrington/Wijnen       Expires  February 1998           [Page 36]
  2125.  
  2126. Draft       Message Processing and Dispatching for SNMP     August 1997
  2127.  
  2128.  
  2129. 9. Editor's Addresses
  2130.  
  2131.    Co-editor:  Jeffrey Case
  2132.                SNMP Research, Inc.
  2133.    postal:     3001 Kimberlin Heights Road
  2134.                Knoxville, TN 37920-9716
  2135.                USA
  2136.    email:      case@snmp.com
  2137.    phone:      +1-423-573-1434
  2138.  
  2139.    Co-editor   Dave Harrington
  2140.                Cabletron Systems, Inc
  2141.    postal:     Post Office Box 5005
  2142.                MailStop: Durham
  2143.                35 Industrial Way
  2144.                Rochester NH 03867-5005
  2145.                USA
  2146.    email:      dbh@cabletron.com
  2147.    phone:      +1-603-337-7357
  2148.  
  2149.    Co-editor:  Bert Wijnen
  2150.                IBM T. J. Watson Research
  2151.    postal:     Schagen 33
  2152.                3461 GL Linschoten
  2153.                Netherlands
  2154.    email:      wijnen@vnet.ibm.com
  2155.    phone:      +31-348-432-794
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183. Case/Harrington/Wijnen       Expires  February 1998           [Page 37]
  2184.  
  2185. Draft       Message Processing and Dispatching for SNMP     August 1997
  2186.  
  2187.  
  2188.  
  2189. 10. Acknowledgements
  2190.  
  2191. This document is the result of the efforts of the SNMPv3 Working Group.
  2192. Some special thanks are in order to the following SNMPv3 WG members:
  2193.  
  2194.     Dave Battle (SNMP Research, Inc.)
  2195.     Uri Blumenthal (IBM T.J. Watson Research Center)
  2196.     Jeff Case (SNMP Research, Inc.)
  2197.     John Curran (BBN)
  2198.     T. Max Devlin (Hi-TECH Connections)
  2199.     John Flick (Hewlett Packard)
  2200.     David Harrington (Cabletron Systems Inc.)
  2201.     N.C. Hien (IBM T.J. Watson Research Center)
  2202.     Dave Levi (SNMP Research, Inc.)
  2203.     Louis A Mamakos (UUNET Technologies Inc.)
  2204.     Paul Meyer (Secure Computing Corporation)
  2205.     Keith McCloghrie (Cisco Systems)
  2206.     Russ Mundy (Trusted Information Systems, Inc.)
  2207.     Bob Natale (ACE*COMM Corporation)
  2208.     Mike O'Dell (UUNET Technologies Inc.)
  2209.     Dave Perkins (DeskTalk)
  2210.     Peter Polkinghorne (Brunel University)
  2211.     Randy Presuhn (BMC Software, Inc.)
  2212.     David Reid (SNMP Research, Inc.)
  2213.     Shawn Routhier (Epilogue)
  2214.     Juergen Schoenwaelder (TU Braunschweig)
  2215.     Bob Stewart (Cisco Systems)
  2216.     Bert Wijnen (IBM T.J. Watson Research Center)
  2217.  
  2218. The document is based on recommendations of the IETF Security and
  2219. Administrative Framework Evolution for SNMP Advisory Team.
  2220. Members of that Advisory Team were:
  2221.  
  2222.     David Harrington (Cabletron Systems Inc.)
  2223.     Jeff Johnson (Cisco Systems)
  2224.     David Levi (SNMP Research Inc.)
  2225.     John Linn (Openvision)
  2226.     Russ Mundy (Trusted Information Systems) chair
  2227.     Shawn Routhier (Epilogue)
  2228.     Glenn Waters (Nortel)
  2229.     Bert Wijnen (IBM T. J. Watson Research Center)
  2230.  
  2231. As recommended by the Advisory Team and the SNMPv3 Working Group
  2232. Charter, the design incorporates as much as practical from previous
  2233. RFCs and drafts. As a result, special thanks are due to the authors
  2234. of previous designs known as SNMPv2u and SNMPv2*:
  2235.  
  2236.     Jeff Case (SNMP Research, Inc.)
  2237.     David Harrington (Cabletron Systems Inc.)
  2238.     David Levi (SNMP Research, Inc.)
  2239.     Keith McCloghrie (Cisco Systems)
  2240.  
  2241.  
  2242.  
  2243. Case/Harrington/Wijnen       Expires  February 1998           [Page 38]
  2244.  
  2245. Draft       Message Processing and Dispatching for SNMP     August 1997
  2246.  
  2247.  
  2248.     Brian O'Keefe (Hewlett Packard)
  2249.     Marshall T. Rose (Dover Beach Consulting)
  2250.     Jon Saperia (BGS Systems Inc.)
  2251.     Steve Waldbusser (International Network Services)
  2252.     Glenn W. Waters (Bell-Northern Research Ltd.)
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302. Case/Harrington/Wijnen       Expires  February 1998           [Page 39]
  2303.  
  2304. Draft       Message Processing and Dispatching for SNMP     August 1997
  2305.  
  2306.  
  2307. 11. References
  2308.  
  2309. [RFC1901] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  2310.      Rose, M., and S., Waldbusser, "Introduction to
  2311.      Community-based SNMPv2", RFC 1901, January 1996.
  2312.  
  2313. [RFC1902] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  2314.      Rose, M., and S., Waldbusser, "Structure of Management
  2315.      Information for Version  2 of the Simple Network Management
  2316.      Protocol (SNMPv2)", RFC 1902, January 1996.
  2317.  
  2318. [RFC1905] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  2319.      Rose, M., and S., Waldbusser, "Protocol Operations for
  2320.      Version 2 of the Simple Network Management Protocol (SNMPv2)",
  2321.      RFC 1905, January 1996.
  2322.  
  2323. [RFC1906] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  2324.      Rose, M., and S. Waldbusser, "Transport Mappings for
  2325.      Version 2 of the Simple Network Management Protocol (SNMPv2)",
  2326.      RFC 1906, January 1996.
  2327.  
  2328. [RFC1907] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  2329.      Rose, M., and S. Waldbusser, "Management Information Base for
  2330.      Version 2 of the Simple Network Management Protocol (SNMPv2)",
  2331.      RFC 1907 January 1996.
  2332.  
  2333. [RFC1908] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  2334.      Rose, M., and S. Waldbusser, "Coexistence between Version 1
  2335.      and Version 2 of the Internet-standard Network Management
  2336.      Framework", RFC 1908, January 1996.
  2337.  
  2338. [SNMP-ARCH] The SNMPv3 Working Group, Harrington, D., Wijnen, B.,
  2339.      "An Architecture for describing SNMP Management Frameworks",
  2340.      draft-ietf-snmpv3-next-gen-arch-04.txt, August 1997.
  2341.  
  2342. [SNMP-USM] The SNMPv3 Working Group, Blumenthal, U., Wijnen, B.,
  2343.      "The User-Based Security Model for Version 3 of the Simple
  2344.      Network Management Protocol (SNMPv3)",
  2345.      draft-ietf-snmpv3-usm-01.txt, August 1997.
  2346.  
  2347. [SNMP-ACM] The SNMPv3 Working Group, Wijnen, B., Presuhn, R.,
  2348.      McCloghrie, K., "View-based Access Control Model for the Simple
  2349.      Network Management Protocol (SNMP)",
  2350.      draft-ietf-snmpv3-acm-02.txt, August 1997.
  2351.  
  2352. [SNMP-APPL] The SNMPv3 Working Group, Levi, D. B., Meyer, P.,
  2353.      Stewart, B., "SNMPv3 Applications",
  2354.      <draft-ietf-snmpv3-appl-01.txt>, August 1997
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361. Case/Harrington/Wijnen       Expires  February 1998           [Page 40]
  2362.  
  2363. Draft       Message Processing and Dispatching for SNMP     August 1997
  2364.  
  2365.  
  2366. Table of Contents
  2367.  
  2368. 0. Issues                                                             2
  2369. 0.1. Resolved Issues                                                  2
  2370. 0.2. Change Log                                                       3
  2371. 1. Introduction                                                       6
  2372. 2. Overview                                                           7
  2373. 2.1. The Dispatcher.                                                  8
  2374. 2.2. Message Processing Subsystem                                     8
  2375. 3. Elements of Message Processing                                     9
  2376. 3.1. messageProcessingModel                                           9
  2377. 3.2. pduVersion                                                       9
  2378. 3.3. pduType                                                         10
  2379. 3.4. sendPduHandle                                                   10
  2380. 4. Elements of Procedure                                             11
  2381. 4.1.  Sending an SNMP Message to the Network                         11
  2382. 4.1.1. Sending a Request or Notification                             11
  2383. 4.1.2. Sending a Response to the Network                             12
  2384. 4.2.  Receiving an SNMP Message from the Network                     13
  2385. 4.2.1. Message Dispatching                                           13
  2386. 4.2.2. PDU Dispatching for Incoming Messages                         14
  2387. 4.3.  Application Registration for Handling PDU types                16
  2388. 4.3.  Application Unregistration for Handling PDU Types              17
  2389. 5. Definitions                                                       18
  2390. 5.1.  Definitions for SNMP Message Processing and Dispatching        18
  2391. 6. The SNMPv3 Message Format                                         21
  2392. 6.1.  msgVersion                                                     22
  2393. 6.2.  msgID                                                          22
  2394. 6.3.  msgMaxSize                                                     22
  2395. 6.4.  msgFlags                                                       22
  2396. 6.5.  msgSecurityModel                                               24
  2397. 6.6.  msgSecurityParameters                                          24
  2398. 6.7.  scopedPduData                                                  24
  2399. 6.8.  scopedPDU                                                      24
  2400. 6.8.1. contextEngineID                                               25
  2401. 6.8.2. contextName                                                   25
  2402. 6.8.3. data                                                          25
  2403. 7. Elements of Procedure                                             26
  2404. 7.1. Prepare an Outgoing SNMP Message                                26
  2405. 7.2. Prepare Data Elements from an Incoming SNMP Message             31
  2406. 8. Security Considerations                                           36
  2407. 9. Editor's Addresses                                                37
  2408. 10. Acknowledgements                                                 38
  2409. 11. References                                                       40
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422. Case/Harrington/Wijnen       Expires  February 1998           [Page 41]
  2423.