SNMP Manager Programmer's Guide
Constructing and Interpreting Packets
SNMP Manager Programmer’s Guide–134249
5-4
Trap Packets
Trap Packets
Figure 5-3 illustrates the fields in a trap packet. The PDU type identifies the PDU as a 
Trap PDU. The enterprise field is an OID identifying the trap originator. The address 
is the IP address of the trap originator.  The generic-trap and specific-trap fields are 
integers that characterize the trap.
Table 5-3
 summarizes how the values of most of the fields are set. Setting variable 
bindings is the topic of Variable Bindings on page 5-5.
Figure 5-3. The Trap Packet
Table 5-3. Assigning Trap Packet Values
Packet 
Field
Assigned 
Value By Value Description
SNMP_PKT_T 
Field
PDU type Manager 
Services
The value 4, defined as TRAP_PDU, is 
assigned. 
pdu_type
enterprise SNMP_Create
_Trap(), agent, 
or subagent
An OID describing the SNMP subtree 
associated with the trap originator.
pdu.trap_pdu.
enterprise_objid.
component-list
address SNMP_Create
_Trap(), agent, 
or subagent
The IP address at which the trap 
originator resides.
pdu.trap_pdu.
net_address
generic-trap SNMP_Create
_Trap(), agent, 
or subagent
An integer describing one of the 
standard generic trap types:
 0 (coldStart)
 1 (warmStart)
 2 (linkDown)
 3 (linkUp)
 4 (authenticationFailure)
 5 (egpNeighborLoss)
 6 (enterpriseSpecific)
pdu.trap_pdu.
generic_trap
specific-trap SNMP_Create
_Trap(), agent, 
or subagent
An enterprise-defined integer 
characterizing the trap.
pdu.trap_pdu.
specific_trap
time-stamp SNMP_Create
_Trap(), agent, 
or subagent
The time at which the trap was issued, 
usually the number of timeticks 
(1/100ths of a second) since the 
originating entity’s system was last 
started.
pdu.trap_pdu.
trap_time_ticks
502
PDU type variable bindingsenterprise address
generic- 
trap
specific- 
trap
time-stamp










