rfc1592.txt
来自「<VC++网络游戏建摸与实现>源代码」· 文本 代码 · 共 1,404 行 · 第 1/5 页
TXT
1,404 行
response if they do not support it. o an indication as to whether the sub-agent wishes to handle the GETBULK itself. If not, then the agent will translate a GETBULK into multiple GETNEXT requests. Not all DPI capable agents need to support this feature. They may opt to always translate a GETBULK into multiple GETNEXT requests. In this case the agent will send the appropriate RESPONSE to indicate this. o the group ID (sub-tree) to be registered (with trailing dot). The group ID is represented in the selected character set as specified in DPI OPEN packet. The agent will respond with an SNMP DPI RESPONSE packet indicating registration error or success. The packet ID of the response will be the same as that for the REGISTER request to which this is a response. The group ID will be the same as that specified in the REGISTER request. There will be no instance returned (e.g. NULL string for instance ID). The value will be an SNMP_TYPE_NULL value with a zero length.Wijnen, Carpenter, Curran, Sehgal & Waters [Page 21]RFC 1592 SNMP-DPI March 1994 +-----------------------------------------------------------------+ | Table 7. Layout SNMP DPI REGISTER packet | +------------+----------------------------------------------------+ | OFFSET | FIELD | +------------+----------------------------------------------------+ | 0 | packet length to follow (MSB to LSB) | +------------+----------------------------------------------------+ | 2 | protocol major version | +------------+----------------------------------------------------+ | 3 | protocol minor version | +------------+----------------------------------------------------+ | 4 | protocol release | +------------+----------------------------------------------------+ | 5 | packet id (MSB to LSB) | +------------+----------------------------------------------------+ | 7 | packet type = SNMP_DPI_REGISTER | +------------+----------------------------------------------------+ | 8 | requested priority (MSB to LSB) | +------------+----------------------------------------------------+ | 12 | timeout in seconds (MSB to LSB) | +------------+----------------------------------------------------+ | 14 | view selection (0 = you (agent) do, 1 = I do) | +------------+----------------------------------------------------+ | 15 | getbulk selection (0=use GetNext, 1=use GetBulk) | +------------+----------------------------------------------------+ | 16 | null terminated group ID (with trailing dot) | +------------+----------------------------------------------------+ | NOTE: | | | | o group ID string uses selected character set | +-----------------------------------------------------------------+3.2.6 UNREGISTER In order to unregister a branch in the MIB tree, an SNMP sub-agent sends an SNMP DPI UNREGISTER packet to the agent. Such a packet contains the standard SNMP DPI header plus UNREGISTER specific data: a null terminated string (represented in the selected character set) representing the group ID in ASN.1 dotted notation and an indication as to the reason for the unregister (see table 14). The agent will respond with an SNMP DPI RESPONSE packet indicating error or success. The packet ID of the response will be the same as that for the UNREGISTER request to which this is a response. The group ID will be the same as that specified in the UNREGISTER request. There will be no instance returned (e.g. NULL string forWijnen, Carpenter, Curran, Sehgal & Waters [Page 22]RFC 1592 SNMP-DPI March 1994 instance ID). The value will be an SNMP_TYPE_NULL value with a zero length. +-----------------------------------------------------------------+ | Table 8. Layout SNMP DPI UNREGISTER packet | +------------+----------------------------------------------------+ | OFFSET | FIELD | +------------+----------------------------------------------------+ | 0 | packet length to follow (MSB to LSB) | +------------+----------------------------------------------------+ | 2 | protocol major version | +------------+----------------------------------------------------+ | 3 | protocol minor version | +------------+----------------------------------------------------+ | 4 | protocol release | +------------+----------------------------------------------------+ | 5 | packet id (MSB to LSB) | +------------+----------------------------------------------------+ | 7 | packet type = SNMP_DPI_UNREGISTER | +------------+----------------------------------------------------+ | 8 | reason code | +------------+----------------------------------------------------+ | 9 | null terminated group ID (with trailing dot) | +------------+----------------------------------------------------+ | NOTE: | | | | o group ID string uses selected character set | +-----------------------------------------------------------------+3.2.7 GET When the SNMP agent receives a PDU containing an SNMP GET request for a variable that resides in a sub-tree registered by a sub-agent, it passes an SNMP DPI GET packet to the sub-agent. Such a packet contains the standard SNMP DPI header plus GET specific data: o the community name used in the SNMP PDU. The length is zero unless view handling was selected by the sub-agent. The length is also zero if the SNMP PDU was not in SNMPv1 format. o per varBind two null terminated strings (in the selected character set) representing the group and instance ID in ASN.1 dotted notation.Wijnen, Carpenter, Curran, Sehgal & Waters [Page 23]RFC 1592 SNMP-DPI March 1994 +-----------------------------------------------------------------+ | Table 9. Layout SNMP DPI GET packet | +------------+----------------------------------------------------+ | OFFSET | FIELD | +------------+----------------------------------------------------+ | 0 | packet length to follow (MSB to LSB) | +------------+----------------------------------------------------+ | 2 | protocol major version | +------------+----------------------------------------------------+ | 3 | protocol minor version | +------------+----------------------------------------------------+ | 4 | protocol release | +------------+----------------------------------------------------+ | 5 | packet id (MSB to LSB) | +------------+----------------------------------------------------+ | 7 | packet type = SNMP_DPI_GET | +------------+----------------------------------------------------+ | 8 | community name length (MSB to LSB) | +------------+----------------------------------------------------+ | 10 | community name (if any) | +------------+----------------------------------------------------+ | 10+L1 | null terminated group ID (with trailing dot) | +------------+----------------------------------------------------+ | 10+L2 | null terminated instance ID (no trailing dot) | +------------+----------------------------------------------------+ | 10+L3 | optionally more varBinds (group/instance ID pairs) | +------------+----------------------------------------------------+ | NOTE: | | | | o L1 = length of community name | | o L2 = L1 + strlen(group ID) + 1 | | o L3 = L2 + strlen(instance ID) + 1 | | o group and instance ID strings use selected character set | +-----------------------------------------------------------------+3.2.8 GETNEXT When the SNMP agent receives a PDU containing an SNMP GETNEXT request for a variable for which a sub-agent may be authoritative, it passes an SNMP DPI GETNEXT packet to the sub-agent. Such a packet contains the standard SNMP DPI header plus GETNEXT specific data: o the community name used in the SNMP PDU. The length is zero unless view handling was selected by the sub-agent. The length is also zero if the SNMP PDU was not in SNMPv1 format. o per varBind two null terminated strings (in the selectedWijnen, Carpenter, Curran, Sehgal & Waters [Page 24]RFC 1592 SNMP-DPI March 1994 character set) representing the group and instance ID in ASN.1 dotted notation. +-----------------------------------------------------------------+ | Table 10. Layout SNMP DPI GETNEXT packet | +------------+----------------------------------------------------+ | OFFSET | FIELD | +------------+----------------------------------------------------+ | 0 | packet length to follow (MSB to LSB) | +------------+----------------------------------------------------+ | 2 | protocol major version | +------------+----------------------------------------------------+ | 3 | protocol minor version | +------------+----------------------------------------------------+ | 4 | protocol release | +------------+----------------------------------------------------+ | 5 | packet id (MSB to LSB) | +------------+----------------------------------------------------+ | 7 | packet type = SNMP_DPI_GETNEXT | +------------+----------------------------------------------------+ | 8 | community name length (MSB to LSB) | +------------+----------------------------------------------------+ | 10 | community name | +------------+----------------------------------------------------+ | 10+L1 | null terminated group ID (with trailing dot) | +------------+----------------------------------------------------+ | 10+L2 | null terminated instance ID (no trailing dot) | +------------+----------------------------------------------------+ | 10+L3 | optionally more varBinds (group/instance ID pairs) | +------------+----------------------------------------------------+ | NOTE: | | | | o L1 = length of community name | | o L2 = L1 + strlen(group ID) + 1 | | o L3 = L2 + strlen(instance ID) + 1 | | o group and instance ID strings use selected character set | +-----------------------------------------------------------------+3.2.9 GETBULK When the SNMP agent receives a PDU containing an SNMP GETBULK request that includes variables for which a sub-agent may be authoritative, it checks if the sub-agent wants to handle the GETBULK itself (as specified at registration time). If so, it sends an SNMP DPI GETBULK packet to the sub-agent. Such a packet contains the standard SNMP DPI header plus GETBULK specific data:Wijnen, Carpenter, Curran, Sehgal & Waters [Page 25]RFC 1592
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?