Kea  2.3.4-git
client_class_def_parser.h File Reference

Parsers for client class definitions. More...

#include <cc/data.h>
#include <cc/simple_parser.h>
#include <eval/eval_context.h>
#include <dhcpsrv/client_class_def.h>
#include <dhcpsrv/parsers/option_data_parser.h>
#include <functional>
#include <list>
+ Include dependency graph for client_class_def_parser.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  isc::dhcp::ClientClassDefListParser
 Parser for a list of client class definitions. More...
 
class  isc::dhcp::ClientClassDefParser
 Parser for a single client class definition. More...
 
class  isc::dhcp::ExpressionParser
 Parser for a logical expression. More...
 

Namespaces

 isc
 Defines the logger used by the top-level component of kea-lfc.
 
 isc::dhcp
 

Typedefs

typedef boost::shared_ptr< ClientClassDefParserisc::dhcp::ClientClassDefParserPtr
 Defines a pointer to a ClientClassDefParser. More...
 

Detailed Description

Parsers for client class definitions.

These parsers are used to parse lists of client class definitions into a ClientClassDictionary of ClientClassDef instances. Each ClientClassDef consists of (at least) a name, an expression, option-def and option-data. Currently only a not empty name is required.

There parsers defined are:

ClientClassDefListParser - creates a ClientClassDictionary from a list of element maps, where each map contains the entries that specify a single class. The names of the classes in the are expected to be unique. Attempting to define a duplicate class will result in an DhcpConfigError throw. At the end the dictionary is stored by the CfgMgr.

ClientClassDefParser - creates a ClientClassDefinition from an element map. The elements are as follows:

  1. "name" - a string containing the name of the class
  2. "test" - a string containing the logical expression used to determine membership in the class. This is passed into the eval parser.
  3. "option-def" - a list which defines the options which processing is deferred. This element is optional and parsed using the isc::dhcp::OptionDefParser. A check is done to verify definitions are only for deferred processing option (DHCPv4 43 and 224-254).
  4. "option-data" - a list which defines the options that should be assigned to remembers of the class. This element is optional and parsed using the isc::dhcp::OptionDataListParser.

ExpressionParser - creates an eval::Expression from a string element, using the Eval Parser.

Definition in file client_class_def_parser.h.