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

SNMPv1 Trap (snmp_trap)

Reached from

Lower layerSelectorValue
snmp_pdupdu_type164 (0xa4) (re-decodes this layer)

Fields

FieldTypeDefaultAutoDescription
pdu_typeenum(8)164 (trap)PDU tag (0xa0 GetRequest, 0xa2 Response, 0xa4 v1 Trap, 0xa7 SNMPv2-Trap, …).
pdu_lengthuint(8)Length of the header and payload in octets (-2)BER length of the PDU contents (Auto; short form, below 128).
bodytlv — rest of the PDU6 itemsTrap contents as BER TLVs: enterprise, agent-addr, generic-trap, specific-trap, time-stamp and variable bindings.

pdu_type

ValueName
164 (0xa4)trap

body

  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
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

FieldTypeDefaultAutoDescription
addressipv4

body › sequence

FieldTypeDefaultAutoDescription
itemstlv — rest of the PDU
body › sequence › items
  • Type 8 bits, length 8 bits.
  • The length counts the value only.
  • Unknown types are kept as raw value octets.
TypeNameValue fieldsDescription
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
FieldTypeDefaultAutoDescription
addressipv4
body › sequence › items › sequence
FieldTypeDefaultAutoDescription
itemstlv — 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.
TypeNameValue fieldsDescription
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

FieldTypeDefaultAutoDescription
addressipv4

Constraints

LevelRule
warningpdu_type = 164
warningheader and payload at most 129 octets

Sample templates

  • snmp-trap-v1 — templates/protocols/app/snmp-trap-v1.wpg.yaml