Kea 2.5.8
isc::dhcp::TokenMember Class Reference

Token that represents client class membership. More...

#include <token.h>

+ Inheritance diagram for isc::dhcp::TokenMember:

Public Member Functions

 TokenMember (const std::string &client_class)
 Constructor.
 
void evaluate (Pkt &pkt, ValueStack &values)
 Token evaluation (check if client_class_ was added to packet client classes)
 
const ClientClassgetClientClass () const
 Returns client class name.
 
- Public Member Functions inherited from isc::dhcp::Token
virtual ~Token ()
 Virtual destructor.
 
virtual void evaluate (Pkt &pkt, ValueStack &values)=0
 This is a generic method for evaluating a packet.
 

Protected Attributes

ClientClass client_class_
 The client class name.
 

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.
 

Detailed Description

Token that represents client class membership.

For example "not member('foo')" is the complement of class foo

Definition at line 1044 of file token.h.

Constructor & Destructor Documentation

◆ TokenMember()

isc::dhcp::TokenMember::TokenMember ( const std::string &  client_class)
inline

Constructor.

Parameters
client_classclient class name

Definition at line 1049 of file token.h.

Member Function Documentation

◆ evaluate()

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

Token evaluation (check if client_class_ was added to packet client classes)

Parameters
pktthe class name will be check from this packet's client classes
valuestrue (if found) or false (if not found) will be pushed here

Implements isc::dhcp::Token.

Definition at line 1061 of file token.cc.

References client_class_, isc::dhcp::EVAL_DBG_STACK, isc::dhcp::EVAL_DEBUG_MEMBER, isc::dhcp::eval_logger, isc::dhcp::Pkt::inClass(), and LOG_DEBUG.

+ Here is the call graph for this function:

◆ getClientClass()

const ClientClass & isc::dhcp::TokenMember::getClientClass ( ) const
inline

Returns client class name.

This method is used in testing to determine if the parser had instantiated TokenMember with correct parameters.

Returns
client class name the token expects to check membership.

Definition at line 1066 of file token.h.

References client_class_.

Member Data Documentation

◆ client_class_

ClientClass isc::dhcp::TokenMember::client_class_
protected

The client class name.

Definition at line 1072 of file token.h.

Referenced by evaluate(), and getClientClass().


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