kea-dhcp4 will parse and use "queue-control" to configure ring
buffer size:
"Dhcp4":
{
"queue-control": {
# max number of packets the ring will hold
"capacity" : 100
},
:
This is an interrim commit for testing purposes.
Expect a fair amount of refactoring in subsequent commits.
New files:
src/lib/dhcp/queue_control.cc
src/lib/dhcp/queue_control.h
src/lib/dhcp/tests/queue_control_unittest.cc
src/lib/dhcpsrv/parsers/queue_control_parser.cc
src/lib/dhcpsrv/parsers/queue_control_parser.h
src/bin/dhcp4/ctrl_dhcp4_srv.cc
ControlledDhcpv4Srv::processConfig() -
added logic to set packet queue controller
src/bin/dhcp4/dhcp4_lexer.ll b/src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/parser_context.*
Added queue-control parsing
src/bin/dhcp4/json_config_parser.cc
configureDhcp4Server() - recognize and parse "queue-control"
src/bin/dhcp4/tests/config_parser_unittest.cc
TEST_F(Dhcp4ParserTest, queueControl)
TEST_F(Dhcp4ParserTest, queueControlInvalid)
- new tests
src/lib/dhcp/iface_mgr.*
IfaceMgr::getPacketQueueControl4()
IfaceMgr::setPacketQueueControl4()
IfaceMgr::getPacketQueueControl6()
IfaceMgr::setPacketQueueControl6()
src/lib/dhcp/packet_queue.*
Use QueueControl class
src/lib/dhcpsrv/srv_config.*
Added QueueControl member, getter/setter
SrvConfig::toElement() - now emits queue-control if not null
src/hooks/dhcp/mysql_cb/mysql_cb_callouts.cc
load() - added call to register MySQL backend
unload() - added call to unregister MySQL backend
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.*
MySqlConfigBackendDHCPv4::registerBackendType()
MySqlConfigBackendDHCPv4::unregisterBackendType()
- new static methods for registering/unregistering
src/hooks/dhcp/mysql_cb/tests/Makefile.am
mysql_cb_dhcp4_mgr_unittest.cc - new file
src/lib/config_backend/base_config_backend_mgr.h
bool unregisterBackendFactory(const std::string& db_type)
- new method to unregister factory and delete backends
src/lib/config_backend/base_config_backend_pool.h
void delAllBackends(const std::string& db_type)
- new method to delete all backends of a given type
/src/lib/config_backend/tests/config_backend_mgr_unittest.cc
TEST_F(ConfigBackendMgrTest, unregister) - new test
src/lib/dhcpsrv/Makefile.am
src/lib/dhcpsrv/config_backend_dhcp4.h
src/lib/dhcpsrv/config_backend_dhcp4.cc
New files that implement ConfigBackendDhcp4Mgr
src/lib/dhcpsrv/config_backend_pool_dhcp4.h
Added missing public scope, removed pure virtual function
src/lib/eval/tests/Makefile.am
Added new dependency libkea-cc
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
Added parsing support for config-control and config-databases
src/bin/dhcp4/json_config_parser.cc
configureDhcp4Server() - added handler for config-control element
src/bin/dhcp4/parser_context.*
added CONFIG_CONTROL and CONFIG_DATABASE
src/bin/dhcp4/tests/config_parser_unittest.cc
TEST_F(Dhcp4ParserTest, configControlInfo) - new test
- Added constants for special SubnetIDs:
SUBNET_ID_GLOBAL, SUBNET_ID_MAX, SUBNET_ID_UNUSED
- Modified code throughout to use these constants, rather than hard-coded
values. Note, MySQL and PostgreSQL host backends convert from NULL to
UNUSED and back.
- kea-dhcp4/6 servers will now parse a "reservations" element at the global
level.
src/lib/dhcpsrv/subnet_id.h
Added constants SubnetID SUBNET_ID_GLOBAL, SUBNET_ID_MAX, SUBNET_ID_UNUSED
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
kea-dhcp4 parsing now handles reservations as a global element
src/bin/dhcp4/tests/config_parser_unittest.cc
TEST_F(Dhcp4ParserTest, globalReservations) - new test to
verify global HR parsing
src/bin/dhcp4/tests/dora_unittest.cc
src/lib/dhcpsrv/cfg_hosts.cc
src/lib/dhcpsrv/host.cc
src/lib/dhcpsrv/host_mgr.cc
src/lib/dhcpsrv/mysql_host_data_source.cc
src/lib/dhcpsrv/parsers/host_reservation_parser.cc
src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
src/lib/dhcpsrv/tests/alloc_engine_utils.cc
src/lib/dhcpsrv/tests/host_mgr_unittest.cc
src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc
src/lib/dhcpsrv/tests/host_reservations_list_parser_unittest.cc
src/lib/dhcpsrv/tests/host_unittest.cc
Replaced SubnetID 0 with SUBNET_ID_UNUSED
src/lib/dhcpsrv/srv_config.cc
SrvConfig::toElement() - added global reservations output
src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc
TEST_F(CfgHostsTest, globalSubnetIDs)
TEST_F(CfgHostsTest, unusedSubnetIDs) - new tests
src/lib/dhcpsrv/tests/host_unittest.cc
Replaced SubnetID 0 with SUBNET_ID_UNUSED
TEST_F(HostTest, toText) - updated to verify global ID output
src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc
TEST_F(MySqlHostDataSourceTest, globalSubnetId4)
TEST_F(MySqlHostDataSourceTest, globalSubnetId6) - new tests
src/lib/dhcpsrv/tests/srv_config_unittest.cc
TEST_F(SrvConfigTest, unparseHR) - added global HRs
src/lib/dhcpsrv/testutils/generic_host_data_source_unittest.*
GenericHostDataSourceTest::testGlobalSubnetId4()
GenericHostDataSourceTest::testGlobalSubnetId6()
src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/dhcp6_parser.yy
src/bin/dhcp6/json_config_parser.cc
kea-dhcp6 now parses reservations as a global element
src/bin/dhcp6/tests/config_parser_unittest.cc
TEST_F(Dhcp6ParserTest, globalReservations) - new test
src/bin/dhcp4/json_config_parser.cc
configureDhcp4Server() - added extract of configured globals
src/bin/dhcp4/tests/get_config_unittest.cc
src/bin/dhcp6/tests/get_config_unittest.cc
Updated extracted and unparsed configs.
src/bin/dhcp6/json_config_parser.cc
configureDhcp6Server() - added extract of configured globals
src/lib/dhcpsrv/srv_config.h
src/lib/dhcpsrv/srv_config.cc
Added storage and maintence of configured globals
SrvConfig::toElement() - added configured globals to result
src/lib/dhcpsrv/tests/srv_config_unittest.cc
TEST_F(SrvConfigTest, configuredGlobals) - new test
src/bin/dhcp4/dhcp4_srv.*
- dumpPackets() - new function that frees all cached and parked packets
- Dhcpv4Srv::~Dhcpv4Srv() - added call to dumpPackets() for cleanliness
src/bin/dhcp4/json_config_parser.cc
configureDhcp4Server() - added a call Dhcpv4Srv::dumpPackets()
src/bin/dhcp6/dhcp6_srv.*
- dumpPackets() - new function that frees all cached and parked packets
- Dhcpv6Srv::~Dhcpv6Srv() - added call to dumpPackets() for cleanliness
src/bin/dhcp6/json_config_parser.cc
configureDhcp6Server() - added a call Dhcpv6Srv::dumpPackets()
src/lib/hooks/hooks_manager.h
- clearParkingLots() - new convenience function for clearing
all parking lots
- clearParkingLotsInternal() - private impl of the above
- many more parameters are now inherited from shared-network to subnet4
- parameters now passed as const reference
- it is no longer possible to specify echo-client-id on shared-network
level (because it's a global parameter)
- example config commented properly