Kea 2.5.8
d2_config.h File Reference

A collection of classes for housing and parsing the application configuration necessary for the DHCP-DDNS application (aka D2). More...

#include <asiolink/io_service.h>
#include <cc/data.h>
#include <cc/simple_parser.h>
#include <cc/cfg_to_element.h>
#include <cc/user_context.h>
#include <d2srv/d2_tsig_key.h>
#include <dhcpsrv/parsers/dhcp_parsers.h>
#include <exceptions/exceptions.h>
#include <process/d_cfg_mgr.h>
#include <stdint.h>
#include <string>
+ Include dependency graph for d2_config.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  isc::d2::D2CfgError
 Exception thrown when the error during configuration handling occurs. More...
 
class  isc::d2::D2Params
 Acts as a storage vault for D2 global scalar parameters. More...
 
class  isc::d2::DdnsDomain
 Represents a DNS domain that is may be updated dynamically. More...
 
class  isc::d2::DdnsDomainListMgr
 Provides storage for and management of a list of DNS domains. More...
 
class  isc::d2::DdnsDomainListMgrParser
 Parser for DdnsDomainListMgr. More...
 
class  isc::d2::DdnsDomainListParser
 Parser for a list of DdnsDomains. More...
 
class  isc::d2::DdnsDomainParser
 Parser for DdnsDomain. More...
 
class  isc::d2::DnsServerInfo
 Represents a specific DNS Server. More...
 
class  isc::d2::DnsServerInfoListParser
 Parser for a list of DnsServerInfos. More...
 
class  isc::d2::DnsServerInfoParser
 Parser for DnsServerInfo. More...
 
class  isc::d2::DScalarContext
 Storage container for scalar configuration parameters. More...
 
class  isc::d2::TSIGKeyInfo
 Represents a TSIG Key. More...
 
class  isc::d2::TSIGKeyInfoListParser
 Parser for a list of TSIGKeyInfos. More...
 
class  isc::d2::TSIGKeyInfoParser
 Parser for TSIGKeyInfo. More...
 

Namespaces

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

Typedefs

typedef boost::shared_ptr< D2Params > isc::d2::D2ParamsPtr
 Defines a pointer for D2Params instances.
 
typedef std::map< std::string, DdnsDomainPtr > isc::d2::DdnsDomainMap
 Defines a map of DdnsDomains, keyed by the domain name.
 
typedef std::pair< std::string, DdnsDomainPtr > isc::d2::DdnsDomainMapPair
 Defines a iterator pairing domain name and DdnsDomain.
 
typedef boost::shared_ptr< DdnsDomainMap > isc::d2::DdnsDomainMapPtr
 Defines a pointer to DdnsDomain storage containers.
 
typedef boost::shared_ptr< DdnsDomain > isc::d2::DdnsDomainPtr
 Defines a pointer for DdnsDomain instances.
 
typedef boost::shared_ptr< DnsServerInfo > isc::d2::DnsServerInfoPtr
 Defines a pointer for DnsServerInfo instances.
 
typedef std::vector< DnsServerInfoPtr > isc::d2::DnsServerInfoStorage
 Defines a storage container for DnsServerInfo pointers.
 
typedef boost::shared_ptr< DnsServerInfoStorage > isc::d2::DnsServerInfoStoragePtr
 Defines a pointer to DnsServerInfo storage containers.
 
typedef boost::shared_ptr< DScalarContext > isc::d2::DScalarContextPtr
 Defines a pointer for DScalarContext instances.
 
typedef std::map< std::string, TSIGKeyInfoPtr > isc::d2::TSIGKeyInfoMap
 Defines a map of TSIGKeyInfos, keyed by the name.
 
typedef std::pair< std::string, TSIGKeyInfoPtr > isc::d2::TSIGKeyInfoMapPair
 Defines a iterator pairing of name and TSIGKeyInfo.
 
typedef boost::shared_ptr< TSIGKeyInfoMap > isc::d2::TSIGKeyInfoMapPtr
 Defines a pointer to map of TSIGkeyInfos.
 
typedef boost::shared_ptr< TSIGKeyInfo > isc::d2::TSIGKeyInfoPtr
 Defines a pointer for TSIGKeyInfo instances.
 

Functions

std::ostream & isc::d2::operator<< (std::ostream &os, const D2Params &config)
 Dumps the contents of a D2Params as text to an output stream.
 
std::ostream & isc::d2::operator<< (std::ostream &os, const DnsServerInfo &server)
 

Detailed Description

A collection of classes for housing and parsing the application configuration necessary for the DHCP-DDNS application (aka D2).

This file contains the class declarations for the class hierarchy created from the D2 configuration and the parser classes used to create it. The application configuration consists of a set of scalar parameters, a list of TSIG keys, and two managed lists of domains: one list for forward domains and one list for reverse domains.

The key list consists of one or more TSIG keys, each entry described by a name, the algorithm method name, optionally the minimum truncated length, and its secret key component.

Each managed domain list consists of a list one or more domains and is represented by the class DdnsDomainListMgr.

Each domain consists of a set of scalars parameters and a list of DNS servers which support that domain. Among its scalars, is key_name, which is the name of the TSIG Key to use for with this domain. This value should map to one of the TSIG Keys in the key list. Domains are represented by the class, DdnsDomain.

Each server consists of a set of scalars used to describe the server such that the application can carry out DNS update exchanges with it. Servers are represented by the class, DnsServerInfo.

The parsing class hierarchy reflects this same scheme. Working top down:

A DdnsDomainListMgrParser parses a managed domain list entry. It handles any scalars which belong to the manager as well as creating and invoking a DdnsDomainListParser to parse its list of domain entries.

A DdnsDomainListParser creates and invokes a DdnsDomainParser for each domain entry in its list.

A DdnsDomainParser handles the scalars which belong to the domain as well as creating and invoking a DnsSeverInfoListParser to parse its list of server entries.

A DnsServerInfoListParser creates and invokes a DnsServerInfoParser for each server entry in its list.

A DdnsServerInfoParser handles the scalars which belong to the server. The following is sample configuration in JSON form with extra spacing for clarity:

{
"interface" : "eth1" ,
"ip-address" : "192.168.1.33" ,
"port" : 88 ,
"control-socket":
{
"socket-type": "unix" ,
"socket-name": "/tmp/kea-ddns-ctrl-socket"
/ },
"tsig-keys":
/ [
{
"name": "d2_key.tmark.org" ,
"algorithm": "md5" ,
"secret": "0123456989"
}
],
"forward-ddns" :
{
"ddns-domains":
[
{
"name": "tmark.org." ,
"key-name": "d2_key.tmark.org" ,
"dns-servers" :
[
{ "hostname": "fserver.tmark.org" },
{ "hostname": "f2server.tmark.org" }
]
},
{
"name": "pub.tmark.org." ,
"key-name": "d2_key.tmark.org" ,
"dns-servers" :
[
{ "hostname": "f3server.tmark.org" }
]
}
]
},
"reverse-ddns" :
{
"ddns-domains":
[
{
"name": " 0.168.192.in.addr.arpa." ,
"key-name": "d2_key.tmark.org" ,
"dns-servers" :
[
{ "ip-address": "127.0.0.101" , "port": 100 ,
"key-name": "d2_key.tmark.org" }
]
}
]
}
}

Definition in file d2_config.h.