SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-95
SNMPTRAP
data-type
describes the SNMP data type of a MIB object when it is not a MIB-II object. It
must be one of these values:
OCTET_STRING
DisplayString
OBJECT_IDENTIFIER
NULL
INTEGER
IpAddress
Counter
Gauge
TimeTicks
Opaque
value
is the value of a MIB object. Enclose strings in double quotation marks (""), use a
colon (:) to specify binary data, and use the dotted notation (1.2.3.4) or NonStop
Kernel node name for IP addresses.
Example 2-12
illustrates the output SNMPTRAP generates when you send the default
trap or an enterprise-specific trap.
Example 2-12. Sample SNMPTRAP Output
TACL> SNMPTRAP mynode
SENDING PACKET:
Packet Length=40, Version=0, Community: Length=6, Value=public
PDU Type=trap Length=27, Enterprise id:
OBJECT IDENTIFIER: nonstopsystems
IpAddress: 130.252.12.3
Generic trap=coldStart, specific trap=0 (0), Trap time=0 (0)
VBLlen=0, VBcount=0
TACL> SNMPTRAP -l -e 1.3.6.1.3.1.169.3 -g 6 -s 1 mynode 1.2.3.0 OCTET_STRING "What's
new?"
SENDING PACKET:
Packet Length=60, Version=0, Community: Length=6, Value=public
PDU Type=trap Length=47, Enterprise id:
OBJECT IDENTIFIER: internet.3.1.169.3
IpAddress: 130.252.12.3
Generic trap=enterpriseSpecific, specific trap=1 (1), Trap time=0 (0)
VBLlen=20, VBcount=1
VarBind #0, content size=18, Flags & type=0x04, encoded length=11
OBJECT IDENTIFIER: iso.2.3.0
OCTET STRING: Length=11
What's new?