Kea 2.7.1
token.h
Go to the documentation of this file.
1// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef TOKEN_H
8#define TOKEN_H
9
11#include <dhcp/pkt.h>
12#include <regex>
13#include <stack>
14
15namespace isc {
16namespace dhcp {
17
18class Token;
19
21typedef boost::shared_ptr<Token> TokenPtr;
22
29typedef std::vector<TokenPtr> Expression;
30
31typedef boost::shared_ptr<Expression> ExpressionPtr;
32
34typedef std::stack<std::string> ValueStack;
35
38class EvalBadStack : public Exception {
39public:
40 EvalBadStack(const char* file, size_t line, const char* what) :
41 isc::Exception(file, line, what) { };
42};
43
46class EvalTypeError : public Exception {
47public:
48 EvalTypeError(const char* file, size_t line, const char* what) :
49 isc::Exception(file, line, what) { };
50};
51
63class Token {
64public:
65
78 virtual void evaluate(Pkt& pkt, ValueStack& values) = 0;
79
81 virtual ~Token() {}
82
90 static inline bool toBool(std::string value) {
91 if (value == "true") {
92 return (true);
93 } else if (value == "false") {
94 return (false);
95 } else {
96 isc_throw(EvalTypeError, "Incorrect boolean. Expected exactly "
97 "\"false\" or \"true\", got \"" << value << "\"");
98 }
99 }
100};
101
109
114class TokenString : public Token {
115public:
119 TokenString(const std::string& str) : value_(str) {}
120
125 void evaluate(Pkt& pkt, ValueStack& values);
126
127protected:
128 std::string value_;
129};
130
135class TokenHexString : public Token {
136public:
142 TokenHexString(const std::string& str);
143
150 void evaluate(Pkt& pkt, ValueStack& values);
151
152protected:
153 std::string value_;
154};
155
160class TokenLowerCase : public Token {
161public:
164
170 void evaluate(Pkt& pkt, ValueStack& values);
171};
172
177class TokenUpperCase : public Token {
178public:
181
187 void evaluate(Pkt& pkt, ValueStack& values);
188};
189
196class TokenInteger : public TokenString {
197public:
204 TokenInteger(const uint32_t value);
205
211 uint32_t getInteger() const {
212 return (int_value_);
213 }
214
215protected:
216 uint32_t int_value_;
217};
218
223class TokenIpAddress : public Token {
224public:
228 TokenIpAddress(const std::string& addr);
229
235 void evaluate(Pkt& pkt, ValueStack& values);
236
237protected:
239 std::string value_;
240};
241
247public:
250
256 void evaluate(Pkt& pkt, ValueStack& values);
257};
258
263class TokenInt8ToText : public Token {
264public:
267
274 void evaluate(Pkt& pkt, ValueStack& values);
275};
276
281class TokenInt16ToText : public Token {
282public:
285
292 void evaluate(Pkt& pkt, ValueStack& values);
293};
294
299class TokenInt32ToText : public Token {
300public:
303
310 void evaluate(Pkt& pkt, ValueStack& values);
311};
312
317class TokenUInt8ToText : public Token {
318public:
321
328 void evaluate(Pkt& pkt, ValueStack& values);
329};
330
335class TokenUInt16ToText : public Token {
336public:
339
346 void evaluate(Pkt& pkt, ValueStack& values);
347};
348
353class TokenUInt32ToText : public Token {
354public:
357
364 void evaluate(Pkt& pkt, ValueStack& values);
365};
366
376class TokenOption : public Token {
377public:
378
391
399 TokenOption(const uint16_t option_code, const RepresentationType& rep_type)
400 : option_code_(option_code), representation_type_(rep_type) {}
401
410 void evaluate(Pkt& pkt, ValueStack& values);
411
418 uint16_t getCode() const {
419 return (option_code_);
420 }
421
431
432protected:
442 virtual OptionPtr getOption(Pkt& pkt);
443
450 virtual std::string pushFailure(ValueStack& values);
451
452 uint16_t option_code_;
454};
455
468public:
469
474 TokenRelay4Option(const uint16_t option_code,
475 const RepresentationType& rep_type);
476
477protected:
481 virtual OptionPtr getOption(Pkt& pkt);
482};
483
500public:
507 TokenRelay6Option(const int8_t nest_level, const uint16_t option_code,
508 const RepresentationType& rep_type)
509 : TokenOption(option_code, rep_type), nest_level_(nest_level) {}
510
518 int8_t getNest() const {
519 return (nest_level_);
520 }
521
522protected:
526 virtual OptionPtr getOption(Pkt& pkt);
527
528 int8_t nest_level_;
529};
530
541class TokenPkt : public Token {
542public:
543
551
553 TokenPkt(const MetadataType type) : type_(type) {}
554
562 void evaluate(Pkt& pkt, ValueStack& values);
563
569 return (type_);
570 }
571
572private:
574 MetadataType type_;
575};
576
590class TokenPkt4 : public Token {
591public:
592
605
608 : type_(type) {}
609
619 void evaluate(Pkt& pkt, ValueStack& values);
620
626 return (type_);
627 }
628
629private:
631 FieldType type_;
632};
633
644class TokenPkt6 : public Token {
645public:
647 enum FieldType : int {
649 TRANSID
650 };
651
654 : type_(type) {}
655
665 void evaluate(Pkt& pkt, ValueStack& values);
666
672 return (type_);
673 }
674
675private:
677 FieldType type_;
678};
679
695class TokenRelay6Field : public Token {
696public:
697
699 enum FieldType : int {
701 LINKADDR
702 };
703
709 TokenRelay6Field(const int8_t nest_level, const FieldType type)
710 : nest_level_(nest_level), type_(type) {}
711
719 void evaluate(Pkt& pkt, ValueStack& values);
720
728 int8_t getNest() const {
729 return (nest_level_);
730 }
731
739 return (type_);
740 }
741
742protected:
744 int8_t nest_level_;
746};
747
752class TokenEqual : public Token {
753public:
756
769 void evaluate(Pkt& pkt, ValueStack& values);
770};
771
777class TokenSubstring : public Token {
778public:
781
826 void evaluate(Pkt& pkt, ValueStack& values);
827};
828
829class TokenSplit : public Token {
830public:
833
870 void evaluate(Pkt& pkt, ValueStack& values);
871};
872
878class TokenConcat : public Token {
879public:
882
894 void evaluate(Pkt& pkt, ValueStack& values);
895};
896
906class TokenIfElse : public Token {
907public:
910
925 void evaluate(Pkt& pkt, ValueStack& values);
926};
927
936class TokenToHexString : public Token {
937public:
940
964 void evaluate(Pkt& pkt, ValueStack& values);
965};
966
971class TokenNot : public Token {
972public:
975
989 void evaluate(Pkt& pkt, ValueStack& values);
990};
991
995class TokenAnd : public Token {
996public:
999
1014 void evaluate(Pkt& pkt, ValueStack& values);
1015};
1016
1020class TokenOr : public Token {
1021public:
1024
1039 void evaluate(Pkt& pkt, ValueStack& values);
1040};
1041
1045class TokenMember : public Token {
1046public:
1050 TokenMember(const std::string& client_class)
1051 : client_class_(client_class) {
1052 }
1053
1059 void evaluate(Pkt& pkt, ValueStack& values);
1060
1068 return (client_class_);
1069 }
1070
1071protected:
1074};
1075
1090class TokenVendor : public TokenOption {
1091public:
1092
1100
1106 TokenVendor(Option::Universe u, uint32_t vendor_id, FieldType field);
1107
1119 TokenVendor(Option::Universe u, uint32_t vendor_id, RepresentationType repr,
1120 uint16_t option_code = 0);
1121
1127 uint32_t getVendorId() const;
1128
1134 FieldType getField() const;
1135
1158 virtual void evaluate(Pkt& pkt, ValueStack& values);
1159
1160protected:
1169 virtual OptionPtr getOption(Pkt& pkt);
1170
1176
1181 uint32_t vendor_id_;
1182
1185};
1186
1205public:
1206
1212 TokenVendorClass(Option::Universe u, uint32_t vendor_id, RepresentationType repr);
1213
1220 TokenVendorClass(Option::Universe u, uint32_t vendor_id, FieldType field,
1221 uint16_t index = 0);
1222
1227 uint16_t getDataIndex() const;
1228
1229protected:
1230
1254 void evaluate(Pkt& pkt, ValueStack& values);
1255
1257 uint16_t index_;
1258};
1259
1276class TokenSubOption : public virtual TokenOption {
1277public:
1278
1281
1289 TokenSubOption(const uint16_t option_code,
1290 const uint16_t sub_option_code,
1291 const RepresentationType& rep_type)
1292 : TokenOption(option_code, rep_type), sub_option_code_(sub_option_code) {}
1293
1305 virtual void evaluate(Pkt& pkt, ValueStack& values);
1306
1313 uint16_t getSubCode() const {
1314 return (sub_option_code_);
1315 }
1316
1317protected:
1322 virtual OptionPtr getSubOption(const OptionPtr& parent);
1323
1325};
1326
1330class TokenMatch : public Token {
1331public:
1336 TokenMatch(const std::string& reg_exp);
1337
1347 void evaluate(Pkt& pkt, ValueStack& values);
1348
1355 const std::string& getRegExp() const {
1356 return (reg_exp_str_);
1357 }
1358
1359private:
1361 std::string reg_exp_str_;
1362
1364 std::regex reg_exp_;
1365};
1366
1367} // end of isc::dhcp namespace
1368} // end of isc namespace
1369
1370#endif
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
EvalBadStack is thrown when more or less parameters are on the stack than expected.
Definition token.h:38
EvalBadStack(const char *file, size_t line, const char *what)
Definition token.h:40
EvalTypeError is thrown when a value on the stack has a content with an unexpected type.
Definition token.h:46
EvalTypeError(const char *file, size_t line, const char *what)
Definition token.h:48
Universe
defines option universe DHCPv4 or DHCPv6
Definition option.h:83
Base class for classes representing DHCP messages.
Definition pkt.h:161
Token that represents logical and operator.
Definition token.h:995
void evaluate(Pkt &pkt, ValueStack &values)
Logical and.
Definition token.cc:1039
TokenAnd()
Constructor (does nothing)
Definition token.h:998
Token that represents concat operator (concatenates two other tokens)
Definition token.h:878
void evaluate(Pkt &pkt, ValueStack &values)
Concatenate two values.
Definition token.cc:922
TokenConcat()
Constructor (does nothing)
Definition token.h:881
Token that represents equality operator (compares two other tokens)
Definition token.h:752
void evaluate(Pkt &pkt, ValueStack &values)
Compare two values.
Definition token.cc:713
TokenEqual()
Constructor (does nothing)
Definition token.h:755
Token representing a constant string in hexadecimal format.
Definition token.h:135
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the constant string on the stack after decoding or an empty string if...
Definition token.cc:79
std::string value_
Constant value.
Definition token.h:153
TokenHexString(const std::string &str)
Value is set during token construction.
Definition token.cc:50
Token that represents an alternative.
Definition token.h:906
TokenIfElse()
Constructor (does nothing)
Definition token.h:909
void evaluate(Pkt &pkt, ValueStack &values)
Alternative.
Definition token.cc:945
Token representing a 16 bit integer as a string.
Definition token.h:281
TokenInt16ToText()
Constructor (does nothing)
Definition token.h:284
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding)
Definition token.cc:219
Token representing a 32 bit integer as a string.
Definition token.h:299
TokenInt32ToText()
Constructor (does nothing)
Definition token.h:302
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding)
Definition token.cc:250
Token representing an 8 bit integer as a string.
Definition token.h:263
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding)
Definition token.cc:189
TokenInt8ToText()
Constructor (does nothing)
Definition token.h:266
Token representing an unsigned 32 bit integer.
Definition token.h:196
TokenInteger(const uint32_t value)
Integer value set during construction.
Definition token.cc:1338
uint32_t getInteger() const
Returns integer value.
Definition token.h:211
uint32_t int_value_
value as integer (stored for testing only)
Definition token.h:216
Token representing an IP address as a string.
Definition token.h:246
TokenIpAddressToText()
Constructor (does nothing)
Definition token.h:249
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding)
Definition token.cc:154
Token representing an IP address as a constant string.
Definition token.h:223
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the constant string on the stack after decoding)
Definition token.cc:143
std::string value_
< Constant value (empty string if the IP address cannot be converted)
Definition token.h:239
TokenIpAddress(const std::string &addr)
Value is set during token construction.
Definition token.cc:127
Token representing a constant lower case string.
Definition token.h:160
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the evaluated string expression converted to lower case on the stack)
Definition token.cc:90
TokenLowerCase()
Constructor (does nothing)
Definition token.h:163
Token that represents regular expression (regex) matching.
Definition token.h:1330
const std::string & getRegExp() const
Returns regular expression.
Definition token.h:1355
TokenMatch(const std::string &reg_exp)
Constructor.
Definition token.cc:1405
void evaluate(Pkt &pkt, ValueStack &values)
Match regular expression.
Definition token.cc:1415
Token that represents client class membership.
Definition token.h:1045
const ClientClass & getClientClass() const
Returns client class name.
Definition token.h:1067
ClientClass client_class_
The client class name.
Definition token.h:1073
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (check if client_class_ was added to packet client classes)
Definition token.cc:1095
TokenMember(const std::string &client_class)
Constructor.
Definition token.h:1050
Token that represents logical negation operator.
Definition token.h:971
TokenNot()
Constructor (does nothing)
Definition token.h:974
void evaluate(Pkt &pkt, ValueStack &values)
Logical negation.
Definition token.cc:1016
Token that represents a value of an option.
Definition token.h:376
uint16_t getCode() const
Returns option-code.
Definition token.h:418
RepresentationType getRepresentation() const
Returns representation-type.
Definition token.h:428
virtual OptionPtr getOption(Pkt &pkt)
Attempts to retrieve an option.
Definition token.cc:373
void evaluate(Pkt &pkt, ValueStack &values)
Evaluates the values of the option.
Definition token.cc:378
RepresentationType representation_type_
Representation type.
Definition token.h:453
uint16_t option_code_
Code of the option to be extracted.
Definition token.h:452
RepresentationType
Token representation type.
Definition token.h:386
TokenOption(const uint16_t option_code, const RepresentationType &rep_type)
Constructor that takes an option code as a parameter.
Definition token.h:399
virtual std::string pushFailure(ValueStack &values)
Auxiliary method that puts string representing a failure.
Definition token.cc:418
Token that represents logical or operator.
Definition token.h:1020
void evaluate(Pkt &pkt, ValueStack &values)
Logical or.
Definition token.cc:1067
TokenOr()
Constructor (does nothing)
Definition token.h:1023
Token that represents fields of a DHCPv4 packet.
Definition token.h:590
FieldType getType()
Returns field type.
Definition token.h:625
FieldType
enum value that determines the field.
Definition token.h:594
@ CIADDR
ciaddr (IPv4 address)
Definition token.h:597
@ HLEN
hlen (hardware address length)
Definition token.h:600
@ HTYPE
htype (hardware address type)
Definition token.h:601
@ GIADDR
giaddr (IPv4 address)
Definition token.h:596
@ CHADDR
chaddr field (up to 16 bytes link-layer address)
Definition token.h:595
@ YIADDR
yiaddr (IPv4 address)
Definition token.h:598
@ SIADDR
siaddr (IPv4 address)
Definition token.h:599
@ TRANSID
transaction-id (xid)
Definition token.h:603
@ MSGTYPE
message type (not really a field, content of option 53)
Definition token.h:602
void evaluate(Pkt &pkt, ValueStack &values)
Gets a value from the specified packet.
Definition token.cc:530
TokenPkt4(const FieldType type)
Constructor (does nothing)
Definition token.h:607
Token that represents fields of DHCPv6 packet.
Definition token.h:644
TokenPkt6(const FieldType type)
Constructor (does nothing)
Definition token.h:653
void evaluate(Pkt &pkt, ValueStack &values)
Gets a value of the specified packet.
Definition token.cc:609
FieldType
enum value that determines the field.
Definition token.h:647
@ TRANSID
transaction id (integer but manipulated as a string)
Definition token.h:649
@ MSGTYPE
msg type
Definition token.h:648
FieldType getType()
Returns field type.
Definition token.h:671
Token that represents meta data of a DHCP packet.
Definition token.h:541
MetadataType
enum value that determines the field.
Definition token.h:545
@ LEN
length (4 octets)
Definition token.h:549
@ DST
destination (IP address)
Definition token.h:548
@ IFACE
interface name (string)
Definition token.h:546
@ SRC
source (IP address)
Definition token.h:547
MetadataType getType()
Returns metadata type.
Definition token.h:568
void evaluate(Pkt &pkt, ValueStack &values)
Gets a value from the specified packet.
Definition token.cc:479
TokenPkt(const MetadataType type)
Constructor (does nothing)
Definition token.h:553
Represents a sub-option inserted by the DHCPv4 relay.
Definition token.h:467
virtual OptionPtr getOption(Pkt &pkt)
Attempts to obtain specified sub-option of option 82 from the packet.
Definition token.cc:432
TokenRelay4Option(const uint16_t option_code, const RepresentationType &rep_type)
Constructor for extracting sub-option from RAI (option 82)
Definition token.cc:427
Token that represents a value of a field within a DHCPv6 relay encapsulation.
Definition token.h:695
FieldType type_
field to get
Definition token.h:745
void evaluate(Pkt &pkt, ValueStack &values)
Extracts the specified field from the requested relay.
Definition token.cc:649
FieldType
enum value that determines the field.
Definition token.h:699
@ LINKADDR
Link address field (IPv6 address)
Definition token.h:701
@ PEERADDR
Peer address field (IPv6 address)
Definition token.h:700
int8_t nest_level_
Specifies field of the DHCPv6 relay option to get.
Definition token.h:744
FieldType getType()
Returns field type.
Definition token.h:738
TokenRelay6Field(const int8_t nest_level, const FieldType type)
Constructor that takes a nesting level and field type as parameters.
Definition token.h:709
int8_t getNest() const
Returns nest-level.
Definition token.h:728
Token that represents a value of an option within a DHCPv6 relay encapsulation.
Definition token.h:499
int8_t nest_level_
nesting level of the relay block to use
Definition token.h:528
int8_t getNest() const
Returns nest-level.
Definition token.h:518
virtual OptionPtr getOption(Pkt &pkt)
Attempts to obtain specified option from the specified relay block.
Definition token.cc:443
TokenRelay6Option(const int8_t nest_level, const uint16_t option_code, const RepresentationType &rep_type)
Constructor that takes a nesting level and an option code as parameters.
Definition token.h:507
TokenSplit()
Constructor (does nothing)
Definition token.h:832
void evaluate(Pkt &pkt, ValueStack &values)
Extract a field from a delimited string.
Definition token.cc:836
The order where Token subtypes are declared should be:
Definition token.h:114
std::string value_
Constant value.
Definition token.h:128
TokenString(const std::string &str)
Value is set during token construction.
Definition token.h:119
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the constant string on the stack)
Definition token.cc:40
Token that represents sub-options in DHCPv4 and DHCPv6.
Definition token.h:1276
virtual void evaluate(Pkt &pkt, ValueStack &values)
This is a method for evaluating a packet.
Definition token.cc:1351
uint16_t sub_option_code_
Code of the sub-option to be extracted.
Definition token.h:1324
uint16_t getSubCode() const
Returns sub-option-code.
Definition token.h:1313
TokenSubOption(const uint16_t option_code, const uint16_t sub_option_code, const RepresentationType &rep_type)
Constructor that takes an option and sub-option codes as parameter.
Definition token.h:1289
virtual OptionPtr getSubOption(const OptionPtr &parent)
Attempts to retrieve a sub-option.
Definition token.cc:1343
Token that represents the substring operator (returns a portion of the supplied string)
Definition token.h:777
void evaluate(Pkt &pkt, ValueStack &values)
Extract a substring from a string.
Definition token.cc:738
TokenSubstring()
Constructor (does nothing)
Definition token.h:780
Token that converts to hexadecimal string.
Definition token.h:936
TokenToHexString()
Constructor (does nothing)
Definition token.h:939
void evaluate(Pkt &pkt, ValueStack &values)
Convert a binary value to its hexadecimal string representation.
Definition token.cc:982
Token representing a 16 bit unsigned integer as a string.
Definition token.h:335
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding)
Definition token.cc:311
TokenUInt16ToText()
Constructor (does nothing)
Definition token.h:338
Token representing a 32 bit unsigned integer as a string.
Definition token.h:353
TokenUInt32ToText()
Constructor (does nothing)
Definition token.h:356
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding)
Definition token.cc:342
Token representing an 8 bit unsigned integer as a string.
Definition token.h:317
TokenUInt8ToText()
Constructor (does nothing)
Definition token.h:320
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the string on the stack after decoding)
Definition token.cc:281
Token representing a constant upper case string.
Definition token.h:177
void evaluate(Pkt &pkt, ValueStack &values)
Token evaluation (puts value of the evaluated string expression converted to upper case on the stack)
Definition token.cc:109
TokenUpperCase()
Constructor (does nothing)
Definition token.h:180
Token that represents vendor class options in DHCPv4 and DHCPv6.
Definition token.h:1204
TokenVendorClass(Option::Universe u, uint32_t vendor_id, RepresentationType repr)
This constructor is used to access fields.
Definition token.cc:1225
uint16_t getDataIndex() const
Returns data index.
Definition token.cc:1236
uint16_t index_
Data chunk index.
Definition token.h:1257
void evaluate(Pkt &pkt, ValueStack &values)
This is a method for evaluating a packet.
Definition token.cc:1240
Token that represents vendor options in DHCPv4 and DHCPv6.
Definition token.h:1090
Option::Universe universe_
Universe (V4 or V6)
Definition token.h:1175
uint32_t vendor_id_
Enterprise-id value.
Definition token.h:1181
FieldType field_
Specifies which field should be accessed.
Definition token.h:1184
uint32_t getVendorId() const
Returns enterprise-id.
Definition token.cc:1123
TokenVendor(Option::Universe u, uint32_t vendor_id, FieldType field)
Constructor used for accessing a field.
Definition token.cc:1115
virtual OptionPtr getOption(Pkt &pkt)
Attempts to get a suboption.
Definition token.cc:1203
FieldType
Specifies a field of the vendor option.
Definition token.h:1094
@ DATA
data chunk, used in derived vendor-class only
Definition token.h:1098
@ EXISTS
vendor[123].exists
Definition token.h:1097
@ ENTERPRISE_ID
enterprise-id field (vendor-info, vendor-class)
Definition token.h:1096
@ SUBOPTION
If this token fetches a suboption, not a field.
Definition token.h:1095
virtual void evaluate(Pkt &pkt, ValueStack &values)
This is a method for evaluating a packet.
Definition token.cc:1131
FieldType getField() const
Returns field.
Definition token.cc:1127
Base class for all tokens.
Definition token.h:63
virtual void evaluate(Pkt &pkt, ValueStack &values)=0
This is a generic method for evaluating a packet.
virtual ~Token()
Virtual destructor.
Definition token.h:81
static bool toBool(std::string value)
Coverts a (string) value to a boolean.
Definition token.h:90
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
std::string ClientClass
Defines a single class name.
Definition classify.h:42
boost::shared_ptr< Token > TokenPtr
Pointer to a single Token.
Definition token.h:21
boost::shared_ptr< Expression > ExpressionPtr
Definition token.h:31
std::vector< TokenPtr > Expression
This is a structure that holds an expression converted to RPN.
Definition token.h:29
boost::shared_ptr< Option > OptionPtr
Definition option.h:37
std::stack< std::string > ValueStack
Evaluated values are stored as a stack of strings.
Definition token.h:34
Defines the logger used by the top-level component of kea-lfc.