diff --git a/src/BER.h b/src/BER.h index e542f7e..51c1864 100644 --- a/src/BER.h +++ b/src/BER.h @@ -286,39 +286,39 @@ class Type: public Base { */ enum : uint16_t { // Universal - Boolean = Class::Universal | Form::Primitive | 0x01, /**< 0x01 */ - Integer, /**< 0x02 */ - BitString, /**< 0x03 */ - OctetString, /**< 0x04 */ - Null, /**< 0x05 */ - ObjectIdentifier, /**< 0x06 */ - Sequence = Class::Universal | Form::Constructed | 0x10, /**< 0x30 */ + Boolean = +Class::Universal | +Form::Primitive | 0x01, /**< 0x01 */ + Integer, /**< 0x02 */ + BitString, /**< 0x03 */ + OctetString, /**< 0x04 */ + Null, /**< 0x05 */ + ObjectIdentifier, /**< 0x06 */ + Sequence = +Class::Universal | +Form::Constructed | 0x10, /**< 0x30 */ // Application - IPAddress = Class::Application | 0x00, /**< 0x40 */ - Counter32, /**< 0x41 */ - Gauge32, /**< 0x42 */ - TimeTicks, /**< 0x43 */ - Opaque, /**< 0x44 */ - Counter64 = Class::Application | 0x06, /**< 0x46 */ - Float = Class::Application | 0x08, /**< 0x48 */ + IPAddress = +Class::Application | 0x00, /**< 0x40 */ + Counter32, /**< 0x41 */ + Gauge32, /**< 0x42 */ + TimeTicks, /**< 0x43 */ + Opaque, /**< 0x44 */ + Counter64 = +Class::Application | 0x06, /**< 0x46 */ + Float = +Class::Application | 0x08, /**< 0x48 */ // Context - NoSuchObject = Class::Context | 0x00, /**< 0x80 */ - NoSuchInstance, /**< 0x81 */ - EndOfMIBView, /**< 0x82 */ + NoSuchObject = +Class::Context | 0x00, /**< 0x80 */ + NoSuchInstance, /**< 0x81 */ + EndOfMIBView, /**< 0x82 */ // Version 1 - GetRequest = Class::Context | Form::Constructed | 0x00, /**< 0xA0 */ - GetNextRequest, /**< 0xA1 */ - GetResponse, /**< 0xA2 */ - SetRequest, /**< 0xA3 */ - Trap, /**< 0xA4 */ + GetRequest = +Class::Context | +Form::Constructed | 0x00, /**< 0xA0 */ + GetNextRequest, /**< 0xA1 */ + GetResponse, /**< 0xA2 */ + SetRequest, /**< 0xA3 */ + Trap, /**< 0xA4 */ // Version 2C - GetBulkRequest, /**< 0xA5 */ - InformRequest, /**< 0xA6 */ - SNMPv2Trap, /**< 0xA7 */ + GetBulkRequest, /**< 0xA5 */ + InformRequest, /**< 0xA6 */ + SNMPv2Trap, /**< 0xA7 */ // Version 3 - Report, /**< 0xA8 */ + Report, /**< 0xA8 */ // Opaque type - OpaqueFloat = 0x9F78 /**< 0x9F78 */ + OpaqueFloat = 0x9F78 /**< 0x9F78 */ }; /** @@ -2642,3 +2642,5 @@ class OpaqueFloatBER: public FloatBER { } // namespace SNMP #endif /* BER_H_ */ + + diff --git a/src/SNMPMessage.h b/src/SNMPMessage.h index b7dc14e..3a80894 100644 --- a/src/SNMPMessage.h +++ b/src/SNMPMessage.h @@ -115,16 +115,16 @@ class Message: public SequenceBER, private PDU { */ class OID { public: - static constexpr char *COLDSTART = "1.3.6.1.6.3.1.1.5.1"; - static constexpr char *WARMSTART = "1.3.6.1.6.3.1.1.5.2"; - static constexpr char *LINKDOWN = "1.3.6.1.6.3.1.1.5.3"; - static constexpr char *LINKUP = "1.3.6.1.6.3.1.1.5.4"; - static constexpr char *AUTHENTICATIONFAILURE = "1.3.6.1.6.3.1.1.5.5"; + static constexpr const char *COLDSTART = "1.3.6.1.6.3.1.1.5.1"; + static constexpr const char *WARMSTART = "1.3.6.1.6.3.1.1.5.2"; + static constexpr const char *LINKDOWN = "1.3.6.1.6.3.1.1.5.3"; + static constexpr const char *LINKUP = "1.3.6.1.6.3.1.1.5.4"; + static constexpr const char *AUTHENTICATIONFAILURE = "1.3.6.1.6.3.1.1.5.5"; private: - static constexpr char *SYSUPTIME = "1.3.6.1.2.1.1.3.0"; - static constexpr char *SNMPTRAPOID = "1.3.6.1.6.3.1.1.4.1.0"; - static constexpr char *SNMPTRAPENTERPRISE = "1.3.6.1.6.3.1.1.4.3.0"; + static constexpr const char *SYSUPTIME = "1.3.6.1.2.1.1.3.0"; + static constexpr const char *SNMPTRAPOID = "1.3.6.1.6.3.1.1.4.1.0"; + static constexpr const char *SNMPTRAPENTERPRISE = "1.3.6.1.6.3.1.1.4.3.0"; friend class Message; };