snmptrapd - snmp trap specific trap code -
i'm building snmp agent , working on trap message. before begin write code of trap message, have question:
in snmpv1 specific trap code ? everywhere searched superficial definition , want deep definition possibilities of can contain.
an snmpv1 trap pdu contains following items:
- object type generating trap (this
oidof typenotification-type) - address of generating object (an ip address)
- generic trap data - 1 of enumerations listed (0==coldstart, 1==warmstart ... 6==enterprise)
- enterprise trap data - 0 or specified enterprise trap data
- timestamp - timestamp trap generated
- variable bindings.
the generic trap data items 0-5 defined explicitly in spec mean, once hit 6 (enterprise), definition supplied in enterprise mib. unless you're loading , interpreting content of mib defines value means can't understand means. if @ ucd-snmp-mib, defines 2 trap types:
ucdtraps object identifier ::= { ucdavis 251 } ucdstart notification-type status current description "this trap in principle sent when agent start" ::= { ucdtraps 1 } ucdshutdown notification-type status current description "this trap sent when agent terminates" ::= { ucdtraps 2 } these correspond oids .1.3.6.1.4.1.2021.251.1 , .1.3.6.1.4.1.2021.251.2 respectively.
the oid interpreted .1.3.6.1.4.1 == enterprises base, 2021 == uc davis, 251 == ucdtraps , trailing 1 or 2 usdstartup , usdshutdown respectively.
these traps set trap data type 6 and, don't specify content of enterprise data field, not interpretable.
finally variable data, it's sequence of oid, value pairs, , needs unwrapped specified asn.1 data.
the coldstart oid .1.3.6.1.6.3.1.1.5.1 - base definitions in the snmpv2 mib file coldstart, warmstart , authenticationfailure, definitions of linkdown , linkup can found in rfc2863.
to honest, wouldn't bother trying interpret data unless armed spec trap without have no way of understanding means.
Comments
Post a Comment