Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
418
Issues
418
List
Boards
Labels
Service Desk
Milestones
Merge Requests
67
Merge Requests
67
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
13159948
Commit
13159948
authored
Aug 31, 2018
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
#25
,
!14
] UserContext is now in isc::data, deps updated
parent
1c29e58e
Changes
45
Hide whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
65 additions
and
128 deletions
+65
-128
src/bin/agent/Makefile.am
src/bin/agent/Makefile.am
+0
-1
src/bin/agent/tests/Makefile.am
src/bin/agent/tests/Makefile.am
+0
-1
src/bin/d2/Makefile.am
src/bin/d2/Makefile.am
+0
-1
src/bin/d2/d2_config.h
src/bin/d2/d2_config.h
+3
-3
src/bin/d2/tests/Makefile.am
src/bin/d2/tests/Makefile.am
+0
-1
src/bin/dhcp4/Makefile.am
src/bin/dhcp4/Makefile.am
+1
-0
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/ctrl_dhcp4_srv.cc
+2
-1
src/bin/dhcp4/dhcp4_srv.h
src/bin/dhcp4/dhcp4_srv.h
+2
-2
src/bin/dhcp4/main.cc
src/bin/dhcp4/main.cc
+2
-1
src/bin/dhcp4/tests/Makefile.am
src/bin/dhcp4/tests/Makefile.am
+1
-0
src/bin/dhcp6/Makefile.am
src/bin/dhcp6/Makefile.am
+1
-0
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/ctrl_dhcp6_srv.cc
+2
-1
src/bin/dhcp6/dhcp6_srv.h
src/bin/dhcp6/dhcp6_srv.h
+2
-2
src/bin/dhcp6/main.cc
src/bin/dhcp6/main.cc
+4
-2
src/bin/dhcp6/tests/Makefile.am
src/bin/dhcp6/tests/Makefile.am
+1
-0
src/bin/lfc/Makefile.am
src/bin/lfc/Makefile.am
+1
-0
src/bin/lfc/tests/Makefile.am
src/bin/lfc/tests/Makefile.am
+1
-0
src/hooks/dhcp/high_availability/Makefile.am
src/hooks/dhcp/high_availability/Makefile.am
+1
-0
src/hooks/dhcp/high_availability/tests/Makefile.am
src/hooks/dhcp/high_availability/tests/Makefile.am
+1
-0
src/hooks/dhcp/lease_cmds/Makefile.am
src/hooks/dhcp/lease_cmds/Makefile.am
+1
-0
src/hooks/dhcp/lease_cmds/tests/Makefile.am
src/hooks/dhcp/lease_cmds/tests/Makefile.am
+1
-0
src/hooks/dhcp/stat_cmds/tests/Makefile.am
src/hooks/dhcp/stat_cmds/tests/Makefile.am
+1
-0
src/lib/Makefile.am
src/lib/Makefile.am
+1
-2
src/lib/cc/tests/data_file_unittests.cc
src/lib/cc/tests/data_file_unittests.cc
+0
-1
src/lib/cc/tests/user_context_unittests.cc
src/lib/cc/tests/user_context_unittests.cc
+0
-1
src/lib/cc/user_context.cc
src/lib/cc/user_context.cc
+1
-3
src/lib/cc/user_context.h
src/lib/cc/user_context.h
+1
-1
src/lib/dhcp/option_definition.h
src/lib/dhcp/option_definition.h
+1
-1
src/lib/dhcpsrv/Makefile.am
src/lib/dhcpsrv/Makefile.am
+0
-4
src/lib/dhcpsrv/cfg_consistency.h
src/lib/dhcpsrv/cfg_consistency.h
+1
-1
src/lib/dhcpsrv/cfg_duid.h
src/lib/dhcpsrv/cfg_duid.h
+1
-1
src/lib/dhcpsrv/cfg_iface.h
src/lib/dhcpsrv/cfg_iface.h
+1
-1
src/lib/dhcpsrv/cfg_option.h
src/lib/dhcpsrv/cfg_option.h
+1
-1
src/lib/dhcpsrv/client_class_def.h
src/lib/dhcpsrv/client_class_def.h
+1
-1
src/lib/dhcpsrv/d2_client_cfg.h
src/lib/dhcpsrv/d2_client_cfg.h
+1
-1
src/lib/dhcpsrv/host.h
src/lib/dhcpsrv/host.h
+1
-1
src/lib/dhcpsrv/lease.h
src/lib/dhcpsrv/lease.h
+1
-1
src/lib/dhcpsrv/network.h
src/lib/dhcpsrv/network.h
+1
-1
src/lib/dhcpsrv/pool.h
src/lib/dhcpsrv/pool.h
+1
-1
src/lib/dhcpsrv/srv_config.cc
src/lib/dhcpsrv/srv_config.cc
+13
-59
src/lib/dhcpsrv/srv_config.h
src/lib/dhcpsrv/srv_config.h
+2
-27
src/lib/dhcpsrv/subnet.h
src/lib/dhcpsrv/subnet.h
+1
-1
src/lib/dhcpsrv/tests/Makefile.am
src/lib/dhcpsrv/tests/Makefile.am
+3
-2
src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
+2
-0
src/lib/dhcpsrv/tests/srv_config_unittest.cc
src/lib/dhcpsrv/tests/srv_config_unittest.cc
+2
-0
No files found.
src/bin/agent/Makefile.am
View file @
13159948
...
...
@@ -68,7 +68,6 @@ kea_ctrl_agent_SOURCES = main.cc
kea_ctrl_agent_LDADD
=
libagent.la
kea_ctrl_agent_LDADD
+=
$(top_builddir)
/src/lib/cfgrpt/libcfgrpt.la
kea_ctrl_agent_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
kea_ctrl_agent_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
kea_ctrl_agent_LDADD
+=
$(top_builddir)
/src/lib/eval/libkea-eval.la
kea_ctrl_agent_LDADD
+=
$(top_builddir)
/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
kea_ctrl_agent_LDADD
+=
$(top_builddir)
/src/lib/stats/libkea-stats.la
...
...
src/bin/agent/tests/Makefile.am
View file @
13159948
...
...
@@ -61,7 +61,6 @@ ca_unittests_LDADD = $(top_builddir)/src/bin/agent/libagent.la
ca_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/testutils/libprocesstest.la
ca_unittests_LDADD
+=
$(top_builddir)
/src/lib/cfgrpt/libcfgrpt.la
ca_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
ca_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
ca_unittests_LDADD
+=
$(top_builddir)
/src/lib/eval/libkea-eval.la
ca_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
ca_unittests_LDADD
+=
$(top_builddir)
/src/lib/stats/libkea-stats.la
...
...
src/bin/d2/Makefile.am
View file @
13159948
...
...
@@ -89,7 +89,6 @@ kea_dhcp_ddns_SOURCES = main.cc
kea_dhcp_ddns_LDADD
=
libd2.la
kea_dhcp_ddns_LDADD
+=
$(top_builddir)
/src/lib/cfgrpt/libcfgrpt.la
kea_dhcp_ddns_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
kea_dhcp_ddns_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
kea_dhcp_ddns_LDADD
+=
$(top_builddir)
/src/lib/eval/libkea-eval.la
kea_dhcp_ddns_LDADD
+=
$(top_builddir)
/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
kea_dhcp_ddns_LDADD
+=
$(top_builddir)
/src/lib/asiodns/libkea-asiodns.la
...
...
src/bin/d2/d2_config.h
View file @
13159948
...
...
@@ -257,7 +257,7 @@ typedef boost::shared_ptr<D2Params> D2ParamsPtr;
/// instance of the actual key (@ref isc::dns::TSIGKey) that can be used
/// by the IO layer for signing and verifying messages.
///
class
TSIGKeyInfo
:
public
isc
::
d
hcp
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
TSIGKeyInfo
:
public
isc
::
d
ata
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
/// @brief Defines string values for the supported TSIG algorithms
//@{
...
...
@@ -412,7 +412,7 @@ typedef boost::shared_ptr<TSIGKeyInfoMap> TSIGKeyInfoMapPtr;
/// belongs to a list of servers supporting DNS for a given domain. It will
/// be used to establish communications with the server to carry out DNS
/// updates.
class
DnsServerInfo
:
public
isc
::
d
hcp
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
DnsServerInfo
:
public
isc
::
d
ata
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
/// @brief defines DNS standard port value
static
const
uint32_t
STANDARD_DNS_PORT
=
53
;
...
...
@@ -522,7 +522,7 @@ typedef boost::shared_ptr<DnsServerInfoStorage> DnsServerInfoStoragePtr;
/// @todo Currently the name entry for a domain is just an std::string. It
/// may be worthwhile to change this to a dns::Name for purposes of better
/// validation and matching capabilities.
class
DdnsDomain
:
public
isc
::
d
hcp
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
DdnsDomain
:
public
isc
::
d
ata
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
/// @brief Constructor
///
...
...
src/bin/d2/tests/Makefile.am
View file @
13159948
...
...
@@ -76,7 +76,6 @@ d2_unittests_LDADD = $(top_builddir)/src/bin/d2/libd2.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/testutils/libprocesstest.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/cfgrpt/libcfgrpt.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/testutils/libdhcpsrvtest.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
d2_unittests_LDADD
+=
$(top_builddir)
/src/lib/testutils/libkea-testutils.la
...
...
src/bin/dhcp4/Makefile.am
View file @
13159948
...
...
@@ -94,6 +94,7 @@ kea_dhcp4_LDADD += $(top_builddir)/src/lib/database/libkea-database.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/asiolink/libkea-asiolink.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/cc/libkea-cc.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/dns/libkea-dns++.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/cryptolink/libkea-cryptolink.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
kea_dhcp4_LDADD
+=
$(top_builddir)
/src/lib/log/libkea-log.la
...
...
src/bin/dhcp4/ctrl_dhcp4_srv.cc
View file @
13159948
...
...
@@ -276,7 +276,8 @@ ControlledDhcpv4Srv::commandConfigWriteHandler(const string&,
// Ok, it's time to write the file.
size_t
size
=
0
;
try
{
size
=
writeConfigFile
(
filename
);
ConstElementPtr
cfg
=
CfgMgr
::
instance
().
getCurrentCfg
()
->
toElement
();
size
=
writeConfigFile
(
filename
,
cfg
);
}
catch
(
const
isc
::
Exception
&
ex
)
{
return
(
createAnswer
(
CONTROL_RESULT_ERROR
,
string
(
"Error during write-config:"
)
+
ex
.
what
()));
...
...
src/bin/dhcp4/dhcp4_srv.h
View file @
13159948
...
...
@@ -22,7 +22,7 @@
#include <dhcpsrv/network_state.h>
#include <dhcpsrv/subnet.h>
#include <hooks/callout_handle.h>
#include <
dhcpsrv
/daemon.h>
#include <
process
/daemon.h>
#include <boost/noncopyable.hpp>
...
...
@@ -191,7 +191,7 @@ typedef boost::shared_ptr<Dhcpv4Exchange> Dhcpv4ExchangePtr;
/// This class does not support any controlling mechanisms directly.
/// See the derived \ref ControlledDhcpv4Srv class for support for
/// command and configuration updates over msgq.
class
Dhcpv4Srv
:
public
Daemon
{
class
Dhcpv4Srv
:
public
process
::
Daemon
{
private:
/// @brief Pointer to IO service used by the server.
...
...
src/bin/dhcp4/main.cc
View file @
13159948
...
...
@@ -22,6 +22,7 @@
using
namespace
isc
::
data
;
using
namespace
isc
::
dhcp
;
using
namespace
isc
::
process
;
using
namespace
std
;
/// This file contains entry point (main() function) for standard DHCPv4 server
...
...
@@ -228,7 +229,7 @@ main(int argc, char* argv[]) {
LOG_INFO
(
dhcp4_logger
,
DHCP4_SHUTDOWN
);
}
catch
(
const
isc
::
dhcp
::
DaemonPIDExists
&
ex
)
{
}
catch
(
const
isc
::
process
::
DaemonPIDExists
&
ex
)
{
// First, we print the error on stderr (that should always work)
cerr
<<
DHCP4_NAME
<<
" already running? "
<<
ex
.
what
()
<<
endl
;
...
...
src/bin/dhcp4/tests/Makefile.am
View file @
13159948
...
...
@@ -149,6 +149,7 @@ dhcp4_unittests_LDADD += $(top_builddir)/src/lib/database/libkea-database.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/asiolink/libkea-asiolink.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/cc/libkea-cc.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/dns/libkea-dns++.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/cryptolink/libkea-cryptolink.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
dhcp4_unittests_LDADD
+=
$(top_builddir)
/src/lib/database/libkea-database.la
...
...
src/bin/dhcp6/Makefile.am
View file @
13159948
...
...
@@ -95,6 +95,7 @@ kea_dhcp6_LDADD += $(top_builddir)/src/lib/database/libkea-database.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/asiolink/libkea-asiolink.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/cc/libkea-cc.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/dns/libkea-dns++.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/cryptolink/libkea-cryptolink.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
kea_dhcp6_LDADD
+=
$(top_builddir)
/src/lib/log/libkea-log.la
...
...
src/bin/dhcp6/ctrl_dhcp6_srv.cc
View file @
13159948
...
...
@@ -278,7 +278,8 @@ ControlledDhcpv6Srv::commandConfigWriteHandler(const string&, ConstElementPtr ar
// Ok, it's time to write the file.
size_t
size
=
0
;
try
{
size
=
writeConfigFile
(
filename
);
ConstElementPtr
cfg
=
CfgMgr
::
instance
().
getCurrentCfg
()
->
toElement
();
size
=
writeConfigFile
(
filename
,
cfg
);
}
catch
(
const
isc
::
Exception
&
ex
)
{
return
(
createAnswer
(
CONTROL_RESULT_ERROR
,
string
(
"Error during write-config:"
)
+
ex
.
what
()));
...
...
src/bin/dhcp6/dhcp6_srv.h
View file @
13159948
...
...
@@ -23,7 +23,7 @@
#include <dhcpsrv/network_state.h>
#include <dhcpsrv/subnet.h>
#include <hooks/callout_handle.h>
#include <
dhcpsrv
/daemon.h>
#include <
process
/daemon.h>
#include <functional>
#include <iostream>
...
...
@@ -56,7 +56,7 @@ public:
/// that is going to be used as server-identifier, receives incoming
/// packets, processes them, manages leases assignment and generates
/// appropriate responses.
class
Dhcpv6Srv
:
public
Daemon
{
class
Dhcpv6Srv
:
public
process
::
Daemon
{
private:
/// @brief Pointer to IO service used by the server.
...
...
src/bin/dhcp6/main.cc
View file @
13159948
...
...
@@ -15,6 +15,7 @@
#include <log/logger_manager.h>
#include <exceptions/exceptions.h>
#include <cfgrpt/config_report.h>
#include <process/daemon.h>
#include <boost/lexical_cast.hpp>
...
...
@@ -22,6 +23,7 @@
using
namespace
isc
::
data
;
using
namespace
isc
::
dhcp
;
using
namespace
isc
::
process
;
using
namespace
std
;
/// This file contains entry point (main() function) for standard DHCPv6 server
...
...
@@ -136,7 +138,7 @@ main(int argc, char* argv[]) {
// This is just a test, so we don't care about lockfile.
setenv
(
"KEA_LOCKFILE_DIR"
,
"none"
,
0
);
CfgMgr
::
instance
().
setDefaultLoggerName
(
DHCP6_ROOT_LOGGER_NAME
);
Daemon
::
loggerInit
(
DHCP6_ROOT_LOGGER_NAME
,
verbose_mode
);
isc
::
process
::
Daemon
::
loggerInit
(
DHCP6_ROOT_LOGGER_NAME
,
verbose_mode
);
// Check the syntax first.
Parser6Context
parser
;
...
...
@@ -236,7 +238,7 @@ main(int argc, char* argv[]) {
LOG_INFO
(
dhcp6_logger
,
DHCP6_SHUTDOWN
);
}
catch
(
const
isc
::
dhcp
::
DaemonPIDExists
&
ex
)
{
}
catch
(
const
isc
::
process
::
DaemonPIDExists
&
ex
)
{
// First, we print the error on stderr (that should always work)
cerr
<<
DHCP6_NAME
<<
" already running? "
<<
ex
.
what
()
<<
endl
;
...
...
src/bin/dhcp6/tests/Makefile.am
View file @
13159948
...
...
@@ -129,6 +129,7 @@ dhcp6_unittests_LDADD += $(top_builddir)/src/lib/testutils/libkea-testutils.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/stats/libkea-stats.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/config/libkea-cfgclient.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp/libkea-dhcp++.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
dhcp6_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp/tests/libdhcptest.la
if
HAVE_MYSQL
...
...
src/bin/lfc/Makefile.am
View file @
13159948
...
...
@@ -56,6 +56,7 @@ kea_lfc_LDADD = liblfc.la
kea_lfc_LDADD
+=
$(top_builddir)
/src/lib/cfgrpt/libcfgrpt.la
kea_lfc_LDADD
+=
$(top_builddir)
/src/lib/eval/libkea-eval.la
kea_lfc_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
kea_lfc_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
kea_lfc_LDADD
+=
$(top_builddir)
/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
kea_lfc_LDADD
+=
$(top_builddir)
/src/lib/stats/libkea-stats.la
kea_lfc_LDADD
+=
$(top_builddir)
/src/lib/config/libkea-cfgclient.la
...
...
src/bin/lfc/tests/Makefile.am
View file @
13159948
...
...
@@ -57,6 +57,7 @@ lfc_unittests_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
lfc_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
lfc_unittests_LDADD
+=
$(top_builddir)
/src/lib/eval/libkea-eval.la
lfc_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
lfc_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
lfc_unittests_LDADD
+=
$(top_builddir)
/src/lib/stats/libkea-stats.la
lfc_unittests_LDADD
+=
$(top_builddir)
/src/lib/config/libkea-cfgclient.la
lfc_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp/libkea-dhcp++.la
...
...
src/hooks/dhcp/high_availability/Makefile.am
View file @
13159948
...
...
@@ -53,6 +53,7 @@ libdhcp_ha_la_LDFLAGS += -avoid-version -export-dynamic -module
libdhcp_ha_la_LIBADD
=
libha.la
libdhcp_ha_la_LIBADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
libdhcp_ha_la_LIBADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
libdhcp_ha_la_LIBADD
+=
$(top_builddir)
/src/lib/eval/libkea-eval.la
libdhcp_ha_la_LIBADD
+=
$(top_builddir)
/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
libdhcp_ha_la_LIBADD
+=
$(top_builddir)
/src/lib/stats/libkea-stats.la
...
...
src/hooks/dhcp/high_availability/tests/Makefile.am
View file @
13159948
...
...
@@ -41,6 +41,7 @@ ha_unittests_CXXFLAGS = $(AM_CXXFLAGS)
ha_unittests_LDADD
=
$(top_builddir)
/src/hooks/dhcp/high_availability/libha.la
ha_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
ha_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
ha_unittests_LDADD
+=
$(top_builddir)
/src/lib/eval/libkea-eval.la
ha_unittests_LDADD
+=
$(top_builddir)
/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
ha_unittests_LDADD
+=
$(top_builddir)
/src/lib/stats/libkea-stats.la
...
...
src/hooks/dhcp/lease_cmds/Makefile.am
View file @
13159948
...
...
@@ -45,6 +45,7 @@ libdhcp_lease_cmds_la_LDFLAGS = $(AM_LDFLAGS)
libdhcp_lease_cmds_la_LDFLAGS
+=
-avoid-version
-export-dynamic
-module
libdhcp_lease_cmds_la_LIBADD
=
liblease_cmds.la
libdhcp_lease_cmds_la_LIBADD
+=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
libdhcp_lease_cmds_la_LIBADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
libdhcp_lease_cmds_la_LIBADD
+=
$(top_builddir)
/src/lib/config/libkea-cfgclient.la
libdhcp_lease_cmds_la_LIBADD
+=
$(top_builddir)
/src/lib/cc/libkea-cc.la
libdhcp_lease_cmds_la_LIBADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
...
...
src/hooks/dhcp/lease_cmds/tests/Makefile.am
View file @
13159948
...
...
@@ -35,6 +35,7 @@ lease_cmds_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
lease_cmds_unittests_CXXFLAGS
=
$(AM_CXXFLAGS)
lease_cmds_unittests_LDADD
=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
lease_cmds_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
lease_cmds_unittests_LDADD
+=
$(top_builddir)
/src/lib/config/libkea-cfgclient.la
lease_cmds_unittests_LDADD
+=
$(top_builddir)
/src/lib/cc/libkea-cc.la
lease_cmds_unittests_LDADD
+=
$(top_builddir)
/src/lib/hooks/libkea-hooks.la
...
...
src/hooks/dhcp/stat_cmds/tests/Makefile.am
View file @
13159948
...
...
@@ -35,6 +35,7 @@ stat_cmds_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
stat_cmds_unittests_CXXFLAGS
=
$(AM_CXXFLAGS)
stat_cmds_unittests_LDADD
=
$(top_builddir)
/src/lib/dhcpsrv/libkea-dhcpsrv.la
stat_cmds_unittests_LDADD
+=
$(top_builddir)
/src/lib/process/libkea-process.la
stat_cmds_unittests_LDADD
+=
$(top_builddir)
/src/lib/config/libkea-cfgclient.la
stat_cmds_unittests_LDADD
+=
$(top_builddir)
/src/lib/asiolink/libkea-asiolink.la
stat_cmds_unittests_LDADD
+=
$(top_builddir)
/src/lib/dns/libkea-dns++.la
...
...
src/lib/Makefile.am
View file @
13159948
...
...
@@ -14,5 +14,4 @@ SUBDIRS += cql
endif
SUBDIRS
+=
testutils hooks dhcp config stats asiodns dhcp_ddns
eval
\
dhcpsrv cfgrpt
\
process http
cfgrpt process dhcpsrv process http
src/lib/cc/tests/data_file_unittests.cc
View file @
13159948
...
...
@@ -6,7 +6,6 @@
#include <config.h>
#include <exceptions/exceptions.h>
#include <dhcpsrv/daemon.h>
#include <gtest/gtest.h>
#include <cc/data.h>
#include <fstream>
...
...
src/lib/cc/tests/user_context_unittests.cc
View file @
13159948
...
...
@@ -9,7 +9,6 @@
#include <gtest/gtest.h>
using
namespace
isc
::
data
;
using
namespace
isc
::
dhcp
;
namespace
{
...
...
src/lib/cc/user_context.cc
View file @
13159948
...
...
@@ -5,13 +5,11 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
#include <cc/user_context.h>
using
namespace
isc
::
data
;
namespace
isc
{
namespace
d
hcp
{
namespace
d
ata
{
void
UserContext
::
contextToElement
(
ElementPtr
map
)
const
{
...
...
src/lib/cc/user_context.h
View file @
13159948
...
...
@@ -11,7 +11,7 @@
#include <boost/shared_ptr.hpp>
namespace
isc
{
namespace
d
hcp
{
namespace
d
ata
{
/// @brief Base class for user context
///
...
...
src/lib/dhcp/option_definition.h
View file @
13159948
...
...
@@ -732,7 +732,7 @@ private:
/// Collection of data fields within the record.
RecordFieldsCollection
record_fields_
;
/// User context
UserContext
user_context_
;
data
::
UserContext
user_context_
;
};
...
...
src/lib/dhcpsrv/Makefile.am
View file @
13159948
...
...
@@ -132,8 +132,6 @@ libkea_dhcpsrv_la_SOURCES += lease_file_loader.h
libkea_dhcpsrv_la_SOURCES
+=
lease_file_stats.h
libkea_dhcpsrv_la_SOURCES
+=
lease_mgr.cc lease_mgr.h
libkea_dhcpsrv_la_SOURCES
+=
lease_mgr_factory.cc lease_mgr_factory.h
libkea_dhcpsrv_la_SOURCES
+=
logging.cc logging.h
libkea_dhcpsrv_la_SOURCES
+=
logging_info.cc logging_info.h
libkea_dhcpsrv_la_SOURCES
+=
memfile_lease_mgr.cc memfile_lease_mgr.h
libkea_dhcpsrv_la_SOURCES
+=
memfile_lease_storage.h
...
...
@@ -298,8 +296,6 @@ libkea_dhcpsrv_include_HEADERS = \
lease_file_stats.h
\
lease_mgr.h
\
lease_mgr_factory.h
\
logging.h
\
logging_info.h
\
memfile_lease_mgr.h
\
memfile_lease_storage.h
\
ncr_generator.h
\
...
...
src/lib/dhcpsrv/cfg_consistency.h
View file @
13159948
...
...
@@ -16,7 +16,7 @@ namespace dhcp {
/// @brief Parameters for various consistency checks.
///
class
CfgConsistency
:
public
isc
::
d
hcp
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
CfgConsistency
:
public
isc
::
d
ata
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
...
...
src/lib/dhcpsrv/cfg_duid.h
View file @
13159948
...
...
@@ -27,7 +27,7 @@ namespace dhcp {
/// generate. It also allows for overriding entire default DUID or parts of
/// it via configuration file. This class holds the DUID configuration
/// specified in the server configuration file.
class
CfgDUID
:
public
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
CfgDUID
:
public
data
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
/// @brief Constructor.
...
...
src/lib/dhcpsrv/cfg_iface.h
View file @
13159948
...
...
@@ -127,7 +127,7 @@ public:
/// to which it is bound. It is allowed to select multiple addresses on the
/// particular interface explicitly, e.g. "eth0/192.168.8.1",
/// "eth0/192.168.8.2".
class
CfgIface
:
public
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
CfgIface
:
public
isc
::
data
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
/// @brief Socket type used by the DHCPv4 server.
...
...
src/lib/dhcpsrv/cfg_option.h
View file @
13159948
...
...
@@ -31,7 +31,7 @@ namespace dhcp {
/// for this option. This information comprises whether this option is sent
/// to DHCP client only on request (persistent = false) or always
/// (persistent = true).
class
OptionDescriptor
:
public
UserContext
{
class
OptionDescriptor
:
public
data
::
UserContext
{
public:
/// @brief Option instance.
OptionPtr
option_
;
...
...
src/lib/dhcpsrv/client_class_def.h
View file @
13159948
...
...
@@ -42,7 +42,7 @@ public:
};
/// @brief Embodies a single client class definition
class
ClientClassDef
:
public
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
ClientClassDef
:
public
data
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
/// @brief Constructor
///
...
...
src/lib/dhcpsrv/d2_client_cfg.h
View file @
13159948
...
...
@@ -50,7 +50,7 @@ public:
/// parameters associated with DHCP-DDNS and acting as a client of D2.
/// Instances of this class may be constructed through configuration parsing.
///
class
D2ClientConfig
:
public
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
D2ClientConfig
:
public
data
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
/// @brief Default configuration constants.
static
const
char
*
DFT_SERVER_IP
;
...
...
src/lib/dhcpsrv/host.h
View file @
13159948
...
...
@@ -239,7 +239,7 @@ typedef std::pair<IPv6ResrvIterator, IPv6ResrvIterator> IPv6ResrvRange;
/// - disable IPv4 reservation without a need to set it to the 0.0.0.0 address
/// Note that the last three operations are mainly required for managing
/// host reservations which will be implemented later.
class
Host
:
public
UserContext
{
class
Host
:
public
data
::
UserContext
{
public:
/// @brief Type of the host identifier.
...
...
src/lib/dhcpsrv/lease.h
View file @
13159948
...
...
@@ -32,7 +32,7 @@ typedef boost::shared_ptr<Lease> LeasePtr;
///
/// This structure holds all information that is common between IPv4 and IPv6
/// leases.
struct
Lease
:
public
UserContext
,
public
isc
::
data
::
CfgToElement
{
struct
Lease
:
public
isc
::
data
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
/// @brief Type of lease or pool
typedef
enum
{
...
...
src/lib/dhcpsrv/network.h
View file @
13159948
...
...
@@ -45,7 +45,7 @@ typedef std::vector<isc::asiolink::IOAddress> IOAddressList;
/// class provides an abstract interface that must be implemented by derived
/// classes and, where appropriate, implements common methods used by the
/// derived classes.
class
Network
:
public
virtual
UserContext
,
public
data
::
CfgToElement
{
class
Network
:
public
virtual
isc
::
data
::
UserContext
,
public
isc
::
data
::
CfgToElement
{
public:
/// @brief Holds optional information about relay.
///
...
...
src/lib/dhcpsrv/pool.h
View file @
13159948
...
...
@@ -26,7 +26,7 @@ namespace dhcp {
///
/// Stores information about pool of IPv4 or IPv6 addresses.
/// That is a basic component of a configuration.
class
Pool
:
public
UserContext
{
class
Pool
:
public
isc
::
data
::
UserContext
{
public:
/// @note:
...
...
src/lib/dhcpsrv/srv_config.cc
View file @
13159948
...
...
@@ -9,6 +9,7 @@
#include <dhcpsrv/srv_config.h>
#include <dhcpsrv/lease_mgr_factory.h>
#include <dhcpsrv/cfg_hosts_util.h>
#include <process/logging_info.h>
#include <log/logger_manager.h>
#include <log/logger_specification.h>
#include <dhcp/pkt.h> // Needed for HWADDR_SOURCE_*
...
...
@@ -17,6 +18,7 @@
using
namespace
isc
::
log
;
using
namespace
isc
::
data
;
using
namespace
isc
::
process
;
namespace
isc
{
namespace
dhcp
{
...
...
@@ -105,12 +107,8 @@ SrvConfig::sequenceEquals(const SrvConfig& other) {
void
SrvConfig
::
copy
(
SrvConfig
&
new_config
)
const
{
// We will entirely replace loggers in the new configuration.
new_config
.
logging_info_
.
clear
();
for
(
LoggingInfoStorage
::
const_iterator
it
=
logging_info_
.
begin
();
it
!=
logging_info_
.
end
();
++
it
)
{
new_config
.
addLoggingInfo
(
*
it
);
}
ConfigBase
::
copy
(
new_config
);
// Replace interface configuration.
new_config
.
cfg_iface_
.
reset
(
new
CfgIface
(
*
cfg_iface_
));
// Replace option definitions.
...
...
@@ -130,44 +128,13 @@ SrvConfig::copy(SrvConfig& new_config) const {
}
}
void
SrvConfig
::
applyLoggingCfg
()
const
{
std
::
list
<
LoggerSpecification
>
specs
;
for
(
LoggingInfoStorage
::
const_iterator
it
=
logging_info_
.
begin
();
it
!=
logging_info_
.
end
();
++
it
)
{
specs
.
push_back
(
it
->
toSpec
());
}
LoggerManager
manager
;
manager
.
process
(
specs
.
begin
(),
specs
.
end
());
}
bool
SrvConfig
::
equals
(
const
SrvConfig
&
other
)
const
{
// If number of loggers is different, then configurations aren't equal.
if
(
logging_info_
.
size
()
!=
other
.
logging_info_
.
size
(
))
{
if
(
!
ConfigBase
::
equals
(
other
))
{
return
(
false
);
}
// Pass through all loggers and try to find the match for each of them
// with the loggers from the other configuration. The order doesn't
// matter so we can't simply compare the vectors.
for
(
LoggingInfoStorage
::
const_iterator
this_it
=
logging_info_
.
begin
();
this_it
!=
logging_info_
.
end
();
++
this_it
)
{
bool
match
=
false
;
for
(
LoggingInfoStorage
::
const_iterator
other_it
=
other
.
logging_info_
.
begin
();
other_it
!=
other
.
logging_info_
.
end
();
++
other_it
)
{
if
(
this_it
->
equals
(
*
other_it
))
{
match
=
true
;
break
;
}
}
// No match found for the particular logger so return false.
if
(
!
match
)
{
return
(
false
);
}
}
// Logging information is equal between objects, so check other values.
if
((
*
cfg_iface_
!=
*
other
.
cfg_iface_
)
||
(
*
cfg_option_def_
!=
*
other
.
cfg_option_def_
)
||
...
...
@@ -210,7 +177,7 @@ SrvConfig::updateStatistics() {
}
}
void
void
SrvConfig
::
extractConfiguredGlobals
(
isc
::
data
::
ConstElementPtr
config
)
{
if
(
config
->
getType
()
!=
Element
::
map
)
{
isc_throw
(
BadValue
,
"extractConfiguredGlobals must be given a map element"
);
...
...
@@ -227,15 +194,16 @@ SrvConfig::extractConfiguredGlobals(isc::data::ConstElementPtr config) {
ElementPtr
SrvConfig
::
toElement
()
const
{
// Toplevel map
ElementPtr
result
=
ConfigBase
::
toElement
();
// Get family for the configuration manager
uint16_t
family
=
CfgMgr
::
instance
().
getFamily
();
// Toplevel map
ElementPtr
result
=
Element
::
createMap
();
// DhcpX global map
ElementPtr
dhcp
=
Element
::
createMap
();
// Add in explicitly configured globals.
dhcp
->
setValue
(
configured_globals_
->
mapValue
());
dhcp
->
setValue
(
configured_globals_
->
mapValue
());
// Set user-context
contextToElement
(
dhcp
);
...
...
@@ -342,7 +310,7 @@ SrvConfig::toElement() const {
}
}
// Host reservations
// Host reservations
CfgHostsList
resv_list
;
resv_list
.
internalize
(
cfg_hosts_
->
toElement
());
...
...
@@ -411,20 +379,6 @@ SrvConfig::toElement() const {
// Set DhcpX
result
->
set
(
family
==
AF_INET
?
"Dhcp4"
:
"Dhcp6"
,
dhcp
);
// Logging global map (skip if empty)
if
(
!
logging_info_
.
empty
())
{
ElementPtr
logging
=
Element
::
createMap
();
// Set loggers list
ElementPtr
loggers
=
Element
::
createList
();
for
(
LoggingInfoStorage
::
const_iterator
logger
=
logging_info_
.
cbegin
();
logger
!=
logging_info_
.
cend
();
++
logger
)
{
loggers
->
add
(
logger
->
toElement
());
}
logging
->
set
(
"loggers"
,
loggers
);
result
->
set
(
"Logging"
,
logging
);
}
ConstElementPtr
cfg_consist
=
cfg_consist_
->
toElement
();
dhcp
->
set
(
"sanity-checks"
,
cfg_consist
);
...
...
src/lib/dhcpsrv/srv_config.h
View file @
13159948
...
...
@@ -24,7 +24,7 @@
#include <dhcpsrv/cfg_consistency.h>
#include <dhcpsrv/client_class_def.h>
#include <dhcpsrv/d2_client_cfg.h>
#include <
dhcpsrv/logging_info
.h>
#include <
process/config_base
.h>
#include <hooks/hooks_config.h>
#include <cc/data.h>
#include <cc/user_context.h>
...
...
@@ -41,7 +41,7 @@ class CfgMgr;
/// @brief Specifies current DHCP configuration
///
/// @todo Migrate all other configuration parameters from cfgmgr.h here
class
SrvConfig
:
public
UserContext
,
public
isc
::
data
::
CfgToElement
{
class
SrvConfig
:
public
process
::
ConfigBase
{
public:
/// @name Constants for selection of parameters returned by @c getConfigSummary
///
...
...
@@ -117,25 +117,6 @@ public:
/// @return true if sequence numbers are equal.
bool
sequenceEquals
(
const
SrvConfig
&
other
);
/// @name Modifiers and accesors for the configuration objects.
///
/// @warning References to the objects returned by accessors are only
/// valid during the lifetime of the @c SrvConfig object which
/// returned them.
///
//@{
/// @brief Returns logging specific configuration.
const
LoggingInfoStorage
&
getLoggingInfo
()
const
{
return
(
logging_info_
);
}
/// @brief Sets logging specific configuration.
///
/// @param logging_info New logging configuration.
void
addLoggingInfo
(
const
LoggingInfo
&
logging_info
)
{
logging_info_
.
push_back
(
logging_info
);
}
/// @brief Returns non-const pointer to interface configuration.
///
/// This function returns a non-const pointer to the interface
...
...
@@ -427,9 +408,6 @@ public:
/// be copied.
void
copy
(
SrvConfig
&
new_config
)
const
;
/// @brief Apply logging configuration to log4cplus.
void
applyLoggingCfg
()
const
;