![]() |
Kea 2.7.3
|
Token that represents fields of DHCPv6 packet. More...
#include <token.h>
Public Types | |
enum | FieldType : int { MSGTYPE , TRANSID } |
enum value that determines the field. More... | |
Public Member Functions | |
TokenPkt6 (const FieldType type) | |
Constructor (does nothing) | |
virtual unsigned | evaluate (Pkt &pkt, ValueStack &values) |
Gets a value of the specified packet. | |
FieldType | getType () |
Returns field type. | |
![]() | |
virtual | ~Token () |
Virtual destructor. | |
virtual unsigned | getLabel () const |
Return the label of this token. | |
Additional Inherited Members | |
![]() | |
static bool | toBool (std::string value) |
Coverts a (string) value to a boolean. | |
Token that represents fields of DHCPv6 packet.
For example in the expression pkt6.msgtype == 1 this token represents the message type of the DHCPv6 packet. The integer values are placed on the value stack as 4 byte strings.
Currently supported fields are:
enum isc::dhcp::TokenPkt6::FieldType : int |
|
inline |
|
virtual |
Gets a value of the specified packet.
The evaluation uses fields that are available in the packet. It does not require any values to be present on the stack.
EvalTypeError | when called for a DHCPv4 packet |
pkt | - packet from which to extract the fields |
values | - stack of values, 1 result will be pushed |
Implements isc::dhcp::Token.
Definition at line 641 of file token.cc.
References isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_PKT6, isc::dhcp::eval_logger, isc::eval::EvalContext::fromUint32(), isc_throw, LOG_DEBUG, MSGTYPE, and TRANSID.
|
inline |