Kea
1.9.9-git
|
Token that represents fields of a DHCPv4 packet. More...
#include <token.h>
Public Types | |
enum | FieldType { CHADDR, GIADDR, CIADDR, YIADDR, SIADDR, HLEN, HTYPE, MSGTYPE, TRANSID } |
enum value that determines the field. More... | |
Public Member Functions | |
TokenPkt4 (const FieldType type) | |
Constructor (does nothing) More... | |
void | evaluate (Pkt &pkt, ValueStack &values) |
Gets a value from the specified packet. More... | |
FieldType | getType () |
Returns field 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 fields of a DHCPv4 packet.
For example in the expression pkt4.chaddr == 0x0102030405 this token represents the pkt4.chaddr expression.
Currently supported fields are:
enum value that determines the field.
|
inline |
|
virtual |
Gets a value from the specified packet.
Evaluation uses fields available in the packet. It does not require any values to be present on the stack.
EvalTypeError | when called for DHCPv6 packet |
pkt | - fields will be extracted from here |
values | - stack of values (1 result will be pushed) |
Implements isc::dhcp::Token.
Definition at line 479 of file token.cc.
References CHADDR, CIADDR, isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_PKT4, isc::dhcp::eval_logger, isc::dhcp::Pkt4::getCiaddr(), isc::dhcp::Pkt4::getGiaddr(), isc::dhcp::Pkt4::getHlen(), isc::dhcp::Pkt4::getHtype(), isc::dhcp::Pkt4::getHWAddr(), isc::dhcp::Pkt4::getSiaddr(), isc::dhcp::Pkt::getTransid(), isc::dhcp::Pkt4::getType(), isc::dhcp::Pkt4::getYiaddr(), GIADDR, HLEN, HTYPE, isc_throw, LOG_DEBUG, MSGTYPE, SIADDR, isc::asiolink::IOAddress::toBytes(), isc::util::encode::toHex(), TRANSID, and YIADDR.
|
inline |