Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SNMP PDU (snmp_pdu)

下位レイヤからの到達

下位レイヤ判別フィールド値
snmpversion(その他の値)

フィールド

フィールド型既定値Auto説明
pdu_typeenum(8)160 (get_request)PDU タグ (0xa0 GetRequest、0xa2 Response、0xa4 v1 Trap、0xa7 SNMPv2-Trap など)。
pdu_lengthuint(8)ヘッダとペイロードの長さ (オクテット単位) (-2)PDU 内容の BER 長 (自動。短形式、128 未満)。
bodytlv — PDU の残りすべて4 要素BER TLV で表した PDU 内容: request-id、error-status、error-index と variable-bindings SEQUENCE。

pdu_type

値名前
160 (0xa0)get_request
161 (0xa1)get_next_request
162 (0xa2)response
163 (0xa3)set_request
165 (0xa5)get_bulk_request
166 (0xa6)inform_request
167 (0xa7)snmpv2_trap
168 (0xa8)report

body

  • タイプ 8 ビット、長さ 8 ビット。
  • 長さは値の部分だけを数えます。
  • 未知のタイプは値をオクテット列のまま保持します。
タイプ値名前値のフィールド説明
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view
48 (0x30)sequenceitems

body › ip_address

フィールド型既定値Auto説明
addressipv4

body › sequence

フィールド型既定値Auto説明
itemstlv — PDU の残りすべて
body › sequence › items
  • タイプ 8 ビット、長さ 8 ビット。
  • 長さは値の部分だけを数えます。
  • 未知のタイプは値をオクテット列のまま保持します。
タイプ値名前値のフィールド説明
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view
48 (0x30)sequenceitems
body › sequence › items › ip_address
フィールド型既定値Auto説明
addressipv4
body › sequence › items › sequence
フィールド型既定値Auto説明
itemstlv — PDU の残りすべて

body › sequence › items › sequence › items

  • タイプ 8 ビット、長さ 8 ビット。
  • 長さは値の部分だけを数えます。
  • 未知のタイプは値をオクテット列のまま保持します。
タイプ値名前値のフィールド説明
2 (0x02)integer
4 (0x04)octet_string
5 (0x05)null
6 (0x06)object_identifier
64 (0x40)ip_addressaddress
65 (0x41)counter32
66 (0x42)gauge32
67 (0x43)timeticks
68 (0x44)opaque
70 (0x46)counter64
128 (0x80)no_such_object
129 (0x81)no_such_instance
130 (0x82)end_of_mib_view

body › sequence › items › sequence › items › ip_address

フィールド型既定値Auto説明
addressipv4

次レイヤ

次レイヤは pdu_type で判別します。このフィールドが Auto のときは、上に積んだプロトコルの値を書き込みます。

値プロトコル備考
164 (0xa4)snmp_trapこのレイヤを読み直す

制約

レベル規則
警告ヘッダとペイロードが 129 オクテット以下

サンプルテンプレート