Kea
1.9.9-git
|
Token that represents meta data of a DHCP packet. More...
#include <token.h>
Public Types | |
enum | MetadataType { IFACE, SRC, DST, LEN } |
enum value that determines the field. More... | |
Public Member Functions | |
TokenPkt (const MetadataType type) | |
Constructor (does nothing) More... | |
void | evaluate (Pkt &pkt, ValueStack &values) |
Gets a value from the specified packet. More... | |
MetadataType | getType () |
Returns metadata type. More... | |
Public Member Functions inherited from isc::dhcp::Token | |
virtual | ~Token () |
Virtual destructor. More... | |
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. More... | |
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:
|
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 428 of file token.cc.
References DST, isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_PKT, isc::dhcp::eval_logger, isc::dhcp::Pkt::getIface(), isc::dhcp::Pkt::getLocalAddr(), isc::dhcp::Pkt::getRemoteAddr(), IFACE, isc_throw, LEN, LOG_DEBUG, SRC, isc::asiolink::IOAddress::toBytes(), and isc::util::encode::toHex().
|
inline |