📄 rfc2741.txt
字号:
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),Daniele, et al. Standards Track [Page 17]RFC 2741 AgentX January 2000 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". The NEW_INDEX and ANY_INDEX bits are used only within the agentx-IndexAllocate-, and -IndexDeallocate-PDUs. The INSTANCE_REGISTRATION bit is used only within the agentx-Register-PDU.Daniele, et al. Standards Track [Page 18]RFC 2741 AgentX January 2000 h.sessionID The session ID uniquely identifies a session over which AgentX PDUs are exchanged between a subagent and the master agent. The session ID has no significance and no defined value in the agentx-Open-PDU sent by a subagent to open a session with the master agent; in this case, the master agent will assign a unique session ID that it will pass back in the corresponding agentx-Response-PDU. From that point on, that same session ID will appear in every AgentX PDU exchanged over that session between the master and the subagent. A subagent may establish multiple AgentX sessions by sending multiple agentx-Open-PDUs to the master agent. In master agents that support multiple transport protocols, the sessionID should be globally unique rather than unique just to a particular transport. h.transactionID The transaction ID uniquely identifies, for a given session, the single SNMP management request (and single SNMP PDU) with which an AgentX PDU is associated. If a single SNMP management request results in multiple AgentX PDUs being sent by the master agent with the same session ID, each of these AgentX PDUs must contain the same transaction ID; conversely, AgentX PDUs sent during a particular session, that result from distinct SNMP management requests, must have distinct transaction IDs within the limits of the 32- bit field). Note that the transaction ID is not the same as the SNMP PDU's request-id (as described in section 4.1 of RFC 1905 [13], nor is it the same as the SNMP Message's msgID (as described in section 6.2 of RFC 2572 [11]), nor can it be, since a master agent might receive SNMP requests with the same request-ids or msgIDs from different managers. The transaction ID has no significance and no defined value in AgentX administrative PDUs, i.e., AgentX PDUs that are not associated with an SNMP management request. h.packetID A packet ID generated by the sender for all AgentX PDUs except the agentx-Response-PDU. In an agentx-Response-PDU, the packet ID must be the same as that in the received AgentX PDU to which it is a response. A master agent mightDaniele, et al. Standards Track [Page 19]RFC 2741 AgentX January 2000 use this field to associate subagent response PDUs with their corresponding request PDUs. A subagent might use this field to correlate responses to multiple (batched) registrations. h.payload_length The size in octets of the PDU contents, excluding the 20- byte header. As a result of the encoding schemes and PDU layouts, this value will always be either 0, or a multiple of 4.6.1.1. Context In the SNMPv1 or SNMPv2c, the community string may be used as an index into a local repository of configuration information that may include community profiles or more complex context information. In SNMPv3 this notion of "context" is formalized (see section 3.3.1 in RFC 2571 [1]. AgentX provides a mechanism for transmitting a context specification within relevant PDUs, but does not place any constraints on the content of that specification. An optional context field may be present in the agentx-Register-, UnRegister-, AddAgentCaps-, RemoveAgentCaps-, Get-, GetNext-, GetBulk-, IndexAllocate-, IndexDeallocate-, Notify-, TestSet-, and Ping- PDUs. If the NON_DEFAULT_CONTEXT bit in the AgentX header field h.flags is clear, then there is no context field in the PDU, and the operation refers to the default context. (This does not mean there is a zero- length Octet String, it means there is no Octet String present.) If the NON_DEFAULT_CONTEXT bit is set, then a context field immediately follows the AgentX header, and the operation refers to that specific context. The context is represented as an Octet String. There are no constraints on its length or contents. Thus, all of these AgentX PDUs (that is, those listed immediately above) refer to, or "indicate" a context, which is either the default context, or a non-default context explicitly named in the PDU.6.2. AgentX PDUs6.2.1. The agentx-Open-PDU An agentx-Open-PDU is generated by a subagent to request establishment of an AgentX session with the master agent.Daniele, et al. Standards Track [Page 20]RFC 2741 AgentX January 2000 (AgentX header) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.version (1) | h.type (1) | h.flags | <reserved> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.sessionID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.transactionID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.packetID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.payload_length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | o.timeout | <reserved> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ (o.id) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | n_subid | prefix | 0 | <reserved> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | subidentifier #1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | subidentifier #n_subid | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ (o.descr) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Octet String Length (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Octet 1 | Octet 2 | Octet 3 | Octet 4 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Octet L - 1 | Octet L | Padding (as required) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ An agentx-Open-PDU contains the following fields: o.timeout The length of time, in seconds, that a master agent should allow to elapse after dispatching a message on a session before it regards the subagent as not responding. This is the default value for the session, and may be overridden byDaniele, et al. Standards Track [Page 21]RFC 2741 AgentX January 2000 values associated with specific registered MIB regions. The default value of 0 indicates that there is no session-wide default value. o.id An Object Identifier that identifies the subagent. Subagents that do not support such an notion may send a null Object Identifier. o.descr An Octet String containing a DisplayString describing the subagent.6.2.2. The agentx-Close-PDU An agentx-Close-PDU issued by either a subagent or the master agent terminates an AgentX session. (AgentX header) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.version (1) | h.type (2) | h.flags | <reserved> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.sessionID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.transactionID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.packetID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | h.payload_length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | c.reason | <reserved> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ An agentx-Close-PDU contains the following field: c.reason An enumerated value that gives the reason that the master agent or subagent closed the AgentX session. This field may take one of the following values:Daniele, et al. Standards Track [Page 22]RFC 2741 AgentX January 2000 reasonOther(1) None of the following reasons
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -