| Lower layer | Selector | Value |
snmp | version | (any other value) |
| Field | Type | Default | Auto | Description |
pdu_type | enum(8) | 160 (get_request) | | PDU tag (0xa0 GetRequest, 0xa2 Response, 0xa4 v1 Trap, 0xa7 SNMPv2-Trap, …). |
pdu_length | uint(8) | | Length of the header and payload in octets (-2) | BER length of the PDU contents (Auto; short form, below 128). |
body | tlv — rest of the PDU | 4 items | | PDU contents as BER TLVs: request-id, error-status, error-index and the variable-bindings SEQUENCE. |
| Value | Name |
| 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 |
- Type 8 bits, length 8 bits.
- The length counts the value only.
- Unknown types are kept as raw value octets.
| Type | Name | Value fields | Description |
| 2 (0x02) | integer | | |
| 4 (0x04) | octet_string | | |
| 5 (0x05) | null | | |
| 6 (0x06) | object_identifier | | |
| 64 (0x40) | ip_address | address | |
| 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) | sequence | items | |
| Field | Type | Default | Auto | Description |
address | ipv4 | | | |
| Field | Type | Default | Auto | Description |
items | tlv — rest of the PDU | | | |
- Type 8 bits, length 8 bits.
- The length counts the value only.
- Unknown types are kept as raw value octets.
| Type | Name | Value fields | Description |
| 2 (0x02) | integer | | |
| 4 (0x04) | octet_string | | |
| 5 (0x05) | null | | |
| 6 (0x06) | object_identifier | | |
| 64 (0x40) | ip_address | address | |
| 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) | sequence | items | |
| Field | Type | Default | Auto | Description |
address | ipv4 | | | |
| Field | Type | Default | Auto | Description |
items | tlv — rest of the PDU | | | |
body › sequence › items › sequence › items
- Type 8 bits, length 8 bits.
- The length counts the value only.
- Unknown types are kept as raw value octets.
| Type | Name | Value fields | Description |
| 2 (0x02) | integer | | |
| 4 (0x04) | octet_string | | |
| 5 (0x05) | null | | |
| 6 (0x06) | object_identifier | | |
| 64 (0x40) | ip_address | address | |
| 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
| Field | Type | Default | Auto | Description |
address | ipv4 | | | |
The next layer is selected by pdu_type; when the field is Auto the builder writes the value of the protocol stacked above.
| Value | Protocol | Note |
| 164 (0xa4) | snmp_trap | re-decodes this layer |
| Level | Rule |
| warning | header and payload at most 129 octets |