18#include <boost/lexical_cast.hpp>
24#include <boost/algorithm/string.hpp>
25#include <boost/algorithm/string/classification.hpp>
26#include <boost/algorithm/string/split.hpp>
49 .arg(
'\'' +
value_ +
'\'');
56 if ((
str.size() < 3) ||
58 ((
str[1] !=
'x') && (
str[1] !=
'X'))) {
61 string digits =
str.substr(2);
64 vector<uint8_t> binary;
69 if ((digits.length() % 2) != 0) {
70 digits = digits.insert(0,
"0");
78 value_.resize(binary.size());
79 memmove(&value_[0], &binary[0], binary.size());
97 if (values.size() == 0) {
101 string op = values.top();
104 string result(boost::algorithm::to_lower_copy(op));
110 .arg(
'\'' + op +
'\'')
111 .arg(
'\'' + result +
'\'');
118 if (values.size() == 0) {
122 string op = values.top();
125 string result(boost::algorithm::to_upper_copy(op));
131 .arg(
'\'' + op +
'\'')
132 .arg(
'\'' + result +
'\'');
139 vector<uint8_t> binary;
148 value_.resize(binary.size());
149 memmove(&
value_[0], &binary[0], binary.size());
167 if (values.size() == 0) {
171 string op = values.top();
172 size_t size = op.size();
180 if ((size != V4ADDRESS_LEN) && (size != V6ADDRESS_LEN)) {
184 std::vector<uint8_t> binary(op.begin(), op.end());
186 if (size == V4ADDRESS_LEN) {
204 if (values.size() == 0) {
208 string op = values.top();
209 size_t size = op.size();
217 if (size !=
sizeof(int8_t)) {
222 tmp << static_cast<int32_t>(*(
reinterpret_cast<const int8_t*
>(op.data())));
236 if (values.size() == 0) {
240 string op = values.top();
241 size_t size = op.size();
249 if (size !=
sizeof(int16_t)) {
254 int16_t value =
static_cast<int16_t
>(
readUint16(
const_cast<const char*
>(op.data()), size));
269 if (values.size() == 0) {
273 string op = values.top();
274 size_t size = op.size();
282 if (size !=
sizeof(int32_t)) {
287 int32_t value =
static_cast<int32_t
>(
readUint32(
const_cast<const char*
>(op.data()), size));
302 if (values.size() == 0) {
306 string op = values.top();
307 size_t size = op.size();
315 if (size !=
sizeof(uint8_t)) {
320 tmp << static_cast<uint32_t>(*(
reinterpret_cast<const uint8_t*
>(op.data())));
334 if (values.size() == 0) {
338 string op = values.top();
339 size_t size = op.size();
347 if (size !=
sizeof(uint16_t)) {
352 uint16_t value =
readUint16(
const_cast<const char*
>(op.data()), size);
367 if (values.size() == 0) {
371 string op = values.top();
372 size_t size = op.size();
380 if (size !=
sizeof(uint32_t)) {
385 uint32_t value =
readUint32(
const_cast<const char*
>(op.data()), size);
408 option = option->getOption(c);
423 opt_str = opt->toString();
425 std::vector<uint8_t> binary = opt->toBinary();
426 opt_str.resize(binary.size());
427 if (!binary.empty()) {
428 memmove(&opt_str[0], &binary[0], binary.size());
439 values.push(opt_str);
443 if (!tmp.str().empty()) {
446 tmp <<
"option[" << c <<
"]";
449 if (tmp.str().empty()) {
460 .arg(
toHex(opt_str));
465 .arg(
'\'' + opt_str +
'\'');
491 option = option->getOption(c);
504 Pkt6& pkt6 =
dynamic_cast<Pkt6&
>(pkt);
512 uint8_t nesting_level =
static_cast<uint8_t
>(
nest_level_);
516 if (nesting_level < 0) {
519 option = pkt6.
getRelayOption(c,
static_cast<uint8_t
>(nesting_level));
532 option = option->getOption(c);
539 }
catch (
const std::bad_cast&) {
547 vector<uint8_t> binary;
549 bool is_binary =
true;
550 bool print_hex =
true;
581 value.resize(binary.size());
582 if (!binary.empty()) {
583 memmove(&value[0], &binary[0], binary.size());
592 .arg(print_hex ?
toHex(value) : value);
599 vector<uint8_t> binary;
606 const Pkt4& pkt4 =
dynamic_cast<const Pkt4&
>(pkt);
615 "Packet does not have hardware address");
617 binary = hwaddr->hwaddr_;
649 type_str =
"msgtype";
653 type_str =
"transid";
659 }
catch (
const std::bad_cast&) {
663 if (!binary.empty()) {
664 value.resize(binary.size());
665 memmove(&value[0], &binary[0], binary.size());
686 const Pkt6& pkt6 =
dynamic_cast<const Pkt6&
>(pkt);
692 type_str =
"msgtype";
698 type_str =
"transid";
705 }
catch (
const std::bad_cast&) {
722 vector<uint8_t> binary;
727 const Pkt6& pkt6 =
dynamic_cast<const Pkt6&
>(pkt);
735 if (nesting_level < 0) {
739 relay_level =
static_cast<uint8_t
>(nesting_level);
745 type_str =
"linkaddr";
749 type_str =
"peeraddr";
765 }
catch (
const std::bad_cast&) {
770 value.resize(binary.size());
771 if (!binary.empty()) {
772 memmove(&value[0], &binary[0], binary.size());
788 if (values.size() < 2) {
790 "2 values for == operator, got " << values.size());
793 string op1 = values.top();
795 string op2 = values.top();
801 values.push(
"false");
808 .arg(
'\'' + values.top() +
'\'');
815 if (values.size() < 3) {
817 "3 values for substring operator, got " << values.size());
820 string len_str = values.top();
822 string start_str = values.top();
824 string string_str = values.top();
828 if (string_str.empty()) {
848 start_pos = boost::lexical_cast<int>(start_str);
849 }
catch (
const boost::bad_lexical_cast&) {
851 <<
"' for the starting position of the substring "
852 <<
"couldn't be converted to an integer.");
855 if (len_str ==
"all") {
856 length = string_str.length();
858 length = boost::lexical_cast<int>(len_str);
860 }
catch (
const boost::bad_lexical_cast&) {
862 <<
"' for the length of the substring "
863 <<
"couldn't be converted to an integer.");
866 const int string_length = string_str.length();
869 if ((start_pos < -string_length) || (start_pos >= string_length)) {
877 .arg(
toHex(string_str))
886 start_pos = string_length + start_pos;
891 if (length <= start_pos){
900 values.push(string_str.substr(start_pos, length));
907 .arg(
toHex(string_str))
908 .arg(
toHex(values.top()));
915 if (values.size() < 3) {
917 "3 values for split operator, got " << values.size());
921 string field_str = values.top();
923 string delim_str = values.top();
925 string string_str = values.top();
929 if (string_str.empty()) {
946 field = boost::lexical_cast<int>(field_str);
947 }
catch (
const boost::bad_lexical_cast&) {
949 <<
"' for the field field for split "
950 <<
"couldn't be converted to an integer.");
954 if (delim_str.empty()) {
955 values.push(string_str);
963 .arg(
toHex(values.top()));
968 std::vector<std::string> fields;
969 boost::split(fields, string_str, boost::is_any_of(delim_str),
970 boost::algorithm::token_compress_off);
973 if (field < 1 ||
static_cast<size_t>(field) > fields.size()) {
988 values.push(fields[field - 1]);
996 .arg(
toHex(values.top()));
1003 if (values.size() < 2) {
1005 "2 values for concat, got " << values.size());
1008 string op1 = values.top();
1010 string op2 = values.top();
1014 values.push(op2 + op1);
1021 .arg(
toHex(values.top()));
1028 if (values.size() < 3) {
1030 "3 values for ifelse, got " << values.size());
1033 string iffalse = values.top();
1035 string iftrue = values.top();
1037 string cond = values.top();
1042 values.push(iftrue);
1044 values.push(iffalse);
1051 .arg(
'\'' + cond +
'\'')
1052 .arg(
toHex(iffalse))
1053 .arg(
toHex(iftrue));
1057 .arg(
'\'' +cond +
'\'')
1059 .arg(
toHex(iffalse));
1067 if (values.size() < 2) {
1069 "2 values for hexstring, got " << values.size());
1072 string separator = values.top();
1074 string binary = values.top();
1080 for (
size_t i = 0; i < binary.size(); ++i) {
1088 values.push(tmp.str());
1102 if (values.size() == 0) {
1106 string op = values.top();
1111 values.push(
"true");
1113 values.push(
"false");
1119 .arg(
'\'' + op +
'\'')
1120 .arg(
'\'' + values.top() +
'\'');
1127 if (values.size() < 2) {
1129 "2 values for and operator, got " << values.size());
1132 string op1 = values.top();
1135 string op2 = values.top();
1140 values.push(
"true");
1142 values.push(
"false");
1148 .arg(
'\'' + op1 +
'\'')
1149 .arg(
'\'' + op2 +
'\'')
1150 .arg(
'\'' + values.top() +
'\'');
1157 if (values.size() < 2) {
1159 "2 values for or operator, got " << values.size());
1162 string op1 = values.top();
1165 string op2 = values.top();
1170 values.push(
"true");
1172 values.push(
"false");
1178 .arg(
'\'' + op1 +
'\'')
1179 .arg(
'\'' + op2 +
'\'')
1180 .arg(
'\'' + values.top() +
'\'');
1188 values.push(
"true");
1190 values.push(
"false");
1197 .arg(
'\'' + values.top() +
'\'');
1203 const std::vector<uint16_t>& option_codes)
1210 vendor_id_(vendor_id), field_(field) {
1211 if (field_ == EXISTS) {
1240 OptionVendorPtr vendor = boost::dynamic_pointer_cast<OptionVendor>(opt);
1258 .arg(vendor->getVendorId())
1267 string txt(
sizeof(uint32_t), 0);
1268 uint32_t value = htonl(vendor->getVendorId());
1269 memcpy(&txt[0], &value,
sizeof(uint32_t));
1273 .arg(vendor->getVendorId())
1287 .arg(vendor->getVendorId())
1289 values.push(
"true");
1321 option = option->getOption(c);
1331 :
TokenVendor(u, vendor_id, repr, std::vector<uint16_t> {}), index_(0) {
1377 .arg(vendor->getVendorId())
1386 string txt(
sizeof(uint32_t), 0);
1387 uint32_t value = htonl(vendor->getVendorId());
1388 memcpy(&txt[0], &value,
sizeof(uint32_t));
1392 .arg(vendor->getVendorId())
1406 .arg(vendor->getVendorId())
1408 values.push(
"true");
1412 size_t max = vendor->getTuplesNum();
1413 if (
static_cast<size_t>(
index_ + 1) > max) {
1419 .arg(vendor->getVendorId())
1428 string txt(buf.begin(), buf.end());
1452 reg_exp_ = regex(reg_exp);
1453 }
catch (
const exception& ex) {
1455 <<
"': " << ex.what());
1461 if (values.size() == 0) {
1465 string val = values.top();
1467 string txt =
"false";
1469 if (regex_match(val, reg_exp_)) {
1476 }
catch (
const exception& ex) {
1517 if (values.size() == 0) {
1521 string op = values.top();
1540 if (values.size() == 0) {
1544 string op = values.top();
1563 if (values.size() == 0) {
1567 string op = values.top();
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
The IOAddress class represents an IP addresses (version agnostic).
std::string toText() const
Convert the address to a string.
std::vector< uint8_t > toBytes() const
Return address as set of bytes.
static IOAddress fromBytes(short family, const uint8_t *data)
Creates an address from over wire data.
EvalBadStack is thrown when more or less parameters are on the stack than expected.
EvalTypeError is thrown when a value on the stack has a content with an unexpected type.
Represents a single instance of the opaque data preceded by length.
const Buffer & getData() const
Returns a reference to the buffer holding tuple data.
std::vector< uint8_t > Buffer
Defines a type of the data buffer used to hold the opaque data.
Universe
defines option universe DHCPv4 or DHCPv6
Represents DHCPv4 packet.
const isc::asiolink::IOAddress & getSiaddr() const
Returns siaddr field.
const isc::asiolink::IOAddress & getYiaddr() const
Returns yiaddr field.
const isc::asiolink::IOAddress & getGiaddr() const
Returns giaddr field.
const isc::asiolink::IOAddress & getCiaddr() const
Returns ciaddr field.
HWAddrPtr getHWAddr() const
returns hardware address information
uint8_t getHlen() const
Returns hlen field.
uint8_t getType() const
Returns DHCP message type (e.g.
uint8_t getHtype() const
Returns htype field.
Represents a DHCPv6 packet.
OptionPtr getRelayOption(uint16_t option_code, uint8_t nesting_level)
Returns option inserted by relay.
const isc::asiolink::IOAddress & getRelay6PeerAddress(uint8_t relay_level) const
return the peer address field from a relay option
const isc::asiolink::IOAddress & getRelay6LinkAddress(uint8_t relay_level) const
return the link address field from a relay option
std::vector< RelayInfo > relay_info_
Relay information.
virtual uint8_t getType() const
Returns message type (e.g.
Base class for classes representing DHCP messages.
const isc::asiolink::IOAddress & getLocalAddr() const
Returns local IP address.
const isc::asiolink::IOAddress & getRemoteAddr() const
Returns remote IP address.
uint32_t getTransid() const
Returns value of transaction-id field.
std::string getIface() const
Returns interface name.
OptionPtr getOption(const uint16_t type)
Returns the first option of specified type.
bool inClass(const isc::dhcp::ClientClass &client_class)
Checks whether a client belongs to a given class.
virtual std::string getLabel() const
Returns text representation primary packet identifiers.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Logical and.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Only return the target.
TokenBranch(const unsigned target)
Constructor.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Concatenate two values.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Compare two values.
std::string value_
Constant value.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the constant string on the stack after decoding or an empty string if...
TokenHexString(const std::string &str)
Value is set during token construction.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Alternative.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding).
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding).
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding).
TokenInteger(const uint32_t value)
Integer value set during construction.
uint32_t int_value_
value as integer (stored for testing only)
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding).
std::string value_
< Constant value (empty string if the IP address cannot be converted)
TokenIpAddress(const std::string &addr)
Value is set during token construction.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the constant string on the stack after decoding).
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Does nothing.
TokenLabel(const unsigned label)
Constructor.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the evaluated string expression converted to lower case on the stack)...
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Match regular expression.
TokenMatch(const std::string ®_exp)
Constructor.
ClientClass client_class_
The client class name.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (check if client_class_ was added to packet client classes).
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Logical negation.
Token that represents a value of an option.
virtual OptionPtr getOption(Pkt &pkt)
Attempts to retrieve an option.
RepresentationType representation_type_
The representation type.
std::vector< uint16_t > option_path_
The options hierarchy.
RepresentationType
Token representation type.
TokenOption(const std::vector< uint16_t > &option_codes, const RepresentationType &rep_type)
Constructor that takes an option code as a parameter.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Evaluates the values of the option.
virtual std::string pushFailure(ValueStack &values)
Auxiliary method that puts string representing a failure.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Logical or.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Gets a value from the specified packet.
@ CIADDR
ciaddr (IPv4 address)
@ HLEN
hlen (hardware address length)
@ HTYPE
htype (hardware address type)
@ GIADDR
giaddr (IPv4 address)
@ CHADDR
chaddr field (up to 16 bytes link-layer address)
@ YIADDR
yiaddr (IPv4 address)
@ SIADDR
siaddr (IPv4 address)
@ TRANSID
transaction-id (xid)
@ MSGTYPE
message type (not really a field, content of option 53)
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Gets a value of the specified packet.
@ TRANSID
transaction id (integer but manipulated as a string)
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Gets a value from the specified packet.
@ DST
destination (IP address)
@ IFACE
interface name (string)
TokenPopAndBranchFalse(const unsigned target)
Constructor.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Pops the top of stack which must be "false" or "true".
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Looks at the top of stack which must be "false" or "true".
TokenPopOrBranchFalse(const unsigned target)
Constructor.
TokenPopOrBranchTrue(const unsigned target)
Constructor.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Looks at the top of stack which must be "false" or "true".
virtual OptionPtr getOption(Pkt &pkt)
Attempts to obtain specified sub-option of option 82 from the packet.
FieldType type_
field to get
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Extracts the specified field from the requested relay.
int8_t nest_level_
Specifies field of the DHCPv6 relay option to get.
@ LINKADDR
Link address field (IPv6 address).
@ PEERADDR
Peer address field (IPv6 address).
int8_t nest_level_
The nesting level of the relay block to use.
virtual OptionPtr getOption(Pkt &pkt)
Attempts to obtain specified option from the specified relay block.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Extract a field from a delimited string.
std::string value_
Constant value.
TokenString(const std::string &str)
Value is set during token construction.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the constant string on the stack).
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Extract a substring from a string.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Convert a binary value to its hexadecimal string representation.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding).
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding).
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding).
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the evaluated string expression converted to upper case on the stack)...
TokenVendorClass(Option::Universe u, uint32_t vendor_id, RepresentationType repr)
This constructor is used to access fields.
uint16_t getDataIndex() const
Returns data index.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
This is a method for evaluating a packet.
uint16_t index_
Data chunk index.
Option::Universe universe_
Universe (V4 or V6).
uint32_t vendor_id_
Enterprise-id value.
FieldType field_
Specifies which field should be accessed.
uint32_t getVendorId() const
Returns enterprise-id.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
This is a method for evaluating a packet.
TokenVendor(Option::Universe u, uint32_t vendor_id, FieldType field)
Constructor used for accessing a field.
virtual OptionPtr getOption(Pkt &pkt)
Attempts to get a suboption.
FieldType
Specifies a field of the vendor option.
@ DATA
data chunk, used in derived vendor-class only
@ EXISTS
vendor[123].exists
@ ENTERPRISE_ID
enterprise-id field (vendor-info, vendor-class)
@ SUBOPTION
If this token fetches a suboption, not a field.
FieldType getField() const
Returns field.
static bool toBool(std::string value)
Coverts a (string) value to a boolean.
Evaluation context, an interface to the expression evaluation.
static std::string fromUint32(const uint32_t integer)
Converts unsigned 32bit integer to string representation.
Evaluation error exception raised when trying to parse an exceptions.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
const isc::log::MessageID EVAL_DEBUG_POP_AND_BRANCH_FALSE
boost::shared_ptr< OptionVendor > OptionVendorPtr
Pointer to a vendor option.
const isc::log::MessageID EVAL_DEBUG_MATCH_ERROR
const isc::log::MessageID EVAL_DEBUG_POP_OR_BRANCH_TRUE
const isc::log::MessageID EVAL_DEBUG_RELAY6_RANGE
const isc::log::MessageID EVAL_DEBUG_UCASE
const isc::log::MessageID EVAL_DEBUG_UINT32TOTEXT
const isc::log::MessageID EVAL_DEBUG_UINT16TOTEXT
const isc::log::MessageID EVAL_DEBUG_SPLIT_EMPTY
const isc::log::MessageID EVAL_DEBUG_VENDOR_CLASS_EXISTS
const isc::log::MessageID EVAL_DEBUG_VENDOR_CLASS_DATA_NOT_FOUND
const isc::log::MessageID EVAL_DEBUG_PKT
const isc::log::MessageID EVAL_DEBUG_HEXSTRING
const isc::log::MessageID EVAL_DEBUG_TOHEXSTRING
const isc::log::MessageID EVAL_DEBUG_VENDOR_CLASS_DATA
const isc::log::MessageID EVAL_DEBUG_SPLIT_FIELD_OUT_OF_RANGE
const isc::log::MessageID EVAL_DEBUG_INT32TOTEXT
const isc::log::MessageID EVAL_DEBUG_OPTION
const isc::log::MessageID EVAL_DEBUG_SUBSTRING
const isc::log::MessageID EVAL_DEBUG_PKT6
const isc::log::MessageID EVAL_DEBUG_RELAY6
const isc::log::MessageID EVAL_DEBUG_OR
const isc::log::MessageID EVAL_DEBUG_INT8TOTEXT
const isc::log::MessageID EVAL_DEBUG_VENDOR_ENTERPRISE_ID
boost::shared_ptr< HWAddr > HWAddrPtr
Shared pointer to a hardware address structure.
const isc::log::MessageID EVAL_DEBUG_STRING
const isc::log::MessageID EVAL_DEBUG_MATCH
const isc::log::MessageID EVAL_DEBUG_VENDOR_ENTERPRISE_ID_MISMATCH
const isc::log::MessageID EVAL_DEBUG_BRANCH
const isc::log::MessageID EVAL_DEBUG_SPLIT
const isc::log::MessageID EVAL_DEBUG_PKT4
const isc::log::MessageID EVAL_DEBUG_INT16TOTEXT
isc::log::Logger eval_logger("eval")
Eval Logger.
const isc::log::MessageID EVAL_DEBUG_CONCAT
const isc::log::MessageID EVAL_DEBUG_VENDOR_CLASS_ENTERPRISE_ID_MISMATCH
const isc::log::MessageID EVAL_DEBUG_VENDOR_EXISTS
const isc::log::MessageID EVAL_DEBUG_VENDOR_NO_OPTION
const isc::log::MessageID EVAL_DEBUG_LCASE
boost::shared_ptr< OptionVendorClass > OptionVendorClassPtr
Defines a pointer to the OptionVendorClass.
const isc::log::MessageID EVAL_DEBUG_IPADDRESS
const isc::log::MessageID EVAL_DEBUG_AND
const isc::log::MessageID EVAL_DEBUG_VENDOR_CLASS_NO_OPTION
const isc::log::MessageID EVAL_DEBUG_POP_OR_BRANCH_FALSE
const isc::log::MessageID EVAL_DEBUG_VENDOR_CLASS_ENTERPRISE_ID
const isc::log::MessageID EVAL_DEBUG_UINT8TOTEXT
const isc::log::MessageID EVAL_DEBUG_EQUAL
const isc::log::MessageID EVAL_DEBUG_IPADDRESSTOTEXT
const isc::log::MessageID EVAL_DEBUG_SPLIT_DELIM_EMPTY
const isc::log::MessageID EVAL_DEBUG_MEMBER
const isc::log::MessageID EVAL_DEBUG_IFELSE_TRUE
const isc::log::MessageID EVAL_DEBUG_NOT
boost::shared_ptr< Option > OptionPtr
const isc::log::MessageID EVAL_DEBUG_SUBSTRING_RANGE
std::stack< std::string > ValueStack
Evaluated values are stored as a stack of strings.
const isc::log::MessageID EVAL_DEBUG_IFELSE_FALSE
const isc::log::MessageID EVAL_DEBUG_SUBSTRING_EMPTY
void decodeHex(const string &encoded_str, vector< uint8_t > &output)
Decode a base16 encoded string into binary data.
string encodeHex(const vector< uint8_t > &binary)
Encode binary data in the base16 format.
std::string toHex(std::string value)
Encode in hexadecimal inline.
const std::string & byteToHex(uint8_t byte)
Converts a byte to a two hex digit string.
uint16_t readUint16(void const *const buffer, size_t const length)
uint16_t wrapper over readUint.
uint32_t readUint32(void const *const buffer, size_t const length)
uint32_t wrapper over readUint.
std::string toHex(std::string value)
Encode in hexadecimal inline.