4 //=============================================================================
8 * constants for Enterprise Traps
10 * @author Peter E MellquistMichael R MacFaden mrm@cisco.com - rework & ACE port
12 //=============================================================================
14 /*===================================================================
16 Hewlett-Packard Company
18 ATTENTION: USE OF THIS SOFTWARE IS SUBJECT TO THE FOLLOWING TERMS.
19 Permission to use, copy, modify, distribute and/or sell this software
20 and/or its documentation is hereby granted without fee. User agrees
21 to display the above copyright notice and this license notice in all
22 copies of the software and any documentation of the software. User
23 agrees to assume all liability for the use of the software; Hewlett-Packard
24 makes no representations about the suitability of this software for any
25 purpose. It is provided "AS-IS without warranty of any kind,either express
26 or implied. User hereby grants a royalty-free license to any and all
27 derivatives based upon this software code base.
28 =====================================================================*/
30 #include "asnmp/asn1.h" // ASN.1 header file
32 //--------------[ well known trap ids ]-----------------------------------
36 * @brief Defines the member functions for the snmpTrapsOid base class
37 * to implement the traps defined in RFC 1215
39 class ASNMP_Export snmpTrapsOid
: public Oid
42 snmpTrapsOid ():Oid("1.3.6.1.6.3.1.1.5"){}
43 SnmpSyntax
& operator=( SnmpSyntax
&val
){ return Oid::operator=(val
); }
47 * @class snmpTrapEnterpriseOid
49 * @brief Defines the default Enterprise Oid for this software package
51 class ASNMP_Export snmpTrapEnterpriseOid
: public Oid
54 snmpTrapEnterpriseOid(): Oid("1.3.6.1.6.3.1.1.4.3.0") { }
55 SnmpSyntax
& operator=( SnmpSyntax
&val
){ return Oid::operator=(val
); }
61 * @brief Defines the RFC 1215 agent cold start generic trap (system reboot)
63 class ASNMP_Export coldStartOid
: public snmpTrapsOid
66 coldStartOid(){*this+=".1";}
67 SnmpSyntax
& operator=( SnmpSyntax
&val
){ return snmpTrapsOid::operator=(val
); }
73 * @brief Defines the RFC 1215 agent warm start generic trap (agent reboot)
75 class ASNMP_Export warmStartOid
: public snmpTrapsOid
78 warmStartOid(){*this+=".2";}
79 SnmpSyntax
& operator=( SnmpSyntax
&val
){ return snmpTrapsOid::operator=(val
); }
85 * @brief Defines the RFC 1215 interface (link) down trap
87 class ASNMP_Export linkDownOid
: public snmpTrapsOid
90 linkDownOid(){*this+=".3";}
91 SnmpSyntax
& operator=( SnmpSyntax
&val
){ return snmpTrapsOid::operator=(val
); }
99 * @brief Defines the RFC 1215 interface (link) up trap
101 class ASNMP_Export linkUpOid
: public snmpTrapsOid
104 linkUpOid(){*this+=".4";}
105 SnmpSyntax
& operator=( SnmpSyntax
&val
){ return snmpTrapsOid::operator=(val
); }
109 * @class authenticationFailureOid
111 * @brief Defines the RFC 1215 device/agent invalid access trap
113 class ASNMP_Export authenticationFailureOid
: public snmpTrapsOid
116 authenticationFailureOid(){*this+=".5";}
117 SnmpSyntax
& operator=( SnmpSyntax
&val
){ return snmpTrapsOid::operator=(val
); }
121 * @class egpNeighborLossOid
123 * @brief Defines the RFC 1215 Exterior Gateway Protocol neighbor loss trap
125 class ASNMP_Export egpNeighborLossOid
: public snmpTrapsOid
128 egpNeighborLossOid(){*this+=".6";}
129 SnmpSyntax
& operator=( SnmpSyntax
&val
){ return snmpTrapsOid::operator=(val
); }
132 #ifdef DEFINE_TRAP_CONSTANTS_
134 const coldStartOid coldStart
;
135 const warmStartOid warmStart
;
136 const linkDownOid linkDown
;
137 const linkUpOid linkUp
;
138 const authenticationFailureOid authenticationFailure
;
139 const egpNeighborLossOid egpNeighborLoss
;
140 const snmpTrapEnterpriseOid snmpTrapEnterprise
;