/// introducing a separately defined class considering the balance
/// between the complexity and advantage, but hopefully the cast notation
/// is sufficiently ugly to prevent proliferation of the usage.
- enum HeaderFlag {
+ enum HeaderFlag : int {
HEADERFLAG_QR = 0x8000, // Query (if cleared) or response (if set)
HEADERFLAG_AA = 0x0400, // Authoritative answer
HEADERFLAG_TC = 0x0200, // Truncation
///
/// <b>Future Extension:</b> We'll probably also define constants for
/// the section names used in dynamic updates in future versions.
- enum Section {
+ enum Section : int {
SECTION_QUESTION = 0, // Question section
SECTION_ANSWER = 1, // Answer section
SECTION_AUTHORITY = 2, // Authority section
public:
/// @brief enum value that determines the field.
- enum MetadataType {
+ enum MetadataType : int {
IFACE, ///< interface name (string)
SRC, ///< source (IP address)
DST, ///< destination (IP address)
public:
/// @brief enum value that determines the field.
- enum FieldType {
+ enum FieldType : int {
CHADDR, ///< chaddr field (up to 16 bytes link-layer address)
GIADDR, ///< giaddr (IPv4 address)
CIADDR, ///< ciaddr (IPv4 address)
class TokenPkt6 : public Token {
public:
/// @brief enum value that determines the field.
- enum FieldType {
+ enum FieldType : int {
MSGTYPE, ///< msg type
TRANSID ///< transaction id (integer but manipulated as a string)
};
public:
/// @brief enum value that determines the field.
- enum FieldType {
+ enum FieldType : int {
PEERADDR, ///< Peer address field (IPv6 address)
LINKADDR ///< Link address field (IPv6 address)
};
public:
/// @brief Specifies a field of the vendor option
- enum FieldType {
+ enum FieldType : int {
SUBOPTION, ///< If this token fetches a suboption, not a field.
ENTERPRISE_ID, ///< enterprise-id field (vendor-info, vendor-class)
EXISTS, ///< vendor[123].exists