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
426
Issues
426
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
393e456b
Commit
393e456b
authored
Aug 05, 2014
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[3417] Bind10 => Kea in many .cc/.h files
parent
3fe98e57
Changes
47
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
94 additions
and
95 deletions
+94
-95
src/bin/d2/bundy_d2_controller.cc
src/bin/d2/bundy_d2_controller.cc
+4
-4
src/bin/d2/bundy_d2_controller.h
src/bin/d2/bundy_d2_controller.h
+1
-1
src/bin/d2/d2_config.h
src/bin/d2/d2_config.h
+1
-1
src/bin/d2/d2_messages.mes
src/bin/d2/d2_messages.mes
+1
-1
src/bin/d2/d2_process.cc
src/bin/d2/d2_process.cc
+1
-1
src/bin/d2/main.cc
src/bin/d2/main.cc
+1
-1
src/bin/d2/tests/bundy_d2_controller_unittests.cc
src/bin/d2/tests/bundy_d2_controller_unittests.cc
+2
-2
src/bin/d2/tests/d2_cfg_mgr_unittests.cc
src/bin/d2/tests/d2_cfg_mgr_unittests.cc
+1
-1
src/bin/d2/tests/d_test_stubs.h
src/bin/d2/tests/d_test_stubs.h
+2
-2
src/bin/dhcp4/main.cc
src/bin/dhcp4/main.cc
+1
-1
src/bin/dhcp4/tests/callout_library_common.h
src/bin/dhcp4/tests/callout_library_common.h
+1
-1
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp4/tests/config_parser_unittest.cc
+1
-2
src/bin/dhcp4/tests/kea_controller_unittest.cc
src/bin/dhcp4/tests/kea_controller_unittest.cc
+1
-1
src/bin/dhcp6/main.cc
src/bin/dhcp6/main.cc
+5
-5
src/bin/dhcp6/tests/callout_library_common.h
src/bin/dhcp6/tests/callout_library_common.h
+1
-1
src/hooks/dhcp/user_chk/version.cc
src/hooks/dhcp/user_chk/version.cc
+1
-1
src/lib/asiodns/tests/dns_server_unittest.cc
src/lib/asiodns/tests/dns_server_unittest.cc
+2
-2
src/lib/cc/proto_defs.h
src/lib/cc/proto_defs.h
+2
-2
src/lib/cc/session.cc
src/lib/cc/session.cc
+2
-2
src/lib/cc/session_config.h.pre.in
src/lib/cc/session_config.h.pre.in
+1
-1
src/lib/cc/tests/session_unittests.cc
src/lib/cc/tests/session_unittests.cc
+11
-11
src/lib/cc/tests/session_unittests_config.h.in
src/lib/cc/tests/session_unittests_config.h.in
+1
-1
src/lib/dhcp/tests/iface_mgr_unittest.cc
src/lib/dhcp/tests/iface_mgr_unittest.cc
+1
-1
src/lib/dhcpsrv/addr_utilities.h
src/lib/dhcpsrv/addr_utilities.h
+1
-1
src/lib/dhcpsrv/csv_lease_file4.h
src/lib/dhcpsrv/csv_lease_file4.h
+2
-2
src/lib/dhcpsrv/csv_lease_file6.h
src/lib/dhcpsrv/csv_lease_file6.h
+2
-2
src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/memfile_lease_mgr.h
+2
-2
src/lib/dhcpsrv/tests/callout_library.cc
src/lib/dhcpsrv/tests/callout_library.cc
+1
-1
src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
+1
-1
src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc
src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc
+1
-1
src/lib/dhcpsrv/tests/dbaccess_parser_unittest.cc
src/lib/dhcpsrv/tests/dbaccess_parser_unittest.cc
+2
-2
src/lib/hooks/hooks.h
src/lib/hooks/hooks.h
+1
-1
src/lib/hooks/library_manager.cc
src/lib/hooks/library_manager.cc
+3
-3
src/lib/hooks/tests/basic_callout_library.cc
src/lib/hooks/tests/basic_callout_library.cc
+1
-1
src/lib/hooks/tests/full_callout_library.cc
src/lib/hooks/tests/full_callout_library.cc
+1
-1
src/lib/hooks/tests/incorrect_version_library.cc
src/lib/hooks/tests/incorrect_version_library.cc
+1
-1
src/lib/hooks/tests/load_callout_library.cc
src/lib/hooks/tests/load_callout_library.cc
+1
-1
src/lib/hooks/tests/load_error_callout_library.cc
src/lib/hooks/tests/load_error_callout_library.cc
+1
-1
src/lib/hooks/tests/unload_callout_library.cc
src/lib/hooks/tests/unload_callout_library.cc
+1
-1
src/lib/log/logger_manager.cc
src/lib/log/logger_manager.cc
+1
-1
src/lib/log/logger_unittest_support.cc
src/lib/log/logger_unittest_support.cc
+3
-3
src/lib/log/logger_unittest_support.h
src/lib/log/logger_unittest_support.h
+1
-1
src/lib/log/tests/init_logger_test.sh.in
src/lib/log/tests/init_logger_test.sh.in
+17
-17
src/lib/log/tests/logger_lock_test.sh.in
src/lib/log/tests/logger_lock_test.sh.in
+1
-1
src/lib/log/tests/logger_manager_unittest.cc
src/lib/log/tests/logger_manager_unittest.cc
+1
-1
src/lib/util/buffer.h
src/lib/util/buffer.h
+2
-2
src/lib/util/tests/socketsession_unittest.cc
src/lib/util/tests/socketsession_unittest.cc
+1
-1
No files found.
src/bin/d2/bundy_d2_controller.cc
View file @
393e456b
...
@@ -177,11 +177,11 @@ D2Controller::establishSession() {
...
@@ -177,11 +177,11 @@ D2Controller::establishSession() {
LOG_DEBUG
(
dctl_logger
,
DBGLVL_START_SHUT
,
DCTL_CCSESSION_STARTING
)
LOG_DEBUG
(
dctl_logger
,
DBGLVL_START_SHUT
,
DCTL_CCSESSION_STARTING
)
.
arg
(
getAppName
()).
arg
(
getSpecFileName
());
.
arg
(
getAppName
()).
arg
(
getSpecFileName
());
// Create the B
IND10
command control session with the our IOService.
// Create the B
undy
command control session with the our IOService.
cc_session_
=
SessionPtr
(
new
isc
::
cc
::
Session
(
cc_session_
=
SessionPtr
(
new
isc
::
cc
::
Session
(
getIOService
()
->
get_io_service
()));
getIOService
()
->
get_io_service
()));
// Create the B
IND10
config session with the stub configuration handler.
// Create the B
undy
config session with the stub configuration handler.
// This handler is internally invoked by the constructor and on success
// This handler is internally invoked by the constructor and on success
// the constructor updates the current session with the configuration that
// the constructor updates the current session with the configuration that
// had been committed in the previous session. If we do not install
// had been committed in the previous session. If we do not install
...
@@ -219,12 +219,12 @@ void D2Controller::disconnectSession() {
...
@@ -219,12 +219,12 @@ void D2Controller::disconnectSession() {
LOG_DEBUG
(
dctl_logger
,
DBGLVL_START_SHUT
,
DCTL_CCSESSION_ENDING
)
LOG_DEBUG
(
dctl_logger
,
DBGLVL_START_SHUT
,
DCTL_CCSESSION_ENDING
)
.
arg
(
getAppName
());
.
arg
(
getAppName
());
// Destroy the B
IND10
config session.
// Destroy the B
undy
config session.
if
(
config_session_
)
{
if
(
config_session_
)
{
config_session_
.
reset
();
config_session_
.
reset
();
}
}
// Destroy the B
IND10
command and control session.
// Destroy the B
undy
command and control session.
if
(
cc_session_
)
{
if
(
cc_session_
)
{
cc_session_
->
disconnect
();
cc_session_
->
disconnect
();
cc_session_
.
reset
();
cc_session_
.
reset
();
...
...
src/bin/d2/bundy_d2_controller.h
View file @
393e456b
...
@@ -98,7 +98,7 @@ public:
...
@@ -98,7 +98,7 @@ public:
/// in their main function. Such logger uses environmental variables to
/// in their main function. Such logger uses environmental variables to
/// control severity, verbosity etc. Reinitialization of logger by this
/// control severity, verbosity etc. Reinitialization of logger by this
/// function would replace unit tests specific logger configuration with
/// function would replace unit tests specific logger configuration with
/// this suitable for D2 running as a
bind10
module.
/// this suitable for D2 running as a
Bundy
module.
///
///
/// @param argc is the number of command line arguments supplied
/// @param argc is the number of command line arguments supplied
/// @param argv is the array of string (char *) command line arguments
/// @param argv is the array of string (char *) command line arguments
...
...
src/bin/d2/d2_config.h
View file @
393e456b
...
@@ -60,7 +60,7 @@ namespace d2 {
...
@@ -60,7 +60,7 @@ namespace d2 {
/// that the application can carry out DNS update exchanges with it. Servers
/// that the application can carry out DNS update exchanges with it. Servers
/// are represented by the class, DnsServerInfo.
/// are represented by the class, DnsServerInfo.
///
///
/// The configuration specification for use with
BIND10
is detailed in the file
/// The configuration specification for use with
Kea
is detailed in the file
/// dhcp-ddns.spec.
/// dhcp-ddns.spec.
///
///
/// The parsing class hierarchy reflects this same scheme. Working top down:
/// The parsing class hierarchy reflects this same scheme. Working top down:
...
...
src/bin/d2/d2_messages.mes
View file @
393e456b
...
@@ -54,7 +54,7 @@ events is called. This only happens during initial startup.
...
@@ -54,7 +54,7 @@ events is called. This only happens during initial startup.
A debug message indicating that the controller has received an
A debug message indicating that the controller has received an
updated configuration from the Kea configuration system.
updated configuration from the Kea configuration system.
% DCTL_DISCONNECT_FAIL %1 controller failed to end session with
Kea
: %2
% DCTL_DISCONNECT_FAIL %1 controller failed to end session with
Bundy
: %2
This message indicates that while shutting down, the DHCP-DDNS controller
This message indicates that while shutting down, the DHCP-DDNS controller
encountered an error terminating communication with the Kea configuration
encountered an error terminating communication with the Kea configuration
system. The service will still exit. While theoretically possible,
system. The service will still exit. While theoretically possible,
...
...
src/bin/d2/d2_process.cc
View file @
393e456b
...
@@ -209,7 +209,7 @@ D2Process::configure(isc::data::ConstElementPtr config_set) {
...
@@ -209,7 +209,7 @@ D2Process::configure(isc::data::ConstElementPtr config_set) {
if
(
rcode
)
{
if
(
rcode
)
{
// Non-zero means we got an invalid configuration, take no further
// Non-zero means we got an invalid configuration, take no further
// action. In integrated mode, this will send a failed response back
// action. In integrated mode, this will send a failed response back
// to
BIND10
.
// to
the configuration backend
.
reconf_queue_flag_
=
false
;
reconf_queue_flag_
=
false
;
return
(
answer
);
return
(
answer
);
}
}
...
...
src/bin/d2/main.cc
View file @
393e456b
...
@@ -25,7 +25,7 @@ using namespace isc::d2;
...
@@ -25,7 +25,7 @@ using namespace isc::d2;
using
namespace
std
;
using
namespace
std
;
/// This file contains entry point (main() function) for standard DHCP-DDNS
/// This file contains entry point (main() function) for standard DHCP-DDNS
/// process, kea-dhcp-ddns, component
for BIND10 framework
. It fetches
/// process, kea-dhcp-ddns, component
of Kea software suite
. It fetches
/// the D2Controller singleton instance and invokes its launch method.
/// the D2Controller singleton instance and invokes its launch method.
/// The exit value of the program will be EXIT_SUCCESS if there were no
/// The exit value of the program will be EXIT_SUCCESS if there were no
/// errors, EXIT_FAILURE otherwise.
/// errors, EXIT_FAILURE otherwise.
...
...
src/bin/d2/tests/bundy_d2_controller_unittests.cc
View file @
393e456b
...
@@ -176,8 +176,8 @@ TEST_F(BundyD2ControllerTest, executeCommandTests) {
...
@@ -176,8 +176,8 @@ TEST_F(BundyD2ControllerTest, executeCommandTests) {
/// @brief Tests launch with a session establishment failure.
/// @brief Tests launch with a session establishment failure.
/// This test launches with a valid command line for integrated mode and no.
/// This test launches with a valid command line for integrated mode and no.
/// Attempting to connect to B
IND10 should fail, even if BIND10
is running
/// Attempting to connect to B
undy should fail, even if Bundy
is running
/// UNLESS the test is run as root.
Launch should throw SessionStartError.
/// UNLESS the test is run as root. Launch should throw SessionStartError.
TEST_F
(
BundyD2ControllerTest
,
launchSessionFailure
)
{
TEST_F
(
BundyD2ControllerTest
,
launchSessionFailure
)
{
// Command line to run integrated
// Command line to run integrated
char
*
argv
[]
=
{
(
char
*
)
"progName"
};
char
*
argv
[]
=
{
(
char
*
)
"progName"
};
...
...
src/bin/d2/tests/d2_cfg_mgr_unittests.cc
View file @
393e456b
...
@@ -184,7 +184,7 @@ public:
...
@@ -184,7 +184,7 @@ public:
};
};
/// @brief Tests that the spec file is valid.
/// @brief Tests that the spec file is valid.
/// Verifies that the
BIND10
DHCP-DDNS configuration specification file
/// Verifies that the DHCP-DDNS configuration specification file
// is valid.
// is valid.
TEST
(
D2SpecTest
,
basicSpec
)
{
TEST
(
D2SpecTest
,
basicSpec
)
{
ASSERT_NO_THROW
(
isc
::
config
::
ASSERT_NO_THROW
(
isc
::
config
::
...
...
src/bin/d2/tests/d_test_stubs.h
View file @
393e456b
...
@@ -192,8 +192,8 @@ public:
...
@@ -192,8 +192,8 @@ public:
/// without polluting production derivations (e.g. D2Process). It uses
/// without polluting production derivations (e.g. D2Process). It uses
/// DStubProcess as its application process class. It is a full enough
/// DStubProcess as its application process class. It is a full enough
/// implementation to support running both stand alone and integrated.
/// implementation to support running both stand alone and integrated.
/// Obviously B
IND10
connectivity is not available under unit tests, so
/// Obviously B
undy
connectivity is not available under unit tests, so
/// testing here is limited to "failures" to communicate with B
IND10
.
/// testing here is limited to "failures" to communicate with B
undy
.
class
DStubController
:
public
DControllerBase
{
class
DStubController
:
public
DControllerBase
{
public:
public:
/// @brief Static singleton instance method. This method returns the
/// @brief Static singleton instance method. This method returns the
...
...
src/bin/dhcp4/main.cc
View file @
393e456b
...
@@ -27,7 +27,7 @@ using namespace isc::dhcp;
...
@@ -27,7 +27,7 @@ using namespace isc::dhcp;
using
namespace
std
;
using
namespace
std
;
/// This file contains entry point (main() function) for standard DHCPv4 server
/// This file contains entry point (main() function) for standard DHCPv4 server
/// component for
BIND10 framework
. It parses command-line arguments and
/// component for
Kea software suite
. It parses command-line arguments and
/// instantiates ControlledDhcpv4Srv class that is responsible for establishing
/// instantiates ControlledDhcpv4Srv class that is responsible for establishing
/// connection with msgq (receiving commands and configuration) and also
/// connection with msgq (receiving commands and configuration) and also
/// creating Dhcpv4 server object as well.
/// creating Dhcpv4 server object as well.
...
...
src/bin/dhcp4/tests/callout_library_common.h
View file @
393e456b
...
@@ -63,7 +63,7 @@ appendDigit(const char* name) {
...
@@ -63,7 +63,7 @@ appendDigit(const char* name) {
// Framework functions
// Framework functions
int
int
version
()
{
version
()
{
return
(
BIND10
_HOOKS_VERSION
);
return
(
KEA
_HOOKS_VERSION
);
}
}
int
int
...
...
src/bin/dhcp4/tests/config_parser_unittest.cc
View file @
393e456b
...
@@ -63,8 +63,7 @@ std::string specfile(const std::string& name) {
...
@@ -63,8 +63,7 @@ std::string specfile(const std::string& name) {
}
}
/// @brief Tests that the spec file is valid.
/// @brief Tests that the spec file is valid.
/// Verifies that the BIND10 DHCP-DDNS configuration specification file
/// Verifies that the Kea DHCPv4 configuration specification file is valid.
// is valid.
TEST
(
Dhcp4SpecTest
,
basicSpec
)
{
TEST
(
Dhcp4SpecTest
,
basicSpec
)
{
(
isc
::
config
::
moduleSpecFromFile
(
specfile
(
"dhcp4.spec"
)));
(
isc
::
config
::
moduleSpecFromFile
(
specfile
(
"dhcp4.spec"
)));
ASSERT_NO_THROW
(
isc
::
config
::
moduleSpecFromFile
(
specfile
(
"dhcp4.spec"
)));
ASSERT_NO_THROW
(
isc
::
config
::
moduleSpecFromFile
(
specfile
(
"dhcp4.spec"
)));
...
...
src/bin/dhcp4/tests/kea_controller_unittest.cc
View file @
393e456b
...
@@ -251,7 +251,7 @@ TEST_F(JSONFileBackendTest, configBroken) {
...
@@ -251,7 +251,7 @@ TEST_F(JSONFileBackendTest, configBroken) {
///
///
/// @todo: Unfortunately, we have this test disabled, because all loaded
/// @todo: Unfortunately, we have this test disabled, because all loaded
/// configs use memfile, which attempts to create lease file in
/// configs use memfile, which attempts to create lease file in
/// /usr/local/var/
bind10
/kea-leases4.csv. We have couple options here:
/// /usr/local/var/
kea
/kea-leases4.csv. We have couple options here:
/// a) disable persistence in example configs - a very bad thing to do
/// a) disable persistence in example configs - a very bad thing to do
/// as users will forget to reenable it and then will be surprised when their
/// as users will forget to reenable it and then will be surprised when their
/// leases disappear
/// leases disappear
...
...
src/bin/dhcp6/main.cc
View file @
393e456b
...
@@ -28,7 +28,7 @@ using namespace isc::dhcp;
...
@@ -28,7 +28,7 @@ using namespace isc::dhcp;
using
namespace
std
;
using
namespace
std
;
/// This file contains entry point (main() function) for standard DHCPv6 server
/// This file contains entry point (main() function) for standard DHCPv6 server
/// component for
BIND10 framework
. It parses command-line arguments and
/// component for
Kea software suite
. It parses command-line arguments and
/// instantiates ControlledDhcpv6Srv class that is responsible for establishing
/// instantiates ControlledDhcpv6Srv class that is responsible for establishing
/// connection with msgq (receiving commands and configuration) and also
/// connection with msgq (receiving commands and configuration) and also
/// creating Dhcpv6 server object as well.
/// creating Dhcpv6 server object as well.
...
@@ -118,16 +118,16 @@ main(int argc, char* argv[]) {
...
@@ -118,16 +118,16 @@ main(int argc, char* argv[]) {
ControlledDhcpv6Srv
server
(
port_number
);
ControlledDhcpv6Srv
server
(
port_number
);
try
{
try
{
// Initialize the server,
i.e
. establish control session
// Initialize the server,
e.g
. establish control session
// if B
IND10
backend is used or read a configuration file
// if B
undy
backend is used or read a configuration file
// if Kea backend is used.
// if Kea backend is used.
server
.
init
(
config_file
);
server
.
init
(
config_file
);
}
catch
(
const
std
::
exception
&
ex
)
{
}
catch
(
const
std
::
exception
&
ex
)
{
LOG_ERROR
(
dhcp6_logger
,
DHCP6_INIT_FAIL
).
arg
(
ex
.
what
());
LOG_ERROR
(
dhcp6_logger
,
DHCP6_INIT_FAIL
).
arg
(
ex
.
what
());
// We should not continue
if were told to configure (either rea
d
// We should not continue
, just flush whatever has been logge
d
//
config file or establish BIND10 control session)
.
//
and exit
.
isc
::
log
::
LoggerManager
log_manager
;
isc
::
log
::
LoggerManager
log_manager
;
log_manager
.
process
();
log_manager
.
process
();
...
...
src/bin/dhcp6/tests/callout_library_common.h
View file @
393e456b
...
@@ -63,7 +63,7 @@ appendDigit(const char* name) {
...
@@ -63,7 +63,7 @@ appendDigit(const char* name) {
// Framework functions
// Framework functions
int
int
version
()
{
version
()
{
return
(
BIND10
_HOOKS_VERSION
);
return
(
KEA
_HOOKS_VERSION
);
}
}
int
int
...
...
src/hooks/dhcp/user_chk/version.cc
View file @
393e456b
...
@@ -19,7 +19,7 @@ extern "C" {
...
@@ -19,7 +19,7 @@ extern "C" {
/// @brief Version function required by Hooks API for compatibility checks.
/// @brief Version function required by Hooks API for compatibility checks.
int
version
()
{
int
version
()
{
return
(
BIND10
_HOOKS_VERSION
);
return
(
KEA
_HOOKS_VERSION
);
}
}
}
}
src/lib/asiodns/tests/dns_server_unittest.cc
View file @
393e456b
...
@@ -80,7 +80,7 @@ const int server_port = 5553;
...
@@ -80,7 +80,7 @@ const int server_port = 5553;
const
char
*
const
server_port_str
=
"5553"
;
const
char
*
const
server_port_str
=
"5553"
;
//message client send to udp server, which isn't dns package
//message client send to udp server, which isn't dns package
//just for simple testing
//just for simple testing
const
char
*
const
query_message
=
"
BIND10
is awesome"
;
const
char
*
const
query_message
=
"
Kea
is awesome"
;
// \brief provide capacity to derived class the ability
// \brief provide capacity to derived class the ability
// to stop DNSServer at certain point
// to stop DNSServer at certain point
...
@@ -649,7 +649,7 @@ TYPED_TEST(DNSServerTest, TCPNoTimeout) {
...
@@ -649,7 +649,7 @@ TYPED_TEST(DNSServerTest, TCPNoTimeout) {
this
->
tcp_client_
->
setSendDataDelay
(
1
);
this
->
tcp_client_
->
setSendDataDelay
(
1
);
this
->
testStopServerByStopper
(
*
this
->
tcp_server_
,
this
->
tcp_client_
,
this
->
testStopServerByStopper
(
*
this
->
tcp_server_
,
this
->
tcp_client_
,
this
->
tcp_client_
);
this
->
tcp_client_
);
EXPECT_EQ
(
"
BIND10
is awesome"
,
this
->
tcp_client_
->
getReceivedData
());
EXPECT_EQ
(
"
Kea
is awesome"
,
this
->
tcp_client_
->
getReceivedData
());
EXPECT_TRUE
(
this
->
serverStopSucceed
());
EXPECT_TRUE
(
this
->
serverStopSucceed
());
}
}
...
...
src/lib/cc/proto_defs.h
View file @
393e456b
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
// PERFORMANCE OF THIS SOFTWARE.
#ifndef
BIND10
_COMMON_DEFS_H
#ifndef
KEA
_COMMON_DEFS_H
#define
BIND10
_COMMON_DEFS_H
#define
KEA
_COMMON_DEFS_H
// \file proto_defs.h
// \file proto_defs.h
// \brief Common shared constants
// \brief Common shared constants
...
...
src/lib/cc/session.cc
View file @
393e456b
...
@@ -309,10 +309,10 @@ public:
...
@@ -309,10 +309,10 @@ public:
void
void
Session
::
establish
(
const
char
*
socket_file
)
{
Session
::
establish
(
const
char
*
socket_file
)
{
if
(
socket_file
==
NULL
)
{
if
(
socket_file
==
NULL
)
{
socket_file
=
getenv
(
"B
IND10
_MSGQ_SOCKET_FILE"
);
socket_file
=
getenv
(
"B
UNDY
_MSGQ_SOCKET_FILE"
);
}
}
if
(
socket_file
==
NULL
)
{
if
(
socket_file
==
NULL
)
{
socket_file
=
B
IND10
_MSGQ_SOCKET_FILE
;
socket_file
=
B
UNDY
_MSGQ_SOCKET_FILE
;
}
}
impl_
->
establish
(
*
socket_file
);
impl_
->
establish
(
*
socket_file
);
...
...
src/lib/cc/session_config.h.pre.in
View file @
393e456b
#define B
IND10
_MSGQ_SOCKET_FILE "@@LOCALSTATEDIR@@/@PACKAGE@/msgq_socket"
#define B
UNDY
_MSGQ_SOCKET_FILE "@@LOCALSTATEDIR@@/@PACKAGE@/msgq_socket"
src/lib/cc/tests/session_unittests.cc
View file @
393e456b
...
@@ -84,7 +84,7 @@ public:
...
@@ -84,7 +84,7 @@ public:
~
TestDomainSocket
()
{
~
TestDomainSocket
()
{
socket_
.
close
();
socket_
.
close
();
unlink
(
B
IND10
_TEST_SOCKET_FILE
);
unlink
(
B
UNDY
_TEST_SOCKET_FILE
);
}
}
void
acceptHandler
(
const
asio
::
error_code
&
)
const
{
void
acceptHandler
(
const
asio
::
error_code
&
)
const
{
...
@@ -165,8 +165,8 @@ protected:
...
@@ -165,8 +165,8 @@ protected:
SessionTest
()
:
sess
(
my_io_service
),
work
(
my_io_service
)
{
SessionTest
()
:
sess
(
my_io_service
),
work
(
my_io_service
)
{
// The TestDomainSocket is held as a 'new'-ed pointer,
// The TestDomainSocket is held as a 'new'-ed pointer,
// so we can call unlink() first.
// so we can call unlink() first.
unlink
(
B
IND10
_TEST_SOCKET_FILE
);
unlink
(
B
UNDY
_TEST_SOCKET_FILE
);
tds
=
new
TestDomainSocket
(
my_io_service
,
B
IND10
_TEST_SOCKET_FILE
);
tds
=
new
TestDomainSocket
(
my_io_service
,
B
UNDY
_TEST_SOCKET_FILE
);
}
}
~
SessionTest
()
{
~
SessionTest
()
{
...
@@ -226,25 +226,25 @@ TEST_F(SessionTest, timeout_on_connect) {
...
@@ -226,25 +226,25 @@ TEST_F(SessionTest, timeout_on_connect) {
sess
.
setTimeout
(
100
);
sess
.
setTimeout
(
100
);
EXPECT_EQ
(
100
,
sess
.
getTimeout
());
EXPECT_EQ
(
100
,
sess
.
getTimeout
());
// no answer, should timeout
// no answer, should timeout
EXPECT_THROW
(
sess
.
establish
(
B
IND10
_TEST_SOCKET_FILE
),
SessionTimeout
);
EXPECT_THROW
(
sess
.
establish
(
B
UNDY
_TEST_SOCKET_FILE
),
SessionTimeout
);
}
}
TEST_F
(
SessionTest
,
connect_ok
)
{
TEST_F
(
SessionTest
,
connect_ok
)
{
tds
->
setSendLname
();
tds
->
setSendLname
();
sess
.
establish
(
B
IND10
_TEST_SOCKET_FILE
);
sess
.
establish
(
B
UNDY
_TEST_SOCKET_FILE
);
}
}
TEST_F
(
SessionTest
,
connect_ok_no_timeout
)
{
TEST_F
(
SessionTest
,
connect_ok_no_timeout
)
{
tds
->
setSendLname
();
tds
->
setSendLname
();
sess
.
setTimeout
(
0
);
sess
.
setTimeout
(
0
);
sess
.
establish
(
B
IND10
_TEST_SOCKET_FILE
);
sess
.
establish
(
B
UNDY
_TEST_SOCKET_FILE
);
}
}
TEST_F
(
SessionTest
,
connect_ok_connection_reset
)
{
TEST_F
(
SessionTest
,
connect_ok_connection_reset
)
{
tds
->
setSendLname
();
tds
->
setSendLname
();
sess
.
establish
(
B
IND10
_TEST_SOCKET_FILE
);
sess
.
establish
(
B
UNDY
_TEST_SOCKET_FILE
);
// Close the session again, so the next recv() should throw
// Close the session again, so the next recv() should throw
sess
.
disconnect
();
sess
.
disconnect
();
...
@@ -255,7 +255,7 @@ TEST_F(SessionTest, connect_ok_connection_reset) {
...
@@ -255,7 +255,7 @@ TEST_F(SessionTest, connect_ok_connection_reset) {
TEST_F
(
SessionTest
,
run_with_handler
)
{
TEST_F
(
SessionTest
,
run_with_handler
)
{
tds
->
setSendLname
();
tds
->
setSendLname
();
sess
.
establish
(
B
IND10
_TEST_SOCKET_FILE
);
sess
.
establish
(
B
UNDY
_TEST_SOCKET_FILE
);
sess
.
startRead
(
boost
::
bind
(
&
SessionTest
::
someHandler
,
this
));
sess
.
startRead
(
boost
::
bind
(
&
SessionTest
::
someHandler
,
this
));
isc
::
data
::
ElementPtr
env
=
isc
::
data
::
Element
::
fromJSON
(
"{
\"
to
\"
:
\"
me
\"
}"
);
isc
::
data
::
ElementPtr
env
=
isc
::
data
::
Element
::
fromJSON
(
"{
\"
to
\"
:
\"
me
\"
}"
);
...
@@ -279,7 +279,7 @@ TEST_F(SessionTest, run_with_handler) {
...
@@ -279,7 +279,7 @@ TEST_F(SessionTest, run_with_handler) {
TEST_F
(
SessionTest
,
run_with_handler_timeout
)
{
TEST_F
(
SessionTest
,
run_with_handler_timeout
)
{
tds
->
setSendLname
();
tds
->
setSendLname
();
sess
.
establish
(
B
IND10
_TEST_SOCKET_FILE
);
sess
.
establish
(
B
UNDY
_TEST_SOCKET_FILE
);
sess
.
startRead
(
boost
::
bind
(
&
SessionTest
::
someHandler
,
this
));
sess
.
startRead
(
boost
::
bind
(
&
SessionTest
::
someHandler
,
this
));
sess
.
setTimeout
(
100
);
sess
.
setTimeout
(
100
);
...
@@ -299,7 +299,7 @@ TEST_F(SessionTest, run_with_handler_timeout) {
...
@@ -299,7 +299,7 @@ TEST_F(SessionTest, run_with_handler_timeout) {
TEST_F
(
SessionTest
,
get_socket_descr
)
{
TEST_F
(
SessionTest
,
get_socket_descr
)
{
tds
->
setSendLname
();
tds
->
setSendLname
();
sess
.
establish
(
B
IND10
_TEST_SOCKET_FILE
);
sess
.
establish
(
B
UNDY
_TEST_SOCKET_FILE
);
int
socket
=
0
;
int
socket
=
0
;
// session is established, so getSocketDesc() should work
// session is established, so getSocketDesc() should work
...
@@ -313,7 +313,7 @@ TEST_F(SessionTest, get_socket_descr) {
...
@@ -313,7 +313,7 @@ TEST_F(SessionTest, get_socket_descr) {
TEST_F
(
SessionTest
,
group_sendmsg
)
{
TEST_F
(
SessionTest
,
group_sendmsg
)
{
// Connect (to set the lname, so we can see it sets the from)
// Connect (to set the lname, so we can see it sets the from)
tds
->
setSendLname
();
tds
->
setSendLname
();
sess
.
establish
(
B
IND10
_TEST_SOCKET_FILE
);
sess
.
establish
(
B
UNDY
_TEST_SOCKET_FILE
);
// Eat the "get_lname" message, so it doesn't confuse the
// Eat the "get_lname" message, so it doesn't confuse the
// test below.
// test below.
sess
.
getSentMessage
();
sess
.
getSentMessage
();
...
...
src/lib/cc/tests/session_unittests_config.h.in
View file @
393e456b
#define B
IND10
_TEST_SOCKET_FILE "@builddir@/test_socket.sock"
#define B
UNDY
_TEST_SOCKET_FILE "@builddir@/test_socket.sock"
src/lib/dhcp/tests/iface_mgr_unittest.cc
View file @
393e456b
...
@@ -1198,7 +1198,7 @@ TEST_F(IfaceMgrTest, sendReceive4) {
...
@@ -1198,7 +1198,7 @@ TEST_F(IfaceMgrTest, sendReceive4) {
// @todo: This part of the test is currently disabled on all BSD systems as it was
// @todo: This part of the test is currently disabled on all BSD systems as it was
// the quick fix. We need a more elegant (config-based) solution to disable
// the quick fix. We need a more elegant (config-based) solution to disable
// this check on affected systems only. The ticket has been submited for this
// this check on affected systems only. The ticket has been submited for this
// work: http://
bind10
.isc.org/ticket/2971
// work: http://
kea
.isc.org/ticket/2971
#ifndef OS_BSD
#ifndef OS_BSD
EXPECT_THROW
(
ifacemgr
->
receive4
(
10
),
SocketReadError
);
EXPECT_THROW
(
ifacemgr
->
receive4
(
10
),
SocketReadError
);
#endif
#endif
...
...
src/lib/dhcpsrv/addr_utilities.h
View file @
393e456b
...
@@ -22,7 +22,7 @@ namespace dhcp {
...
@@ -22,7 +22,7 @@ namespace dhcp {
/// This code is based on similar code from the Dibbler project. I, Tomasz Mrugalski,
/// This code is based on similar code from the Dibbler project. I, Tomasz Mrugalski,
/// as a sole creator of that code hereby release it under BSD license for the benefit
/// as a sole creator of that code hereby release it under BSD license for the benefit
/// of the
BIND10
project.
/// of the
Kea
project.
/// @brief returns a first address in a given prefix
/// @brief returns a first address in a given prefix
///
///
...
...
src/lib/dhcpsrv/csv_lease_file4.h
View file @
393e456b
...
@@ -35,7 +35,7 @@ namespace dhcp {
...
@@ -35,7 +35,7 @@ namespace dhcp {
///
///
/// @todo This class doesn't validate the lease values read from the file.
/// @todo This class doesn't validate the lease values read from the file.
/// The @c Lease4 is a structure that should be itself responsible for this
/// The @c Lease4 is a structure that should be itself responsible for this
/// validation (see http://
bind10
.isc.org/ticket/2405). However, when #2405
/// validation (see http://
kea
.isc.org/ticket/2405). However, when #2405
/// is implemented, the @c next function may need to be updated to use the
/// is implemented, the @c next function may need to be updated to use the
/// validation capablity of @c Lease4.
/// validation capablity of @c Lease4.
class
CSVLeaseFile4
:
public
isc
::
util
::
CSVFile
{
class
CSVLeaseFile4
:
public
isc
::
util
::
CSVFile
{
...
@@ -75,7 +75,7 @@ public:
...
@@ -75,7 +75,7 @@ public:
///
///
/// @todo Make sure that the values read from the file are correct.
/// @todo Make sure that the values read from the file are correct.
/// The appropriate @c Lease4 validation mechanism should be used once
/// The appropriate @c Lease4 validation mechanism should be used once
/// ticket http://
bind10
.isc.org/ticket/2405 is implemented.
/// ticket http://
kea
.isc.org/ticket/2405 is implemented.
bool
next
(
Lease4Ptr
&
lease
);
bool
next
(
Lease4Ptr
&
lease
);
private:
private:
...
...
src/lib/dhcpsrv/csv_lease_file6.h
View file @
393e456b
...
@@ -34,7 +34,7 @@ namespace dhcp {
...
@@ -34,7 +34,7 @@ namespace dhcp {
///
///
/// @todo This class doesn't validate the lease values read from the file.
/// @todo This class doesn't validate the lease values read from the file.
/// The @c Lease6 is a structure that should be itself responsible for this
/// The @c Lease6 is a structure that should be itself responsible for this
/// validation (see http://
bind10
.isc.org/ticket/2405). However, when #2405
/// validation (see http://
kea
.isc.org/ticket/2405). However, when #2405
/// is implemented, the @c next function may need to be updated to use the
/// is implemented, the @c next function may need to be updated to use the
/// validation capablity of @c Lease6.
/// validation capablity of @c Lease6.
class
CSVLeaseFile6
:
public
isc
::
util
::
CSVFile
{
class
CSVLeaseFile6
:
public
isc
::
util
::
CSVFile
{
...
@@ -74,7 +74,7 @@ public:
...
@@ -74,7 +74,7 @@ public:
///
///
/// @todo Make sure that the values read from the file are correct.
/// @todo Make sure that the values read from the file are correct.
/// The appropriate @c Lease6 validation mechanism should be used once
/// The appropriate @c Lease6 validation mechanism should be used once
/// ticket http://
bind10
.isc.org/ticket/2405 is implemented.
/// ticket http://
kea
.isc.org/ticket/2405 is implemented.
bool
next
(
Lease6Ptr
&
lease
);
bool
next
(
Lease6Ptr
&
lease
);
private:
private:
...
...
src/lib/dhcpsrv/memfile_lease_mgr.h
View file @
393e456b
...
@@ -66,8 +66,8 @@ namespace dhcp {
...
@@ -66,8 +66,8 @@ namespace dhcp {
/// parameter in the database access string. The [path] is the
/// parameter in the database access string. The [path] is the
/// absolute path to the file (including file name). If this parameter
/// absolute path to the file (including file name). If this parameter
/// is not specified, the default location in the installation
/// is not specified, the default location in the installation
/// directory is used: var/
bind10
/kea-leases4.csv and
/// directory is used: var/
kea
/kea-leases4.csv and
/// var/
bind10
/kea-leases6.csv.
/// var/
kea
/kea-leases6.csv.
class
Memfile_LeaseMgr
:
public
LeaseMgr
{
class
Memfile_LeaseMgr
:
public
LeaseMgr
{
public:
public:
...
...
src/lib/dhcpsrv/tests/callout_library.cc
View file @
393e456b
...
@@ -25,7 +25,7 @@ extern "C" {
...
@@ -25,7 +25,7 @@ extern "C" {
// Framework functions
// Framework functions
int
int
version
()
{
version
()
{
return
(
BIND10
_HOOKS_VERSION
);
return
(
KEA
_HOOKS_VERSION
);
}
}
};
};
src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
View file @
393e456b
...
@@ -177,6 +177,6 @@ TEST_F(CSVLeaseFile4Test, recreate) {
...
@@ -177,6 +177,6 @@ TEST_F(CSVLeaseFile4Test, recreate) {
/// lease type, invalid preferred lifetime vs valid lifetime etc. The Lease6
/// lease type, invalid preferred lifetime vs valid lifetime etc. The Lease6
/// should be extended with the function that validates lease attributes. Once
/// should be extended with the function that validates lease attributes. Once
/// this is implemented we should provide more tests for malformed leases
/// this is implemented we should provide more tests for malformed leases
/// in the CSV file. See http://
bind10
.isc.org/ticket/2405.