libdhcp4_la_SOURCES += dhcp4_log.cc dhcp4_log.h
libdhcp4_la_SOURCES += dhcp4_srv.cc dhcp4_srv.h
libdhcp4_la_SOURCES += dhcp4to6_ipc.cc dhcp4to6_ipc.h
-
+libdhcp4_la_SOURCES += dhcp4_lexer.ll location.hh position.hh stack.hh
+libdhcp4_la_SOURCES += dhcp4_parser.cc dhcp4_parser.h
+libdhcp4_la_SOURCES += parser_context.cc parser_context.h parser_context_decl.h
-
libdhcp4_la_SOURCES += kea_controller.cc
+ libdhcp4_la_SOURCES += simple_parser4.cc simple_parser4.h
nodist_libdhcp4_la_SOURCES = dhcp4_messages.h dhcp4_messages.cc
EXTRA_DIST += dhcp4_messages.mes
parser = new IfacesConfigParser4();
} else if (config_id.compare("subnet4") == 0) {
parser = new Subnets4ListConfigParser(config_id);
- } else if (config_id.compare("option-data") == 0) {
- parser = new OptionDataListParser(config_id, CfgOptionPtr(), AF_INET);
- } else if (config_id.compare("option-def") == 0) {
- parser = new OptionDefListParser(config_id, globalContext());
+ // option-data and option-def have been converted to SimpleParser already.
- } else if ((config_id.compare("version") == 0) ||
- (config_id.compare("next-server") == 0)) {
+ } else if ((config_id.compare("next-server") == 0)) {
parser = new StringParser(config_id,
globalContext()->string_values_);
} else if (config_id.compare("lease-database") == 0) {
libdhcp6_la_SOURCES += ctrl_dhcp6_srv.cc ctrl_dhcp6_srv.h
libdhcp6_la_SOURCES += json_config_parser.cc json_config_parser.h
libdhcp6_la_SOURCES += dhcp6to4_ipc.cc dhcp6to4_ipc.h
-
+libdhcp6_la_SOURCES += dhcp6_lexer.ll location.hh position.hh stack.hh
+libdhcp6_la_SOURCES += dhcp6_parser.cc dhcp6_parser.h
+libdhcp6_la_SOURCES += parser_context.cc parser_context.h parser_context_decl.h
-
libdhcp6_la_SOURCES += kea_controller.cc
+ libdhcp6_la_SOURCES += simple_parser6.cc simple_parser6.h
nodist_libdhcp6_la_SOURCES = dhcp6_messages.h dhcp6_messages.cc
EXTRA_DIST += dhcp6_messages.mes
@section dhcpv6ConfigParser Configuration Parsers in DHCPv6
- @endcode
+Three minutes overview. If you are here only to learn absolute minimum about
+the new parser, here's how you use it:
+
+@code
+ // The following code:
+ json = isc::data::Element::fromJSONFile(file_name, true);
+
+ // can be replaced with this:
+ Parser6Context parser;
+ json = parser.parseFile(file_name, Parser6Context::PARSER_DHCP6);
++
+ Note: parsers are currently being migrated to @ref isc::data::SimpleParser. See
+ @ref ccSimpleParser page for details.
The common configuration parsers for the DHCP servers are located in the
src/lib/dhcpsrv/parsers/ directory. Parsers specific to the DHCPv6 component
dhcp6_unittests_SOURCES += kea_controller_unittest.cc
dhcp6_unittests_SOURCES += dhcp6to4_ipc_unittest.cc
dhcp6_unittests_SOURCES += classify_unittests.cc
+dhcp6_unittests_SOURCES += parser_unittest.cc
+ dhcp6_unittests_SOURCES += simple_parser6_unittest.cc
nodist_dhcp6_unittests_SOURCES = marker_file.h test_libraries.h
AM_CPPFLAGS += $(CQL_CPPFLAGS)
endif
- AM_CXXFLAGS = $(KEA_CXXFLAGS)
-# This is a temporary workaround until we have Kea-wide support for C++11.
-AM_CXXFLAGS = $(KEA_CXXFLAGS) -std=c++11
--
# The files in the subfolder must be explicitly specified here so
# as they are copied to the distribution. The other option would
# be to specify a whole 'parsers' folder here but that would also