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

📄 rfc2741.txt

📁 开发snmp的开发包有两个开放的SNMP开发库
💻 TXT
📖 第 1 页 / 共 5 页
字号:
   set to 0.   Examples:   sysDescr.0 (1.3.6.1.2.1.1.1.0)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 4             | 2             | 0             | 0             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 1                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 1                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 1                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 0                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   1.2.3.4   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 4             | 0             | 0             | 0             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 1                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 2                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 3                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 4                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+5.2. SearchRange   A SearchRange consists of two Object Identifiers.  In its   communication with a subagent, the master agent uses a SearchRange to   identify a requested variable binding, and, in GetNext and GetBulk   operations, to set an upper bound on the names of managed object   instances the subagent may send in reply.   The first Object Identifier in a SearchRange (called the starting   OID) indicates the beginning of the range.  It is frequently (but not   necessarily) the name of a requested variable binding.   The "include" field in this OID's header is a boolean value (0 or 1)   indicating whether or not the starting OID is included in the range.   The second object identifier (ending OID) indicates the non-inclusive   end of the range, and its "include" field is always 0.  A null value   for ending OID indicates an unbounded SearchRange.   Example:  To indicate a search range from 1.3.6.1.2.1.25.2   (inclusive) to 1.3.6.1.2.1.25.2.1 (exclusive), the SearchRange would   be:   (start)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 3             | 2             | 1             |       0       |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 1                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 25                                                            |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 2                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   (end)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 4             | 2             | 0             |       0       |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 1                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 25                                                            |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 2                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   | 1                                                             |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   A SearchRangeList is a contiguous list of SearchRanges.5.3. Octet String   An octet string is represented by a contiguous series of bytes,   beginning with a 4-byte integer (encoded according to the header's   NETWORK_BYTE_ORDER bit) whose value is the number of octets in the   octet string, followed by the octets themselves.  This representation   is termed an Octet String.  If the last octet does not end on a 4-   byte offset from the start of the Octet String, padding bytes are   appended to achieve alignment of following data.  This padding must   be added even if the Octet String is the last item in the PDU.   Padding bytes must be zero filled.   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                     Octet String Length (L)                   |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |  Octet L - 1  |  Octet L      |       Padding (as required)   |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   A null Octet String consists of a 4-byte length field set to 0.5.4. Value Representation   Variable bindings may be encoded within the variable-length portion   of some PDUs.  The representation of a variable binding (termed a   VarBind) consists of a 2-byte type field, a name (Object Identifier),   and the actual value data.   VarBind   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |          v.type               |          <reserved>           |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   (v.name)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |  n_subid      |  prefix       |      0        |       0       |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                       sub-identifier #1                       |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                       sub-identifier #n_subid                 |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   (v.data)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                       data                                    |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                       data                                    |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   VarBind fields:      v.type   Indicates the variable binding's syntax, and must be one of the   following values:              Integer                  (2),              Octet String             (4),              Null                     (5),              Object Identifier        (6),              IpAddress               (64),              Counter32               (65),              Gauge32                 (66),              TimeTicks               (67),              Opaque                  (68),              Counter64               (70),              noSuchObject           (128),              noSuchInstance         (129),              endOfMibView           (130)      v.name         The Object Identifier which names the variable.      v.data         The actual value, encoded as follows:         -  Integer, Counter32, Gauge32, and TimeTicks are encoded as 4            contiguous bytes, according to the header's            NETWORK_BYTE_ORDER bit.         -  Counter64 is encoded as 8 contiguous bytes, according to            the header's NETWORK_BYTE_ORDER bit.         -  Object Identifiers are encoded as described in section 5.1,            Object Identifier.         -  IpAddress, Opaque, and Octet String are all octet strings            and are encoded as described in section 5.3, "Octet            String", Octet String.  Note that the octets used to            represent IpAddress are always ordered most significant to            least significant.            Value data always follows v.name whenever v.type is one of            the above types.  These data bytes are present even if they            will not be used (as, for example, in certain types of            index allocation).         -  Null, noSuchObject, noSuchInstance, and endOfMibView do not            contain any encoded value.  Value data never follows v.name            in these cases.         Note that the VarBind itself does not contain the value size.         That information is implied for the fixed-length types, and         explicitly contained in the encodings of variable-length types         Object Identifier and Octet String).   A VarBindList is a contiguous list of VarBinds.  Within a   VarBindList, a particular VarBind is identified by an index value.   The first VarBind in a VarBindList has index value 1, the second has   index value 2, and so on.6. Protocol Definitions6.1. AgentX PDU Header   The AgentX PDU header is a fixed-format, 20-octet structure:   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |   h.version   |    h.type     |    h.flags    |  <reserved>   |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                          h.sessionID                          |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                        h.transactionID                        |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                          h.packetID                           |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |                        h.payload_length                       |   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   An AgentX PDU header contains the following fields:      h.version         The version of the AgentX protocol (1 for this memo).      h.type         The PDU type; one of the following values:            agentx-Open-PDU             (1),            agentx-Close-PDU            (2),            agentx-Register-PDU         (3),            agentx-Unregister-PDU       (4),            agentx-Get-PDU              (5),            agentx-GetNext-PDU          (6),            agentx-GetBulk-PDU          (7),            agentx-TestSet-PDU          (8),            agentx-CommitSet-PDU        (9),            agentx-UndoSet-PDU         (10),            agentx-CleanupSet-PDU      (11),            agentx-Notify-PDU          (12),            agentx-Ping-PDU            (13),            agentx-IndexAllocate-PDU   (14),            agentx-IndexDeallocate-PDU (15),            agentx-AddAgentCaps-PDU    (16),            agentx-RemoveAgentCaps-PDU (17),            agentx-Response-PDU        (18)            The set of PDU types for "administrative processing" are 1-4            and 12-17.  The set of PDU types for "SNMP request            processing" are 5-11.      h.flags            A bitmask, with bit 0 the least significant bit.  The bit            definitions are as follows:                 Bit             Definition                 ---             ----------                 0               INSTANCE_REGISTRATION                 1               NEW_INDEX                 2               ANY_INDEX                 3               NON_DEFAULT_CONTEXT                 4               NETWORK_BYTE_ORDER                 5-7             (reserved)            The NETWORK_BYTE_ORDER bit applies to all multi-byte integer            values in the entire AgentX packet, including the remaining            header fields.  If set, then network byte order (most            significant byte first; "big endian") is used.  If not set,            then least significant byte first ("little endian") is used.            The NETWORK_BYTE_ORDER bit applies to all AgentX PDUs.            The NON_DEFAULT_CONTEXT bit is used only in the AgentX PDUs            described in section 6.1.1, "Context".

⌨️ 快捷键说明

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