17#include <boost/lexical_cast.hpp>
23#include <boost/algorithm/string.hpp>
24#include <boost/algorithm/string/classification.hpp>
25#include <boost/algorithm/string/split.hpp>
47 .arg(
'\'' +
value_ +
'\'');
54 if ((str.size() < 3) ||
56 ((str[1] !=
'x') && (str[1] !=
'X'))) {
59 string digits = str.substr(2);
62 vector<uint8_t> binary;
67 if ((digits.length() % 2) != 0) {
68 digits = digits.insert(0,
"0");
76 value_.resize(binary.size());
77 memmove(&
value_[0], &binary[0], binary.size());
95 if (values.size() == 0) {
99 string op = values.top();
102 string result(boost::algorithm::to_lower_copy(op));
108 .arg(
'\'' + op +
'\'')
109 .arg(
'\'' + result +
'\'');
116 if (values.size() == 0) {
120 string op = values.top();
123 string result(boost::algorithm::to_upper_copy(op));
129 .arg(
'\'' + op +
'\'')
130 .arg(
'\'' + result +
'\'');
137 vector<uint8_t> binary;
140 binary = ip.toBytes();
146 value_.resize(binary.size());
147 memmove(&
value_[0], &binary[0], binary.size());
165 if (values.size() == 0) {
169 string op = values.top();
170 size_t size = op.size();
178 if ((size != V4ADDRESS_LEN) && (size != V6ADDRESS_LEN)) {
182 std::vector<uint8_t> binary(op.begin(), op.end());
184 if (size == V4ADDRESS_LEN) {
202 if (values.size() == 0) {
206 string op = values.top();
207 size_t size = op.size();
215 if (size !=
sizeof(int8_t)) {
220 tmp << static_cast<int32_t>(*(
reinterpret_cast<const int8_t*
>(op.data())));
234 if (values.size() == 0) {
238 string op = values.top();
239 size_t size = op.size();
247 if (size !=
sizeof(int16_t)) {
252 int16_t value =
static_cast<int16_t
>(
readUint16(
const_cast<const char*
>(op.data()), size));
267 if (values.size() == 0) {
271 string op = values.top();
272 size_t size = op.size();
280 if (size !=
sizeof(int32_t)) {
285 int32_t value =
static_cast<int32_t
>(
readUint32(
const_cast<const char*
>(op.data()), size));
300 if (values.size() == 0) {
304 string op = values.top();
305 size_t size = op.size();
313 if (size !=
sizeof(uint8_t)) {
318 tmp << static_cast<uint32_t>(*(
reinterpret_cast<const uint8_t*
>(op.data())));
332 if (values.size() == 0) {
336 string op = values.top();
337 size_t size = op.size();
345 if (size !=
sizeof(uint16_t)) {
350 uint16_t value =
readUint16(
const_cast<const char*
>(op.data()), size);
365 if (values.size() == 0) {
369 string op = values.top();
370 size_t size = op.size();
378 if (size !=
sizeof(uint32_t)) {
383 uint32_t value =
readUint32(
const_cast<const char*
>(op.data()), size);
407 opt_str = opt->toString();
409 std::vector<uint8_t> binary = opt->toBinary();
410 opt_str.resize(binary.size());
411 if (!binary.empty()) {
412 memmove(&opt_str[0], &binary[0], binary.size());
423 values.push(opt_str);
432 .arg(toHex(opt_str));
437 .arg(
'\'' + opt_str +
'\'');
475 Pkt6& pkt6 =
dynamic_cast<Pkt6&
>(pkt);
481 uint8_t nesting_level =
static_cast<uint8_t
>(
nest_level_);
482 return(pkt6.getRelayOption(
option_code_, nesting_level));
485 if (nesting_level < 0) {
489 static_cast<uint8_t
>(nesting_level)));
500 }
catch (
const std::bad_cast&) {
509 vector<uint8_t> binary;
511 bool is_binary =
true;
512 bool print_hex =
true;
517 value = pkt.getIface();
521 binary = pkt.getRemoteAddr().toBytes();
525 binary = pkt.getLocalAddr().toBytes();
543 value.resize(binary.size());
544 if (!binary.empty()) {
545 memmove(&value[0], &binary[0], binary.size());
554 .arg(print_hex ? toHex(value) : value);
561 vector<uint8_t> binary;
568 const Pkt4& pkt4 =
dynamic_cast<const Pkt4&
>(pkt);
577 "Packet does not have hardware address");
579 binary = hwaddr->hwaddr_;
584 binary = pkt4.getGiaddr().toBytes();
588 binary = pkt4.getCiaddr().toBytes();
592 binary = pkt4.getYiaddr().toBytes();
596 binary = pkt4.getSiaddr().toBytes();
611 type_str =
"msgtype";
615 type_str =
"transid";
621 }
catch (
const std::bad_cast&) {
625 if (!binary.empty()) {
626 value.resize(binary.size());
627 memmove(&value[0], &binary[0], binary.size());
648 const Pkt6& pkt6 =
dynamic_cast<const Pkt6&
>(pkt);
654 type_str =
"msgtype";
660 type_str =
"transid";
667 }
catch (
const std::bad_cast&) {
684 vector<uint8_t> binary;
689 const Pkt6& pkt6 =
dynamic_cast<const Pkt6&
>(pkt);
697 if (nesting_level < 0) {
701 relay_level =
static_cast<uint8_t
>(nesting_level);
707 type_str =
"linkaddr";
708 binary = pkt6.getRelay6LinkAddress(relay_level).toBytes();
711 type_str =
"peeraddr";
712 binary = pkt6.getRelay6PeerAddress(relay_level).toBytes();
727 }
catch (
const std::bad_cast&) {
732 value.resize(binary.size());
733 if (!binary.empty()) {
734 memmove(&value[0], &binary[0], binary.size());
750 if (values.size() < 2) {
752 "2 values for == operator, got " << values.size());
755 string op1 = values.top();
757 string op2 = values.top();
763 values.push(
"false");
770 .arg(
'\'' + values.top() +
'\'');
777 if (values.size() < 3) {
779 "3 values for substring operator, got " << values.size());
782 string len_str = values.top();
784 string start_str = values.top();
786 string string_str = values.top();
790 if (string_str.empty()) {
810 start_pos = boost::lexical_cast<int>(start_str);
811 }
catch (
const boost::bad_lexical_cast&) {
813 <<
"' for the starting position of the substring "
814 <<
"couldn't be converted to an integer.");
817 if (len_str ==
"all") {
818 length = string_str.length();
820 length = boost::lexical_cast<int>(len_str);
822 }
catch (
const boost::bad_lexical_cast&) {
824 <<
"' for the length of the substring "
825 <<
"couldn't be converted to an integer.");
828 const int string_length = string_str.length();
831 if ((start_pos < -string_length) || (start_pos >= string_length)) {
839 .arg(toHex(string_str))
848 start_pos = string_length + start_pos;
853 if (length <= start_pos){
862 values.push(string_str.substr(start_pos, length));
869 .arg(toHex(string_str))
870 .arg(toHex(values.top()));
877 if (values.size() < 3) {
879 "3 values for split operator, got " << values.size());
883 string field_str = values.top();
885 string delim_str = values.top();
887 string string_str = values.top();
891 if (string_str.empty()) {
908 field = boost::lexical_cast<int>(field_str);
909 }
catch (
const boost::bad_lexical_cast&) {
911 <<
"' for the field field for split "
912 <<
"couldn't be converted to an integer.");
916 if (delim_str.empty()) {
917 values.push(string_str);
925 .arg(toHex(values.top()));
930 std::vector<std::string> fields;
931 boost::split(fields, string_str, boost::is_any_of(delim_str),
932 boost::algorithm::token_compress_off);
935 if (field < 1 || field > fields.size()) {
950 values.push(fields[field - 1]);
958 .arg(toHex(values.top()));
965 if (values.size() < 2) {
967 "2 values for concat, got " << values.size());
970 string op1 = values.top();
972 string op2 = values.top();
976 values.push(op2 + op1);
983 .arg(toHex(values.top()));
990 if (values.size() < 3) {
992 "3 values for ifelse, got " << values.size());
995 string iffalse = values.top();
997 string iftrue = values.top();
999 string cond = values.top();
1004 values.push(iftrue);
1006 values.push(iffalse);
1012 .arg(pkt.getLabel())
1013 .arg(
'\'' + cond +
'\'')
1014 .arg(toHex(iffalse))
1015 .arg(toHex(iftrue));
1018 .arg(pkt.getLabel())
1019 .arg(
'\'' +cond +
'\'')
1021 .arg(toHex(iffalse));
1029 if (values.size() < 2) {
1031 "2 values for hexstring, got " << values.size());
1034 string separator = values.top();
1036 string binary = values.top();
1042 for (
size_t i = 0; i < binary.size(); ++i) {
1048 tmp << setw(2) << setfill(
'0')
1049 << (
static_cast<unsigned>(binary[i]) & 0xff);
1051 values.push(tmp.str());
1055 .arg(pkt.getLabel())
1065 if (values.size() == 0) {
1069 string op = values.top();
1074 values.push(
"true");
1076 values.push(
"false");
1081 .arg(pkt.getLabel())
1082 .arg(
'\'' + op +
'\'')
1083 .arg(
'\'' + values.top() +
'\'');
1090 if (values.size() < 2) {
1092 "2 values for and operator, got " << values.size());
1095 string op1 = values.top();
1098 string op2 = values.top();
1103 values.push(
"true");
1105 values.push(
"false");
1110 .arg(pkt.getLabel())
1111 .arg(
'\'' + op1 +
'\'')
1112 .arg(
'\'' + op2 +
'\'')
1113 .arg(
'\'' + values.top() +
'\'');
1120 if (values.size() < 2) {
1122 "2 values for or operator, got " << values.size());
1125 string op1 = values.top();
1128 string op2 = values.top();
1133 values.push(
"true");
1135 values.push(
"false");
1140 .arg(pkt.getLabel())
1141 .arg(
'\'' + op1 +
'\'')
1142 .arg(
'\'' + op2 +
'\'')
1143 .arg(
'\'' + values.top() +
'\'');
1151 values.push(
"true");
1153 values.push(
"false");
1158 .arg(pkt.getLabel())
1160 .arg(
'\'' + values.top() +
'\'');
1166 uint16_t option_code)
1167 :
TokenOption(option_code, repr), universe_(u), vendor_id_(vendor_id),
1168 field_(option_code ? SUBOPTION : EXISTS) {
1203 OptionVendorPtr vendor = boost::dynamic_pointer_cast<OptionVendor>(opt);
1208 .arg(pkt.getLabel())
1219 .arg(pkt.getLabel())
1221 .arg(vendor->getVendorId())
1230 string txt(
sizeof(uint32_t), 0);
1231 uint32_t value = htonl(vendor->getVendorId());
1232 memcpy(&txt[0], &value,
sizeof(uint32_t));
1235 .arg(pkt.getLabel())
1236 .arg(vendor->getVendorId())
1249 .arg(pkt.getLabel())
1250 .arg(vendor->getVendorId())
1252 values.push(
"true");
1321 .arg(pkt.getLabel())
1332 .arg(pkt.getLabel())
1334 .arg(vendor->getVendorId())
1343 string txt(
sizeof(uint32_t), 0);
1344 uint32_t value = htonl(vendor->getVendorId());
1345 memcpy(&txt[0], &value,
sizeof(uint32_t));
1348 .arg(pkt.getLabel())
1349 .arg(vendor->getVendorId())
1362 .arg(pkt.getLabel())
1363 .arg(vendor->getVendorId())
1365 values.push(
"true");
1369 size_t max = vendor->getTuplesNum();
1374 .arg(pkt.getLabel())
1376 .arg(vendor->getVendorId())
1385 string txt(buf.begin(), buf.end());
1388 .arg(pkt.getLabel())
1435 txt = sub->toString();
1437 std::vector<uint8_t> binary = sub->toBinary();
1438 txt.resize(binary.size());
1439 if (!binary.empty()) {
1440 memmove(&txt[0], &binary[0], binary.size());
1457 .arg(pkt.getLabel())
1463 .arg(pkt.getLabel())
1466 .arg(
'\'' + txt +
'\'');
1474 reg_exp_ = regex(reg_exp);
1475 }
catch (
const exception& ex) {
1477 <<
"': " << ex.
what());
1483 if (values.size() == 0) {
1487 string val = values.top();
1489 string txt =
"false";
1491 if (regex_match(val, reg_exp_)) {
1498 }
catch (
const exception& ex) {
1539 if (values.size() == 0) {
1543 string op = values.top();
1562 if (values.size() == 0) {
1566 string op = values.top();
1585 if (values.size() == 0) {
1589 string op = values.top();
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
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)
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.
HWAddrPtr getHWAddr() const
returns hardware address information
Represents a DHCPv6 packet.
std::vector< RelayInfo > relay_info_
Relay information.
Base class for classes representing DHCP messages.
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Logical and.
Token that represents unconditional branch.
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.
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_
Representation type.
uint16_t option_code_
Code of the option to be extracted.
RepresentationType
Token representation type.
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)
@ DST
destination (IP address)
@ IFACE
interface name (string)
virtual unsigned evaluate(Pkt &pkt, ValueStack &values)
Gets a value from the specified packet.
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.
TokenRelay4Option(const uint16_t option_code, const RepresentationType &rep_type)
Constructor for extracting sub-option from RAI (option 82)
FieldType type_
field to get
@ LINKADDR
Link address field (IPv6 address)
@ PEERADDR
Peer address field (IPv6 address)
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.
int8_t nest_level_
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.
The order where Token subtypes are declared should be:
std::string value_
Constant value.
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)
This is a method for evaluating a packet.
uint16_t sub_option_code_
Code of the sub-option to be extracted.
virtual OptionPtr getSubOption(const OptionPtr &parent)
Attempts to retrieve a sub-option.
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.
Token that represents vendor options in DHCPv4 and DHCPv6.
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_SUB_OPTION_NO_OPTION
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_SUB_OPTION
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.
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.