Kea 2.7.5
|
Token that represents meta data of a DHCP packet. More...
#include <token.h>
Public Types | |
enum | MetadataType : int { IFACE , SRC , DST , LEN } |
enum value that determines the field. More... | |
Public Member Functions | |
TokenPkt (const MetadataType type) | |
Constructor (does nothing) | |
virtual unsigned | evaluate (Pkt &pkt, ValueStack &values) |
Gets a value from the specified packet. | |
MetadataType | getType () |
Returns metadata type. | |
Public Member Functions inherited from isc::dhcp::Token | |
virtual | ~Token () |
Virtual destructor. | |
virtual unsigned | getLabel () const |
Return the label of this token. | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::dhcp::Token | |
static bool | toBool (std::string value) |
Coverts a (string) value to a boolean. | |
Token that represents meta data of a DHCP packet.
For example in the expression pkt.iface == 'eth0' this token represents the pkt.iface expression.
Currently supported meta datas are:
enum isc::dhcp::TokenPkt::MetadataType : int |
|
inline |
|
virtual |
Gets a value from the specified packet.
Evaluation uses metadata available in the packet. It does not require any values to be present on the stack.
pkt | - metadata will be extracted from here |
values | - stack of values (1 result will be pushed) |
Implements isc::dhcp::Token.
Definition at line 507 of file token.cc.
References DST, isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_PKT, isc::dhcp::eval_logger, isc::eval::EvalContext::fromUint32(), IFACE, isc_throw, LEN, LOG_DEBUG, and SRC.
|
inline |