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:

  1. object type generating trap (this oid of type notification-type)
  2. address of generating object (an ip address)
  3. generic trap data - 1 of enumerations listed (0==coldstart, 1==warmstart ... 6==enterprise)
  4. enterprise trap data - 0 or specified enterprise trap data
  5. timestamp - timestamp trap generated
  6. 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

Popular posts from this blog

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -

java - How to specify maven bin in eclipse maven plugin? -