home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_a_c / draft-ietf-agentx-ext-pro-04.txt < prev    next >
Text File  |  1997-06-10  |  178KB  |  4,777 lines

  1.  
  2.  
  3.  
  4.  
  5.                    Agent Extensibility (AgentX) Protocol
  6.                                  Version 1
  7.  
  8.                     <draft-ietf-agentx-ext-pro-04.txt>
  9.  
  10.                                Mike Daniele
  11.                        Digital Equipment Corporation
  12.                             daniele@zk3.dec.com
  13.  
  14.                                 Bert Wijnen
  15.                   T.J. Watson Research Center, IBM Corp.
  16.                             wijnen@vnet.ibm.com
  17.  
  18.                           Dale Francisco (editor)
  19.                             Cisco Systems, Inc.
  20.                             dfrancis@cisco.com
  21.  
  22.  
  23.  
  24. Status of this Memo
  25.  
  26.    This document is an Internet-Draft.  Internet-Drafts are working
  27.    documents of the Internet Engineering Task Force (IETF), its areas,
  28.    and its working groups.  Note that other groups may also distribute
  29.    working documents as Internet-Drafts.
  30.  
  31.    Internet-Drafts are draft documents valid for a maximum of six
  32.    months and may be updated, replaced, or obsoleted by other documents
  33.    at any time.  It is inappropriate to use Internet-Drafts as
  34.    reference material or to cite them other than as "work in progress".
  35.  
  36.    To learn the current status of any Internet-Draft, please check the
  37.    "1id-abstracts.txt" listing contained in the Internet-Drafts
  38.    Shadow Directories on ds.internic.net (US East Coast), nic.nordu.net
  39.    (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific
  40.    Rim).
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56. Daniele/Wijnen       Expires December 1997                     [Page  1]
  57.  
  58. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  59.  
  60.  
  61.    1 Introduction......................................................5
  62.  
  63.    2 The SNMP Framework................................................5
  64.      2.1 A Note on Terminology.........................................5
  65.  
  66.    3 Extending the MIB.................................................6
  67.      3.1 Motivation for AgentX.........................................6
  68.  
  69.    4 AgentX Framework..................................................7
  70.      4.1 AgentX Roles..................................................8
  71.      4.2 Applicability.................................................9
  72.      4.3 Design Features of AgentX....................................10
  73.      4.4 Non-Goals....................................................11
  74.  
  75.    5 AgentX Encodings.................................................12
  76.      5.1 Object Identifier............................................12
  77.      5.2 SearchRange..................................................14
  78.      5.3 Octet String.................................................16
  79.      5.4 Value Representation.........................................17
  80.  
  81.    6 Protocol Definitions.............................................19
  82.      6.1 AgentX PDU Header............................................19
  83.        6.1.1 Context..................................................22
  84.      6.2 AgentX PDUs..................................................23
  85.        6.2.1 The agentx-Open-PDU......................................23
  86.        6.2.2 The agentx-Close-PDU.....................................24
  87.        6.2.3 The agentx-Register-PDU..................................26
  88.        6.2.4 The agentx-Unregister-PDU................................29
  89.        6.2.5 The agentx-Get-PDU.......................................31
  90.        6.2.6 The agentx-GetNext-PDU...................................32
  91.        6.2.7 The agentx-GetBulk-PDU...................................34
  92.        6.2.8 The agentx-TestSet-PDU...................................35
  93.        6.2.9 The agentx-CommitSet, -UndoSet, -CleanupSet
  94.              PDUs.....................................................36
  95.        6.2.10 The agentx-Notify-PDU...................................37
  96.        6.2.11 The agentx-Ping-PDU.....................................38
  97.        6.2.12 The agentx-IndexAllocate-PDU............................39
  98.        6.2.13 The agentx-IndexDeallocate-PDU..........................40
  99.        6.2.14 The agentx-AddAgentCaps-PDU.............................41
  100.        6.2.15 The agentx-RemoveAgentCaps-PDU..........................43
  101.        6.2.16 The agentx-Response-PDU.................................44
  102.  
  103.    7 Elements of Procedure............................................46
  104.      7.1 Processing AgentX Administrative Messages....................46
  105.        7.1.1 Processing the agentx-Open-PDU...........................47
  106.        7.1.2 Processing the agentx-IndexAllocate-PDU..................48
  107.        7.1.3 Using the agentx-IndexAllocate-PDU.......................49
  108.        7.1.4 Processing the agentx-IndexDeallocate-PDU................51
  109.        7.1.5 Processing the agentx-Register-PDU.......................52
  110.          7.1.5.1 Handling Duplicate OID Ranges........................54
  111.        7.1.6 Processing the agentx-Unregister-PDU.....................54
  112.  
  113.  
  114.  
  115. Daniele/Wijnen       Expires December 1997                     [Page  2]
  116.  
  117. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  118.  
  119.  
  120.        7.1.7 Processing the agentx-AddAgentCaps-PDU...................55
  121.        7.1.8 Processing the agentx-RemoveAgentCaps-PDU................56
  122.        7.1.9 Processing the agentx-Close-PDU..........................56
  123.        7.1.10 Detecting Connection Loss...............................57
  124.        7.1.11 Processing the agentx-Notify-PDU........................57
  125.        7.1.12 Processing the agentx-Ping-PDU..........................58
  126.      7.2 Processing Received SNMP Protocol Messages...................58
  127.        7.2.1 Dispatching AgentX PDUs..................................59
  128.          7.2.1.1 agentx-Get-PDU.......................................61
  129.          7.2.1.2 agentx-GetNext-PDU...................................62
  130.          7.2.1.3 agentx-GetBulk-PDU...................................62
  131.          7.2.1.4 agentx-TestSet-PDU...................................63
  132.          7.2.1.5 Dispatch.............................................64
  133.        7.2.2 Subagent Processing of agentx-Get, GetNext,
  134.              GetBulk-PDUs.............................................64
  135.          7.2.2.1 Subagent Processing of the agentx-Get-PDU............64
  136.          7.2.2.2 Subagent Processing of the
  137.                  agentx-GetNext-PDU...................................65
  138.          7.2.2.3 Subagent Processing of the
  139.                  agentx-GetBulk-PDU...................................65
  140.        7.2.3 Subagent Processing of agentx-TestSet,
  141.              -CommitSet, -UndoSet, -CleanupSet-PDUs...................67
  142.          7.2.3.1 Subagent Processing of the
  143.                  agentx-TestSet-PDU...................................67
  144.          7.2.3.2 Subagent Processing of the
  145.                  agentx-CommitSet-PDU.................................68
  146.          7.2.3.3 Subagent Processing of the
  147.                  agentx-UndoSet-PDU...................................68
  148.          7.2.3.4 Subagent Processing of the
  149.                  agentx-CleanupSet-PDU................................69
  150.        7.2.4 Master Agent Processing of AgentX Responses..............69
  151.          7.2.4.1 Common Processing of All AgentX Response
  152.                  PDUs.................................................69
  153.          7.2.4.2 Processing of Responses to agentx-Get-PDUs...........69
  154.          7.2.4.3 Processing of Responses to
  155.                  agentx-GetNext-PDU and agentx-GetBulk-PDU............70
  156.          7.2.4.4 Processing of Responses to
  157.                  agentx-TestSet-PDUs..................................71
  158.          7.2.4.5 Processing of Responses to
  159.                  agentx-CommitSet-PDUs................................71
  160.          7.2.4.6 Processing of Responses to
  161.                  agentx-UndoSet-PDUs..................................72
  162.        7.2.5 Sending the SNMP Response-PDU............................72
  163.        7.2.6 MIB Views................................................72
  164.      7.3 State Transitions............................................73
  165.        7.3.1 Set Transaction States...................................73
  166.        7.3.2 Transport Connection States..............................75
  167.        7.3.3 Session States...........................................76
  168.  
  169.    8 Transport Mappings...............................................77
  170.      8.1 AgentX over TCP..............................................77
  171.  
  172.  
  173.  
  174. Daniele/Wijnen       Expires December 1997                     [Page  3]
  175.  
  176. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  177.  
  178.  
  179.        8.1.1 Well-known Values........................................77
  180.        8.1.2 Operation................................................77
  181.      8.2 AgentX over UNIX-domain Sockets..............................77
  182.        8.2.1 Well-known Values........................................78
  183.        8.2.2 Operation................................................78
  184.  
  185.    9 Security Considerations..........................................78
  186.  
  187.    10 Acknowledgements................................................79
  188.  
  189.    11 Authors' and Editor's Addresses.................................80
  190.  
  191.    12 References......................................................80
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233. Daniele/Wijnen       Expires December 1997                     [Page  4]
  234.  
  235. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  236.  
  237.  
  238. 1.  Introduction
  239.  
  240.    This memo defines a standardized framework for extensible SNMP
  241.    agents.  It defines processing entities called master agents
  242.    and subagents, a protocol (AgentX) used to communicate between
  243.    them, and the elements of procedure by which the extensible agent
  244.    processes SNMP protocol messages.
  245.  
  246.  
  247. 2.  The SNMP Framework
  248.  
  249.    A management system contains:  several (potentially many) nodes,
  250.    each with a processing entity, termed an agent, which has access to
  251.    management instrumentation; at least one management station; and, a
  252.    management protocol, used to convey management information between
  253.    the agents and management stations.  Operations of the protocol are
  254.    carried out under an administrative framework which defines
  255.    authentication, authorization, access control, and privacy
  256.    policies.
  257.  
  258.    Management stations execute management applications which monitor
  259.    and control managed elements.  Managed elements are devices such as
  260.    hosts, routers, terminal servers, etc., which are monitored and
  261.    controlled via access to their management information.
  262.  
  263.    Management information is viewed as a collection of managed objects,
  264.    residing in a virtual information store, termed the Management
  265.    Information Base (MIB).  Collections of related objects are defined
  266.    in MIB modules.  These modules are written using a subset of OSI's
  267.    Abstract Syntax Notation One (ASN.1) [1], termed the Structure of
  268.    Management Information (SMI) (see RFC 1902 [2]).
  269.  
  270. 2.1.  A Note on Terminology
  271.  
  272.    The term "variable" refers to an instance of a non-aggregate
  273.    object type defined according to the conventions set forth in the
  274.    SMI (RFC 1902, [2]) or the textual conventions based on the SMI
  275.    (RFC 1903 [3]).  The term "variable binding" normally refers to
  276.    the pairing of the name of a variable and its associated value.
  277.    However, if certain kinds of exceptional conditions occur during
  278.    processing of a retrieval request, a variable binding will pair a
  279.    name and an indication of that exception.
  280.  
  281.    A variable-binding list is a simple list of variable bindings.
  282.  
  283.    The name of a variable is an OBJECT IDENTIFIER, which is the
  284.    concatenation of the OBJECT IDENTIFIER of the corresponding object
  285.    type together with an OBJECT IDENTIFIER fragment identifying the
  286.    instance.  The OBJECT IDENTIFIER of the corresponding object-type is
  287.    called the OBJECT IDENTIFIER prefix of the variable.
  288.    For the purpose of exposition, the original Internet-standard
  289.  
  290.  
  291.  
  292. Daniele/Wijnen       Expires December 1997                     [Page  5]
  293.  
  294. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  295.  
  296.  
  297.    Network Management Framework, as described in RFCs 1155 (STD 16),
  298.    1157 (STD 15), and 1212 (STD 16), is termed the SNMP version 1
  299.    framework (SNMPv1).  The current framework, as described in RFCs
  300.    1902-1908, is termed the SNMP version 2 framework (SNMPv2).
  301.  
  302.  
  303. 3.  Extending the MIB
  304.  
  305.    New MIB modules that extend the Internet-standard MIB are
  306.    continuously being defined by various IETF working groups.  It is
  307.    also common for enterprises or individuals to create or extend
  308.    enterprise-specific or experimental MIBs.
  309.  
  310.    As a result, managed devices are frequently complex collections of
  311.    manageable components that have been independently installed on a
  312.    managed node.  Each component provides instrumentation for the
  313.    managed objects defined in the MIB module(s) it implements.
  314.  
  315.    Neither the SNMP version 1 nor version 2 framework describes how
  316.    the set of managed objects supported by a particular agent may be
  317.    changed dynamically.
  318.  
  319. 3.1.  Motivation for AgentX
  320.  
  321.    This very real need to dynamically extend the management objects
  322.    within a node has given rise to a variety of "extensible agents",
  323.    which typically comprise
  324.  
  325.       - a "master" agent that is available on the standard transport
  326.         address and that accepts SNMP protocol messages
  327.  
  328.       - a set of "subagents" that each contain management
  329.         instrumentation
  330.  
  331.       - a protocol that operates between the master agent and subagents,
  332.         permitting subagents to "connect" to the master agent, and the
  333.         master agent to multiplex received SNMP protocol messages
  334.         amongst the subagents.
  335.  
  336.       - a set of tools to aid subagent development, and a runtime (API)
  337.         environment that hides much of the protocol operation between a
  338.         subagent and the master agent.
  339.  
  340.    The wide deployment of extensible SNMP agents, coupled with the
  341.    lack of Internet standards in this area, makes it difficult to field
  342.    SNMP-manageable applications.  A vendor may have to support several
  343.    different subagent environments (APIs) in order to support different
  344.    target platforms.
  345.  
  346.    It can also become quite cumbersome to configure subagents and
  347.    (possibly multiple) master agents on a particular managed node.
  348.  
  349.  
  350.  
  351. Daniele/Wijnen       Expires December 1997                     [Page  6]
  352.  
  353. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  354.  
  355.  
  356.    Specifying a standard protocol for agent extensibility (AgentX)
  357.    provides the technical foundation required to solve both of
  358.    these problems.  Independently developed AgentX-capable master
  359.    agents and subagents will be able to interoperate at the protocol
  360.    level.  Vendors can continue to differentiate their products
  361.    in all other respects.
  362.  
  363.  
  364. 4.  AgentX Framework
  365.  
  366.    Within the SNMP framework, a managed node contains a processing
  367.    entity, called an agent, which has access to management
  368.    information.
  369.  
  370.    Within the AgentX framework, an agent is further defined to
  371.    consist of
  372.  
  373.       - a single processing entity called the master agent, which sends
  374.         and receives SNMP protocol messages in an agent role (as
  375.         specified by the SNMP version 1 and version 2 framework
  376.         documents) but typically has little or no direct access to
  377.         management information.
  378.  
  379.       - 0 or more processing entities called subagents, which are
  380.         "shielded" from the SNMP protocol messages processed by the
  381.         master agent, but which have access to management information.
  382.  
  383.    The master and subagent entities communicate via AgentX protocol
  384.    messages, as specified in this memo.  Other interfaces (if any) on
  385.    these entities, and their associated protocols, are outside the
  386.    scope of this document.  While some of the AgentX protocol messages
  387.    appear similar in syntax and semantics to the SNMP, bear in mind
  388.    that AgentX is not SNMP.
  389.  
  390.    The internal operations of AgentX are invisible to an SNMP entity
  391.    operating in a manager role.  From a manager's point of view, an
  392.    extensible agent behaves exactly as would a non-extensible
  393.    (monolithic) agent that has access to the same management
  394.    instrumentation.
  395.  
  396.    This transparency to managers is a fundamental requirement of
  397.    AgentX, and is what differentiates AgentX subagents from SNMP proxy
  398.    agents.
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410. Daniele/Wijnen       Expires December 1997                     [Page  7]
  411.  
  412. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  413.  
  414.  
  415. 4.1.  AgentX Roles
  416.  
  417.    An entity acting in a master agent role performs the following
  418.    functions:
  419.  
  420.       - Accepts AgentX session establishment requests from subagents.
  421.  
  422.       - Accepts registration of MIB regions by subagents.
  423.  
  424.       - Sends and accepts SNMP protocol messages on the agent's
  425.         specified transport addresses.
  426.  
  427.       - Implements the agent role Elements of Procedure specified
  428.         for the administrative framework applicable to the SNMP
  429.         protocol message, except where they specify performing
  430.         management operations.  (The application of MIB views, and
  431.         the access control policy for the managed node, are
  432.         implemented by the master agent.)
  433.  
  434.       - Provides instrumentation for the MIB objects defined in RFC
  435.         1907 [5], and for any MIB objects relevant to any
  436.         administrative framework it supports.
  437.  
  438.       - Sends and receives AgentX protocol messages to access
  439.         management information, based on the current registry of MIB
  440.         regions.
  441.  
  442.       - Forwards notifications on behalf of subagents.
  443.  
  444.    An entity acting in a subagent role performs the following functions:
  445.  
  446.       - Initiates an AgentX session with the master agent.
  447.  
  448.       - Registers MIB regions with the master agent.
  449.  
  450.       - Instantiates managed objects.
  451.  
  452.       - Binds OIDs within its registered MIB regions to actual
  453.         variables.
  454.  
  455.       - Performs management operations on variables.
  456.  
  457.       - Initiates notifications.
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469. Daniele/Wijnen       Expires December 1997                     [Page  8]
  470.  
  471. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  472.  
  473.  
  474. 4.2  Applicability
  475.  
  476.    It is intended that this draft specify the smallest amount of
  477.    required behavior necessary to achieve the largest benefit,
  478.    that is, to cover a very large number of possible MIB
  479.    implementations and configurations with minimum complexity and low
  480.    "cost of entry".
  481.  
  482.    This section discusses several typical usage scenarios.
  483.  
  484.    1) Subagents implement separate MIB modules--for example,
  485.       subagent A implements "mib-2", subagent b implements
  486.       "host-resources".  
  487.  
  488.       It is anticipated that this will be the most common subagent
  489.       configuration.
  490.  
  491.    2) Subagents implement rows in a "simple table".  A simple table
  492.       is one in which row creation is not specified, and for which
  493.       the MIB does not define an object that counts entries in the
  494.       table.  Examples of simple tables are rdbmsDbTable, udpTable,
  495.       and hrSWRunTable.
  496.  
  497.       This is the most commonly defined type of MIB table, and
  498.       probably represents the next most typical configuration
  499.       that AgentX would support.
  500.  
  501.    3) Subagents share MIBs along non-row partitions.  Subagents
  502.       register "chunks" of the MIB that represent multiple rows,
  503.       due to the nature of the MIB's index structure.  Examples
  504.       include registering ipNetToMediaEntry.n, where n represents
  505.       the ifIndex value for an interface implemented by the subagent,
  506.       and tcpConnEntry.a.b.c.d, where a.b.c.d represents an IP
  507.       address on an interface implemented by the subagent.
  508.  
  509.    AgentX supports these three common configurations, and all
  510.    permutations of them, completely.  The consensus is that they
  511.    comprise a very large majority of current and likely future uses
  512.    of multi-vendor extensible agent configurations.
  513.  
  514.    4) Subagents implement rows in "complex tables".  Complex tables
  515.       here are defined as tables permitting row creation, or whose
  516.       MIB also defines an object that counts entries in the table.
  517.       Examples include the MIB-2 ifTable (due to ifNumber), and the
  518.       RMON historyControlTable.
  519.  
  520.    The subagent that implements such a counter object (like
  521.    ifNumber) must go beyond AgentX to correctly implement it.
  522.    This is an implementation issue (and most new MIB designs
  523.    no longer include such objects).
  524.  
  525.  
  526.  
  527.  
  528. Daniele/Wijnen       Expires December 1997                     [Page  9]
  529.  
  530. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  531.  
  532.  
  533.    To implement row creation in such tables, at least one AgentX
  534.    subagent must register at a point "higher" in the OID tree
  535.    than an individual row (per AgentX's dispatching procedure).
  536.    Again, this is an implementation issue.
  537.  
  538.    Scenarios in this category were thought to occur somewhat
  539.    rarely in configurations where subagents are independently
  540.    implemented by different vendors.  The focus of a standard
  541.    protocol, however, must be in just those areas where multi-
  542.    vendor interoperability must be assured.
  543.  
  544.    Note that it would be inefficient (due to AgentX registration
  545.    overhead) to share a table among AgentX subagents if the table
  546.    contains very dynamic instances, and each subagent registers fully
  547.    qualified instances.  ipRouteTable could be an example of such a
  548.    table in some environments.
  549.  
  550.  
  551. 4.3.  Design Features of AgentX
  552.  
  553.    The primary features of the design described in this memo are:
  554.  
  555.    1) A general architectural division of labor between master agent
  556.       and subagent: The master agent is MIB ignorant and SNMP
  557.       omniscient, while the subagent is SNMP ignorant and MIB
  558.       omniscient (for the MIB variables it instantiates).  That is,
  559.       master agents, exclusively, are concerned with SNMP protocol
  560.       operations and the translations to and from AgentX protocol
  561.       operations needed to carry them out; subagents are exclusively
  562.       concerned with management instrumentation; and neither should
  563.       intrude on the other's territory.
  564.  
  565.    2) A standard protocol and "rules of engagement" to enable
  566.       interoperability between management instrumentation and
  567.       extensible agents.
  568.  
  569.    3) Mechanisms for independently developed subagents to
  570.       integrate into the extensible agent on a particular
  571.       managed node in such a way that they need not be aware
  572.       of any other existing subagents.
  573.  
  574.    4) A simple, deterministic registry and dispatching algorithm.
  575.       For a given extensible agent configuration, there is a single
  576.       subagent who is "authoritative" for any particular region of
  577.       the MIB (where "region" may extend from an entire MIB down
  578.       to a single object-instance).
  579.  
  580.    5) Performance considerations.  It is likely that the master
  581.       agent and all subagents will reside on the same host, and
  582.       in such cases AgentX is more a form of inter-process
  583.       communication than a traditional communications protocol.
  584.  
  585.  
  586.  
  587. Daniele/Wijnen       Expires December 1997                     [Page 10]
  588.  
  589. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  590.  
  591.  
  592.       Some of the design decisions made with this in mind include:
  593.  
  594.          - 32-bit alignment of data within PDUs
  595.  
  596.          - Native byte-order encoding by subagents
  597.  
  598.          - Large AgentX PDU payload sizes.
  599.  
  600. 4.4  Non-Goals
  601.  
  602.    1) Subagent-to-subagent communication.  This is out of scope, 
  603.       due to the security ramifications and complexity involved.  
  604.  
  605.    2) Subagent access (via the master agent) to MIB variables.
  606.       This is not addressed, since various other mechanisms
  607.       are available and it was not a fundamental requirement.
  608.  
  609.    3) The ability to accommodate every conceivable extensible
  610.       agent configuration option. This was the most contentious
  611.       aspect in the drafting of this protocol.  In essence,
  612.       certain features currently available in some commercial
  613.       extensible agent products are not included in AgentX.
  614.       Although useful or even vital in some implementation
  615.       strategies, the rough consensus was that these features
  616.       were not appropriate for an Internet Standard, or not
  617.       typically required for independently developed subagents
  618.       to coexist.  The set of supported extensible agent
  619.       configurations is described above, in Section 4.2.
  620.  
  621.    Some possible future version of the AgentX protocol may provide
  622.    coverage for one or more of these "non-goals" or for new goals
  623.    that might be identified after greater deployment experience.
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646. Daniele/Wijnen       Expires December 1997                     [Page 11]
  647.  
  648. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  649.  
  650.  
  651. 5.  AgentX Encodings
  652.  
  653.    AgentX PDUs consist of a common header, followed by PDU-specific
  654.    data of variable length.  Unlike SNMP PDUs, AgentX PDUs are not
  655.    encoded using the BER (as specified in ISO 8824 [1]), but are
  656.    transmitted as a contiguous byte stream.  The data within this
  657.    stream is organized to provide natural alignment with respect to
  658.    the start of the PDU, permitting direct (integer) access by the
  659.    processing entities.
  660.  
  661.    The first four fields in the header are single-byte values.
  662.    A bit (NETWORK_BYTE_ORDER) in the third field (h.flags) is
  663.    used to indicate the byte ordering of all multi-byte integer
  664.    values in the PDU, including those which follow in the header
  665.    itself.  This is described in more detail in Section 6.1,
  666.    "AgentX PDU Header", below.
  667.  
  668.    PDUs are depicted in this memo using the following convention
  669.    (where byte 1 is the first transmitted byte):
  670.  
  671.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  672.    |  byte 1       |  byte 2       |  byte 3       |  byte 4       |
  673.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  674.    |  byte 5       |  byte 6       |  byte 7       |  byte 8       |
  675.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  676.    ...
  677.  
  678.    Fields marked "<reserved>" are reserved for future use and must be
  679.    zero-filled.
  680.  
  681. 5.1.  Object Identifier
  682.  
  683.    An object identifier is encoded as a 4-byte header, followed by a
  684.    variable number of contiguous 4-byte fields representing
  685.    sub-identifiers.  This representation (termed Object Identifier) is
  686.    as follows:
  687.  
  688.  
  689.    Object Identifier
  690.  
  691.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  692.    |  n_subid      |  prefix       |  include      |  <reserved>   |
  693.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  694.    |                       sub-identifier #1                       |
  695.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  696.    ...
  697.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  698.    |                       sub-identifier #n_subid                 |
  699.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  700.  
  701.  
  702.  
  703.  
  704.  
  705. Daniele/Wijnen       Expires December 1997                     [Page 12]
  706.  
  707. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  708.  
  709.  
  710.    Object Identifier header fields:
  711.  
  712.       n_subid
  713.  
  714.          The number (0-128) of sub-identifiers in the object
  715.          identifier.  An ordered list of "n_subid" 4-byte
  716.          sub-identifiers follows the 4-byte header.
  717.  
  718.       prefix
  719.  
  720.          An unsigned value used to reduce the length of object
  721.          identifier encodings.  A non-zero value "x" is interpreted as
  722.          the first sub-identifier after "internet" (1.3.6.1), and
  723.          indicates an implicit prefix "internet.x" to the actual
  724.          sub-identifiers encoded in the Object Identifier.  For
  725.          example, a prefix field value 2 indicates an implicit prefix
  726.          "1.3.6.1.2".  A value of 0 in the prefix field indicates there
  727.          is no prefix to the sub-identifiers.
  728.  
  729.       include
  730.  
  731.          Used only when the Object Identifier is the start of a
  732.          SearchRange, as described in section 5.2.
  733.  
  734.  
  735.    A null Object Identifier consists of the 4-byte header with all
  736.    bytes set to 0.
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764. Daniele/Wijnen       Expires December 1997                     [Page 13]
  765.  
  766. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  767.  
  768.  
  769.    Examples:
  770.  
  771.    sysDescr.0 (1.3.6.1.2.1.1.1.0)
  772.  
  773.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  774.    | 4             | 2             | 0             | 0             |
  775.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  776.    | 1                                                             |
  777.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  778.    | 1                                                             |
  779.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  780.    | 1                                                             |
  781.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  782.    | 0                                                             |
  783.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  784.  
  785.  
  786.    1.2.3.4
  787.  
  788.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  789.    | 4             | 0             | 0             | 0             |
  790.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  791.    | 1                                                             |
  792.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  793.    | 2                                                             |
  794.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  795.    | 3                                                             |
  796.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  797.    | 4                                                             |
  798.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  799.  
  800.  
  801. 5.2.  SearchRange
  802.  
  803.    A SearchRange consists of two Object Identifiers.  In its
  804.    communication with a subagent, the master agent uses a SearchRange
  805.    to identify a requested variable binding, and, in GetNext and
  806.    GetBulk operations, to set an upper bound on the names of managed
  807.    object instances the subagent may send in reply.
  808.  
  809.    The first Object Identifier in a SearchRange (called the starting
  810.    OID) indicates the beginning of the range.  It is frequently (but
  811.    not necessarily) the name of a requested variable binding.
  812.  
  813.    The "include" field in this OID's header is a boolean value
  814.    (0 or 1) indicating whether or not the starting OID is included in
  815.    the range.
  816.  
  817.    The second object identifier indicates the non-inclusive end of
  818.    the range, and its "include" field is always 0.
  819.  
  820.  
  821.  
  822.  
  823. Daniele/Wijnen       Expires December 1997                     [Page 14]
  824.  
  825. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  826.  
  827.  
  828.    Example:  To indicate a search range from 1.3.6.1.2.1.25.2
  829.    (inclusive) to 1.3.6.1.2.1.25.2.1 (exclusive), the SearchRange would
  830.    be
  831.  
  832.    (start)
  833.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  834.    | 3             | 2             | 1             |       0       |
  835.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  836.    | 1                                                             |
  837.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  838.    | 25                                                            |
  839.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  840.    | 2                                                             |
  841.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  842.  
  843.    (end)
  844.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  845.    | 4             | 2             | 0             |       0       |
  846.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  847.    | 1                                                             |
  848.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  849.    | 25                                                            |
  850.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  851.    | 2                                                             |
  852.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  853.    | 1                                                             |
  854.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  855.  
  856.    A SearchRangeList is a contiguous list of SearchRanges.
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882. Daniele/Wijnen       Expires December 1997                     [Page 15]
  883.  
  884. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  885.  
  886.  
  887. 5.3.  Octet String
  888.  
  889.    An octet string is represented by a contiguous series of bytes,
  890.    beginning with a 4-byte integer whose value is the number of octets
  891.    in the octet string, followed by the octets themselves.  This
  892.    representation is termed an Octet String.  If the last octet does
  893.    not end on a 4-byte offset from the start of the Octet String,
  894.    padding bytes are appended to achieve alignment of following data.
  895.    This padding must be added even if the Octet String is the last item
  896.    in the PDU.  Padding bytes must be zero filled.
  897.  
  898.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  899.    |                     Octet String Length (L)                   |  
  900.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  901.    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  902.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  903.    ...
  904.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  905.    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  906.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  907.  
  908.    A null Octet String consists of a 4-byte length field set to 0.
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941. Daniele/Wijnen       Expires December 1997                     [Page 16]
  942.  
  943. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  944.  
  945.  
  946. 5.4.  Value Representation
  947.  
  948.    Variable bindings may be encoded within the variable-length portion
  949.    of some PDUs.  The representation of a variable binding (termed a
  950.    VarBind) consists of a 2-byte type field, a name (Object
  951.    Identifier), and the actual value data.
  952.  
  953.    VarBind
  954.  
  955.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  956.    |          v.type               |          <reserved>           |
  957.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  958.  
  959.    (v.name)
  960.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  961.    |  n_subid      |  prefix       |      0        |       0       |
  962.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  963.    |                       sub-identifier #1                       |
  964.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  965.    ...
  966.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  967.    |                       sub-identifier #n_subid                 |
  968.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  969.  
  970.    (v.data)
  971.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  972.    |                       data                                    |
  973.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  974.    ...
  975.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  976.    |                       data                                    |
  977.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000. Daniele/Wijnen       Expires December 1997                     [Page 17]
  1001.  
  1002. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1003.  
  1004.  
  1005.    VarBind fields:
  1006.  
  1007.    v.type
  1008.  
  1009.          Indicates the variable binding's syntax, and must be one of
  1010.          the following values:
  1011.  
  1012.                      Integer                  (2),
  1013.                      Octet String             (4),
  1014.                      Null                     (5),
  1015.                      Object Identifier        (6),
  1016.                      IpAddress               (64),
  1017.                      Counter32               (65),
  1018.                      Gauge32                 (66),
  1019.                      TimeTicks               (67),
  1020.                      Opaque                  (68),
  1021.                      Counter64               (70),
  1022.                      noSuchObject           (128),
  1023.                      noSuchInstance         (129),
  1024.                      endOfMibView           (130)
  1025.  
  1026.    v.name
  1027.  
  1028.          The Object Identifier which names the variable.
  1029.  
  1030.    v.data
  1031.  
  1032.          The actual value, encoded as follows:
  1033.  
  1034.           - Integer, Counter32, Gauge32, and TimeTicks are encoded as
  1035.             4 contiguous bytes.  If the NETWORK_BYTE_ORDER bit is set
  1036.             in h.flags, the bytes are ordered most significant to least
  1037.             significant, otherwise they are ordered least significant
  1038.             to most significant.
  1039.  
  1040.           - Counter64 is encoded as 8 contiguous bytes.  If the
  1041.             NETWORK_BYTE_ORDER bit is set in h.flags, the bytes are
  1042.             ordered most significant to least significant, otherwise
  1043.             they are ordered least significant to most significant.
  1044.  
  1045.           - Object Identifiers are encoded as described in section
  1046.             5.1, Object Identifier.
  1047.  
  1048.           - IpAddress, Opaque, and Octet String are all octet strings
  1049.             and are encoded as described in section 5.3, Octet String.
  1050.  
  1051.             Value data always follows v.name whenever v.type is one
  1052.             of the above types.  These data bytes are present even if
  1053.             they will not be used (as, for example, in certain types
  1054.             of index allocation).
  1055.  
  1056.  
  1057.  
  1058.  
  1059. Daniele/Wijnen       Expires December 1997                     [Page 18]
  1060.  
  1061. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1062.  
  1063.  
  1064.           - Null, noSuchObject, noSuchInstance, and endOfMibView do not
  1065.             contain any encoded value.  Value data never follows
  1066.             v.name in these cases.
  1067.  
  1068.          Note that the VarBind itself does not contain the value size.
  1069.          That information is implied for the fixed-length types, and
  1070.          explicitly contained in the encodings of variable-length types
  1071.          (Object Identifier and Octet String).
  1072.  
  1073.    A VarBindList is a contiguous list of VarBinds.  Within a
  1074.    VarBindList, a particular VarBind is identified by an index value.
  1075.    The first VarBind in a VarBindList has index value 1, the second
  1076.    has index value 2, and so on.
  1077.  
  1078.  
  1079. 6.  Protocol Definitions
  1080.  
  1081. 6.1.  AgentX PDU Header
  1082.  
  1083.    The AgentX PDU header is a fixed-format, 20-octet structure:
  1084.  
  1085.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1086.    |   h.version   |    h.type     |    h.flags    |  <reserved>   |
  1087.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1088.    |                          h.sessionID                          |
  1089.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1090.    |                        h.transactionID                        |
  1091.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1092.    |                          h.packetID                           |
  1093.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1094.    |                        h.payload_length                       |
  1095.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1096.  
  1097.    An AgentX PDU header contains the following fields:
  1098.  
  1099.       h.version
  1100.  
  1101.          The version of the AgentX protocol (1 for this draft).
  1102.  
  1103.       h.type
  1104.  
  1105.          The PDU type; one of the following values:
  1106.  
  1107.               agentx-Open-PDU             (1),
  1108.               agentx-Close-PDU            (2),
  1109.               agentx-Register-PDU         (3),
  1110.               agentx-Unregister-PDU       (4),
  1111.               agentx-Get-PDU              (5),
  1112.               agentx-GetNext-PDU          (6),
  1113.               agentx-GetBulk-PDU          (7),
  1114.               agentx-TestSet-PDU          (8),
  1115.  
  1116.  
  1117.  
  1118. Daniele/Wijnen       Expires December 1997                     [Page 19]
  1119.  
  1120. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1121.  
  1122.  
  1123.               agentx-CommitSet-PDU        (9),
  1124.               agentx-UndoSet-PDU         (10),
  1125.               agentx-CleanupSet-PDU      (11),
  1126.               agentx-Notify-PDU          (12),
  1127.               agentx-Ping-PDU            (13),
  1128.               agentx-IndexAllocate-PDU   (14),
  1129.               agentx-IndexDeallocate-PDU (15),
  1130.               agentx-AddAgentCaps-PDU    (16),
  1131.               agentx-RemoveAgentCaps-PDU (17),
  1132.               agentx-Response-PDU        (18)
  1133.  
  1134.       h.flags
  1135.  
  1136.          A bitmask, with bit 0 the least significant bit.  The bit
  1137.          definitions are as follows:
  1138.  
  1139.                  Bit             Definition
  1140.                  ---             ----------
  1141.                  0               INSTANCE_REGISTRATION
  1142.                  1               NEW_INDEX
  1143.                  2               ANY_INDEX
  1144.                  3               NON_DEFAULT_CONTEXT
  1145.                  4               NETWORK_BYTE_ORDER
  1146.                  5-7             (reserved)
  1147.  
  1148.          The NETWORK_BYTE_ORDER bit applies to all multi-byte
  1149.          integer values in the entire AgentX packet, including
  1150.          the remaining header fields.  If set, then network byte
  1151.          order (most significant byte first; "big endian") is
  1152.          used.  If not set, then least significant byte first
  1153.          ("little endian") is used.
  1154.  
  1155.          The NETWORK_BYTE_ORDER bit applies to all AgentX PDUs.
  1156.  
  1157.          The NON_DEFAULT_CONTEXT bit is used only in the AgentX PDUs
  1158.          described in section 6.1.1.
  1159.  
  1160.          The NEW_INDEX and ANY_INDEX bits are used only within the
  1161.          agentx-IndexAllocate-, and -IndexDeallocate-PDUs.
  1162.  
  1163.          The INSTANCE_REGISTRATION bit is used only within the
  1164.          agentx-Register-PDU.
  1165.  
  1166.       h.sessionID
  1167.  
  1168.          The session ID uniquely identifies a session over
  1169.          which AgentX PDUs are exchanged between a subagent and
  1170.          the master agent.  The session ID has no significance
  1171.          and no defined value in the agentx-Open-PDU sent by a
  1172.          subagent to open a session with the master agent; in
  1173.          this case, the master agent will assign a unique
  1174.  
  1175.  
  1176.  
  1177. Daniele/Wijnen       Expires December 1997                     [Page 20]
  1178.  
  1179. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1180.  
  1181.  
  1182.          sessionID that it will pass back in the corresponding
  1183.          agentx-Response-PDU.  From that point on, that same
  1184.          sessionID will appear in every AgentX PDU exchanged
  1185.          over that session between the master and the subagent.
  1186.          A subagent may establish multiple AgentX sessions by
  1187.          sending multiple agentx-Open-PDUs to the master agent.
  1188.  
  1189.          In master agents that support multiple transport
  1190.          protocols, the sessionID should be globally unique
  1191.          rather than unique just to a particular transport.
  1192.  
  1193.  
  1194.       h.transactionID
  1195.  
  1196.          The transaction ID uniquely identifies, for a given
  1197.          session, the single SNMP management request (and single
  1198.          SNMP PDU) with which an AgentX PDU is associated.  If
  1199.          a single SNMP management request results in multiple
  1200.          AgentX PDUs being sent by the master agent with the same
  1201.          sessionID, each of these AgentX PDUs must contain the
  1202.          same transaction ID; conversely, AgentX PDUs sent during
  1203.          a particular session, that result from distinct SNMP
  1204.          management requests, must have distinct transaction IDs
  1205.         (within the limits of the 32-bit field).         
  1206.  
  1207.          Note that the transaction ID is not the same as the SNMP
  1208.          PDU's request-id (as described in section 4.1 of RFC
  1209.          1905 [4]), nor can it be, since a master agent might
  1210.          receive SNMP requests with the same request-ids from
  1211.          different managers.
  1212.  
  1213.          The transaction ID has no significance and no defined
  1214.          value in AgentX administrative PDUs, i.e., AgentX
  1215.          PDUs that are not associated with an SNMP management
  1216.          request.
  1217.  
  1218.       h.packetID
  1219.  
  1220.          A packet ID generated by the sender for all AgentX PDUs
  1221.          except the agentx-Response-PDU. In an agentx-Response-PDU,
  1222.          the packet ID must be the same as that in the received
  1223.          AgentX PDU to which it is a response.  A master agent
  1224.          might use this field to associate subagent response PDUs
  1225.          with their corresponding request PDUs.  A subagent might
  1226.          use this field to correlate responses to multiple
  1227.          (batched) registrations.
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236. Daniele/Wijnen       Expires December 1997                     [Page 21]
  1237.  
  1238. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1239.  
  1240.  
  1241.       h.payload_length
  1242.  
  1243.          The size in octets of the PDU contents, excluding the
  1244.          20-byte header.  As a result of the encoding schemes
  1245.          and PDU layouts, this value will always be either 0,
  1246.          or a multiple of 4.
  1247.  
  1248. 6.1.1.  Context
  1249.  
  1250.    In the SNMPv1 or v2c frameworks, the community string may be used as
  1251.    an index into a local repository of configuration information that
  1252.    may include community profiles or more complex context information.
  1253.    Future versions of the SNMP will likely formalize this notion of
  1254.    "context".
  1255.  
  1256.    AgentX provides a mechanism for transmitting a context specification
  1257.    within relevant PDUs, but does not place any constraints on the
  1258.    content of that specification.
  1259.  
  1260.    An optional context field may be present in the agentx-Register-,
  1261.    UnRegister-, AddAgentCaps-, RemoveAgentCaps-, Get-, GetNext-,
  1262.    GetBulk-, IndexAllocate-, IndexDeallocate-, Notify-, TestSet-,
  1263.    and Ping- PDUs.
  1264.  
  1265.    If the NON_DEFAULT_CONTEXT bit in the AgentX header field h.flags is
  1266.    clear, then there is no context field in the PDU, and the operation
  1267.    refers to the default context.
  1268.  
  1269.    If the NON_DEFAULT_CONTEXT bit is set, then a context field
  1270.    immediately follows the AgentX header, and the operation refers
  1271.    to that specific context.  The context is represented as an Octet
  1272.    String.  There are no constraints on its length or contents.
  1273.  
  1274.    Thus, all of these AgentX PDUs (that is, those listed immediately
  1275.    above) refer to, or "indicate" a context, which is either the
  1276.    default context, or a non-default context explicitly named in the
  1277.    PDU.
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295. Daniele/Wijnen       Expires December 1997                     [Page 22]
  1296.  
  1297. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1298.  
  1299.  
  1300. 6.2.  AgentX PDUs
  1301.  
  1302. 6.2.1.  The agentx-Open-PDU
  1303.  
  1304.    An agentx-Open-PDU is generated by a subagent to request
  1305.    establishment of an AgentX session with the master agent.
  1306.  
  1307.    (AgentX header)
  1308.  
  1309.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1310.    | h.version (1) |  h.type (1)   |    h.flags    |  <reserved>   |
  1311.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1312.    |                          h.sessionID                          |
  1313.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1314.    |                        h.transactionID                        |
  1315.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1316.    |                           h.packetID                          |
  1317.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1318.    |                        h.payload_length                       |
  1319.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1320.  
  1321.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1322.    |  o.timeout    |                     <reserved>                |
  1323.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1324.  
  1325.    (o.id)
  1326.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1327.    |  n_subid      |  prefix       |       0       |  <reserved>   |
  1328.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1329.    |             subidentifier #1                                  |
  1330.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1331.    ...                                                             |
  1332.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1333.    |             subidentifier #n_subid                            |
  1334.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1335.  
  1336.    (o.descr)
  1337.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1338.    |                     Octet String Length (L)                   |  
  1339.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1340.    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  1341.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1342.    ...
  1343.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1344.    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  1345.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354. Daniele/Wijnen       Expires December 1997                     [Page 23]
  1355.  
  1356. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1357.  
  1358.  
  1359.    An agentx-Open-PDU contains the following fields:
  1360.  
  1361.       o.timeout
  1362.  
  1363.          The length of time, in seconds, that a master agent should
  1364.          allow to elapse after dispatching a message to a subagent
  1365.          before it regards the subagent as not responding.  This is a
  1366.          subagent-wide default value that may be overridden by values
  1367.          associated with specific registered MIB regions.  The default
  1368.          value of 0 indicates that no subagent-wide value is
  1369.          requested.
  1370.  
  1371.       o.id
  1372.  
  1373.          An Object Identifier that identifies the subagent.  Subagents
  1374.          that do not support such an notion may send a null Object
  1375.          Identifier.
  1376.  
  1377.       o.descr
  1378.  
  1379.          An Octet String containing a DisplayString describing the
  1380.          subagent.
  1381.  
  1382.  
  1383. 6.2.2.  The agentx-Close-PDU
  1384.  
  1385.    An agentx-Close-PDU issued by either a subagent or the master
  1386.    agent terminates an AgentX session.
  1387.  
  1388.    (AgentX header)
  1389.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1390.    | h.version (1) |  h.type (2)   |    h.flags    |  <reserved>   |
  1391.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1392.    |                          h.sessionID                          |
  1393.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1394.    |                        h.transactionID                        |
  1395.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1396.    |                           h.packetID                          |
  1397.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1398.    |                        h.payload_length                       |
  1399.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1400.  
  1401.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1402.    |  c.reason     |                     <reserved>                |
  1403.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413. Daniele/Wijnen       Expires December 1997                     [Page 24]
  1414.  
  1415. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1416.  
  1417.  
  1418.    An agentx-Close-PDU contains the following field:
  1419.  
  1420.       c.reason
  1421.  
  1422.          An enumerated value that gives the reason that the master
  1423.          agent or subagent closed the AgentX session.  This field may
  1424.          take one of the following values:
  1425.  
  1426.             reasonOther(1)
  1427.                None of the following reasons
  1428.  
  1429.             reasonParseError(2)
  1430.                Too many AgentX parse errors from peer
  1431.  
  1432.             reasonProtocolError(3)
  1433.                Too many AgentX protocol errors from peer
  1434.  
  1435.             reasonTimeouts(4)
  1436.                Too many timeouts waiting for peer
  1437.  
  1438.             reasonShutdown(5)
  1439.                Sending entity is shutting down
  1440.  
  1441.             reasonByManager(6)
  1442.                Due to Set operation; this reason code can
  1443.                be used only by the master agent, in response
  1444.                to an SNMP management request.
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472. Daniele/Wijnen       Expires December 1997                     [Page 25]
  1473.  
  1474. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1475.  
  1476.  
  1477. 6.2.3.  The agentx-Register-PDU
  1478.  
  1479.    An agentx-Register-PDU is generated by a subagent for each region of
  1480.    the MIB variable naming tree (within one or more contexts) that it
  1481.    wishes to support.
  1482.  
  1483.     (AgentX header)
  1484.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1485.    | h.version (1) |  h.type (3)   |    h.flags    |  <reserved>   |
  1486.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1487.    |                          h.sessionID                          |
  1488.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1489.    |                        h.transactionID                        |
  1490.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1491.    |                           h.packetID                          |
  1492.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1493.    |                        h.payload_length                       |
  1494.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1495.  
  1496.     (r.context) (OPTIONAL)
  1497.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1498.     |                     Octet String Length (L)                   |  
  1499.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1500.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  1501.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1502.     ...
  1503.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1504.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  1505.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1506.  
  1507.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1508.     |  r.timeout    |  r.priority   | r.range_subid |  <reserved>   |
  1509.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1510.  
  1511.     (r.region)
  1512.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1513.     |  n_subid      |  prefix       |      0        |  <reserved>   |
  1514.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1515.     |             sub-identifier #1                                 |
  1516.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1517.     ...
  1518.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1519.     |             sub-identifier #n_subid                           |
  1520.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1521.  
  1522.     (r.upper_bound) 
  1523.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1524.     |             optional upper-bound sub-identifier               |
  1525.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531. Daniele/Wijnen       Expires December 1997                     [Page 26]
  1532.  
  1533. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1534.  
  1535.  
  1536.    An agentx-Register-PDU contains the following fields:
  1537.  
  1538.       r.context
  1539.  
  1540.          An optional non-default context.
  1541.  
  1542.       r.timeout
  1543.  
  1544.          The length of time, in seconds, that a master agent should
  1545.          allow to elapse after dispatching a message to a subagent
  1546.          before it regards the subagent as not responding.  r.timeout
  1547.          applies only to messages that concern MIB objects within
  1548.          r.region.  It overrides both the subagent-wide value (if any)
  1549.          indicated when the AgentX session with the master agent was
  1550.          established, and the master agent's default timeout.  The
  1551.          default value for r.timeout is 0 (no override).
  1552.  
  1553.       r.priority
  1554.  
  1555.          A value between 1 and 255, used to achieve a desired
  1556.          configuration when different subagents register identical or 
  1557.          overlapping regions.  Subagents with no particular knowledge
  1558.          of priority should register with the default value of 255
  1559.          (lowest priority).
  1560.  
  1561.          In the master agent's dispatching algorithm, smaller
  1562.          values of r.priority take precedence over larger values, 
  1563.          as described in section 7.1.5.1.
  1564.  
  1565.       r.region
  1566.  
  1567.          An Object Identifier that, in conjunction with r.range_subid,
  1568.          indicates a region of the MIB that a subagent wishes to
  1569.          support.  It may be a fully-qualified instance name, a partial
  1570.          instance name, a MIB table, an entire MIB, or ranges of any of
  1571.          these.
  1572.  
  1573.          The choice of what to register is implementation-specific;
  1574.          this memo does not specify permissible values.  Standard
  1575.          practice however is for a subagent to register at the
  1576.          highest level of the naming tree that makes sense.
  1577.          Registration of fully-qualified instances is typically done
  1578.          only when a subagent can perform management operations only
  1579.          on particular rows of a conceptual table.
  1580.  
  1581.          If r.region is in fact a fully qualified instance name, the
  1582.          INSTANCE_REGISTRATION bit in h.flags must be set, otherwise it
  1583.          must be cleared.  The master agent may save this information
  1584.          to optimize subsequent operational dispatching.
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590. Daniele/Wijnen       Expires December 1997                     [Page 27]
  1591.  
  1592. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1593.  
  1594.  
  1595.       r.range_subid
  1596.  
  1597.          Permits specifying a range in place of one of r.region's
  1598.          sub-identifiers.  If this value is 0, no range is specified.
  1599.          Otherwise the "r.range_subid"-th sub-identifier in
  1600.          r.region is a range lower bound, and the range upper
  1601.          bound sub-identifier (r.upper_bound) immediately follows
  1602.          r.region.
  1603.  
  1604.          This permits registering a conceptual row with a single
  1605.          PDU.  For example, the following PDU would register row
  1606.          7 of the RFC 1573 ifTable (1.3.6.1.2.1.2.2.1.1-22.7):
  1607.  
  1608.    (AgentX header)
  1609.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1610.    | h.version (1) |  h.type (3)   |    h.flags    |  <reserved>   |
  1611.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1612.    |                          h.sessionID                          |
  1613.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1614.    |                        h.transactionID                        |
  1615.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1616.    |                           h.packetID                          |
  1617.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1618.    |                        h.payload_length                       |
  1619.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1620.  
  1621.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1622.    |   r.timeout   |  r.priority   | 5             |  <reserved>   |
  1623.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1624.  
  1625.    (r.region)
  1626.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1627.    | 6             |  2            |  0            |  <reserved>   |
  1628.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1629.    | 1                                                             |
  1630.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1631.    | 2                                                             |
  1632.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1633.    | 2                                                             |
  1634.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1635.    | 1                                                             |
  1636.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1637.    | 1                                                             |
  1638.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1639.    | 7                                                             |
  1640.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1641.  
  1642.    (r.upper_bound)
  1643.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1644.    | 22                                                            |
  1645.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1646.  
  1647.  
  1648.  
  1649. Daniele/Wijnen       Expires December 1997                     [Page 28]
  1650.  
  1651. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1652.  
  1653.  
  1654. 6.2.4.  The agentx-Unregister-PDU
  1655.  
  1656.    The agentx-Unregister-PDU is sent by a subagent to remove a
  1657.    previously registered MIB region from the master agent's OID space.
  1658.  
  1659.    (AgentX header)
  1660.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1661.    | h.version (1) |  h.type (4)   |    h.flags    |  <reserved>   |
  1662.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1663.    |                          h.sessionID                          |
  1664.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1665.    |                        h.transactionID                        |
  1666.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1667.    |                           h.packetID                          |
  1668.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1669.    |                        h.payload_length                       |
  1670.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1671.  
  1672.    (u.context) OPTIONAL
  1673.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1674.    |                     Octet String Length (L)                   |  
  1675.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1676.    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  1677.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1678.    ...
  1679.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1680.    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  1681.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1682.  
  1683.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1684.    |    <reserved> |  u.priority   | u.range_subid |  <reserved>   |
  1685.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1686.  
  1687.    (u.region)
  1688.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1689.    |  n_subid      |  prefix       |      0        |  <reserved>   |
  1690.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1691.    |             sub-identifier #1                                 |
  1692.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1693.    ...
  1694.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1695.    |             sub-identifier #n_subid                           |
  1696.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1697.  
  1698.    (u.upper_bound)
  1699.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1700.    |             optional upper-bound sub-identifier               |
  1701.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708. Daniele/Wijnen       Expires December 1997                     [Page 29]
  1709.  
  1710. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1711.  
  1712.  
  1713.    An agentx-Unregister-PDU contains the following fields:
  1714.  
  1715.       u.context
  1716.  
  1717.          An optional non-default context.
  1718.  
  1719.       u.priority
  1720.  
  1721.          The priority at which this region was originally registered.
  1722.  
  1723.       u.region
  1724.  
  1725.          Indicates a previously-registered region of the MIB that a
  1726.          subagent no longer wishes to support.
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767. Daniele/Wijnen       Expires December 1997                     [Page 30]
  1768.  
  1769. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1770.  
  1771.  
  1772. 6.2.5.  The agentx-Get-PDU
  1773.  
  1774.     (AgentX header)
  1775.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1776.     | h.version (1) |  h.type (5)   |    h.flags    |  <reserved>   |
  1777.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1778.     |                          h.sessionID                          |
  1779.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1780.     |                        h.transactionID                        |
  1781.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1782.     |                           h.packetID                          |
  1783.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1784.     |                        h.payload_length                       |
  1785.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1786.  
  1787.     (g.context) OPTIONAL
  1788.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1789.     |                     Octet String Length (L)                   |  
  1790.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1791.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  1792.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1793.     ...
  1794.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1795.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  1796.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1797.  
  1798.     (g.sr)
  1799.  
  1800.     (start 1)
  1801.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1802.     |  n_subid      |  prefix       |  include      |  <reserved>   |
  1803.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1804.     |             sub-identifier #1                                 |
  1805.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1806.     ...
  1807.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1808.     |             sub-identifier #n_subid                           |
  1809.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1810.  
  1811.     (end 1)
  1812.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1813.     | 0             | 0             | 0             |       0       |
  1814.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1815.     ...
  1816.     (start n)
  1817.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1818.     |  n_subid      |  prefix       |  include      |  <reserved>   |
  1819.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1820.     |             sub-identifier #1                                 |
  1821.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1822.     ...
  1823.  
  1824.  
  1825.  
  1826. Daniele/Wijnen       Expires December 1997                     [Page 31]
  1827.  
  1828. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1829.  
  1830.  
  1831.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1832.     |             sub-identifier #n_subid                           |
  1833.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1834.  
  1835.     (end n)
  1836.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1837.     | 0             | 0             | 0             |       0       |
  1838.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1839.  
  1840.  
  1841.    An agentx-Get-PDU contains the following fields:
  1842.  
  1843.       g.context
  1844.  
  1845.          An optional non-default context.
  1846.  
  1847.       g.sr
  1848.  
  1849.          A SearchRangeList containing the requested variables for this
  1850.          subagent.
  1851.  
  1852.  
  1853. 6.2.6.  The agentx-GetNext-PDU
  1854.  
  1855.     (AgentX header)
  1856.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1857.     | h.version (1) |  h.type (6)   |    h.flags    |  <reserved>   |
  1858.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1859.     |                          h.sessionID                          |
  1860.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1861.     |                        h.transactionID                        |
  1862.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1863.     |                           h.packetID                          |
  1864.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1865.     |                        h.payload_length                       |
  1866.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1867.  
  1868.     (g.context) OPTIONAL
  1869.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1870.     |                     Octet String Length (L)                   |  
  1871.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1872.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  1873.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1874.     ...
  1875.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1876.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  1877.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1878.  
  1879.     (g.sr)
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885. Daniele/Wijnen       Expires December 1997                     [Page 32]
  1886.  
  1887. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1888.  
  1889.  
  1890.     (start 1)
  1891.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1892.     |  n_subid      |  prefix       |  include      |  <reserved>   |
  1893.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1894.     |             sub-identifier #1                                 |
  1895.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1896.     ...
  1897.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1898.     |             sub-identifier #n_subid                           |
  1899.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1900.  
  1901.     (end 1)
  1902.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1903.     |  n_subid      |  prefix       |      0        |  <reserved>   |
  1904.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1905.     |             sub-identifier #1                                 |
  1906.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1907.     ...
  1908.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1909.     |             sub-identifier #n_subid                           |
  1910.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1911.     ...
  1912.  
  1913.     (start n)
  1914.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1915.     |  n_subid      |  prefix       |  include      |  <reserved>   |
  1916.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1917.     |             sub-identifier #1                                 |
  1918.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1919.     ...
  1920.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1921.     |             sub-identifier #n_subid                           |
  1922.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1923.  
  1924.     (end n)
  1925.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1926.     |  n_subid      |  prefix       |      0        |  <reserved>   |
  1927.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1928.     |             sub-identifier #1                                 |
  1929.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1930.     ...
  1931.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1932.     |             sub-identifier #n_subid                           |
  1933.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1934.     ...
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944. Daniele/Wijnen       Expires December 1997                     [Page 33]
  1945.  
  1946. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  1947.  
  1948.  
  1949. 6.2.7.  The agentx-GetBulk-PDU
  1950.  
  1951.     (AgentX header)
  1952.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1953.     | h.version (1) |  h.type (7)   |    h.flags    |  <reserved>   |
  1954.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1955.     |                          h.sessionID                          |
  1956.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1957.     |                        h.transactionID                        |
  1958.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1959.     |                           h.packetID                          |
  1960.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1961.     |                        h.payload_length                       |
  1962.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1963.  
  1964.     (g.context) OPTIONAL
  1965.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1966.     |                     Octet String Length (L)                   |  
  1967.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1968.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  1969.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1970.     ...
  1971.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1972.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  1973.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1974.  
  1975.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1976.     |             g.non_repeaters   |     g.max_repetitions         |   
  1977.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1978.  
  1979.     (g.sr) as in agentx-GetNext-PDU above
  1980.     ...
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003. Daniele/Wijnen       Expires December 1997                     [Page 34]
  2004.  
  2005. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2006.  
  2007.  
  2008. 6.2.8.  The agentx-TestSet-PDU
  2009.  
  2010.     (AgentX header)
  2011.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2012.     | h.version (1) |  h.type (8)   |    h.flags    |  <reserved>   |
  2013.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2014.     |                          h.sessionID                          |
  2015.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2016.     |                        h.transactionID                        |
  2017.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2018.     |                           h.packetID                          |
  2019.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2020.     |                        h.payload_length                       |
  2021.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2022.  
  2023.     (t.context) OPTIONAL
  2024.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2025.     |                     Octet String Length (L)                   |  
  2026.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2027.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  2028.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2029.     ...
  2030.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2031.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  2032.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2033.  
  2034.     (t.vb)
  2035.  
  2036.     (VarBind 1)
  2037.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2038.     |          v.type               |        <reserved>             |
  2039.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2040.     |  n_subid      |  prefix       |      0        |  <reserved>   |
  2041.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2042.     |                       sub-identifier #1                       |
  2043.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2044.     ...
  2045.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2046.     |                       sub-identifier #n_subid                 |
  2047.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2048.     |                       data                                    |
  2049.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2050.     ...
  2051.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2052.     |                       data                                    |
  2053.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2054.     ...
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062. Daniele/Wijnen       Expires December 1997                     [Page 35]
  2063.  
  2064. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2065.  
  2066.  
  2067.     (VarBind n)
  2068.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2069.     |          v.type               |        <reserved>             |
  2070.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2071.     |  n_subid      |  prefix       |      0        |  <reserved>   |
  2072.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2073.     |                       sub-identifier #1                       |
  2074.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2075.     ...
  2076.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2077.     |                       sub-identifier #n_subid                 |
  2078.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2079.     |                       data                                    |
  2080.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2081.     ...
  2082.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2083.     |                       data                                    |
  2084.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2085.  
  2086.  
  2087.    An agentx-TestSet-PDU contains the following fields:
  2088.  
  2089.       t.context
  2090.  
  2091.          An optional non-default context.
  2092.  
  2093.       t.vb
  2094.  
  2095.          A VarBindList containing the requested VarBinds for
  2096.          this subagent.
  2097.  
  2098.  
  2099. 6.2.9.  The agentx-CommitSet, -UndoSet, -CleanupSet PDUs
  2100.  
  2101.    These PDUs consist of the AgentX header only.
  2102.  
  2103.    The agentx-CommitSet-, -UndoSet-, and -Cleanup-PDUs are
  2104.    used in processing an SNMP SetRequest operation.
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121. Daniele/Wijnen       Expires December 1997                     [Page 36]
  2122.  
  2123. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2124.  
  2125.  
  2126. 6.2.10.  The agentx-Notify-PDU
  2127.  
  2128.    An agentx-Notify-PDU is sent by a subagent to cause the master agent
  2129.    to forward a notification.
  2130.  
  2131.     (AgentX header)
  2132.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2133.     | h.version (1) |  h.type (12)  |    h.flags    |  <reserved>   |
  2134.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2135.     |                          h.sessionID                          |
  2136.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2137.     |                        h.transactionID                        |
  2138.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2139.     |                           h.packetID                          |
  2140.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2141.     |                        h.payload_length                       |
  2142.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2143.  
  2144.     (n.context) OPTIONAL
  2145.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2146.     |                     Octet String Length (L)                   |  
  2147.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2148.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  2149.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2150.     ...
  2151.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2152.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  2153.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2154.  
  2155.     (n.vb)
  2156.     ...
  2157.  
  2158.  
  2159.    An agentx-Notify-PDU contains the following fields:
  2160.  
  2161.       n.context
  2162.  
  2163.          An optional non-default context.
  2164.  
  2165.       n.vb
  2166.  
  2167.          A VarBindList whose contents define the actual PDU to be
  2168.          sent.  This memo places the following restrictions on its
  2169.          contents:
  2170.  
  2171.              - If the subagent supplies sysUpTime.0, it must be
  2172.                present as the first varbind.
  2173.  
  2174.              - snmpTrapOID.0 must be present, as the second
  2175.                varbind if sysUpTime.0 was supplied, as the
  2176.                first if it was not.
  2177.  
  2178.  
  2179.  
  2180. Daniele/Wijnen       Expires December 1997                     [Page 37]
  2181.  
  2182. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2183.  
  2184.  
  2185. 6.2.11  The agentx-Ping-PDU
  2186.  
  2187.    The agentx-Ping-PDU is sent by a subagent to the master agent to
  2188.    monitor the master agent's ability to receive and send AgentX
  2189.    PDUs over their AgentX session.
  2190.  
  2191.     (AgentX header)
  2192.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2193.     | h.version (1) |  h.type (13)  |    h.flags    |  <reserved>   |
  2194.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2195.     |                          h.sessionID                          |
  2196.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2197.     |                        h.transactionID                        |
  2198.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2199.     |                           h.packetID                          |
  2200.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2201.     |                        h.payload_length                       |
  2202.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2203.  
  2204.    (p.context) OPTIONAL
  2205.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2206.     |                     Octet String Length (L)                   |  
  2207.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2208.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  2209.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2210.     ...
  2211.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2212.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  2213.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2214.  
  2215.    An agentx-Ping-PDU may contain the following field:
  2216.  
  2217.       p.context
  2218.  
  2219.          An optional non-default context.
  2220.  
  2221.    Using p.context a subagent can retrieve the sysUpTime value
  2222.    for a specific context, if required.
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239. Daniele/Wijnen       Expires December 1997                     [Page 38]
  2240.  
  2241. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2242.  
  2243.  
  2244. 6.2.12.  The agentx-IndexAllocate-PDU
  2245.  
  2246.    An agentx-IndexAllocate-PDU is sent by a subagent to request
  2247.    allocation of a value for specific index objects.  Refer to section
  2248.    7.1.3 (Using the agentx-IndexAllocate-PDU) for suggested usage.
  2249.  
  2250.     (AgentX header)
  2251.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2252.     | h.version (1) |  h.type (14)  |    h.flags    |  <reserved>   |
  2253.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2254.     |                          h.sessionID                          |
  2255.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2256.     |                        h.transactionID                        |
  2257.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2258.     |                           h.packetID                          |
  2259.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2260.     |                        h.payload_length                       |
  2261.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2262.  
  2263.     (i.context) OPTIONAL
  2264.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2265.     |                     Octet String Length (L)                   |  
  2266.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2267.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  2268.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2269.     ...
  2270.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2271.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  2272.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2273.  
  2274.     (i.vb)
  2275.     ...
  2276.  
  2277.  
  2278.    An agentx-IndexAllocate-PDU contains the following fields:
  2279.  
  2280.       i.context
  2281.  
  2282.          An optional non-default context.
  2283.  
  2284.       i.vb
  2285.  
  2286.          A VarBindList containing the index names and values requested
  2287.          for allocation.
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298. Daniele/Wijnen       Expires December 1997                     [Page 39]
  2299.  
  2300. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2301.  
  2302.  
  2303. 6.2.13.  The agentx-IndexDeallocate-PDU
  2304.  
  2305.    An agentx-IndexDeallocate-PDU is sent by a subagent to release
  2306.    previously allocated index values. 
  2307.  
  2308.     (AgentX header)
  2309.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2310.     | h.version (1) |  h.type (15)  |    h.flags    |  <reserved>   |
  2311.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2312.     |                          h.sessionID                          |
  2313.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2314.     |                        h.transactionID                        |
  2315.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2316.     |                           h.packetID                          |
  2317.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2318.     |                        h.payload_length                       |
  2319.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2320.  
  2321.     (i.context) OPTIONAL
  2322.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2323.     |                     Octet String Length (L)                   |  
  2324.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2325.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  2326.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2327.     ...
  2328.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2329.     |  Octet L - 1  |  Octet L      |       Padding (as required)   |
  2330.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2331.  
  2332.     (i.vb)
  2333.     ...
  2334.  
  2335.  
  2336.    An agentx-IndexDeallocate-PDU contains the following fields:
  2337.  
  2338.       i.context
  2339.  
  2340.          An optional non-default context.
  2341.  
  2342.       i.vb
  2343.  
  2344.          A VarBindList containing the index names and values to be
  2345.          released.
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357. Daniele/Wijnen       Expires December 1997                     [Page 40]
  2358.  
  2359. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2360.  
  2361.  
  2362. 6.2.14.  The agentx-AddAgentCaps-PDU
  2363.  
  2364.    An agentx-AddAgentCaps-PDU is generated by a subagent to inform the
  2365.    master agent of its agent capabilities.
  2366.  
  2367.     (AgentX header)
  2368.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2369.     | h.version (1) |  h.type (16)  |    h.flags    |  <reserved>   |
  2370.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2371.     |                          h.sessionID                          |
  2372.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2373.     |                        h.transactionID                        |
  2374.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2375.     |                           h.packetID                          |
  2376.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2377.     |                        h.payload_length                       |
  2378.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2379.  
  2380.     (a.context) (OPTIONAL)
  2381.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2382.     |                     Octet String Length (L)                   |  
  2383.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2384.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  2385.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2386.     ...
  2387.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2388.     |  Octet L - 1  |  Octet L      |       Optional Padding        |
  2389.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2390.  
  2391.     (a.id)
  2392.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2393.     |  n_subid      |  prefix       |      0        |  <reserved>   |
  2394.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2395.     |             sub-identifier #1                                 |
  2396.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2397.     ...
  2398.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2399.     |             sub-identifier #n_subid                           |
  2400.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2401.  
  2402.     (a.descr)
  2403.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2404.     |                     Octet String Length (L)                   |  
  2405.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2406.     |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  2407.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2408.     ...
  2409.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2410.     |  Octet L - 1  |  Octet L      |       Optional Padding        |
  2411.     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2412.  
  2413.  
  2414.  
  2415.  
  2416. Daniele/Wijnen       Expires December 1997                     [Page 41]
  2417.  
  2418. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2419.  
  2420.  
  2421.    An agentx-AddAgentCaps-PDU contains the following fields:
  2422.  
  2423.       a.context
  2424.  
  2425.          An optional non-default context.
  2426.  
  2427.       a.id
  2428.  
  2429.          An Object Identifier containing the value of an invocation of
  2430.          the AGENT-CAPABILITIES macro, which the master agent exports
  2431.          as a value of sysORID for the indicated context.  (Recall that
  2432.          the value of an invocation of an AGENT-CAPABILITIES macro is
  2433.          an object identifier that describes a precise level of support
  2434.          with respect to implemented MIB modules.  A more complete
  2435.          discussion of the AGENT-CAPABILITIES macro and related sysORID
  2436.          values can be found in section 6 of RFC 1904 [10].)
  2437.  
  2438.       a.descr
  2439.  
  2440.          An Octet String containing a DisplayString to be used as the
  2441.          value of sysORDescr corresponding to the sysORID value above.
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475. Daniele/Wijnen       Expires December 1997                     [Page 42]
  2476.  
  2477. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2478.  
  2479.  
  2480. 6.2.15.  The agentx-RemoveAgentCaps-PDU
  2481.  
  2482.    An agentx-RemoveAgentCaps-PDU is generated by a subagent to request 
  2483.    that the master agent stop exporting a particular value of sysORID.
  2484.    This value must have previously been advertised by the subagent in
  2485.    an agentx-AddAgentCaps-PDU.
  2486.  
  2487.    (AgentX header)
  2488.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2489.    | h.version (1) |  h.type (17)  |    h.flags    |  <reserved>   |
  2490.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2491.    |                          h.sessionID                          |
  2492.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2493.    |                        h.transactionID                        |
  2494.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2495.    |                           h.packetID                          |
  2496.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2497.    |                        h.payload_length                       |
  2498.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2499.  
  2500.    (a.context) (OPTIONAL)
  2501.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2502.    |                     Octet String Length (L)                   |  
  2503.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2504.    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
  2505.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2506.    ...
  2507.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2508.    |  Octet L - 1  |  Octet L      |       Optional Padding        |
  2509.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2510.  
  2511.    (a.id)
  2512.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2513.    |  n_subid      |  prefix       |       0       |   <reserved>  |
  2514.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2515.    |             sub-identifier #1                                 |
  2516.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2517.    ...
  2518.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2519.    |             sub-identifier #n_subid                           |
  2520.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534. Daniele/Wijnen       Expires December 1997                     [Page 43]
  2535.  
  2536. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2537.  
  2538.  
  2539.    An agentx-RemoveAgentCaps-PDU contains the following fields:
  2540.  
  2541.       a.context
  2542.  
  2543.          An optional non-default context.
  2544.  
  2545.       a.id
  2546.  
  2547.          An ObjectIdentifier containing the value of sysORID that
  2548.          should no longer be exported.
  2549.  
  2550.  
  2551. 6.2.16.  The agentx-Response-PDU
  2552.  
  2553.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2554.    | h.version (1) |  h.type (18)  |    h.flags    |  <reserved>   |
  2555.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2556.    |                          h.sessionID                          |
  2557.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2558.    |                        h.transactionID                        |
  2559.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2560.    |                           h.packetID                          |
  2561.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2562.    |                        h.payload_length                       |
  2563.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2564.  
  2565.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2566.    |                        res.sysUpTime                          |
  2567.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2568.    |             res.error         |     res.index                 |
  2569.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  2570.    ...
  2571.  
  2572.  
  2573.    An agentx-Response-PDU contains the following fields:
  2574.  
  2575.       h.sessionID
  2576.  
  2577.          If this is a response to a agentx-Open-PDU, then it
  2578.          contains the new and unique sessionID (as assigned by
  2579.          the master agent) for this session.
  2580.  
  2581.          Otherwise it must be identical to the h.sessionID
  2582.          value in the PDU to which this PDU is a response.
  2583.  
  2584.       h.transactionID
  2585.  
  2586.          Must be identical to the h.transactionID value in the PDU to
  2587.          which this PDU is a response.
  2588.  
  2589.          In an agentx response PDU from the master agent to the
  2590.  
  2591.  
  2592.  
  2593. Daniele/Wijnen       Expires December 1997                     [Page 44]
  2594.  
  2595. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2596.  
  2597.  
  2598.          subagent, the value of h.transactionID has no significance
  2599.          and can be ignored by the subagent.
  2600.  
  2601.       h.packetID
  2602.  
  2603.          Must be identical to the h.packetID value in the PDU to
  2604.          which this PDU is a response.
  2605.  
  2606.       res.sysUpTime
  2607.  
  2608.          This field contains the current value of sysUpTime for
  2609.          the indicated context.  It is relevant only in agentx
  2610.          response PDUs sent from the master agent to a subagent in
  2611.          response to the following agentx PDUs:
  2612.  
  2613.                agentx-Open-PDU               (1),
  2614.                agentx-Close-PDU              (2),
  2615.                agentx-Register-PDU           (3),
  2616.                agentx-Unregister-PDU         (4),
  2617.                agentx-Ping-PDU              (13),
  2618.                agentx-IndexAllocate-PDU     (14),
  2619.                agentx-IndexDeallocate-PDU   (15),
  2620.                agentx-AddAgentCaps-PDU      (16),
  2621.                agentx-RemoveAgentCaps-PDU   (17)
  2622.  
  2623.          In an agentx response PDU from the subagent to the master
  2624.          agent, the value of res.sysUpTime has no significance and
  2625.          is ignored by the master agent.
  2626.  
  2627.       res.error
  2628.  
  2629.          Indicates error status (including `noError').  Values are
  2630.          limited to those defined for errors in the SNMPv2 SMI (RFC
  2631.          1905 [4]), and the following AgentX-specific values:
  2632.  
  2633.                 openFailed                 (256),
  2634.                 notOpen                    (257),
  2635.                 indexWrongType             (258),
  2636.                 indexAlreadyAllocated      (259),
  2637.                 indexNoneAvailable         (260),
  2638.                 indexNotAllocated          (261),
  2639.                 unsupportedContext         (262),
  2640.                 duplicateRegistration      (263),
  2641.                 unknownRegistration        (264),
  2642.                 unknownAgentCaps           (265)
  2643.  
  2644.  
  2645.       res.index
  2646.  
  2647.          In error cases, this is the index of the failed variable
  2648.          binding within a received request PDU.  (Note: As explained in
  2649.  
  2650.  
  2651.  
  2652. Daniele/Wijnen       Expires December 1997                     [Page 45]
  2653.  
  2654. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2655.  
  2656.  
  2657.          section 5.4, Value Representation, the index values of
  2658.          variable bindings within a variable binding list are 1-based.)
  2659.  
  2660.    A VarBindList may follow these latter two fields, depending on which
  2661.    AgentX PDU is being responded to.  These data are specified in the
  2662.    subsequent elements of procedure.
  2663.  
  2664.  
  2665. 7.  Elements of Procedure
  2666.  
  2667.    This section describes the actions of protocol entities (master
  2668.    agents and subagents) implementing the AgentX protocol.  Note,
  2669.    however, that it is not intended to constrain the internal
  2670.    architecture of any conformant implementation.
  2671.  
  2672.    Specific error conditions and associated actions are described in
  2673.    various places.  Other error conditions not specifically mentioned
  2674.    fall into one of two categories, "parse" errors and "protocol"
  2675.    errors.
  2676.  
  2677.    A parse error occurs when a receiving entity cannot decode the PDU.
  2678.    For instance, a VarBind contains an unknown type, or a PDU contains
  2679.    a malformed Object Identifier.
  2680.  
  2681.    A protocol error occurs when a receiving entity can parse a PDU, but
  2682.    the resulting data is unspecified.  For instance, an
  2683.    agentx-Response-PDU is successfully parsed, but contains an unknown
  2684.    res.error value.
  2685.  
  2686.    An implementation may choose either to ignore such messages, or to
  2687.    close the session on which they are received, using the appropriate
  2688.    reason code as defined in the agentx-Close-PDU.
  2689.  
  2690.    The actions of AgentX protocol entities can be broadly categorized
  2691.    under two headings, each of which is described separately: 
  2692.  
  2693.       (1) processing AgentX administrative messages (e.g., connection
  2694.           requests from a subagent to a master agent); and
  2695.  
  2696.       (2) processing SNMP messages (the coordinated actions of a
  2697.           master agent and one or more subagents in processing,
  2698.           for example, a received SNMP GetRequest-PDU).
  2699.  
  2700. 7.1.  Processing AgentX Administrative Messages
  2701.  
  2702.    This subsection describes the actions of AgentX protocol entities
  2703.    in processing AgentX administrative messages.  Such messages
  2704.    include those involved in establishing and terminating an AgentX
  2705.    session between a subagent and a master agent, those by which a
  2706.    subagent requests allocation of instance index values, and those
  2707.    by which a subagent communicates to a master agent which MIB
  2708.  
  2709.  
  2710.  
  2711. Daniele/Wijnen       Expires December 1997                     [Page 46]
  2712.  
  2713. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2714.  
  2715.  
  2716.    regions it supports.
  2717.  
  2718. 7.1.1.  Processing the agentx-Open-PDU
  2719.  
  2720.    When the master agent receives an agentx-Open-PDU, it processes
  2721.    it as follows:
  2722.  
  2723.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  2724.       the value of sysUpTime.0 for the indicated context.
  2725.  
  2726.    2) If the master agent is unable to open an AgentX session for
  2727.       any reason, it may refuse the session establishment request,
  2728.       sending in reply the agentx-Response-PDU, with res.error
  2729.       field set to `openFailed'.
  2730.  
  2731.    3) Otherwise:  The master agent assigns a sessionID to the new
  2732.       session and puts the value in the h.sessionID field of the
  2733.       agentx-Response-PDU.  This value must be unique among all
  2734.       existing open sessions.
  2735.  
  2736.    4) The master agent retains session-specific information
  2737.       from the PDU for this subagent:
  2738.  
  2739.        - The NETWORK_BYTE_ORDER value in h.flags is retained.
  2740.          All subsequent AgentX protocol operations initiated by
  2741.          the master agent for this session must use this byte
  2742.          ordering and set this bit accordingly.
  2743.  
  2744.          The subagent typically sets this bit to correspond to
  2745.          its native byte ordering, and typically does not vary
  2746.          byte ordering for an initiated session.  The master
  2747.          agent must be able to decode each PDU according to the
  2748.          h.flag NETWORK_BYTE_ORDER bit in the PDU, but does not
  2749.          need to toggle its retained value for the session if
  2750.          the subagent varies its byte ordering.
  2751.  
  2752.        - The o.timeout value is used in calculating response
  2753.          timeout conditions for this subagent.
  2754.  
  2755.        - The o.id and o.descr fields are used for informational
  2756.          purposes.  (Such purposes are implementation-specific
  2757.          for now, and may be used in a possible future standard
  2758.          AgentX MIB.)
  2759.  
  2760.    5) The agentx-Response-PDU is sent with the res.error field
  2761.       set to `noError'.
  2762.  
  2763.    At this point, an AgentX session is considered established between
  2764.    the master agent and the subagent.  An AgentX session is a distinct
  2765.    channel for the exchange of AgentX protocol messages between a
  2766.    master agent and one subagent, qualified by the session-specific
  2767.  
  2768.  
  2769.  
  2770. Daniele/Wijnen       Expires December 1997                     [Page 47]
  2771.  
  2772. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2773.  
  2774.  
  2775.    attributes listed in 4) above.  AgentX session establishment is
  2776.    initiated by the subagent.  An AgentX session can be terminated
  2777.    by either the master agent or the subagent.
  2778.  
  2779. 7.1.2.  Processing the agentx-IndexAllocate-PDU
  2780.  
  2781.    When the master agent receives an agentx-IndexAllocate-PDU, it
  2782.    processes it as follows:
  2783.  
  2784.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  2785.       the value of sysUpTime.0 for the default context.
  2786.  
  2787.    2) If h.sessionID does not correspond to a currently established
  2788.       session with this subagent, the agentx-Response-PDU is sent
  2789.       in reply with res.error set to `notOpen'.
  2790.  
  2791.    3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
  2792.       supports only a default context, the agentx-Response-PDU is
  2793.       returned with res.error set to `unsupportedContext', and the
  2794.       requested allocation fails.  Otherwise: The value of
  2795.       res.sysUpTime is set to the value of sysUpTime.0 for the
  2796.       indicated context.
  2797.  
  2798.    4) Each VarBind in the VarBindList is processed until either all
  2799.       are successful, or one fails.  If any VarBind fails, the
  2800.       agentx-Response-PDU is sent in reply containing the original
  2801.       VarBindList, with res.index set to indicate the failed VarBind,
  2802.       and with res.error set as described subsequently.  All other
  2803.       VarBinds are ignored; no index values are allocated.
  2804.  
  2805.       VarBinds are processed as follows:
  2806.  
  2807.       - v.name is the name of the index for which a value is to be
  2808.         allocated.
  2809.  
  2810.       - v.type is the syntax of the index object.
  2811.  
  2812.       - v.data indicates the specific index value requested.
  2813.         If the NEW_INDEX or the ANY_INDEX bit is set, the actual
  2814.         value in v.data is ignored and an appropriate index value
  2815.         is generated.
  2816.  
  2817.       a) If there are no currently allocated index values for v.name
  2818.          in the indicated context, and v.type does not correspond to
  2819.          a valid index type value, the VarBind fails and res.error
  2820.          is set to `indexWrongType'.
  2821.  
  2822.       b) If there are currently allocated index values for v.name
  2823.          in the indicated context, but the syntax of those values
  2824.          does not match v.type, the VarBind fails and res.error is
  2825.          set to `indexWrongType'.
  2826.  
  2827.  
  2828.  
  2829. Daniele/Wijnen       Expires December 1997                     [Page 48]
  2830.  
  2831. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2832.  
  2833.  
  2834.       c) Otherwise, if both the NEW_INDEX and ANY_INDEX bits are
  2835.          clear, allocation of a specific index value is being
  2836.          requested.  If the requested index is already allocated
  2837.          for v.name in the indicated context, the VarBind fails
  2838.          and res.error is set to `indexAlreadyAllocated'.
  2839.  
  2840.       d) Otherwise, if the NEW_INDEX bit is set, the master agent
  2841.          should generate the next available index value for v.name
  2842.          in the indicated context, with the constraint that this
  2843.          value must not have been allocated (even if subsequently
  2844.          released) to any subagent since the last re-initialization
  2845.          of the master agent.  If no such value can be generated,
  2846.          the VarBind fails and res.error is set to `indexNoneAvailable'.
  2847.  
  2848.       e) Otherwise, if the ANY_INDEX bit is set, the master agent
  2849.          should generate an index value for v.name in the
  2850.          indicated context, with the constraint that this value is
  2851.          not currently allocated to any subagent.  If no such value
  2852.          can be generated, then the VarBind fails and res.error is
  2853.          set to `indexNoneAvailable'.
  2854.  
  2855.    5) If all VarBinds are processed successfully, the
  2856.       agentx-Response-PDU is sent in reply with res.error set to
  2857.       `noError'.  A VarBindList is included that is identical to the
  2858.       one sent in the agentx-IndexAllocate-PDU, except that VarBinds
  2859.       requesting a NEW_INDEX or ANY_INDEX value are generated with an
  2860.       appropriate value.
  2861.  
  2862. 7.1.3.  Using the agentx-IndexAllocate-PDU
  2863.  
  2864.    Index allocation is a service provided by an AgentX master agent.
  2865.    It provides generic support for sharing MIB conceptual tables among
  2866.    subagents who are assumed to have no knowledge of each other.
  2867.  
  2868.    Each subagent sharing a table should first request allocation of
  2869.    index values, then use those index values to qualify MIB regions in
  2870.    its subsequent registrations.
  2871.  
  2872.    The master agent maintains a database of index objects (OIDs), and,
  2873.    for each index, the values that have been allocated for it.  It is
  2874.    unaware of what MIB variables (if any) the index objects represent.
  2875.  
  2876.    By convention, subagents use the MIB variable listed in the INDEX
  2877.    clause as the index object for which values must be allocated.  For
  2878.    tables indexed by multiple variables, values may be allocated for
  2879.    each index (although this is frequently unnecessary; see example 2
  2880.    below).  The subagent may request allocation of
  2881.  
  2882.         - a specific index value
  2883.         - an index value that is not currently allocated
  2884.         - an index value that has never been allocated
  2885.  
  2886.  
  2887.  
  2888. Daniele/Wijnen       Expires December 1997                     [Page 49]
  2889.  
  2890. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2891.  
  2892.  
  2893.    The last two alternatives reflect the uniqueness and constancy
  2894.    requirements present in many MIB specifications for arbitrary
  2895.    integer indexes (e.g., ifIndex in the IF MIB (RFC 1573 [11]),
  2896.    snmpFddiSMTIndex in the FDDI MIB (RFC 1285 [12]), or
  2897.    sysApplInstallPkgIndex in the System Application MIB [13]).  The
  2898.    need for subagents to share tables using such indexes is the main
  2899.    motivation for index allocation in AgentX.
  2900.  
  2901.    Example 1:
  2902.  
  2903.       A subagent implements an interface, and wishes to register a
  2904.       single row of the RFC 1573 ifTable.  It requests an allocation
  2905.       for the index object "ifIndex", for a value that has never been
  2906.       allocated (since ifIndex values must be unique).  The master agent
  2907.       returns the value "7".
  2908.  
  2909.       The subagent now attempts to register row 7 of ifTable, by
  2910.       specifying a MIB region in the agentx-Register-PDU of
  2911.       1.3.6.1.2.1.2.2.1.[1-22].7.  If the registration succeeds, no
  2912.       further processing is required.  The master agent will dispatch
  2913.       to this subagent correctly.
  2914.  
  2915.       But the registration may fail.  Index allocation and MIB region
  2916.       registration are not coupled in the master agent.  Some other
  2917.       subagent may have already registered ifTable row 7 without first
  2918.       having requested allocation of the index.  The current state of
  2919.       index allocations is not considered when processing registration
  2920.       requests, and the current registry is not considered when
  2921.       processing index allocation requests.  If subagents follow the
  2922.       model of "first request allocation of an index, then register the
  2923.       corresponding region", then a successful index allocation request
  2924.       gives a subagent a good hint (but no guarantee) of what it should
  2925.       be able to register.
  2926.  
  2927.       If the registration failed, the subagent should request allocation
  2928.       of a new index i, and attempt to register ifTable.[1-22].i, until
  2929.       successful.
  2930.  
  2931.    Example 2:
  2932.  
  2933.       This same subagent wishes to register ipNetToMediaTable rows
  2934.       corresponding to its interface (ifIndex i).  Due to structure of
  2935.       this table, no further index allocation need be done.  The
  2936.       subagent can register the MIB region ipNetToMediaTable.[1-4].i,
  2937.       It is claiming responsibility for all rows of the table whose
  2938.       value of ipNetToMediaIfIndex is i.
  2939.  
  2940.    Example 3:
  2941.  
  2942.       A network device consists of a set of processors, each of which
  2943.       accepts network connections for a unique set of IP addresses.
  2944.  
  2945.  
  2946.  
  2947. Daniele/Wijnen       Expires December 1997                     [Page 50]
  2948.  
  2949. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  2950.  
  2951.  
  2952.       Further, each processor contains a subagent that implements
  2953.       tcpConnTable.  In order to represent tcpConnTable for the entire
  2954.       managed device, the subagents need to share tcpConnTable.
  2955.  
  2956.       In this case, no index allocation need be done at all.  Each
  2957.       subagent can register a MIB region of tcpConnTable.[1-5].a.b.c.d,
  2958.       where a.b.c.d represents an unique IP address of the individual
  2959.       processor.
  2960.  
  2961.       Each subagent is claiming responsibility for the region of
  2962.       tcpConnTable where the value of tcpConnLocalAddress is a.b.c.d.
  2963.  
  2964. 7.1.4   Processing the agentx-IndexDeallocate-PDU
  2965.  
  2966.    When the master agent receives an agentx-IndexDeallocate-PDU, it
  2967.    processes it as follows:
  2968.  
  2969.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  2970.       the value of sysUpTime.0 for the default context.
  2971.  
  2972.    2) If h.sessionID does not correspond to a currently
  2973.       established session with this subagent, the
  2974.       agentx-Response-PDU is sent in reply with res.error set
  2975.       to `notOpen'.
  2976.  
  2977.    3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
  2978.       supports only a default context, the agentx-Response-PDU is
  2979.       returned with res.error set to `unsupportedContext', and the
  2980.       requested deallocation fails.  Otherwise: The value of
  2981.       res.sysUpTime is set to the value of sysUpTime.0 for the
  2982.       indicated context.
  2983.  
  2984.    4) Each VarBind in the VarBindList is processed until either all
  2985.       are successful, or one fails.  If any VarBind fails, the
  2986.       agentx-Response-PDU is sent in reply, containing the original
  2987.       VarBindList, with res.index set to indicate the failed VarBind,
  2988.       and with res.error set as described subsequently.  All other
  2989.       VarBinds are ignored; no index values are released.
  2990.  
  2991.       VarBinds are processed as follows:
  2992.  
  2993.       - v.name is the name of the index for which a value is to be
  2994.         released 
  2995.  
  2996.       - v.type is the syntax of the index object
  2997.  
  2998.       - v.data indicates the specific index value to be released.
  2999.         The NEW_INDEX and ANY_INDEX bits are ignored. 
  3000.  
  3001.       a) If the index value for the named index is not currently
  3002.          allocated to this subagent, the VarBind fails and res.error
  3003.  
  3004.  
  3005.  
  3006. Daniele/Wijnen       Expires December 1997                     [Page 51]
  3007.  
  3008. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3009.  
  3010.  
  3011.          is set to `indexNotAllocated'.
  3012.  
  3013.    5) If all VarBinds are processed successfully, res.error is
  3014.       set to `noError' and the agentx-Response-PDU is sent.
  3015.       A VarBindList is included which is identical to the one
  3016.       sent in the agentx-IndexDeallocate-PDU.
  3017.  
  3018.       All released index values are now available, and may be
  3019.       used in response to subsequent allocation requests for
  3020.       ANY_INDEX values for the particular index.
  3021.  
  3022. 7.1.5.  Processing the agentx-Register-PDU
  3023.  
  3024.    When the master agent receives an agentx-Register-PDU, it processes
  3025.    it as follows:
  3026.  
  3027.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  3028.       the value of sysUpTime.0 for the default context.
  3029.  
  3030.    2) If h.sessionID does not correspond to a currently
  3031.       established session with this subagent, the
  3032.       agentx-Response-PDU is sent in reply with res.error set
  3033.       to `notOpen'.
  3034.  
  3035.    3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
  3036.       supports only a default context, the agentx-Response-PDU is
  3037.       returned with res.error set to `unsupportedContext', and the
  3038.       requested registration fails.  Otherwise:  The value of
  3039.       res.sysUpTime is set to the value of sysUpTime.0 for the
  3040.       indicated context.
  3041.  
  3042.       Note: Non-default contexts might be added on the fly by
  3043.             the master agent, or the master agent might require
  3044.             such non-default contexts to be pre-configured.
  3045.             The choice is implementation-specific.
  3046.  
  3047.    4) Characterize the request.
  3048.  
  3049.       If r.region (or any of its set of Object Identifiers, if r.range
  3050.       is non-zero) is exactly the same as any currently registered
  3051.       value of r.region (or any of its set of Object Identifiers),
  3052.       this registration is termed a duplicate region.
  3053.  
  3054.       If r.region (or any of its set of Object Identifiers, if r.range
  3055.       is non-zero) is a subtree of, or contains, any currently
  3056.       registered value of r.region (or any of its set of
  3057.       Object Identifiers), this registration is termed an overlapping
  3058.       region.
  3059.  
  3060.       If the NON_DEFAULT_CONTEXT bit is set, this region is to be
  3061.       logically registered within the context indicated by r.context.
  3062.  
  3063.  
  3064.  
  3065. Daniele/Wijnen       Expires December 1997                     [Page 52]
  3066.  
  3067. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3068.  
  3069.  
  3070.       Otherwise this region is to be logically registered within the
  3071.       default context.
  3072.  
  3073.       A registration that would result in a duplicate region with the
  3074.       same priority and within the same context as that of a current
  3075.       registration is termed a duplicate registration.
  3076.  
  3077.    5) Otherwise, if this is a duplicate registration, the
  3078.       agentx-Response-PDU is returned with res.error set to
  3079.       `duplicateRegistration', and the requested registration fails.
  3080.  
  3081.    6) Otherwise, the agentx-Response-PDU is returned with res.error
  3082.       set to `noError'.
  3083.  
  3084.       The master agent adds this region to its registered OID space for
  3085.       the indicated context, to be considered during the dispatching
  3086.       phase for subsequently received SNMP protocol messages.
  3087.  
  3088.       Note: The following algorithm describes maintaining a set of
  3089.       OID ranges derived from "splitting" registered regions.  The
  3090.       algorithm for operational dispatching is also stated in terms of
  3091.       these OID ranges.
  3092.  
  3093.       These OID ranges are a useful explanatory device, but are not 
  3094.       required for a correct implementation.
  3095.  
  3096.        - If r.region (R1) is a subtree of a currently registered
  3097.          region (R2), split R2 into 3 new regions (R2a, R2b, and R2c)
  3098.          such that R2b is an exact duplicate of R1.  Now remove R2 and
  3099.          add R1, R2a, R2b, and R2c to the master agent's
  3100.          lexicographically ordered set of ranges (the registered OID
  3101.          space).  Note: Though newly-added ranges R1 and R2b are
  3102.          identical in terms of the MIB objects they contain, they are
  3103.          registered by different subagents, possibly at different
  3104.          priorities.
  3105.  
  3106.          For instance, if subagent S2 registered "ip" (R2 is
  3107.          1.3.6.1.2.1.4) and subagent S1 subsequently registered
  3108.          "ipNetToMediaTable" (R1 is 1.3.6.1.2.1.4.22), the resulting
  3109.          set of registered regions would be:
  3110.  
  3111.    1.3.6.1.2.1.4    up to but not including 1.3.6.1.2.1.4.22     (by S2)
  3112.    1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S2)
  3113.    1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S1)
  3114.    1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5        (by S2)
  3115.  
  3116.        - If r.region (R1) overlaps one or more currently registered
  3117.          regions, then for each overlapped region (R2) split R1 into 3
  3118.          new ranges (R1a, R1b, R1c) such that R1b is an exact
  3119.          duplicate of R2.  Add R1b and R2 into the lexicographically
  3120.          ordered set of regions.  Apply (5) above iteratively to R1a and
  3121.  
  3122.  
  3123.  
  3124. Daniele/Wijnen       Expires December 1997                     [Page 53]
  3125.  
  3126. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3127.  
  3128.  
  3129.          R1c (since they may overlap, or be subtrees of, other regions).
  3130.  
  3131.          For instance, given the currently registered regions in the
  3132.          example above, if subagent S3 now registers mib-2 (R1 is
  3133.          1.3.6.1.2.1) the resulting set of regions would be:
  3134.  
  3135.    1.3.6.1.2.1      up to but not including 1.3.6.1.2.1.4        (by S3)
  3136.    1.3.6.1.2.1.4    up to but not including 1.3.6.1.2.1.4.22     (by S2)
  3137.    1.3.6.1.2.1.4    up to but not including 1.3.6.1.2.1.4.22     (by S3)
  3138.    1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S2)
  3139.    1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S1)
  3140.    1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S3)
  3141.    1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5        (by S2)
  3142.    1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5        (by S3)
  3143.    1.3.6.1.2.1.5    up to but not including 1.3.6.1.2.2          (by S3)
  3144.  
  3145.    Note that at registration time a region may be split into multiple
  3146.    OID ranges due to pre-existing registrations, or as a result of any
  3147.    subsequent registration.  This region splitting is transparent to
  3148.    subagents.  Hence the master agent must always be able to associate
  3149.    any OID range with the information contained in its original
  3150.    agentx-Register-PDU.
  3151.  
  3152. 7.1.5.1.  Handling Duplicate OID Ranges 
  3153.  
  3154.    As a result of this registration algorithm there are likely to be
  3155.    duplicate OID ranges (regions of identical MIB objects registered to
  3156.    different subagents) in the master agent's registered OID space.
  3157.    Whenever the master agent's dispatching algorithm (see 7.2.1,
  3158.    Dispatching AgentX PDUs) results in  a duplicate OID range, the
  3159.    master agent selects one to use, termed the 'authoritative
  3160.    region', as follows:
  3161.  
  3162.       1) Choose the one whose original agentx-Register-PDU
  3163.          r.region contained the most subids, i.e., the most specific
  3164.          r.region.  Note: The presence or absence of a range subid
  3165.          has no bearing on how "specific" one object identifier is
  3166.          compared to another.
  3167.  
  3168.       2) If still ambiguous, there were duplicate regions.  Choose the
  3169.          one whose original agentx-Register-PDU specified the smaller
  3170.          value of r.priority.
  3171.  
  3172. 7.1.6.  Processing the agentx-Unregister-PDU
  3173.  
  3174.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  3175.       the value of sysUpTime.0 for the default context.
  3176.  
  3177.    2) If h.sessionID does not correspond to a currently
  3178.       established session with this subagent, the
  3179.       agentx-Response-PDU is sent in reply with res.error set
  3180.  
  3181.  
  3182.  
  3183. Daniele/Wijnen       Expires December 1997                     [Page 54]
  3184.  
  3185. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3186.  
  3187.  
  3188.       to `notOpen'.
  3189.  
  3190.    3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
  3191.       supports only a default context, the agentx-Response-PDU is
  3192.       returned with res.error set to `unsupportedContext', and the
  3193.       requested unregistration fails.  Otherwise:  The value of
  3194.       res.sysUpTime is set to the value of sysUpTime.0 for the
  3195.       indicated context.
  3196.  
  3197.    4) If u.region, u.priority, and the indicated context do not match
  3198.       an existing registration made during this session, the
  3199.       agentx-Response-PDU is returned with res.error set to
  3200.       `unknownRegistration'.
  3201.  
  3202.    5) Otherwise, the agentx-Response-PDU is sent in reply with res.error
  3203.       set to `noError', and the previous registration is removed:
  3204.  
  3205.       - The master agent removes u.region from its registered OID space
  3206.         within the indicated context.  If the original region had been
  3207.         split, all such related regions are removed. 
  3208.  
  3209.         For instance, given the example registry above, if subagent S2
  3210.         unregisters "ip", the resulting registry would be:
  3211.  
  3212.    1.3.6.1.2.1      up to but not including 1.3.6.1.2.1.4        (by S3)
  3213.    1.3.6.1.2.1.4    up to but not including 1.3.6.1.2.1.4.22     (by S3)
  3214.    1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S1)
  3215.    1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S3)
  3216.    1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5        (by S3)
  3217.    1.3.6.1.2.1.5    up to but not including 1.3.6.1.2.2          (by S3)
  3218.  
  3219.  
  3220. 7.1.7.  Processing the agentx-AddAgentCaps-PDU
  3221.  
  3222.    When the master agent receives an agentx-AddAgentCaps-PDU,
  3223.    it processes it as follows:
  3224.  
  3225.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  3226.       the value of sysUpTime.0 for the default context.
  3227.  
  3228.    2) If h.sessionID does not correspond to a currently
  3229.       established session with this subagent, the
  3230.       agentx-Response-PDU is sent in reply with res.error set
  3231.       to `notOpen'.
  3232.  
  3233.    3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
  3234.       supports only a default context, the agentx-Response-PDU is
  3235.       returned with res.error set to `unsupportedContext', and the
  3236.       requested operation fails.  Otherwise:  The value of
  3237.       res.sysUpTime is set to the value of sysUpTime.0 for the
  3238.       indicated context.
  3239.  
  3240.  
  3241.  
  3242. Daniele/Wijnen       Expires December 1997                     [Page 55]
  3243.  
  3244. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3245.  
  3246.  
  3247.    4) Otherwise, the master agent adds the subagent's capabilities
  3248.       information to the sysORTable for the indicated context.  An
  3249.       agentx-Response-PDU is sent in reply with res.error set to
  3250.       `noError'.
  3251.  
  3252. 7.1.8.  Processing the agentx-RemoveAgentCaps-PDU
  3253.  
  3254.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  3255.       the value of sysUpTime.0 for the default context.
  3256.  
  3257.    2) If h.sessionID does not correspond to a currently
  3258.       established session with this subagent, the
  3259.       agentx-Response-PDU is sent in reply with res.error set
  3260.       to `notOpen'.
  3261.  
  3262.    3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
  3263.       supports only a default context, the agentx-Response-PDU is
  3264.       returned with res.error set to `unsupportedContext', and the
  3265.       requested operation fails.  Otherwise:  The value of
  3266.       res.sysUpTime is set to the value of sysUpTime.0 for the
  3267.       indicated context.
  3268.  
  3269.    4) If the combination of a.id and the optional a.context does not
  3270.       represent a sysORTable entry that was added by this subagent,
  3271.       during this session, the agentx-Response-PDU is returned with
  3272.       res.error set to `unknownAgentCaps'.
  3273.  
  3274.    5) Otherwise the master agent deletes the corresponding sysORTable
  3275.       entry and sends in reply the agentx-Response-PDU, with res.error
  3276.       set to `noError'.
  3277.  
  3278. 7.1.9.  Processing the agentx-Close-PDU
  3279.  
  3280.    When the master agent receives an agentx-Close-PDU, it processes it
  3281.    as follows:
  3282.  
  3283.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  3284.       the value of sysUpTime.0 for the default context.
  3285.  
  3286.    2) If h.sessionID does not correspond to a currently
  3287.       established session with this subagent, the
  3288.       agentx-Response-PDU is sent in reply with res.error set
  3289.       to `notOpen'.
  3290.  
  3291.    3) Otherwise, the master agent closes the AgentX session
  3292.       as described below.  No agentx-Response-PDU is sent.
  3293.  
  3294.       - All MIB regions that have been registered during this session
  3295.         are unregistered, as described in 7.1.6.  
  3296.  
  3297.       - All index values allocated during this session are freed, as
  3298.  
  3299.  
  3300.  
  3301. Daniele/Wijnen       Expires December 1997                     [Page 56]
  3302.  
  3303. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3304.  
  3305.  
  3306.         described in section 7.1.4. 
  3307.  
  3308.       - All sysORID values that were registered during this session
  3309.         are removed, as described in section 7.1.8.
  3310.  
  3311.    The master agent does not maintain state for closed sessions.
  3312.    If a subagent wishes to re-establish a session after receiving
  3313.    an agentx-Close-PDU, it needs to re-register MIB regions, agent
  3314.    capabilities, etc.
  3315.  
  3316. 7.1.10.  Detecting Connection Loss
  3317.  
  3318.    If a master agent is able to detect (from the underlying transport)
  3319.    that a subagent cannot receive AgentX PDUs, it should close all
  3320.    affected AgentX sessions as described in 7.1.9, step 3).
  3321.  
  3322. 7.1.11.  Processing the agentx-Notify-PDU
  3323.  
  3324.    A subagent sending SNMPv1 trap information must map this into
  3325.    (minimally) a value of snmpTrapOID.0, as described in 3.1.2 of
  3326.    RFC 1908 [8].
  3327.  
  3328.    The master agent processes the agentx-Notify-PDU as follows:
  3329.  
  3330.    1) If h.sessionID does not correspond to a currently
  3331.       established session with this subagent, an
  3332.       agentx-Response-PDU is sent in reply with res.error set
  3333.       to `notOpen', and res.sysUpTime set to the value of
  3334.       sysUpTime.0 for the indicated context.
  3335.  
  3336.    2) The VarBindList is parsed.  If it does not contain a value for
  3337.       sysUpTime.0, the master agent supplies the current value of
  3338.       sysUpTime.0 for the indicated context.  If the next VarBind
  3339.       (either the first or second VarBind; see section 6.2.10.1)
  3340.       is not snmpTrapOID.0, the master agent ceases further processing
  3341.       of the notification.
  3342.  
  3343.    3) Notifications are sent according to the implementation-specific
  3344.       configuration of the master agent.
  3345.  
  3346.       If SNMPv1 Trap PDUs are generated, the recommended mapping is as
  3347.       described in RFC 2089 [9].
  3348.  
  3349.       Except in the case of a `notOpen' error as described in
  3350.       (1) above, no agentx-Response-PDU is sent to the subagent
  3351.       when the master agent finishes processing the notification.
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360. Daniele/Wijnen       Expires December 1997                     [Page 57]
  3361.  
  3362. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3363.  
  3364.  
  3365. 7.1.12.  Processing the agentx-Ping-PDU
  3366.  
  3367.    When the master agent receives an agentx-Ping-PDU, it processes it
  3368.    as follows:
  3369.  
  3370.    1) An agentx-Response-PDU is created and res.sysUpTime is set to
  3371.       the value of sysUpTime.0 for the default context.
  3372.  
  3373.    2) If h.sessionID does not correspond to a currently
  3374.       established session with this subagent, the
  3375.       agentx-Response-PDU is sent in reply with res.error set
  3376.       to `notOpen'.
  3377.  
  3378.    3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
  3379.       supports only a default context, the agentx-Response-PDU is
  3380.       returned with res.error set to `unsupportedContext'.
  3381.       Otherwise:  The value of res.sysUpTime is set to the value
  3382.       of sysUpTime.0 for the indicated context.
  3383.  
  3384.    4) The agentx-Response-PDU is sent, with res.error set to
  3385.       `noError'.
  3386.  
  3387.    If a subagent does not receive a response to its pings, or if it
  3388.    is able to detect (from the underlying transport) that the
  3389.    master agent is not able to receive AgentX messages, then it
  3390.    eventually must initiate a new AgentX session, re-register its
  3391.    regions, etc.
  3392.  
  3393. 7.2.  Processing Received SNMP Protocol Messages
  3394.  
  3395.    When an SNMP GetRequest, GetNextRequest, GetBulkRequest, or
  3396.    SetRequest protocol message is received by the master agent, the
  3397.    master agent applies its access control policy.
  3398.  
  3399.    In particular, for SNMPv1 or SNMPv2c PDUs, the master agent
  3400.    applies the Elements of Procedure defined in section 4.1 of RFC
  3401.    1157 [6] that apply to receiving entities.  (For other versions
  3402.    of SNMP, the master agent applies the access control policy
  3403.    defined in the Elements of Procedure for those versions.)
  3404.  
  3405.    In the SNMPv1 or v2c frameworks, the master agent uses the community
  3406.    string as an index into a local repository of configuration
  3407.    information that may include community profiles or more complex
  3408.    context information.
  3409.  
  3410.    If application of the access control policy results in a valid SNMP
  3411.    request PDU, then an SNMP Response-PDU is constructed from
  3412.    information gathered in the exchange of AgentX PDUs between the
  3413.    master agent and one or more subagents.  Upon receipt and initial
  3414.    validation of an SNMP request PDU, a master agent uses the
  3415.    procedures described below to dispatch AgentX PDUs to the proper
  3416.  
  3417.  
  3418.  
  3419. Daniele/Wijnen       Expires December 1997                     [Page 58]
  3420.  
  3421. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3422.  
  3423.  
  3424.    subagents, marshal the subagent responses, and construct an SNMP
  3425.    response PDU.
  3426.  
  3427. 7.2.1.  Dispatching AgentX PDUs
  3428.  
  3429.    Upon receipt and initial validation of an SNMP request PDU, a master
  3430.    agent uses the procedures described below to dispatch AgentX PDUs to
  3431.    the proper subagents.
  3432.  
  3433.    Note: In the following procedures, an object identifier is said to
  3434.    be "contained" within an OID range when both of the following
  3435.    are true:
  3436.  
  3437.        - The object identifier does not lexicographically precede
  3438.          the range.
  3439.  
  3440.        - The object identifier lexicographically precedes the end
  3441.          of the range.
  3442.  
  3443.    General Rules of Procedure
  3444.  
  3445.    While processing a particular SNMP request, the master agent may
  3446.    send one or more AgentX PDUs to one or more subagents.  The
  3447.    following rules of procedure apply in general to the AgentX master
  3448.    agent. PDU-specific rules are listed in the applicable sections.
  3449.  
  3450.    1) Honoring the registry
  3451.  
  3452.       Because AgentX supports overlapping registrations, it is
  3453.       possible for the master agent to obtain a value for a requested
  3454.       varbind from within multiple registered MIB regions.
  3455.  
  3456.       The master agent must ensure that the value (or exception)
  3457.       actually returned in the SNMP response PDU is taken from the
  3458.       authoritative region (as defined in section 7.1.5.1).
  3459.  
  3460.    2) GetNext and GetBulk Processing
  3461.  
  3462.       The master agent may choose to send agentx-Get-PDUs while
  3463.       servicing an SNMP GetNextRequest-PDU.  The master agent may
  3464.       choose to send agentx-Get-PDUs or agentx-GetNext-PDUs while
  3465.       servicing an SNMP GetBulkRequest-PDU.  One possible reason for
  3466.       this would be if the current iteration has targeted
  3467.       instance-level registrations.
  3468.  
  3469.       The master agent may choose to "scope" the possible
  3470.       instances returned by a subagent by specifying an ending
  3471.       OID in the SearchRange.  If such scoping is used, typically
  3472.       the ending OID would be the first lexicographical successor 
  3473.       to the target OID range that was registered by a subagent
  3474.       other than the target subagent.  Regardless of this choice,
  3475.  
  3476.  
  3477.  
  3478. Daniele/Wijnen       Expires December 1997                     [Page 59]
  3479.  
  3480. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3481.  
  3482.  
  3483.       rule (1) must be obeyed.
  3484.  
  3485.       The master agent may require multiple request-response
  3486.       iterations on the same subagent session, to determine the
  3487.       final value of all requested variables.
  3488.  
  3489.       All AgentX PDUs sent on the session while processing a given 
  3490.       SNMP request must contain identical values of transactionID.
  3491.       Each different SNMP request processed by the master agent must
  3492.       present a unique value of transactionID (within the limits of
  3493.       the 32-bit field) to the session.
  3494.  
  3495.    3) Number and order of variables sent per AgentX PDU
  3496.  
  3497.       For Get/GetNext/GetBulk operations, at any stage of the
  3498.       possibly iterative process, the master agent may need to
  3499.       dispatch several SearchRanges to a particular subagent
  3500.       session.  The master agent may send one, some, or all
  3501.       of the SearchRanges in a single AgentX PDU.
  3502.  
  3503.       The master agent must ensure that the correct contents
  3504.       and ordering of the VarBindList in the SNMP Response-PDU
  3505.       are maintained.
  3506.  
  3507.       The following rules govern the number of VarBinds in a
  3508.       given AgentX PDU:
  3509.  
  3510.          a) The subagent must support processing of AgentX PDUs
  3511.             with multiple VarBinds.
  3512.  
  3513.          b) When processing an SNMP Set request, the master agent
  3514.             must send all of the VarBinds applicable to a particular
  3515.             subagent session in a single Test/Set transaction.
  3516.  
  3517.          c) When processing an SNMP Get, GetNext, or GetBulk request,
  3518.             the master agent may send a single AgentX PDU to the
  3519.             subagent with all applicable VarBinds, or multiple
  3520.             PDUs with single VarBinds, or something in between
  3521.             those extremes. The determination of which method to
  3522.             use in a particular case is implementation-specific.
  3523.  
  3524.    4) Timeout Values
  3525.  
  3526.       The master agent chooses a timeout value for each MIB region
  3527.       being queried, which is
  3528.  
  3529.          a) the value specified during registration of the MIB region,
  3530.             if it was non-zero
  3531.  
  3532.          b) otherwise, the value specified during establishment of
  3533.             the session in which this region was subsequently
  3534.  
  3535.  
  3536.  
  3537. Daniele/Wijnen       Expires December 1997                     [Page 60]
  3538.  
  3539. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3540.  
  3541.  
  3542.             registered, if that value was non-zero.
  3543.  
  3544.          c) otherwise, the master agent's default value
  3545.  
  3546.       When an AgentX PDU that references multiple MIB regions is
  3547.       dispatched, the timeout value used for the PDU is the maximum
  3548.       value of the timeouts so determined for each of the referenced
  3549.       MIB regions.
  3550.  
  3551.    5) Context
  3552.  
  3553.       If the master agent has determined that a specific non-default
  3554.       context is associated with the SNMP request PDU, that context is
  3555.       encoded into the AgentX PDU's context field and the
  3556.       NON_DEFAULT_CONTEXT bit is set in h.flags.
  3557.  
  3558.       Otherwise, no context Octet String is added to the PDU, and the
  3559.       NON_DEFAULT_CONTEXT bit is cleared.
  3560.  
  3561. 7.2.1.1.  agentx-Get-PDU
  3562.  
  3563.    Each variable binding in the SNMP request PDU is processed as
  3564.    follows:
  3565.  
  3566.    (1) Identify the target OID range.
  3567.  
  3568.        Within a lexicographically ordered set of OID ranges, valid for
  3569.        the indicated context, locate the authoritative region that
  3570.        contains the binding's name.
  3571.  
  3572.    (2) If no such OID range exists, the variable binding is not
  3573.        processed further, and its value is set to `noSuchObject'.
  3574.  
  3575.    (3) Identify the subagent session in which this region was
  3576.        registered, termed the target session.
  3577.  
  3578.    (4) If this is the first variable binding to be dispatched over
  3579.        the target session in a request-response exchange entailed
  3580.        in the processing of this management request:
  3581.  
  3582.        - Create an agentx-Get-PDU for this session, with the header
  3583.          fields initialized as described above (see 6.1 AgentX PDU
  3584.          Header).
  3585.  
  3586.    (5) Add a SearchRange to the end of the target session's PDU
  3587.        for this variable binding.
  3588.  
  3589.         - The variable binding's name is encoded into the starting OID.
  3590.  
  3591.         - The ending OID is encoded as null.
  3592.  
  3593.  
  3594.  
  3595.  
  3596. Daniele/Wijnen       Expires December 1997                     [Page 61]
  3597.  
  3598. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3599.  
  3600.  
  3601. 7.2.1.2.  agentx-GetNext-PDU
  3602.  
  3603.    Each variable binding in the SNMP request PDU is processed as
  3604.    follows:
  3605.  
  3606.    (1) Identify the target OID range. 
  3607.  
  3608.        Within a lexicographically ordered set of OID ranges, valid for 
  3609.        the indicated context, locate 
  3610.  
  3611.         a) the authoritative OID range that contains the variable
  3612.            binding's name and is not a fully qualified instance, or
  3613.  
  3614.         b) the authoritative OID range that is the first
  3615.            lexicographical successor to the variable binding's name.
  3616.  
  3617.    (2) If no such OID range exists, the variable binding is not
  3618.        processed further, and its value is set to `endOfMibView'.
  3619.  
  3620.    (3) Identify the subagent session in which this region was
  3621.        registered, termed the target session.
  3622.  
  3623.    (4) If this is the first variable binding to be dispatched over the
  3624.        target session in a request-response exchange entailed in the
  3625.        processing of this management request:
  3626.  
  3627.        - Create an agentx-GetNext-PDU for the session, with
  3628.          the header fields initialized as described above (see 6.1
  3629.          AgentX PDU Header).
  3630.  
  3631.    (5) Add a SearchRange to the end of the target session's
  3632.        agentx-GetNext-PDU for this variable binding.
  3633.  
  3634.         - if (1a) applies, the variable binding's name is encoded 
  3635.           into the starting OID, and the OID's "include" field 
  3636.           is set to 0.
  3637.  
  3638.         - if (1b) applies, the target OID is encoded into the starting
  3639.           OID, and its "include" field is set to 1.
  3640.  
  3641. 7.2.1.3.  agentx-GetBulk-PDU
  3642.  
  3643.    (Note: The outline of the following procedure is based closely on
  3644.    section 4.2.3, "The GetBulkRequest-PDU" of RFC 1905 [4].  Please
  3645.    refer to it for details on the format of the SNMP GetBulkRequest-PDU
  3646.    itself.)
  3647.  
  3648.    Each variable binding in the request PDU is processed as follows:
  3649.  
  3650.    (1) Identify the authoritative target OID range and target session,
  3651.        exactly as described for the agentx-GetNext-PDU (see 7.2.1.2).
  3652.  
  3653.  
  3654.  
  3655. Daniele/Wijnen       Expires December 1997                     [Page 62]
  3656.  
  3657. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3658.  
  3659.  
  3660.  
  3661.    (2) If this is the first variable binding to be dispatched over the
  3662.        target session in a request-response exchange entailed in the
  3663.        processing of this management request:
  3664.  
  3665.        - Create an agentx-GetBulk-PDU for the session, with
  3666.          the header fields initialized as described above (see 6.1
  3667.          AgentX PDU Header).
  3668.  
  3669.    (3) Add a SearchRange to the end of the target session's
  3670.        agentx-GetBulk-PDU for this variable binding, as described
  3671.        for the agentx-GetNext-PDU.  If the variable binding was
  3672.        a non-repeater in the original request PDU, it must be a
  3673.        non-repeater in the agentx-GetBulk-PDU. 
  3674.  
  3675.    The value of g.max_repetitions in the agentx-GetBulk-PDU may be less
  3676.    than (but not greater than) the value in the original request PDU.
  3677.  
  3678.    The master agent may make such alterations due to simple sanity
  3679.    checking, optimizations for the current iteration based on the
  3680.    registry, the maximum possible size of a potential Response-PDU,
  3681.    known constraints of the AgentX transport, or any other
  3682.    implementation-specific constraint.
  3683.  
  3684. 7.2.1.4.  agentx-TestSet-PDU
  3685.  
  3686.    AgentX employs test-commit-undo-cleanup phases
  3687.    to achieve "as if simultaneous" semantics of the SNMP SetRequest-PDU
  3688.    within the extensible agent.  The initial phase involves 
  3689.    the agentx-TestSet-PDU.
  3690.  
  3691.    Each variable binding in the SNMP request PDU is processed in order,
  3692.    as follows:
  3693.  
  3694.    (1) Identify the target OID range.
  3695.  
  3696.        Within a lexicographically ordered set of OID ranges, valid for 
  3697.        the indicated context, locate the authoritative range that
  3698.        contains the variable binding's name.
  3699.  
  3700.    (2) If no such OID range exists, this variable binding fails with an
  3701.        error of `notWritable'.  Processing is complete for this
  3702.        request.
  3703.  
  3704.    (3) Identify the single subagent responsible for this OID range,
  3705.        termed the target subagent, and the applicable session,
  3706.        termed the target session.
  3707.  
  3708.    (4) If this is the first variable binding to be dispatched over
  3709.        the target session in a request-response exchange entailed
  3710.        in the processing of this management request:
  3711.  
  3712.  
  3713.  
  3714. Daniele/Wijnen       Expires December 1997                     [Page 63]
  3715.  
  3716. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3717.  
  3718.  
  3719.        - create an agentx-TestSet-PDU for the session, with the
  3720.          header fields initialized as described above (see 6.1
  3721.          AgentX PDU Header).
  3722.  
  3723.    (5) Add a VarBind to the end of the target session's PDU
  3724.        for this variable binding, as described in section 5.4.
  3725.  
  3726.     Note that all VarBinds applicable to a given session must be
  3727.     sent in a single agentx-TestSet-PDU.
  3728.  
  3729. 7.2.1.5.  Dispatch
  3730.  
  3731.    A timeout value is calculated for each PDU to be sent, which is the
  3732.    maximum value of the timeouts determined for each of the PDU's
  3733.    SearchRanges (as described above in 7.2.1 Dispatching AgentX PDUs,
  3734.    item 4). Each pending PDU is mapped (via its h.sessionID value) to a
  3735.    particular transport domain/endpoint, as described in section 8
  3736.    (Transport Mappings).
  3737.  
  3738. 7.2.2.  Subagent Processing of agentx-Get, GetNext, GetBulk-PDUs
  3739.  
  3740.    A conformant AgentX subagent must support the agentx-Get, -GetNext,
  3741.    and -GetBulk PDUs, and must support multiple variables being supplied
  3742.    in each PDU.
  3743.  
  3744.    When a subagent receives an agentx-Get-, GetNext-, or GetBulk-PDU, it
  3745.    performs the indicated management operations and returns an 
  3746.    agentx-Response-PDU.
  3747.  
  3748.    The agentx-Response-PDU header fields are identical to the received
  3749.    request PDU except that, at the start of processing, the subagent
  3750.    initializes h.type to Response, res.error to `noError',
  3751.    res.index to 0, and the VarBindList to null.
  3752.  
  3753.    Each SearchRange in the request PDU's SearchRangeList is processed as
  3754.    described below, and a VarBind is added in the corresponding
  3755.    location of the agentx-Response-PDU's  VarbindList.  If processing
  3756.    should fail for any reason not described below, res.error is set to
  3757.    `genErr', res.index to the index of the failed SearchRange,
  3758.    the VarBindList is reset to null, and this agentx-Response-PDU is
  3759.    returned to the master agent.
  3760.  
  3761.  
  3762. 7.2.2.1.  Subagent Processing of the agentx-Get-PDU
  3763.  
  3764.    Upon the subagent's receipt of an agentx-Get-PDU, each SearchRange 
  3765.    in the request is processed as follows:
  3766.  
  3767.    (1) The starting OID is copied to v.name.
  3768.  
  3769.    (2) If the starting OID exactly matches the name of a
  3770.  
  3771.  
  3772.  
  3773. Daniele/Wijnen       Expires December 1997                     [Page 64]
  3774.  
  3775. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3776.  
  3777.  
  3778.        variable instantiated by this subagent within the indicated
  3779.        context and session, v.type and v.data are encoded to represent
  3780.        the variable's syntax and value, as described in section 5.4,
  3781.        Value Representation.
  3782.  
  3783.    (3) Otherwise, if the starting OID does not match the object
  3784.        identifier prefix of any variable instantiated within the
  3785.        indicated context and session, the VarBind is set to
  3786.        `noSuchObject', in the manner described in section 5.4,
  3787.        Value Representation.
  3788.  
  3789.    (4) Otherwise, the VarBind is set to `noSuchInstance' 
  3790.        in the manner described in section 5.4, Value Representation.
  3791.  
  3792. 7.2.2.2.  Subagent Processing of the agentx-GetNext-PDU 
  3793.  
  3794.    Upon the subagent's receipt of an agentx-GetNext-PDU, each
  3795.    SearchRange in the request is processed as follows:
  3796.  
  3797.    (1) The subagent searches for a variable within the
  3798.        lexicographically ordered list of variable names for all
  3799.        variables it instantiates (without regard to registration of
  3800.        regions) within the indicated context and session, for which
  3801.        the following are all true:
  3802.  
  3803.        - if the "include" field of the starting OID is 0, the
  3804.          variable's name is the closest lexicographical successor to
  3805.          the starting OID. 
  3806.  
  3807.        - if the "include" field of the starting OID is 1, the
  3808.          variable's name is either equal to, or the closest
  3809.          lexicographical successor to, the starting OID. 
  3810.  
  3811.        - If the ending OID is not null, the variable's name 
  3812.          lexicographically precedes the ending OID.
  3813.  
  3814.        If all of these conditions are met, v.name is set to the
  3815.        located variable's name.  v.type and v.data are encoded to 
  3816.        represent the variable's syntax and value, as described in
  3817.        section 5.4, Value Representation.
  3818.  
  3819.    (2) If no such variable exists, v.name is set to the starting OID,
  3820.        and the VarBind is set to `endOfMibView', in the manner described
  3821.        in section 5.4, Value Representation.
  3822.  
  3823. 7.2.2.3.  Subagent Processing of the agentx-GetBulk-PDU
  3824.  
  3825.    A maximum of N + (M * R) VarBinds are returned, where
  3826.  
  3827.       N equals g.non_repeaters,
  3828.       M equals g.max_repetitions, and
  3829.  
  3830.  
  3831.  
  3832. Daniele/Wijnen       Expires December 1997                     [Page 65]
  3833.  
  3834. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3835.  
  3836.  
  3837.       R is (number of SearchRanges in the GetBulk request) - N.
  3838.  
  3839.    The first N SearchRanges are processed exactly as for the 
  3840.    agentx-GetNext-PDU.
  3841.  
  3842.    If M and R are both non-zero, the remaining R SearchRanges are
  3843.    processed iteratively to produce potentially many VarBinds.  For
  3844.    each iteration i, such that i is greater than zero and less than or
  3845.    equal to M, and for each repeated SearchRange s, such that s is
  3846.    greater than zero and less than or equal to R, the
  3847.    (N+((i-1)*R)+s)-th VarBind is added to the agentx-Response-PDU
  3848.    as follows:
  3849.  
  3850.       1) The subagent searches for a variable within the
  3851.          lexicographically ordered list of variable names for all
  3852.          variables it instantiates (without regard to registration of
  3853.          regions) within the indicated context and session, for which
  3854.          the following are all true:
  3855.  
  3856.           - The variable's name is the (i)-th lexicographical successor
  3857.             to the (N+s)-th requested OID.
  3858.  
  3859.             (Note that if i is 0 and the "include" field is 1, the
  3860.             variable's name may be equivalent to, or the first 
  3861.             lexicographical successor to, the (N+s)-th requested OID.)
  3862.  
  3863.           - If the ending OID is not null, the variable's name
  3864.             lexicographically precedes the ending OID.
  3865.  
  3866.          If all of these conditions are met, v.name is set to the
  3867.          located variable's name.  v.type and v.data are
  3868.          encoded to represent the variable's syntax and value, as
  3869.          described in section 5.4, Value Representation.
  3870.  
  3871.  
  3872.       2) If no such variable exists, the VarBind is set to
  3873.          `endOfMibView' as described in section 5.4, Value
  3874.          Representation.  v.name is set to v.name of the 
  3875.          (N+((i-2)*R)+s)-th VarBind unless i is currently 1, in which
  3876.          case it is set to the value of the starting OID in the (N+s)-th
  3877.          SearchRange.
  3878.  
  3879.    Note that further iterative processing should stop if 
  3880.  
  3881.         - For any iteration i, all s values of v.type are 
  3882.           `endOfMibView'.
  3883.  
  3884.         - An AgentX transport constraint or other
  3885.           implementation-specific constraint is reached.
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891. Daniele/Wijnen       Expires December 1997                     [Page 66]
  3892.  
  3893. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3894.  
  3895.  
  3896. 7.2.3.  Subagent Processing of agentx-TestSet, -CommitSet, -UndoSet,
  3897.         -CleanupSet-PDUs
  3898.  
  3899.    A conformant AgentX subagent must support the agentx-TestSet,
  3900.    -CommitSet, -UndoSet, and -CleanupSet PDUs, and must support multiple
  3901.    variables being supplied in each PDU.
  3902.  
  3903.    These four PDUs are used to collectively perform the indicated
  3904.    management operation.  An agentx-Response-PDU is sent in reply to
  3905.    each of the PDUs, to inform the master agent of the state of the
  3906.    operation.
  3907.  
  3908.    The agentx-Response-PDU header fields are identical to the received
  3909.    request PDU except that, at the start of processing, the subagent
  3910.    initializes h.type to Response, res.error to `noError', and
  3911.    res.index to 0.
  3912.  
  3913.    These Response-PDUs do not contain a VarBindList.
  3914.  
  3915.  
  3916. 7.2.3.1.  Subagent Processing of the agentx-TestSet-PDU
  3917.  
  3918.    Upon the subagent's receipt of an agentx-TestSet-PDU, each VarBind
  3919.    in the PDU is validated until they are all successful, or until one
  3920.    fails, as described in section 4.2.5 of RFC 1905 [4]. The subagent
  3921.    validates variables with respect to the context and session
  3922.    indicated in the testSet-PDU.
  3923.  
  3924.    If each VarBind is successful, the subagent has a further
  3925.    responsibility to ensure the availability of all resources (memory,
  3926.    write access, etc.) required for successfully carrying out a
  3927.    subsequent agentx-CommitSet operation.  If this cannot be guaranteed,
  3928.    the subagent should set res.error to `resourceUnavailable'.
  3929.  
  3930.    As a result of this validation step, an agentx-Response-PDU
  3931.    is sent in reply whose res.error field is set to one of the
  3932.    following (SNMPv2 SMI) values:
  3933.  
  3934.             noError                    (0),
  3935.             genErr                     (5),
  3936.             noAccess                   (6),
  3937.             wrongType                  (7),
  3938.             wrongLength                (8),
  3939.             wrongEncoding              (9),
  3940.             wrongValue                (10),
  3941.             noCreation                (11),
  3942.             inconsistentValue         (12),
  3943.             resourceUnavailable       (13),
  3944.             notWritable               (17),
  3945.             inconsistentName          (18)
  3946.  
  3947.  
  3948.  
  3949.  
  3950. Daniele/Wijnen       Expires December 1997                     [Page 67]
  3951.  
  3952. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  3953.  
  3954.  
  3955.    If this value is not `noError', the res.index field must be
  3956.    set to the index of the VarBind for which validation failed.
  3957.  
  3958.    Implementation of rigorous validation code may be one of the
  3959.    most demanding aspects of subagent development.  Implementors
  3960.    are strongly encouraged to do this right, so as to avoid if at
  3961.    all possible the extensible agent's having to return `commitFailed'
  3962.    or `undoFailed' during subsequent processing.
  3963.  
  3964.  
  3965. 7.2.3.2.  Subagent Processing of the agentx-CommitSet-PDU
  3966.  
  3967.    The agentx-CommitSet-PDU indicates that the subagent should actually
  3968.    perform (as described in the post-validation sections of 4.2.5 of
  3969.    RFC 1905 [4]) the management operation indicated by the previous
  3970.    TestSet-PDU.
  3971.    After carrying out the management operation, the subagent sends in
  3972.    reply an agentx-Response-PDU whose res.error field is set to one of
  3973.    the following (SNMPv2 SMI) values:
  3974.  
  3975.             noError                    (0),
  3976.             commitFailed              (14)
  3977.  
  3978.    If this value is `commitFailed', the res.index field must be
  3979.    set to the index of the VarBind for which the operation failed.
  3980.    Otherwise res.index is set to 0.
  3981.  
  3982. 7.2.3.3.  Subagent Processing of the agentx-UndoSet-PDU
  3983.  
  3984.    The agentx-UndoSet-PDU indicates that the subagent should undo
  3985.    the management operation requested in a preceding CommitSet-PDU.
  3986.    The undo process is as described in section 4.2.5 of RFC 1905
  3987.    [4].
  3988.  
  3989.    After carrying out the undo process, the subagent sends in reply an
  3990.    agentx-Response-PDU whose res.index field is set to 0, and whose
  3991.    res.error field is set to one of the following (SNMPv2 SMI) values:
  3992.  
  3993.             noError                    (0),
  3994.             undoFailed                (15)
  3995.  
  3996.    If this value is `undoFailed', the res.index field must be
  3997.    set to the index of the VarBind for which the operation failed.
  3998.    Otherwise res.index is set to 0.
  3999.  
  4000.    This PDU also signals the end of processing of the management
  4001.    operation initiated by the previous TestSet-PDU.  The subagent
  4002.    should release resources, etc. as described in section 7.2.3.4.
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009. Daniele/Wijnen       Expires December 1997                     [Page 68]
  4010.  
  4011. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4012.  
  4013.  
  4014. 7.2.3.4.  Subagent Processing of the agentx-CleanupSet-PDU
  4015.  
  4016.    The agentx-CleanupSet-PDU signals the end of processing of the
  4017.    management operation requested in the previous TestSet-PDU.  This
  4018.    is an indication to the subagent that it may now release any
  4019.    resources it may have reserved in order to carry out the management
  4020.    request.
  4021.  
  4022.    No response is sent by the subagent.
  4023.  
  4024.  
  4025. 7.2.4.  Master Agent Processing of AgentX Responses
  4026.  
  4027.    The master agent now marshals all subagent AgentX response PDUs and
  4028.    builds an SNMP response PDU.  In the next several subsections, the
  4029.    initial processing of all subagent AgentX response PDUs is
  4030.    described, followed by descriptions of subsequent processing
  4031.    for each specific subagent Response.
  4032.  
  4033. 7.2.4.1.  Common Processing of All AgentX Response PDUs
  4034.  
  4035.    1) If a subagent does not respond within the timeout interval for
  4036.       this dispatch, it is treated as if the subagent had returned
  4037.       `genErr' and processed as described below.
  4038.  
  4039.       A timeout may be due to a variety of reasons, and does
  4040.       not necessarily denote a failed or malfunctioning
  4041.       subagent.  As such, the master agent's response to a
  4042.       subagent timeout is implementation-specific, but with the
  4043.       following constraint:
  4044.  
  4045.          A subagent that times out on three consecutive requests
  4046.          is considered unable to respond, and the master agent
  4047.          must close the AgentX session as described in
  4048.          7.1.9, step (2).
  4049.  
  4050.    2) Otherwise, the h.packetID, h.sessionID, and h.transactionID
  4051.       fields of the AgentX response PDU are used to correlate subagent
  4052.       responses.  If the response does not pertain to this SNMP
  4053.       operation, it is ignored.
  4054.  
  4055.    3) Otherwise, the responses are processed jointly to form the SNMP
  4056.       response PDU.
  4057.  
  4058. 7.2.4.2.  Processing of Responses to agentx-Get-PDUs
  4059.  
  4060.    After common processing of the subagent's response to an
  4061.    agentx-Get-PDU (see 7.2.4.1 above), processing continues with
  4062.    the following steps:
  4063.  
  4064.    1)  For any received AgentX response PDU, if res.error is not
  4065.  
  4066.  
  4067.  
  4068. Daniele/Wijnen       Expires December 1997                     [Page 69]
  4069.  
  4070. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4071.  
  4072.  
  4073.        `noError', the SNMP response PDU's error code is set to this
  4074.        value, and its error index to the index of the variable binding
  4075.        corresponding to the failed VarBind in the subagent's
  4076.        AgentX response PDU.
  4077.  
  4078.        All other AgentX response PDUs received due to processing this
  4079.        SNMP request are ignored.  Processing is complete; the SNMP
  4080.        Response PDU is ready to be sent (see section 7.2.5, Sending
  4081.        the SNMP Response-PDU).
  4082.  
  4083.    2)  Otherwise, the content of each VarBind in the AgentX response PDU
  4084.        is used to update the corresponding variable binding in the SNMP
  4085.        Response-PDU.
  4086.  
  4087. 7.2.4.3.  Processing of Responses to agentx-GetNext-PDU and
  4088.           agentx-GetBulk-PDU
  4089.  
  4090.    After common processing of the subagent's response to an
  4091.    agentx-GetNext-PDU or agentx-GetBulk-PDU (see 7.2.4.1 above),
  4092.    processing continues with the following steps:
  4093.  
  4094.    1)  For any received AgentX response PDU, if res.error is not
  4095.        `noError', the SNMP response PDU's error code is set to this
  4096.        value, and its error index to the index of the VarBind
  4097.        corresponding to the failed VarBind in the subagent's
  4098.        AgentX response PDU.
  4099.  
  4100.        All other AgentX response PDUs received due to processing this
  4101.        SNMP request are ignored.  Processing is complete; the SNMP
  4102.        response PDU is ready to be sent (see section 7.2.5, Sending
  4103.        the SNMP Response PDU).
  4104.  
  4105.    2)  Otherwise, the content of each VarBind in the AgentX response
  4106.        PDU is used to update the corresponding VarBind in the SNMP
  4107.        response PDU.
  4108.  
  4109.    After all expected AgentX response PDUs have been processed, if
  4110.    any VarBinds still contain the value `endOfMibView' in their
  4111.    v.type fields, processing must continue:
  4112.  
  4113.    3)  A new iteration of AgentX request dispatching is initiated
  4114.        (as described in section 7.2.1.1), in which only those
  4115.        VarBinds whose v.type is `endOfMibView' are processed.
  4116.  
  4117.    4)  For each such VarBind, a target OID range is identified
  4118.        which is the lexicographical successor to the target OID
  4119.        range for this VarBind on the last iteration.  The target
  4120.        subagent is the one that registered the target OID range.
  4121.        The target session is the one in which the target OID range
  4122.        was registered.
  4123.  
  4124.  
  4125.  
  4126.  
  4127. Daniele/Wijnen       Expires December 1997                     [Page 70]
  4128.  
  4129. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4130.  
  4131.  
  4132.        If an agentx-GetNext- or GetBulk-PDU is being dispatched,
  4133.        the starting OID in the SearchRanges is set to the target 
  4134.        OID range, and its "include" field is set to 1.
  4135.  
  4136.    5)  The value of transactionID must be identical to the value
  4137.        used during the previous iteration. 
  4138.  
  4139.    6)  The AgentX PDUs are sent to the subagent(s), and the responses
  4140.        are received and processed according to the steps described in
  4141.        section 7.2.4.
  4142.  
  4143.    7)  This process continues iteratively until a complete SNMP
  4144.        Response-PDU has been built, or until there remain no
  4145.        target OID range lexicographical successors.
  4146.  
  4147. 7.2.4.4.  Processing of Responses to agentx-TestSet-PDUs
  4148.  
  4149.    After common processing of the subagent's response to an
  4150.    agentx-TestSet-PDU (see 7.2.4.1 above), processing continues with
  4151.    the further exchange of AgentX PDUs.  The value of h.transactionID
  4152.    in the agentx-CommitSet, -UndoSet, and -CleanupSet-PDUs must be
  4153.    identical to the value sent in the testSet-PDU.
  4154.  
  4155.    The state transitions and PDU sequences are depicted in section 7.3. 
  4156.  
  4157.    1)  If any target subagent's response is not `noError', all other
  4158.        agentx-Response-PDUs received due to processing this SNMP
  4159.        request are ignored.
  4160.  
  4161.        An agentx-CleanupSet-PDU is sent to each target subagent that has
  4162.        been sent a agentx-TestSet-PDU.
  4163.  
  4164.        Processing is complete; the SNMP response PDU is constructed as
  4165.        described below in 7.2.4.6.
  4166.  
  4167.    2)  Otherwise an agentx-CommitSet-PDU is sent to each target
  4168.        subagent.
  4169.  
  4170. 7.2.4.5.  Processing of Responses to agentx-CommitSet-PDUs
  4171.  
  4172.    After common processing of the subagent's response to an
  4173.    agentx-CommitSet-PDU (see 7.2.4.1 above), processing continues with
  4174.    the following steps:
  4175.  
  4176.    1)  If any response is not `noError', all other
  4177.        agentx-Response-PDUs received due to processing this SNMP
  4178.        request are ignored.
  4179.  
  4180.        An agentx-UndoSet-PDU is sent to each target subagent that has
  4181.        been sent a agentx-CommitSet-PDU.  All other subagents are sent a
  4182.        agentx-CleanupSet-PDU.
  4183.  
  4184.  
  4185.  
  4186. Daniele/Wijnen       Expires December 1997                     [Page 71]
  4187.  
  4188. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4189.  
  4190.  
  4191.  
  4192.    2)  Otherwise an agentx-CleanupSet-PDU is sent to each target
  4193.        subagent.  Processing is complete; the SNMP response PDU is
  4194.        constructed as described below in 7.2.4.6.
  4195.  
  4196. 7.2.4.6.  Processing of Responses to agentx-UndoSet-PDUs
  4197.  
  4198.    After common processing of the subagent's response to an
  4199.    agentx-UndoSet-PDU (see 7.2.4.1 above), processing continues with the
  4200.    following steps:
  4201.  
  4202.    1)  If any response is not `noError' the SNMP response
  4203.        PDU's error code is set to this value, and its error index to the
  4204.        index of the VarBind corresponding to the failed VarBind
  4205.        in the agentx-TestSet-PDU.
  4206.  
  4207.        Otherwise the SNMP response PDU's error code is set to `noError'
  4208.        and its error index to 0.
  4209.  
  4210. 7.2.5.  Sending the SNMP Response-PDU
  4211.  
  4212.    Once the processing described in sections 7.2.1 - 7.2.4 is
  4213.    complete, there is an SNMP response PDU available.  The master agent
  4214.    now implements the Elements of Procedure for the applicable version
  4215.    of the SNMP protocol in order to encapsulate the PDU into a message,
  4216.    and transmit it to the originator of the SNMP management request.
  4217.    Note that this may involve altering the PDU contents (for instance,
  4218.    to replace the original VarBinds if an error condition is
  4219.    to be returned).
  4220.  
  4221.    The response PDU may also be altered in order to support the SNMP
  4222.    version 1 framework.  In such cases the required mapping is that
  4223.    defined in RFC 2089 [9].  (Note in particular that the rules for
  4224.    handling Counter64 syntax may require re-sending AgentX GetBulk
  4225.    or GetNext PDUs until a VarBind of suitable syntax is returned.)
  4226.  
  4227.  
  4228. 7.2.6.  MIB Views
  4229.  
  4230.    AgentX subagents are not aware of MIB views, since view information
  4231.    is not contained in AgentX PDUs.
  4232.  
  4233.    As stated above, the descriptions of procedures in section 7 of this
  4234.    memo are not intended to constrain the internal architecture of any
  4235.    conformant implementation.  In particular, the master agent
  4236.    procedures described in sections 7.2.1 and 7.2.4 may be altered so
  4237.    as to optimize AgentX exchanges when implementing MIB views.
  4238.  
  4239.    Such optimizations are beyond the scope of this memo.  But note that
  4240.    section 7.2.3 defines subagent behavior in such a way that alteration
  4241.    of SearchRanges may be used in such optimizations.
  4242.  
  4243.  
  4244.  
  4245. Daniele/Wijnen       Expires December 1997                     [Page 72]
  4246.  
  4247. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4248.  
  4249.  
  4250. 7.3.  State Transitions
  4251.  
  4252.    State diagrams are presented from the master agent's perspective
  4253.    for transport connection and session establishment, and from the
  4254.    subagent's perspective for Set transaction processing.
  4255.  
  4256. 7.3.1.  Set Transaction States
  4257.  
  4258.    The following table presents, from the subagent's perspective,
  4259.    the state transitions involved in Set transaction processing:
  4260.  
  4261.                                        STATE
  4262.             +----------------+--------------+---------+--------+--------
  4263.             |       A        |      B       |   C     |   D    |   E
  4264.             |   (Initial     |    TestOK    | Commit  | Test   | Commit 
  4265.             |     State)     |              |  OK     | Fail   |  Fail 
  4266.             |                |              |         |        |        
  4267.     EVENT   |                |              |         |        |        
  4268.    ---------+----------------+--------------+---------+--------+--------
  4269.             | 7.2.3.1        |              |         |        |        
  4270.    Receive  | All varbinds   |              |         |        |        
  4271.    TestSet  | OK?            |      X       |    X    |   X    |    X   
  4272.    PDU      |   Yes ->B      |              |         |        |        
  4273.             |   No  ->D      |              |         |        |        
  4274.    ---------+----------------+--------------+---------+--------+--------
  4275.             |                |  7.2.3.2     |         |        |        
  4276.    Receive  |                |  NoError?    |         |        |        
  4277.    Commit-  |       X        |   Yes ->C    |    X    |   X    |    X   
  4278.    Set PDU  |                |   No  ->E    |         |        |        
  4279.    ---------+----------------+--------------+---------+--------+--------
  4280.    Receive  |                |              | 7.2.3.3 |        |7.2.4.5 
  4281.    UndoSet  |       X        |       X      | ->done  |   X    | ->done 
  4282.    PDU      |                |              |         |        |        
  4283.    ---------+----------------+--------------+---------+--------+--------
  4284.    Receive  |                |  7.2.4.4     | 7.2.3.4 |7.2.4.4 |        
  4285.    Cleanup- |       X        |   ->done     | ->done  | ->done |   X    
  4286.    Set PDU  |                |              |         |        |        
  4287.    ---------+----------------+--------------+---------+--------+--------
  4288.    Session  |                | rollback     | undo    |        |       
  4289.    Loss     |  ->done        |  ->done      |  ->done | ->done | ->done
  4290.    ---------+----------------+--------------+---------+--------+--------
  4291.  
  4292.    There are three possible sequences that a subagent may follow for a
  4293.    particular set transaction:
  4294.  
  4295.       1) TestSet CommitSet CleanupSet
  4296.       2) TestSet CommitSet UndoSet 
  4297.       3) TestSet           CleanupSet
  4298.  
  4299.    Note that a single PDU sequence may result in multiple paths through
  4300.    the finite state machine (FSM).  For example, the sequence
  4301.  
  4302.  
  4303.  
  4304. Daniele/Wijnen       Expires December 1997                     [Page 73]
  4305.  
  4306. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4307.  
  4308.  
  4309.       TestSet CommitSet UndoSet 
  4310.  
  4311.    may walk through either of these two state sequences:
  4312.  
  4313.       (initial) TestOK CommitOK   (done)
  4314.       (initial) TestOK CommitFail (done)
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363. Daniele/Wijnen       Expires December 1997                     [Page 74]
  4364.  
  4365. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4366.  
  4367.  
  4368. 7.3.2  Transport Connection States
  4369.  
  4370.    The following table presents, from the master agent's perspective,
  4371.    the state transitions involved in transport connection setup
  4372.    and teardown:
  4373.  
  4374.                                 STATE
  4375.                    +--------------+--------------
  4376.                    |      A       |      B       
  4377.                    | No transport |  Transport   
  4378.                    |              |  connected   
  4379.                    |              |              
  4380.    EVENT           |              |              
  4381.    ----------------+--------------+--------------
  4382.    Transport       |              |              
  4383.    connect         |     ->B      |      X       
  4384.    indication      |              |              
  4385.    ----------------+--------------+--------------
  4386.    Receive         |              | if duplicate 
  4387.    Open-PDU        |              | session id,  
  4388.                    |              | reject, else 
  4389.                    |      X       | establish    
  4390.                    |              | session      
  4391.                    |              |
  4392.                    |              |     ->B
  4393.    ----------------+--------------+--------------
  4394.    Receive         |              | if matching  
  4395.    Response-PDU    |              | session id,  
  4396.                    |              | feed to that 
  4397.                    |      X       | session's FSM
  4398.                    |              | else ignore  
  4399.                    |              | 
  4400.                    |              |     ->B      
  4401.    ----------------+--------------+--------------
  4402.    Receive other   |              | if matching  
  4403.    PDUs            |              | session id,  
  4404.                    |              | feed to that 
  4405.                    |      X       | session's FSM
  4406.                    |              | else reject  
  4407.                    |              | 
  4408.                    |              |     ->B
  4409.    ----------------+--------------+--------------
  4410.    Transport       |              |notify all    
  4411.    disconnect      |              |sessions on   
  4412.    indication      |      X       |this transport 
  4413.                    |              | 
  4414.                    |              |     ->A      
  4415.    ----------------+--------------+--------------
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422. Daniele/Wijnen       Expires December 1997                     [Page 75]
  4423.  
  4424. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4425.  
  4426.  
  4427. 7.3.3  Session States
  4428.  
  4429.    The following table presents, from the master agent's perspective,
  4430.    the state transitions involved in session setup and teardown:
  4431.  
  4432.                               STATE
  4433.                   +-------------+----------------
  4434.                   |     A       |      B         
  4435.                   |  No session |  Session
  4436.                   |             |  established   
  4437.    EVENT          |             |
  4438.    ---------------+-------------+----------------
  4439.                   |  7.1.1      |                
  4440.    Receive        |             |      X         
  4441.    Open PDU       |    ->B      |                
  4442.    ---------------+-------------+----------------
  4443.                   |             |  7.1.9   
  4444.    Receive        |      X      | 
  4445.    Close PDU      |             |    ->A         
  4446.    ---------------+-------------+----------------
  4447.    Receive        |             |  7.1.5   
  4448.    Register PDU   |      X      |
  4449.                   |             |    ->B
  4450.    ---------------+-------------+----------------
  4451.    Receive        |             |  7.1.6         
  4452.    Unregister     |      X      | 
  4453.    PDU            |             |    ->B
  4454.    ---------------+-------------+----------------
  4455.    Receive        |             |                
  4456.    Get PDU        |             |                
  4457.    GetNext PDU    |             |                
  4458.    GetBulk PDU    |      X      |       X        
  4459.    TestSet PDU    |             |                
  4460.    CommitSet PDU  |             |                
  4461.    UndoSet PDU    |             |                
  4462.    CleanupSet PDU |             |                
  4463.    ---------------+-------------+----------------
  4464.    Receive        |             |  7.1.11  
  4465.    Notify PDU     |      X      | 
  4466.                   |             |    ->B
  4467.    ---------------+-------------+----------------
  4468.    Receive Ping   |             |  7.1.12  
  4469.    PDU            |      X      | 
  4470.                   |             |    ->B
  4471.    ---------------+-------------+----------------
  4472.    Receive        |             |  7.1.2   
  4473.    IndexAllocate  |      X      | 
  4474.    PDU            |             |    ->B
  4475.    ---------------+-------------+----------------
  4476.    (continued next page)
  4477.  
  4478.  
  4479.  
  4480.  
  4481. Daniele/Wijnen       Expires December 1997                     [Page 76]
  4482.  
  4483. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4484.  
  4485.  
  4486.    ---------------+-------------+----------------
  4487.    Receive        |             |  7.1.4   
  4488.    IndexDeallocate|      X      | 
  4489.    PDU            |             |    ->B
  4490.    ---------------+-------------+----------------
  4491.    Receive        |             |  7.1.7   
  4492.    AddAgentxCaps  |      X      | 
  4493.    PDU            |             |    ->B
  4494.    ---------------+-------------+----------------
  4495.    Receive        |             |  7.1.8   
  4496.    RemoveAgentxCap|      X      | 
  4497.    PDU            |             |    ->B
  4498.    ---------------+-------------+----------------
  4499.    Receive        |             |  7.2.4   
  4500.    Response PDU   |      X      | 
  4501.                   |             |    ->B
  4502.    ---------------+-------------+----------------
  4503.    Receive        |             |                
  4504.    Other PDU      |      X      |       X        
  4505.    ---------------+-------------+----------------
  4506.  
  4507. 8.  Transport Mappings
  4508.  
  4509.    The same AgentX PDU formats, encodings, and elements of procedure
  4510.    are used regardless of the underlying transport.
  4511.  
  4512. 8.1.  AgentX over TCP
  4513.  
  4514. 8.1.1.  Well-known Values
  4515.  
  4516.    The master agent accepts TCP connection requests for the well-known
  4517.    port 705.  Subagents connect to the master agent using this port
  4518.    number.
  4519.  
  4520. 8.1.2.  Operation
  4521.  
  4522.    Once a TCP connection has been established, the AgentX peers use
  4523.    this connection to carry all AgentX PDUs. Multiple AgentX sessions
  4524.    may be established using the same TCP connection.  AgentX PDUs are
  4525.    sent within an AgentX session.  AgentX peers are responsible for
  4526.    mapping the h.sessionID to a particular TCP connection.
  4527.  
  4528.    All AgentX PDUs are presented individually to the TCP, to be sent as
  4529.    the data portion of a TCP PDU.
  4530.  
  4531. 8.2.  AgentX over UNIX-domain Sockets
  4532.  
  4533.    Many (BSD-derived) implementations of the UNIX operating system
  4534.    support the UNIX pathname address family (AF_UNIX) for socket
  4535.    communications.  This provides a convenient method of sending and
  4536.    receiving data between processes on the same host.
  4537.  
  4538.  
  4539.  
  4540. Daniele/Wijnen       Expires December 1997                     [Page 77]
  4541.  
  4542. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4543.  
  4544.  
  4545.    Mapping AgentX to this transport is useful for environments that
  4546.  
  4547.        - wish to guarantee subagents are running on the same
  4548.          managed node as the master agent, and where
  4549.  
  4550.        - sockets provide better performance than TCP or UDP,
  4551.          especially in the presence of heavy network I/O
  4552.  
  4553. 8.2.1.  Well-known Values
  4554.  
  4555.    The master agent creates a well-known UNIX-domain socket endpoint
  4556.    called "/var/agentx/master".  (It may create other, implementation-
  4557.    specific endpoints.)
  4558.  
  4559.    This endpoint name uses the character set encoding native to the
  4560.    managed node, and represents a UNIX-domain stream (SOCK_STREAM)
  4561.    socket.
  4562.  
  4563. 8.2.2.  Operation
  4564.  
  4565.    Once a connection has been established, the AgentX peers use
  4566.    this connection to carry all AgentX PDUs.
  4567.  
  4568.    Multiple AgentX sessions may be established using the same
  4569.    connection.  AgentX PDUs are sent within an AgentX session.  AgentX
  4570.    peers are responsible for mapping the h.sessionID to a particular
  4571.    connection.
  4572.  
  4573.    All AgentX PDUs are presented individually to the socket layer, to
  4574.    be sent in the data stream.
  4575.  
  4576.  
  4577. 9.  Security Considerations
  4578.  
  4579.    This memo defines a protocol between two processing entities,
  4580.    one of which (the master agent) is assumed to perform
  4581.    authentication of received SNMP requests and to control access
  4582.    to management information.  The master agent performs these
  4583.    security operations independently of the other processing
  4584.    entity (the subagent).
  4585.  
  4586.    Security considerations require three questions to be answered:
  4587.  
  4588.       1. Is a particular subagent allowed to initiate a session with a
  4589.          particular master agent?
  4590.  
  4591.       2. During an AgentX session, is any SNMP security-related
  4592.          information (for example, community names) passed from the
  4593.          master agent to the subagent?
  4594.  
  4595.       3. During an AgentX session, what part of the MIB tree is this
  4596.  
  4597.  
  4598.  
  4599. Daniele/Wijnen       Expires December 1997                     [Page 78]
  4600.  
  4601. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4602.  
  4603.  
  4604.          subagent allowed to register?
  4605.  
  4606.    The answer to the third question is: A subagent can register any
  4607.    subtree (subject to AgentX elements of procedure, section 7.1.5).
  4608.    Currently there is no access control mechanism
  4609.    defined in AgentX. A concern here is that a malicious subagent
  4610.    that registers an unauthorized "sensitive" subtree, could see
  4611.    modification requests to those objects, or by giving its own
  4612.    clever answer to NMS queries, could cause the NMS to do something
  4613.    that leads to information disclosure or other damage.
  4614.  
  4615.    The answer to the second question is: No. 
  4616.  
  4617.    Now we can answer the first question.
  4618.    AgentX does not contain a mechanism for authorizing/refusing session
  4619.    initiations.  Thus, controlling subagent access to the master
  4620.    agent may only be done at a lower layer (e.g., transport).
  4621.  
  4622.    An AgentX subagent can connect to a master agent
  4623.    using either a network transport mechanism (e.g., TCP), or a "local"
  4624.    mechanism (e.g., shared memory, named pipes).
  4625.  
  4626.    In the case where a local transport mechanism is used and both
  4627.    subagent and master agent are running on the same host, connection
  4628.    authorization can be delegated to the operating system features.
  4629.    The answer to the first security question then becomes:
  4630.    "If and only if the subagent has sufficient privileges, then the
  4631.    operating system will allow the connection".
  4632.  
  4633.    If a network transport is used, currently there is no inherent 
  4634.    security.  Transport Layer Security or SSL could be used
  4635.    to control subagent connections, but that is beyond the scope
  4636.    of this document.
  4637.  
  4638.    Thus it is recommended that subagents always run on the same
  4639.    host as the master agent and that operating system features be
  4640.    used to ensure that only properly authorized subagents
  4641.    can establish connections to the master agent.
  4642.  
  4643. 10.  Acknowledgements
  4644.  
  4645.    The initial draft of this memo was heavily influenced by the DPI
  4646.    2.0 specification RFC 1592 [7].
  4647.  
  4648.    This document was produced by the IETF Agent Extensibility
  4649.    (AgentX) Working Group, and benefited especially from the
  4650.    contributions of the following working group members:
  4651.  
  4652.       David Battle, Uri Blumenthal, Jeff Case, Maria Greene,
  4653.       Dave Keeney, Harmen van der Linde, Bob Natale, Randy Presuhn,
  4654.       Aleksey Romanov, Don Ryan, and Juergen Schoenwaelder.
  4655.  
  4656.  
  4657.  
  4658. Daniele/Wijnen       Expires December 1997                     [Page 79]
  4659.  
  4660. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4661.  
  4662.  
  4663.    The AgentX Working Group is chaired by:
  4664.  
  4665.       Bob Natale
  4666.       ACE*COMM Corporation
  4667.       704 Quince Orchard Road
  4668.       Gaithersburg MD  20878
  4669.  
  4670.       Phone: +1-301-721-3000
  4671.       Fax:   +1-301-721-3001
  4672.       EMail: bnatale@acecomm.com
  4673.  
  4674.  
  4675. 11.  Authors' and Editor's Addresses
  4676.  
  4677.       Mike Daniele
  4678.       Digital Equipment Corporation
  4679.       110 Spit Brook Rd
  4680.       Nashua, NH 03062
  4681.  
  4682.       Phone: +1-603-881-1423
  4683.       EMail: daniele@zk3.dec.com
  4684.  
  4685.  
  4686.       Bert Wijnen
  4687.       IBM Professional Services
  4688.       Watsonweg 2
  4689.       1423 ND Uithoorn
  4690.       The Netherlands
  4691.  
  4692.       Phone: +31-79-322-8316
  4693.       EMail: wijnen@vnet.ibm.com
  4694.  
  4695.  
  4696.       Dale Francisco (editor)
  4697.       Cisco Systems
  4698.       150 Castilian Dr
  4699.       Goleta CA 93117
  4700.  
  4701.       Phone: +1-805-961-3642
  4702.       Fax:   +1-805-961-3600
  4703.       EMail: dfrancis@cisco.com
  4704.  
  4705.  
  4706. 12.  References
  4707.  
  4708. [1]  Information processing systems - Open Systems Interconnection -
  4709.      Specification of Abstract Syntax Notation One (ASN.1),
  4710.      International Organization for Standardization.  International
  4711.      Standard 8824, (December, 1987).
  4712.  
  4713. [2]  SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
  4714.  
  4715.  
  4716.  
  4717. Daniele/Wijnen       Expires December 1997                     [Page 80]
  4718.  
  4719. Draft          Agent Extensibility (AgentX) Protocol           June 1997
  4720.  
  4721.  
  4722.      S. Waldbusser, "Structure of Management Information for Version 2
  4723.      of the Simple Network Management Protocol (SNMPv2)", RFC 1902,
  4724.      January 1996.
  4725.  
  4726. [3]  SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
  4727.      S. Waldbusser, "Textual Conventions for Version 2 of the Simple
  4728.      Network Management Protocol (SNMPv2)", RFC 1903, January 1996.
  4729.  
  4730. [4]  SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
  4731.      S. Waldbusser, "Protocol Operations for Version 2 of the Simple
  4732.      Network Management Protocol (SNMPv2)", RFC 1905, January 1996.
  4733.  
  4734. [5]  SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
  4735.      S. Waldbusser, "Management Information Base for Version 2 of the
  4736.      Simple Network Management Protocol (SNMPv2)", RFC 1907,
  4737.      January 1996.
  4738.  
  4739. [6]  Case, J., Fedor, M., Schoffstall, M., and J. Davin, "Simple Network
  4740.      Management Protocol", STD 15, RFC 1157, SNMP Research, Performance
  4741.      Systems International, MIT Laboratory for Computer Science, May
  4742.      1990.
  4743.  
  4744. [7]  Wijnen, B., Carpenter, G., Curran, K., Sehgal, A., and G. Waters,
  4745.      "Simple Network Management Protocol: Distributed Protocol
  4746.      Interface, Version 2.0", RFC 1592, T.J. Watson Research Center,
  4747.      IBM Corp., Bell Northern Research, Ltd., March 1994.
  4748.  
  4749. [8]  SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
  4750.      S. Waldbusser, "Coexistence between Version 1 and Version 2 of the
  4751.      Internet-standard Network Management Framework", RFC 1908,
  4752.      January 1996.
  4753.  
  4754. [9]  Wijnen, B., and Levi, D., "V2ToV1: Mapping SNMPv2 onto SNMPv1
  4755.      Within a Bilingual SNMP Agent", RFC 2089, T.J. Watson Research
  4756.      Center, IBM Corp., SNMP Research, Inc., January 1997.
  4757.  
  4758. [10] SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and
  4759.      S. Waldbusser, "Conformance Statements for Version 2 of the
  4760.      Simple Network Management Protocol (SNMPv2)", RFC 1904,
  4761.      January 1996.
  4762.  
  4763. [11] Interfaces MIB Working Group, McCloghrie, K., and F. Kastenholz,
  4764.      "Evolution of the Interfaces Group of MIB-II", RFC 1573,
  4765.      January 1994.
  4766.  
  4767. [12] FDDI MIB Working Group, J. Case, "FDDI Management Information
  4768.      Base", RFC 1285, January 1992.
  4769.  
  4770. [13] Application MIB Working Group, Krupczak, C., and J. Saperia,
  4771.      "Definitions of System-Level Managed Objects for Applications",
  4772.      draft-ietf-applmib-sysapplmib-08.txt, 15 Apr 1997.
  4773.  
  4774.  
  4775.  
  4776. Daniele/Wijnen       Expires December 1997                     [Page 81]
  4777.