Kea  2.1.7-git
isc::dhcp::TokenIpAddress Class Reference

Token representing an IP address as a constant string. More...

#include <token.h>

+ Inheritance diagram for isc::dhcp::TokenIpAddress:

Public Member Functions

 TokenIpAddress (const std::string &addr)
 Value is set during token construction. More...
 
void evaluate (Pkt &pkt, ValueStack &values)
 Token evaluation (puts value of the constant string on the stack after decoding) More...
 
- Public Member Functions inherited from isc::dhcp::Token
virtual ~Token ()
 Virtual destructor. More...
 

Protected Attributes

std::string value_
 < Constant value (empty string if the IP address cannot be converted) 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...
 

Detailed Description

Token representing an IP address as a constant string.

This token holds the value of an IP address as a constant string, for instance 10.0.0.1 is 0x10000001

Definition at line 191 of file token.h.

Constructor & Destructor Documentation

◆ TokenIpAddress()

TokenIpAddress::TokenIpAddress ( const std::string &  addr)

Value is set during token construction.

Parameters
addrIP address to be represented as a constant string

Definition at line 86 of file token.cc.

References isc::asiolink::IOAddress::toBytes(), and value_.

+ Here is the call graph for this function:

Member Function Documentation

◆ evaluate()

void TokenIpAddress::evaluate ( Pkt pkt,
ValueStack values 
)
virtual

Token evaluation (puts value of the constant string on the stack after decoding)

Parameters
pkt(ignored)
values(represented IP address will be pushed here)

Implements isc::dhcp::Token.

Definition at line 102 of file token.cc.

References isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_IPADDRESS, isc::dhcp::eval_logger, LOG_DEBUG, isc::util::encode::toHex(), and value_.

+ Here is the call graph for this function:

Member Data Documentation

◆ value_

std::string isc::dhcp::TokenIpAddress::value_
protected

< Constant value (empty string if the IP address cannot be converted)

Definition at line 207 of file token.h.

Referenced by evaluate(), and TokenIpAddress().


The documentation for this class was generated from the following files: