Addresses the range checks in *toText() functions.
static const size_t MAX_QUEUE_DEFAULT = 1024;
/// @brief Defines the list of possible states for D2QueueMgr.
- enum State : int {
+ enum State : uint16_t {
NOT_INITTED = 0,
INITTED = 1,
RUNNING = 2,
namespace radius {
/// @brief Type of accounting events.
-enum Event : int {
+enum Event : uint16_t {
EVENT_CREATE = 0, //< A new lease was created (leaseX_select hooks).
EVENT_RENEW = 1, //< A lease was renewed (leaseX_renew hooks).
EVENT_REBIND = 2, //< A lease was rebound (lease6_rebind hook).
/// @note that this applies to the status of I/Os in the fetch - a fetch that
/// resulted in a packet being received from the server is a SUCCESS, even if
/// the contents of the packet indicate that some error occurred.
- enum Result : int {
+ enum Result : uint16_t {
SUCCESS = 0, // Success, fetch completed
TIME_OUT = 1, // Failure, fetch timed out
STOPPED = 2, // Control code, fetch has been stopped
-// Copyright (C) 2010-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
///
/// any is a special type used in list specifications, specifying that the
/// elements can be of any type.
- enum types : int {
+ enum types : uint16_t {
integer = 0,
real = 1,
boolean = 2,
namespace cryptolink {
/// @brief Hash algorithm identifiers.
-enum HashAlgorithm : int {
+enum HashAlgorithm : uint16_t {
UNKNOWN_HASH = 0, // This value can be used in conversion
// functions, to be returned when the
// input is unknown (but a value MUST be
};
/// @brief A status code of the DNSClient.
- enum Status : int {
+ enum Status : uint16_t {
SUCCESS = 0, ///< Response received and is ok.
TIMEOUT = 1, ///< No response, timeout.
IO_STOPPED = 2, ///< IO was stopped.
-// Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// @brief Type of the domain-name: partial or full.
- enum DomainNameType : int {
+ enum DomainNameType : uint16_t {
PARTIAL,
FULL
};
-// Copyright (C) 2013-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
static const uint16_t FLAG_FIELD_LEN = 1;
/// @brief Type of the domain-name: partial or full.
- enum DomainNameType : int {
+ enum DomainNameType : uint16_t {
PARTIAL,
FULL
};
-// Copyright (C) 2012-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// must always be and OPT_RECORD_TYPE must be at second to last.
/// This is because some functions perform sanity checks on data type
/// values using '>' operators, assuming that all values beyond the
-enum OptionDataType : int {
+enum OptionDataType : uint16_t {
OPT_EMPTY_TYPE = 0,
OPT_BINARY_TYPE = 1,
OPT_BOOLEAN_TYPE = 2,
static const size_t MAX_QUEUE_DEFAULT = 1024;
/// @brief Defines the outcome of an asynchronous NCR send.
- enum Result : int {
+ enum Result : uint16_t {
SUCCESS = 0,
TIME_OUT = 1,
STOPPED = 2,
/// @c SimpleParser6::GLOBAL6_PARAMETERS, first part with common
/// parameters followed by DHCPv4 and DHCPv6 specific parameters.
/// Keep the order, enum element names is uppercase with - replaced by _.
- enum Index : int {
+ enum Index : uint16_t {
// Common parameters.
VALID_LIFETIME,
MIN_VALID_LIFETIME,
/// - DUID (DHCPv4 and DHCPv6) (identifier name: "duid"),
/// - circuit identifier (DHCPv4) (identifier name: "circuit-id"),
/// - client identifier (DHCPv4) (identifier name: "client-id")
- enum IdentifierType : int {
+ enum IdentifierType : uint16_t {
IDENT_HWADDR = 0,
IDENT_DUID = 1,
IDENT_CIRCUIT_ID = 2,
static std::string lifetimeToText(uint32_t lifetime);
/// @brief Type of lease or pool
- enum Type : int {
+ enum Type : uint16_t {
TYPE_NA = 0, ///< the lease contains non-temporary IPv6 address
TYPE_TA = 1, ///< the lease contains temporary IPv6 address
TYPE_PD = 2, ///< the lease contains IPv6 prefix (for prefix delegation)
-// Copyright (C) 2009-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// 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 : int {
+ enum HeaderFlag : uint16_t {
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 : int {
+ enum Section : uint16_t {
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 : int {
+ enum MetadataType : uint16_t {
IFACE, ///< interface name (string)
SRC, ///< source (IP address)
DST, ///< destination (IP address)
public:
/// @brief enum value that determines the field.
- enum FieldType : int {
+ enum FieldType : uint16_t {
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 : int {
+ enum FieldType : uint16_t {
MSGTYPE, ///< msg type
TRANSID ///< transaction id (integer but manipulated as a string)
};
public:
/// @brief enum value that determines the field.
- enum FieldType : int {
+ enum FieldType : uint16_t {
PEERADDR, ///< Peer address field (IPv6 address)
LINKADDR ///< Link address field (IPv6 address)
};
public:
/// @brief Specifies a field of the vendor option
- enum FieldType : int {
+ enum FieldType : uint16_t {
SUBOPTION, ///< If this token fetches a suboption, not a field.
ENTERPRISE_ID, ///< enterprise-id field (vendor-info, vendor-class)
EXISTS, ///< vendor[123].exists