>>>>> On Thu, 8 Jul 2010 09:13:43 +0200, "OMRI Elaid" <omri.el...@ncr.com.tn> >>>>> said:
OE> Could you please send me the exact format of a trap snmp (in details). -- BEGIN SNMPv3Message (MPC section 6) SNMPv3Message ::= SEQUENCE { -- identify the layout of the SNMPv3Message -- this element is in same position as in SNMPv1 -- and SNMPv2c, allowing recognition msgVersion INTEGER { snmpv3 (3) }, -- administrative parameters msgGlobalData HeaderData, -- BEGIN HeaderData (MPC section 6) HeaderData ::= SEQUENCE { msgID INTEGER (0..2147483647), msgMaxSize INTEGER (484..2147483647), msgFlags OCTET STRING (SIZE(1)), -- .... ...1 authFlag -- .... ..1. privFlag -- .... .1.. reportableFlag -- Please observe: -- .... ..00 is OK, means noAuthNoPriv -- .... ..01 is OK, means authNoPriv -- .... ..10 reserved, must NOT be used. -- .... ..11 is OK, means authPriv msgSecurityModel INTEGER (0..2147483647) -- From the SNMP-FRAMEWORK-MIB: 0 reserved for 'any' 1 reserved for SNMPv1 2 reserved for SNMPv2c 3 User-Based Security Model (USM) } -- END HeaderData (MPC section 6: the SNMPv3 Message Format) -- security model-specific parameters -- format defined by Security Model msgSecurityParameters OCTET STRING, -- this is a null octet string (length 0) if noAuth/noPriv -- BEGIN UsmSecurityParameters (USM section 2.4) UsmSecurityParameters ::= SEQUENCE { -- global User-based security parameters msgAuthoritativeEngineID OCTET STRING, msgAuthoritativeEngineBoots INTEGER (0..2147483647), msgAuthoritativeEngineTime INTEGER (0..2147483647), msgUserName OCTET STRING (SIZE(0..32)), | -- authentication protocol specific parameters msgAuthenticationParameters OCTET STRING, -- BEGIN HMAC-MD5-96 Authentication Protocol (USM: section 6.2.3) -- "first 12 octets of the HMAC-MD5-96 output done over -- the wholeMsg." msgAuthenticationParameters OCTET STRING (SIZE(12)) -- END HMAC-MD5-96 Authentication Protocol (USM: section 6.2.3) -- BEGIN HMAC-SHA-96 Authentication Protocol (USM: section 6.2.4) -- "first 12 octets of the HMAC-SHA-96 output done over -- the wholeMsg." msgAuthenticationParameters OCTET STRING (SIZE(12)) -- END HMAC-SHA-96 Authentication Protocol (USM: section 6.2.4) -- privacy protocol specific parameters -- BEGIN CBC-DES Symmetric Encryption Proto (USM: section 8.2.3) -- "For this protocol, the msgPrivacyParameters -- field is the serialized OCTET STRING representing -- the 'salt' that was used to create the IV." -- See section 8.1.1.1 for salt info. msgPrivacyParameters OCTET STRING (SIZE(8)) -- END CBC-DES Symmetric Encryption Proto (USM: section 8.2.3) } -- END UsmSecurityParameters (USM section 2.4) scra msgData ScopedPduData -- BEGIN ScopedPduData (MPC section 6) ScopedPduData ::= CHOICE { plaintext ScopedPDU, encryptedPDU OCTET STRING -- encrypted scopedPDU value -- BEGIN ScopedPDU (MPC section 6) ScopedPDU ::= SEQUENCE { contextEngineID OCTET STRING, contextName OCTET STRING, data ANY -- e.g., PDUs as defined in RFC1905 -- BEGIN SNMPv2 PDU (1905 section 3) [X] -- X is the pdu type (get, getnext, ...) PDU ::= SEQUENCE { request-id Integer32, error-status INTEGER error-index INTEGER (0..max-bindings) variable-bindings VarBindList VarBindList ::= SEQUENCE (SIZE (0..max-bindings)) OF VarBind ::= SEQUENCE { name ObjectName, CHOICE { value ObjectSyntax, unSpecified NULL noSuchObject[0] IMPLICIT NULL, noSuchInstance[1] IMPLICIT NULL, endOfMibView[2] IMPLICIT NULL } -- END SNMPv2 PDU (1905 section 3) } -- END ScopedPDU (MPC section 6) } -- END ScopedPduData (MPC section 6) } -- END SNMPv3Message (MPC section 6: the SNMPv3 Message Format) -- BEGIN SNMPv1Message (1157 section 4) Message ::= SEQUENCE { version INTEGER { snmpv1 (0), snmpv2(1) }, community OCTET STRING, data ANY -- PDU's defined above } -- END SNMPv1Message (1157 section 4) -- Wes Hardaker Please mail all replies to net-snmp-coders@lists.sourceforge.net ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders