2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 09:57:41 +00:00

[#3443] Proof of Concept: meson

This commit is contained in:
Andrei Pavel 2024-12-19 13:27:16 +02:00 committed by Francis Dupont
parent adcefbfb05
commit e37f8c004c
76 changed files with 2277 additions and 15 deletions

2
.gitignore vendored
View File

@ -46,3 +46,5 @@ config.h.in~
/logger_lockfile
/report.info
/hammer
/build

View File

@ -0,0 +1,5 @@
#include <mysql.h>
int main() {
my_bool _(0);
}

View File

@ -0,0 +1,5 @@
#include <boost/asio/ssl.hpp>
int main() {
auto _(boost::asio::ssl::error::stream_truncated);
}

294
config.h.in Normal file
View File

@ -0,0 +1,294 @@
/* config.h inclusion marker */
#define CONFIG_H_WAS_INCLUDED
/* Whether system and steady clocks use the same duration type */
#mesondefine CHRONO_SAME_DURATION
/* Enable low-performing debugging facilities? */
#mesondefine ENABLE_DEBUG
/* Check logger messages? */
#mesondefine ENABLE_LOGGER_CHECKS
/* Fuzzing enabled. */
#mesondefine FUZZING
/* Fuzzing running in CI. */
#mesondefine FUZZING_IN_CI
/* Does this platform have some undefined pthreads behavior? */
#mesondefine HAS_UNDEFINED_PTHREAD_BEHAVIOR
/* AFL compiler enabled. */
#mesondefine HAVE_AFL
/* Whether you have the <boost/asio/coroutine.hpp> header file. */
#mesondefine HAVE_BOOST_ASIO_COROUTINE_HPP
/* Whether you have the <boost/asio.hpp> header file. */
#mesondefine HAVE_BOOST_ASIO_HPP
/* Whether you have the <boost/asio/ip/address.hpp> header file. */
#mesondefine HAVE_BOOST_ASIO_IP_ADDRESS_HPP
/* Whether you have the <boost/asio/signal_set.hpp> header file. */
#mesondefine HAVE_BOOST_ASIO_SIGNAL_SET_HPP
/* Whether you have the <boost/asio/ssl.hpp> header file. */
#mesondefine HAVE_BOOST_ASIO_SSL_HPP
/* Whether you have the <boost/atomic.hpp> header file. */
#mesondefine HAVE_BOOST_ATOMIC_HPP
/* Whether you have the <boost/circular_buffer.hpp> header file. */
#mesondefine HAVE_BOOST_CIRCULAR_BUFFER_HPP
/* Whether you have the <boost/date_time/posix_time/posix_time_types.hpp> header file. */
#mesondefine HAVE_BOOST_DATE_TIME_POSIX_TIME_POSIX_TIME_TYPES_HPP
/* Whether you have the <boost/foreach.hpp> header file. */
#mesondefine HAVE_BOOST_FOREACH_HPP
/* Whether you have the <boost/functional/hash.hpp> header file. */
#mesondefine HAVE_BOOST_FUNCTIONAL_HASH_HPP
/* Whether you have the <boost/integer/common_factor.hpp> header file. */
#mesondefine HAVE_BOOST_INTEGER_COMMON_FACTOR_HPP
/* Whether you have the <boost/interprocess/sync/interprocess_upgradable_mutex.hpp> header file. */
#mesondefine HAVE_BOOST_INTERPROCESS_SYNC_INTERPROCESS_UPGRADABLE_MUTEX_HPP
/* Whether you have the <boost/shared_ptr.hpp> header file. */
#mesondefine HAVE_BOOST_SHARED_PTR_HPP
/* Whether you have the <boost/system/error_code.hpp> header file. */
#mesondefine HAVE_BOOST_SYSTEM_ERROR_CODE_HPP
/* Whether you have the <botan/asio_stream.h> header file. */
#mesondefine HAVE_BOTAN_ASIO_STREAM_H
/* Whether you have the <botan/build.h> header file. */
#mesondefine HAVE_BOTAN_BUILD_H
/* Whether getsockopt(IPV6_USE_MIN_MTU) does not work */
#mesondefine HAVE_BROKEN_GET_IPV
/* Whether gtest defines edit_distance::CreateUnifiedDiff */
#mesondefine HAVE_CREATE_UNIFIED_DIFF
/* Whether you have the <dlfcn.h> header file. */
#mesondefine HAVE_DLFCN_H
/* Whether you have the 'EVP_MD_CTX_create' function. */
#mesondefine HAVE_EVP_MD_CTX_CREATE
/* Whether you have the 'EVP_MD_CTX_destroy' function. */
#mesondefine HAVE_EVP_MD_CTX_DESTROY
/* Whether you have the 'EVP_MD_CTX_free' function. */
#mesondefine HAVE_EVP_MD_CTX_FREE
/* Whether you have the 'EVP_MD_CTX_new' function. */
#mesondefine HAVE_EVP_MD_CTX_NEW
/* Whether you have the 'EVP_PKEY_new_mac_key' function. */
#mesondefine HAVE_EVP_PKEY_NEW_MAC_KEY
/* Whether you have the 'EVP_PKEY_new_raw_private_key' function. */
#mesondefine HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY
/* Whether boost::asio::ssl::context::tls is available */
#mesondefine HAVE_GENERIC_TLS_METHOD
/* Whether you have the <gssapi/gssapi.h> header file. */
#mesondefine HAVE_GSSAPI_GSSAPI_H
/* Whether you have the <gssapi/gssapi_krb5.h> header file. */
#mesondefine HAVE_GSSAPI_GSSAPI_KRB
/* gss_str_to_oid is available */
#mesondefine HAVE_GSS_STR_TO_OID
/* Whether you have the <inttypes.h> header file. */
#mesondefine HAVE_INTTYPES_H
/* Whether std::is_base_of is available */
#mesondefine HAVE_IS_BASE_OF
/* Whether you have the <krb5.h> header file. */
#mesondefine HAVE_KRB
/* Whether you have the <krb5/krb5.h> header file. */
#mesondefine HAVE_KRB
/* Whether you have the <log4cplus/logger.h> header file. */
#mesondefine HAVE_LOG
/* MySQL is present */
#mesondefine HAVE_MYSQL
/* MySQL has mysql_get_option defined. */
#mesondefine HAVE_MYSQL_GET_OPTION
/* MySQL uses my_bool */
#mesondefine HAVE_MYSQL_MY_BOOL
/* MySQL has MYSQL_OPT_RECONNNECT */
#mesondefine HAVE_MYSQL_OPT_RECONNECT
/* NETCONF capabilities enabled */
#mesondefine HAVE_NETCONF
/* Check for optreset? */
#mesondefine HAVE_OPTRESET
/* PostgreSQL is present */
#mesondefine HAVE_PGSQL
/* PostgreSQL was built with OpenSSL support */
#mesondefine HAVE_PGSQL_SSL
/* PostgreSQL connection parameter tcp_user_timeout supported */
#mesondefine HAVE_PGSQL_TCP_USER_TIMEOUT
/* Whether you have the 'pselect' function. */
#mesondefine HAVE_PSELECT
/* Whether sockaddr has a sa_len member, and corresponding sin_len and sun_len */
#mesondefine HAVE_SA_LEN
/* Whether stdbool.h conforms to C99. */
#mesondefine HAVE_STDBOOL_H
/* Whether you have the <stdint.h> header file. */
#mesondefine HAVE_STDINT_H
/* Whether you have the <stdio.h> header file. */
#mesondefine HAVE_STDIO_H
/* Whether you have the <stdlib.h> header file. */
#mesondefine HAVE_STDLIB_H
/* Whether boost::asio::ssl::error::stream_truncated is available */
#mesondefine HAVE_STREAM_TRUNCATED_ERROR
/* Whether you have the <strings.h> header file. */
#mesondefine HAVE_STRINGS_H
/* Whether you have the <string.h> header file. */
#mesondefine HAVE_STRING_H
/* Whether you have the <sys/devpoll.h> header file. */
#mesondefine HAVE_SYS_DEVPOLL_H
/* Whether you have the <sys/filio.h> header file. */
#mesondefine HAVE_SYS_FILIO_H
/* Whether you have the <sys/stat.h> header file. */
#mesondefine HAVE_SYS_STAT_H
/* Whether you have the <sys/types.h> header file. */
#mesondefine HAVE_SYS_TYPES_H
/* Whether boost::asio::ssl::context::tlsv12 is available */
#mesondefine HAVE_TLS_
/* Whether you have the <unistd.h> header file. */
#mesondefine HAVE_UNISTD_H
/* Whether you have the <utils/errcodes.h> header file. */
#mesondefine HAVE_UTILS_ERRCODES_H
/* Check valgrind headers */
#mesondefine HAVE_VALGRIND_HEADERS
/* Whether you have the <valgrind/valgrind.h> header file. */
#mesondefine HAVE_VALGRIND_VALGRIND_H
/* Whether the system has the type '_Bool'. */
#mesondefine HAVE__BOOL
/* Whether libc is musl */
#mesondefine LIBC_MUSL
/* Explicit initialization of log4cplus possible */
#mesondefine LOG
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#mesondefine LT_OBJDIR
/* Running on BSD? */
#mesondefine OS_BSD
/* Running on FreeBSD? */
#mesondefine OS_FREEBSD
/* Running on Linux? */
#mesondefine OS_LINUX
/* Running on NetBSD? */
#mesondefine OS_NETBSD
/* Running on OpenBSD? */
#mesondefine OS_OPENBSD
/* Running on OSX? */
#mesondefine OS_OSX
/* Running on Solaris? */
#mesondefine OS_SOLARIS
/* Name of package */
#mesondefine PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#mesondefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#mesondefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#mesondefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#mesondefine PACKAGE_TARNAME
/* Define to the home page for this package. */
#mesondefine PACKAGE_URL
/* Define to the version of this package. */
#mesondefine PACKAGE_VERSION
/* Kea-premium hooks found */
#mesondefine PREMIUM
/* Whether all of the C89 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#mesondefine STDC_HEADERS
#mesondefine TOP_BUILDDIR
/* Was Kea statically linked? */
#mesondefine USE_STATIC_LINK
/* Version number of package */
#mesondefine VERSION
/* Compile with Botan crypto */
#mesondefine WITH_BOTAN
/* Heimdal GSS-API implementation */
#mesondefine WITH_HEIMDAL
/* Compile with OpenSSL crypto */
#mesondefine WITH_OPENSSL
/* Whether 'lex' declares 'yytext' as a 'char *' by default, not a 'char[]'. */
#mesondefine YYTEXT_POINTER
/* Define as 'unsigned int' if <stddef.h> doesn't define. */
#mesondefine SIZE_T
/* Define as 'int' if <sys/types.h> doesn't define. */
#mesondefine SSIZE_T

View File

@ -1,3 +1,3 @@
#define EXTENDED_VERSION "@KEA_SRCID@"
#define PREMIUM_EXTENDED_VERSION "@PREMIUM@"
#define PACKAGE_VERSION_TYPE "@PACKAGE_VERSION_TYPE@"
#mesondefine EXTENDED_VERSION
#mesondefine PACKAGE_VERSION_TYPE
#mesondefine PREMIUM_EXTENDED_VERSION

242
meson.build Normal file
View File

@ -0,0 +1,242 @@
project('kea', 'cpp', version: '2.7.6-git', default_options : ['default_library=shared'])
cpp = meson.get_compiler('cpp')
fs = import('fs')
conf_data = configuration_data({
# 'CHRONO_SAME_DURATION': true,
# 'CONFIG_H_WAS_INCLUDED': true,
# 'ENABLE_DEBUG': false,
# 'ENABLE_LOGGER_CHECKS': false,
'EXTENDED_VERSION': '"@0@"'.format(meson.project_version()),
# 'FUZZING': false,
# 'FUZZING_IN_CI': false,
# 'HAS_UNDEFINED_PTHREAD_BEHAVIOR': false,
# 'HAVE_AFL': false,
# 'HAVE_BOOST_ASIO_COROUTINE_HPP': false,
# 'HAVE_BOOST_ASIO_HPP': false,
# 'HAVE_BOOST_ASIO_IP_ADDRESS_HPP': false,
# 'HAVE_BOOST_ASIO_SIGNAL_SET_HPP': false,
# 'HAVE_BOOST_ASIO_SSL_HPP': false,
# 'HAVE_BOOST_ATOMIC_HPP': false,
# 'HAVE_BOOST_CIRCULAR_BUFFER_HPP': false,
# 'HAVE_BOOST_DATE_TIME_POSIX_TIME_POSIX_TIME_TYPES_HPP': false,
# 'HAVE_BOOST_FOREACH_HPP': false,
# 'HAVE_BOOST_FUNCTIONAL_HASH_HPP': false,
# 'HAVE_BOOST_INTEGER_COMMON_FACTOR_HPP': false,
# 'HAVE_BOOST_INTERPROCESS_SYNC_INTERPROCESS_UPGRADABLE_MUTEX_HPP': false,
# 'HAVE_BOOST_SHARED_PTR_HPP': false,
# 'HAVE_BOOST_SYSTEM_ERROR_CODE_HPP': false,
# 'HAVE_BOTAN_ASIO_STREAM_H': false,
# 'HAVE_BOTAN_BUILD_H': false,
# 'HAVE_BROKEN_GET_IPV': false,
# 'HAVE_CREATE_UNIFIED_DIFF': false,
# 'HAVE_DLFCN_H': false,
# 'HAVE_EVP_MD_CTX_CREATE': false,
# 'HAVE_EVP_MD_CTX_DESTROY': false,
# 'HAVE_EVP_MD_CTX_FREE': false,
# 'HAVE_EVP_MD_CTX_NEW': false,
# 'HAVE_EVP_PKEY_NEW_MAC_KEY': false,
# 'HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY': false,
'HAVE_GENERIC_TLS_METHOD': true,
# 'HAVE_GSSAPI_GSSAPI_H': false,
# 'HAVE_GSSAPI_GSSAPI_KRB': false,
# 'HAVE_GSS_STR_TO_OID': false,
# 'HAVE_INTTYPES_H': false,
# 'HAVE_IS_BASE_OF': false,
# 'HAVE_KRB': false,
# 'HAVE_LOG': false,
# 'HAVE_MYSQL': false,
# 'HAVE_MYSQL_GET_OPTION': false,
# 'HAVE_MYSQL_MY_BOOL': false,
# 'HAVE_MYSQL_OPT_RECONNECT': false,
# 'HAVE_NETCONF': false,
# 'HAVE_OPTRESET': false,
# 'HAVE_PGSQL': false,
# 'HAVE_PGSQL_SSL': false,
# 'HAVE_PGSQL_TCP_USER_TIMEOUT': false,
# 'HAVE_PSELECT': false,
# 'HAVE_SA_LEN': false,
# 'HAVE_STDBOOL_H': false,
# 'HAVE_STDINT_H': false,
# 'HAVE_STDIO_H': false,
# 'HAVE_STDLIB_H': false,
# 'HAVE_STREAM_TRUNCATED_ERROR': false,
# 'HAVE_STRINGS_H': false,
# 'HAVE_STRING_H': false,
# 'HAVE_SYS_DEVPOLL_H': false,
# 'HAVE_SYS_FILIO_H': false,
# 'HAVE_SYS_STAT_H': false,
# 'HAVE_SYS_TYPES_H': false,
# 'HAVE_TLS_': false,
# 'HAVE_UNISTD_H': false,
# 'HAVE_UTILS_ERRCODES_H': false,
# 'HAVE_VALGRIND_HEADERS': false,
# 'HAVE_VALGRIND_VALGRIND_H': false,
# 'HAVE__BOOL': false,
# 'LIBC_MUSL': false,
# 'LOG': false,
# 'LT_OBJDIR': false,
# 'OS_BSD': false,
# 'OS_FREEBSD': false,
# 'OS_LINUX': false,
# 'OS_NETBSD': false,
# 'OS_OPENBSD': false,
# 'OS_OSX': false,
# 'OS_SOLARIS': false,
# 'PACKAGE': 'kea',
# 'PACKAGE_BUGREPORT': 'kea-dev@lists.isc.org',
# 'PACKAGE_NAME': 'kea',
# 'PACKAGE_STRING': 'kea @0@'.format(meson.project_version()),
# 'PACKAGE_TARNAME': 'kea',
# 'PACKAGE_URL': '',
# 'PACKAGE_VERSION': meson.project_version(),
'PACKAGE_VERSION_TYPE': '"tarball"',
# 'PREMIUM': false,
'PREMIUM_EXTENDED_VERSION': '"@0@"'.format(meson.project_version()),
# 'STDC_HEADERS': false,
# 'TOP_BUILDDIR': false,
# 'USE_STATIC_LINK': false,
'VERSION': '"@0@"'.format(meson.project_version()),
# 'WITH_BOTAN': false,
# 'WITH_HEIMDAL': false,
# 'WITH_OPENSSL': false,
# 'YYTEXT_POINTER': false,
# 'SIZE_T': 'size_t',
# 'SSIZE_T': 'ssize_t',
})
boost = dependency('boost', version: '>=1.66')
botan = dependency('botan', required: false)
gtest = dependency('gtest', required: false)
log4cplus = dependency('log4cplus')
krb5 = dependency('krb5', required: false)
mysql = dependency('mariadb', required: false)
if not mysql.found()
mysql = dependency('mysql', required: false)
endif
if not mysql.found()
mysql_config = find_program('mariadb_config', required: false)
if mysql_config.found()
mysql = declare_dependency(compile_args: run_command([mysql_config, '--cflags']).stdout().split(),
link_args: run_command([mysql_config, '--libs']).stdout().split())
endif
endif
if not mysql.found()
mysql_config = find_program('mysql_config')
if mysql_config.found()
mysql = declare_dependency(compile_args: run_command([mysql_config, '--cflags']).stdout().split(),
link_args: run_command([mysql_config, '--libs']).stdout().split())
endif
endif
postgresql = dependency('libpq', required: false)
openssl = dependency('openssl', required: false)
netconf_deps = {}
netconf_deps_array = []
netconf_deps_found = true
foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
netconf_deps = netconf_deps + {dep: cpp.find_library(dep, dirs: [f'/opt/@dep@/lib'], required: false)}
if netconf_deps[dep].found()
netconf_deps = netconf_deps + {dep: declare_dependency(
dependencies: netconf_deps[dep],
include_directories: include_directories(f'/opt/@dep@/include'),
)}
netconf_deps_array += netconf_deps[dep]
else
netconf_deps_found = false
break
endif
endforeach
if netconf_deps_found
add_project_arguments('-std=c++20', language: 'cpp')
endif
if openssl.found()
crypto = openssl
conf_data.set('WITH_OPENSSL', true)
message('Using OpenSSL.')
elif botan.found()
crypto = botan
conf_data.set('WITH_BOTAN', true)
message('Using Botan.')
else
error('Build failed: Could not find neither botan nor openssl libraries.')
endif
result = cpp.run(fs.read('compiler-checks/stream-truncated-error.cc'), name: 'HAVE_STREAM_TRUNCATED_ERROR', dependencies: [crypto])
if result.compiled() and result.returncode() == 0
conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', true)
endif
if mysql.found()
result = cpp.run(fs.read('compiler-checks/mysql-my-bool.cc'), name: 'HAVE_MYSQL_MY_BOOL', dependencies: [mysql])
if result.compiled() and result.returncode() == 0
conf_data.set('HAVE_MYSQL_MY_BOOL', true)
endif
endif
system = build_machine.system()
if system == 'linux'
conf_data.set('OS_LINUX', true)
elif system == 'freebsd'
conf_data.set('OS_BSD', true)
conf_data.set('OS_FREEBSD', true)
conf_data.set('HAVE_SA_LEN', true)
elif system == 'netbsd'
conf_data.set('OS_BSD', true)
conf_data.set('OS_NETBSD', true)
conf_data.set('HAVE_SA_LEN', true)
elif system == 'openbsd'
conf_data.set('OS_BSD', true)
conf_data.set('OS_OPENBSD', true)
conf_data.set('HAVE_SA_LEN', true)
elif system == 'sun'
conf_data.set('OS_SOLARIS', true)
elif system == 'darwin'
conf_data.set('OS_BSD', true)
conf_data.set('OS_OSX', true)
conf_data.set('HAVE_SA_LEN', true)
else
error(f'Build failed: Unsupported system "@system@".')
endif
message(f'Detected system "@system@".')
prefix = get_option('prefix')
if system == 'darwin'
add_project_arguments('-D__APPLE_USE_RFC_3542', language: 'cpp')
add_project_link_arguments(f'-Wl,-rpath,@prefix@/lib', language: 'cpp')
else
conf_data.set('CHRONO_SAME_DURATION', true)
add_project_link_arguments(f'-Wl,-rpath=@prefix@/lib', language: 'cpp')
endif
have_premium = false
if fs.is_dir('premium')
have_premium = true
conf_data.set('PREMIUM', true)
endif
configure_file(input : 'config.h.in',
output : 'config.h',
configuration : conf_data)
configure_file(input : 'kea_version.h.in',
output : 'kea_version.h',
configuration : conf_data)
includes = [
include_directories('.'),
include_directories('src/bin'),
include_directories('src/lib'),
]
kea_admin = '@0@/src/bin/admin/kea-admin'.format(meson.current_build_dir())
kea_lfc = '@0@/src/bin/lfc/kea-lfc'.format(meson.current_build_dir())
libs_built_so_far = []
subdir('src')
if have_premium
subdir('premium')
endif

22
src/bin/dhcp4/meson.build Normal file
View File

@ -0,0 +1,22 @@
dhcp4_lib = static_library('dhcp4',
'client_handler.cc',
'ctrl_dhcp4_srv.cc',
'dhcp4to6_ipc.cc',
'dhcp4_lexer.cc',
'dhcp4_log.cc',
'dhcp4_messages.cc',
'dhcp4_parser.cc',
'dhcp4_srv.cc',
'json_config_parser.cc',
'parser_context.cc',
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far,
)
kea_dhcp4_exe = executable('kea-dhcp4',
'main.cc',
dependencies: [crypto],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'sbin',
link_with: libs_built_so_far + [dhcp4_lib],
)

32
src/bin/dhcp6/meson.build Normal file
View File

@ -0,0 +1,32 @@
dhcp6_lib = static_library('dhcp6',
'client_handler.cc',
'client_handler.h',
'ctrl_dhcp6_srv.cc',
'ctrl_dhcp6_srv.h',
'dhcp6to4_ipc.cc',
'dhcp6to4_ipc.h',
'dhcp6_lexer.cc',
'dhcp6_log.cc',
'dhcp6_log.h',
'dhcp6_messages.cc',
'dhcp6_messages.h',
'dhcp6_parser.cc',
'dhcp6_parser.h',
'dhcp6_srv.cc',
'dhcp6_srv.h',
'json_config_parser.cc',
'json_config_parser.h',
'main.cc',
'parser_context.cc',
'parser_context.h',
'parser_context_decl.h',
include_directories: includes
)
kea_dhcp6_exe = executable('kea-dhcp6',
'main.cc',
dependencies: [crypto],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'sbin',
link_with: libs_built_so_far + [dhcp6_lib],
)

17
src/bin/lfc/meson.build Normal file
View File

@ -0,0 +1,17 @@
lfc_lib = static_library('lfc',
'lfc_controller.cc',
'lfc_controller.h',
'lfc_log.cc',
'lfc_log.h',
'lfc_messages.cc',
'lfc_messages.h',
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far,
)
kea_lfc_exe = executable('kea-lfc',
'main.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'sbin',
link_with: libs_built_so_far + [lfc_lib],
)

4
src/bin/meson.build Normal file
View File

@ -0,0 +1,4 @@
subdir('dhcp4')
subdir('dhcp6')
subdir('lfc')
subdir('perfdhcp')

View File

@ -0,0 +1,36 @@
perfdhcplib_lib = static_library('perfdhcplib',
'abstract_scen.h',
'avalanche_scen.cc',
'avalanche_scen.h',
'basic_scen.cc',
'basic_scen.h',
'command_options.cc',
'command_options.h',
'localized_option.h',
'packet_storage.h',
'perf_pkt4.cc',
'perf_pkt4.h',
'perf_pkt6.cc',
'perf_pkt6.h',
'perf_socket.cc',
'perf_socket.h',
'pkt_transform.cc',
'pkt_transform.h',
'rate_control.cc',
'rate_control.h',
'receiver.cc',
'receiver.h',
'stats_mgr.cc',
'stats_mgr.h',
'test_control.cc',
'test_control.h',
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far,
)
perfdhcp_exe = executable('perfdhcp',
'main.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'sbin',
link_with: libs_built_so_far + [perfdhcplib_lib],
)

View File

@ -0,0 +1,12 @@
dhcp_bootp_lib = library('dhcp_bootp',
'bootp_callouts.cc',
'bootp_log.cc',
'bootp_log.h',
'bootp_messages.cc',
'bootp_messages.h',
'version.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,14 @@
dhcp_flex_option_lib = library('dhcp_flex_option',
'flex_option.cc',
'flex_option.h',
'flex_option_callouts.cc',
'flex_option_log.cc',
'flex_option_log.h',
'flex_option_messages.cc',
'flex_option_messages.h',
'version.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,35 @@
dhcp_high_availability_lib = library('dhcp_high_availability',
'command_creator.cc',
'command_creator.h',
'communication_state.cc',
'communication_state.h',
'ha_callouts.cc',
'ha_config.cc',
'ha_config.h',
'ha_config_parser.cc',
'ha_config_parser.h',
'ha_impl.cc',
'ha_impl.h',
'ha_log.cc',
'ha_log.h',
'ha_messages.cc',
'ha_messages.h',
'ha_relationship_mapper.h',
'ha_server_type.h',
'ha_service.cc',
'ha_service.h',
'ha_service_states.cc',
'ha_service_states.h',
'lease_sync_filter.cc',
'lease_sync_filter.h',
'lease_update_backlog.cc',
'lease_update_backlog.h',
'query_filter.cc',
'query_filter.h',
'version.cc',
dependencies: [crypto],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,17 @@
dhcp_lease_cmds_lib = library('dhcp_lease_cmds',
'lease_cmds.cc',
'lease_cmds.h',
'lease_cmds_callouts.cc',
'lease_cmds_exceptions.h',
'lease_cmds_log.cc',
'lease_cmds_log.h',
'lease_cmds_messages.cc',
'lease_cmds_messages.h',
'lease_parser.cc',
'lease_parser.h',
'version.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,10 @@
subdir('bootp')
subdir('flex_option')
subdir('high_availability')
subdir('lease_cmds')
subdir('mysql')
subdir('perfmon')
subdir('pgsql')
subdir('run_script')
subdir('stat_cmds')
subdir('user_chk')

View File

@ -0,0 +1,36 @@
if not mysql.found()
subdir_done()
endif
dhcp_mysql_lib = library('dhcp_mysql',
'mysql_callouts.cc',
'mysql_cb_dhcp4.cc',
'mysql_cb_dhcp4.h',
'mysql_cb_dhcp6.cc',
'mysql_cb_dhcp6.h',
'mysql_cb_impl.cc',
'mysql_cb_impl.h',
'mysql_cb_log.cc',
'mysql_cb_log.h',
'mysql_cb_messages.cc',
'mysql_cb_messages.h',
'mysql_hb_log.cc',
'mysql_hb_log.h',
'mysql_hb_messages.cc',
'mysql_hb_messages.h',
'mysql_host_data_source.cc',
'mysql_host_data_source.h',
'mysql_lb_log.cc',
'mysql_lb_log.h',
'mysql_lb_messages.cc',
'mysql_lb_messages.h',
'mysql_lease_mgr.cc',
'mysql_lease_mgr.h',
'mysql_query_macros_dhcp.h',
'version.cc',
dependencies: [mysql],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,24 @@
dhcp_perfmon_lib = library('dhcp_perfmon',
'alarm.cc',
'alarm.h',
'alarm_store.cc',
'alarm_store.h',
'monitored_duration.cc',
'monitored_duration.h',
'monitored_duration_store.cc',
'monitored_duration_store.h',
'perfmon_callouts.cc',
'perfmon_config.cc',
'perfmon_config.h',
'perfmon_log.cc',
'perfmon_log.h',
'perfmon_messages.cc',
'perfmon_messages.h',
'perfmon_mgr.cc',
'perfmon_mgr.h',
'version.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,36 @@
if not postgresql.found()
subdir_done()
endif
dhcp_pgsql_lib = library('dhcp_pgsql',
'pgsql_callouts.cc',
'pgsql_cb_dhcp4.cc',
'pgsql_cb_dhcp4.h',
'pgsql_cb_dhcp6.cc',
'pgsql_cb_dhcp6.h',
'pgsql_cb_impl.cc',
'pgsql_cb_impl.h',
'pgsql_cb_log.cc',
'pgsql_cb_log.h',
'pgsql_cb_messages.cc',
'pgsql_cb_messages.h',
'pgsql_hb_log.cc',
'pgsql_hb_log.h',
'pgsql_hb_messages.cc',
'pgsql_hb_messages.h',
'pgsql_host_data_source.cc',
'pgsql_host_data_source.h',
'pgsql_lb_log.cc',
'pgsql_lb_log.h',
'pgsql_lb_messages.cc',
'pgsql_lb_messages.h',
'pgsql_lease_mgr.cc',
'pgsql_lease_mgr.h',
'pgsql_query_macros_dhcp.h',
'version.cc',
dependencies: [postgresql],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,14 @@
dhcp_run_script_lib = library('dhcp_run_script',
'run_script.cc',
'run_script.h',
'run_script_callouts.cc',
'run_script_log.cc',
'run_script_log.h',
'run_script_messages.cc',
'run_script_messages.h',
'version.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,14 @@
dhcp_stat_cmds_lib = library('dhcp_stat_cmds',
'stat_cmds.cc',
'stat_cmds.h',
'stat_cmds_callouts.cc',
'stat_cmds_log.cc',
'stat_cmds_log.h',
'stat_cmds_messages.cc',
'stat_cmds_messages.h',
'version.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

View File

@ -0,0 +1,23 @@
dhcp_user_chk_lib = library('dhcp_user_chk',
'load_unload.cc',
'pkt_receive_co.cc',
'pkt_send_co.cc',
'subnet_select_co.cc',
'user.cc',
'user.h',
'user_chk.h',
'user_chk_log.cc',
'user_chk_log.h',
'user_chk_messages.cc',
'user_chk_messages.h',
'user_data_source.h',
'user_file.cc',
'user_file.h',
'user_registry.cc',
'user_registry.h',
'version.cc',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib/kea/hooks',
link_with: libs_built_so_far,
)

1
src/hooks/meson.build Normal file
View File

@ -0,0 +1 @@
subdir('dhcp')

View File

@ -0,0 +1,14 @@
kea_asiodns_lib = library('kea-asiodns',
'asiodns_messages.cc',
'asiodns_messages.h',
'io_fetch.cc',
'io_fetch.h',
'logger.cc',
'logger.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_asiodns_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,8 @@
kea_asiodns_tests_exe = executable('kea-asiodns-tests',
'io_fetch_unittest.cc',
'run_unittests.cc',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
)
test('kea_asiodns_tests_exe', kea_asiodns_tests_exe)

View File

@ -0,0 +1,53 @@
kea_asiolink_lib = library('kea-asiolink',
'addr_utilities.cc',
'addr_utilities.h',
'asiolink.h',
'asio_wrapper.h',
'botan_tls.cc',
'botan_tls.h',
'botan_wrapper.h',
'common_tls.cc',
'common_tls.h',
'crypto_tls.h',
'dummy_io_cb.h',
'interval_timer.cc',
'interval_timer.h',
'io_acceptor.h',
'io_address.cc',
'io_address.h',
'io_asio_socket.h',
'io_endpoint.cc',
'io_endpoint.h',
'io_error.h',
'io_service.cc',
'io_service.h',
'io_service_mgr.cc',
'io_service_mgr.h',
'io_service_signal.cc',
'io_service_signal.h',
'io_service_thread_pool.cc',
'io_service_thread_pool.h',
'io_socket.cc',
'io_socket.h',
'openssl_tls.cc',
'openssl_tls.h',
'process_spawn.cc',
'process_spawn.h',
'tcp_acceptor.h',
'tcp_endpoint.h',
'tcp_socket.h',
'tls_acceptor.h',
'tls_socket.h',
'udp_endpoint.h',
'udp_socket.h',
'unix_domain_socket.cc',
'unix_domain_socket.h',
'unix_domain_socket_acceptor.h',
'unix_domain_socket_endpoint.h',
dependencies: crypto,
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_asiolink_lib]

29
src/lib/cc/meson.build Normal file
View File

@ -0,0 +1,29 @@
kea_cc_lib = library('kea-cc',
'base_stamped_element.cc',
'base_stamped_element.h',
'cfg_to_element.h',
'command_interpreter.cc',
'command_interpreter.h',
'data.cc',
'data.h',
'dhcp_config_error.h',
'element_value.h',
'json_feed.cc',
'json_feed.h',
'server_tag.cc',
'server_tag.h',
'simple_parser.cc',
'simple_parser.h',
'stamped_element.cc',
'stamped_element.h',
'stamped_value.cc',
'stamped_value.h',
'user_context.cc',
'user_context.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_cc_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,17 @@
kea_cc_tests_exe = executable('kea-cc-tests',
'command_interpreter_unittests.cc',
'data_file_unittests.cc',
'data_unittests.cc',
'element_value_unittests.cc',
'json_feed_unittests.cc',
'run_unittests.cc',
'server_tag_unittest.cc',
'simple_parser_unittest.cc',
'stamped_element_unittest.cc',
'stamped_value_unittest.cc',
'user_context_unittests.cc',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_util_unittests_lib],
)
test('kea_cc_tests_exe', kea_cc_tests_exe)

View File

@ -0,0 +1,36 @@
kea_config_lib = library('kea-config',
'base_command_mgr.cc',
'base_command_mgr.h',
'client_connection.cc',
'client_connection.h',
'cmds_impl.h',
'cmd_http_listener.cc',
'cmd_http_listener.h',
'cmd_response_creator.cc',
'cmd_response_creator.h',
'cmd_response_creator_factory.h',
'command_mgr.cc',
'command_mgr.h',
'config_log.cc',
'config_log.h',
'config_messages.cc',
'config_messages.h',
'hooked_command_mgr.cc',
'hooked_command_mgr.h',
'http_command_config.cc',
'http_command_config.h',
'http_command_mgr.cc',
'http_command_mgr.h',
'http_command_response_creator.cc',
'http_command_response_creator.h',
'http_command_response_creator_factory.h',
'timeouts.h',
'unix_command_mgr.cc',
'unix_command_mgr.h',
dependencies: [crypto],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_config_lib]

View File

@ -0,0 +1,12 @@
kea_config_backend_lib = library('kea-config_backend',
'base_config_backend.h',
'base_config_backend_mgr.h',
'base_config_backend_pool.h',
'constants.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_config_backend_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,8 @@
kea_config_backend_tests_exe = executable('kea-config_backend-tests',
'config_backend_mgr_unittest.cc',
'run_unittests.cc',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
)
test('kea_config_backend_tests_exe', kea_config_backend_tests_exe)

View File

@ -0,0 +1,21 @@
kea_cryptolink_lib = library('kea-cryptolink',
'cryptolink.cc',
'cryptolink.h',
'crypto_hash.cc',
'crypto_hash.h',
'crypto_hmac.cc',
'crypto_hmac.h',
'crypto_rng.cc',
'crypto_rng.h',
'openssl_common.h',
'openssl_hash.cc',
'openssl_hmac.cc',
'openssl_link.cc',
dependencies: [crypto],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_cryptolink_lib] + libs_built_so_far
subdir('tests')

View File

@ -1,4 +1,4 @@
// Copyright (C) 2014-2024 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@ -14,8 +14,6 @@
#include <openssl/evp.h>
#include <cryptolink/openssl_common.h>
#define KEA_HASH
#include <cryptolink/openssl_compat.h>
#include <cstring>

View File

@ -1,4 +1,4 @@
// Copyright (C) 2014-2022 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@ -14,9 +14,6 @@
#include <openssl/evp.h>
#include <cryptolink/openssl_common.h>
#define KEA_HASH
#define KEA_HMAC
#include <cryptolink/openssl_compat.h>
#include <cstring>

View File

@ -0,0 +1,10 @@
kea_cryptolink_tests_exe = executable('kea-cryptolink-tests',
'crypto_unittests.cc',
'hash_unittests.cc',
'hmac_unittests.cc',
'run_unittests.cc',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_util_unittests_lib],
)
test('kea_cryptolink_tests_exe', kea_cryptolink_tests_exe)

29
src/lib/d2srv/meson.build Normal file
View File

@ -0,0 +1,29 @@
kea_d2srv_lib = library('kea-d2srv',
'd2_cfg_mgr.cc',
'd2_cfg_mgr.h',
'd2_config.cc',
'd2_config.h',
'd2_log.cc',
'd2_log.h',
'd2_messages.cc',
'd2_messages.h',
'd2_simple_parser.cc',
'd2_simple_parser.h',
'd2_stats.cc',
'd2_stats.h',
'd2_tsig_key.cc',
'd2_tsig_key.h',
'd2_update_message.cc',
'd2_update_message.h',
'd2_zone.cc',
'd2_zone.h',
'dns_client.cc',
'dns_client.h',
'nc_trans.cc',
'nc_trans.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_d2srv_lib]

View File

@ -0,0 +1,27 @@
kea_database_lib = library('kea-database',
'audit_entry.cc',
'audit_entry.h',
'backend_selector.cc',
'backend_selector.h',
'database_connection.cc',
'database_connection.h',
'dbaccess_parser.cc',
'dbaccess_parser.h',
'db_exceptions.h',
'db_log.cc',
'db_log.h',
'db_messages.cc',
'db_messages.h',
'server.cc',
'server.h',
'server_collection.cc',
'server_collection.h',
'server_selector.cc',
'server_selector.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_database_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,14 @@
kea_database_tests_exe = executable('kea-database-tests',
'audit_entry_unittest.cc',
'backend_selector_unittest.cc',
'database_connection_unittest.cc',
'database_log_unittest.cc',
'dbaccess_parser_unittest.cc',
'run_unittests.cc',
'server_selector_unittest.cc',
'server_unittest.cc',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
)
test('kea_database_tests_exe', kea_database_tests_exe)

119
src/lib/dhcp/meson.build Normal file
View File

@ -0,0 +1,119 @@
system = build_machine.system()
pkt_filter_cc = 'pkt_filter_bpf.cc'
pkt_filter_h = 'pkt_filter_bpf.h'
if system == 'linux'
iface_mgr = 'iface_mgr_linux.cc'
pkt_filter_cc = 'pkt_filter_lpf.cc'
pkt_filter_h = 'pkt_filter_lpf.h'
elif system == 'freebsd' or system == 'netbsd' or system == 'openbsd' or system == 'darwin'
iface_mgr = 'iface_mgr_bsd.cc'
elif system == 'sun'
iface_mgr = 'iface_mgr_sun.cc'
elif system == 'osx'
else
error(f'Build failed: Unsupported system "@system@".')
endif
kea_dhcp_lib = library('kea-dhcp',
'classify.cc',
'classify.h',
'dhcp4.h',
'dhcp6.h',
'docsis3_option_defs.h',
'duid.cc',
'duid.h',
'duid_factory.cc',
'duid_factory.h',
'hwaddr.cc',
'hwaddr.h',
'iface_mgr.cc',
'iface_mgr.h',
'iface_mgr_error_handler.h',
iface_mgr,
'libdhcp++.cc',
'libdhcp++.h',
'opaque_data_tuple.cc',
'opaque_data_tuple.h',
'option.cc',
'option.h',
'option4_addrlst.cc',
'option4_addrlst.h',
'option4_client_fqdn.cc',
'option4_client_fqdn.h',
'option4_dnr.cc',
'option4_dnr.h',
'option6_addrlst.cc',
'option6_addrlst.h',
'option6_auth.cc',
'option6_auth.h',
'option6_client_fqdn.cc',
'option6_client_fqdn.h',
'option6_dnr.cc',
'option6_dnr.h',
'option6_ia.cc',
'option6_ia.h',
'option6_iaaddr.cc',
'option6_iaaddr.h',
'option6_iaprefix.cc',
'option6_iaprefix.h',
'option6_pdexclude.cc',
'option6_pdexclude.h',
'option6_status_code.cc',
'option6_status_code.h',
'option_classless_static_route.cc',
'option_classless_static_route.h',
'option_custom.cc',
'option_custom.h',
'option_data_types.cc',
'option_data_types.h',
'option_definition.cc',
'option_definition.h',
'option_int.h',
'option_int_array.h',
'option_opaque_data_tuples.cc',
'option_opaque_data_tuples.h',
'option_space.cc',
'option_space.h',
'option_space_container.h',
'option_string.cc',
'option_string.h',
'option_vendor.cc',
'option_vendor.h',
'option_vendor_class.cc',
'option_vendor_class.h',
'packet_queue.h',
'packet_queue_mgr.h',
'packet_queue_mgr4.cc',
'packet_queue_mgr4.h',
'packet_queue_mgr6.cc',
'packet_queue_mgr6.h',
'packet_queue_ring.h',
'pkt.cc',
'pkt.h',
'pkt4.cc',
'pkt4.h',
'pkt4o6.cc',
'pkt4o6.h',
'pkt6.cc',
'pkt6.h',
'pkt_filter.cc',
'pkt_filter.h',
'pkt_filter6.cc',
'pkt_filter6.h',
'pkt_filter_inet.cc',
'pkt_filter_inet.h',
'pkt_filter_inet6.cc',
'pkt_filter_inet6.h',
pkt_filter_cc,
pkt_filter_h,
'pkt_template.h',
'protocol_util.cc',
'protocol_util.h',
'socket_info.h',
'std_option_defs.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_dhcp_lib]

View File

@ -0,0 +1,18 @@
kea_dhcp_ddns_lib = library('kea-dhcp_ddns',
'dhcp_ddns_log.cc',
'dhcp_ddns_log.h',
'dhcp_ddns_messages.cc',
'dhcp_ddns_messages.h',
'ncr_io.cc',
'ncr_io.h',
'ncr_msg.cc',
'ncr_msg.h',
'ncr_udp.cc',
'ncr_udp.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_dhcp_ddns_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,11 @@
kea_dhcp_ddns_tests_exe = executable('kea-dhcp_ddns-tests',
'ncr_udp_unittests.cc',
'ncr_unittests.cc',
'run_unittests.cc',
'test_utils.cc',
'test_utils.h',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
)
test('kea_dhcp_ddns_tests_exe', kea_dhcp_ddns_tests_exe)

195
src/lib/dhcpsrv/meson.build Normal file
View File

@ -0,0 +1,195 @@
kea_dhcpsrv_lib = library('kea-dhcpsrv',
'allocation_state.cc',
'allocation_state.h',
'allocator.cc',
'allocator.h',
'alloc_engine.cc',
'alloc_engine.h',
'alloc_engine_log.cc',
'alloc_engine_log.h',
'alloc_engine_messages.cc',
'alloc_engine_messages.h',
'base_host_data_source.h',
'cache_host_data_source.h',
'callout_handle_store.h',
'cb_ctl_dhcp.h',
'cb_ctl_dhcp4.cc',
'cb_ctl_dhcp4.h',
'cb_ctl_dhcp6.cc',
'cb_ctl_dhcp6.h',
'cfgmgr.cc',
'cfgmgr.h',
'cfg_4o6.cc',
'cfg_4o6.h',
'cfg_consistency.cc',
'cfg_consistency.h',
'cfg_db_access.cc',
'cfg_db_access.h',
'cfg_duid.cc',
'cfg_duid.h',
'cfg_expiration.cc',
'cfg_expiration.h',
'cfg_globals.cc',
'cfg_globals.h',
'cfg_hosts.cc',
'cfg_hosts.h',
'cfg_hosts_util.cc',
'cfg_hosts_util.h',
'cfg_host_operations.cc',
'cfg_host_operations.h',
'cfg_iface.cc',
'cfg_iface.h',
'cfg_mac_source.cc',
'cfg_mac_source.h',
'cfg_multi_threading.cc',
'cfg_multi_threading.h',
'cfg_option.cc',
'cfg_option.h',
'cfg_option_def.cc',
'cfg_option_def.h',
'cfg_rsoo.cc',
'cfg_rsoo.h',
'cfg_shared_networks.cc',
'cfg_shared_networks.h',
'cfg_subnets4.cc',
'cfg_subnets4.h',
'cfg_subnets6.cc',
'cfg_subnets6.h',
'client_class_def.cc',
'client_class_def.h',
'config_backend_dhcp4.h',
'config_backend_dhcp4_mgr.cc',
'config_backend_dhcp4_mgr.h',
'config_backend_dhcp6.h',
'config_backend_dhcp6_mgr.cc',
'config_backend_dhcp6_mgr.h',
'config_backend_pool_dhcp4.cc',
'config_backend_pool_dhcp4.h',
'config_backend_pool_dhcp6.cc',
'config_backend_pool_dhcp6.h',
'csv_lease_file4.cc',
'csv_lease_file4.h',
'csv_lease_file6.cc',
'csv_lease_file6.h',
'd2_client_cfg.cc',
'd2_client_cfg.h',
'd2_client_mgr.cc',
'd2_client_mgr.h',
'db_type.h',
'dhcp4o6_ipc.cc',
'dhcp4o6_ipc.h',
'dhcpsrv_exceptions.h',
'dhcpsrv_log.cc',
'dhcpsrv_log.h',
'dhcpsrv_messages.cc',
'dhcpsrv_messages.h',
'flq_allocation_state.cc',
'flq_allocation_state.h',
'flq_allocator.cc',
'flq_allocator.h',
'fuzz_log.cc',
'fuzz_log.h',
'fuzz_messages.cc',
'fuzz_messages.h',
'host.cc',
'host.h',
'hosts_log.cc',
'hosts_log.h',
'hosts_messages.cc',
'hosts_messages.h',
'host_container.h',
'host_data_source_factory.cc',
'host_data_source_factory.h',
'host_mgr.cc',
'host_mgr.h',
'ip_range.cc',
'ip_range.h',
'ip_range_permutation.cc',
'ip_range_permutation.h',
'iterative_allocation_state.cc',
'iterative_allocation_state.h',
'iterative_allocator.cc',
'iterative_allocator.h',
'key_from_key.h',
'lease.cc',
'lease.h',
'lease_file_loader.h',
'lease_file_stats.h',
'lease_mgr.cc',
'lease_mgr.h',
'lease_mgr_factory.cc',
'lease_mgr_factory.h',
'memfile_lease_limits.cc',
'memfile_lease_limits.h',
'memfile_lease_mgr.cc',
'memfile_lease_mgr.h',
'memfile_lease_storage.h',
'ncr_generator.cc',
'ncr_generator.h',
'network.cc',
'network.h',
'network_state.cc',
'network_state.h',
'packet_fuzzer.cc',
'packet_fuzzer.h',
'parsers/base_network_parser.cc',
'parsers/base_network_parser.h',
'parsers/client_class_def_parser.cc',
'parsers/client_class_def_parser.h',
'parsers/dhcp_parsers.cc',
'parsers/dhcp_parsers.h',
'parsers/dhcp_queue_control_parser.cc',
'parsers/dhcp_queue_control_parser.h',
'parsers/duid_config_parser.cc',
'parsers/duid_config_parser.h',
'parsers/expiration_config_parser.cc',
'parsers/expiration_config_parser.h',
'parsers/host_reservations_list_parser.h',
'parsers/host_reservation_parser.cc',
'parsers/host_reservation_parser.h',
'parsers/ifaces_config_parser.cc',
'parsers/ifaces_config_parser.h',
'parsers/multi_threading_config_parser.cc',
'parsers/multi_threading_config_parser.h',
'parsers/option_data_parser.cc',
'parsers/option_data_parser.h',
'parsers/sanity_checks_parser.cc',
'parsers/sanity_checks_parser.h',
'parsers/shared_networks_list_parser.h',
'parsers/shared_network_parser.cc',
'parsers/shared_network_parser.h',
'parsers/simple_parser4.cc',
'parsers/simple_parser4.h',
'parsers/simple_parser6.cc',
'parsers/simple_parser6.h',
'pool.cc',
'pool.h',
'random_allocation_state.cc',
'random_allocation_state.h',
'random_allocator.cc',
'random_allocator.h',
'resource_handler.cc',
'resource_handler.h',
'sanity_checker.cc',
'sanity_checker.h',
'shared_network.cc',
'shared_network.h',
'srv_config.cc',
'srv_config.h',
'subnet.cc',
'subnet.h',
'subnet_id.h',
'subnet_selector.h',
'timer_mgr.cc',
'timer_mgr.h',
'tracking_lease_mgr.cc',
'tracking_lease_mgr.h',
'utils.h',
'writable_host_data_source.h',
cpp_args: ['-DDHCP_DATA_DIR="@0@"'.format(meson.current_build_dir()), f'-DKEA_LFC_EXECUTABLE="@kea_lfc@"'],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_dhcpsrv_lib]

64
src/lib/dns/meson.build Normal file
View File

@ -0,0 +1,64 @@
kea_dns_lib = library('kea-dns',
'char_string.cc',
'char_string.h',
'edns.cc',
'edns.h',
'exceptions.cc',
'exceptions.h',
'labelsequence.cc',
'labelsequence.h',
'master_lexer.cc',
'master_lexer.h',
'master_lexer_inputsource.cc',
'master_lexer_inputsource.h',
'master_lexer_state.h',
'master_loader.cc',
'master_loader.h',
'master_loader_callbacks.h',
'message.cc',
'message.h',
'messagerenderer.cc',
'messagerenderer.h',
'name.cc',
'name.h',
'name_internal.h',
'opcode.cc',
'opcode.h',
'question.cc',
'question.h',
'rcode.cc',
'rcode.h',
'rdata.cc',
'rdata.h',
'rdataclass.cc',
'rdataclass.h',
'rrclass.cc',
'rrclass.h',
'rrparamregistry.cc',
'rrparamregistry.h',
'rrset.cc',
'rrset.h',
'rrttl.cc',
'rrttl.h',
'rrtype.cc',
'rrtype.h',
'serial.cc',
'serial.h',
'time_utils.cc',
'time_utils.h',
'tsig.cc',
'tsig.h',
'tsigerror.cc',
'tsigerror.h',
'tsigkey.cc',
'tsigkey.h',
'tsigrecord.cc',
'tsigrecord.h',
'txt_like.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_dns_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,54 @@
kea_dns_tests_exe = executable('kea-dns-tests',
'dns_exceptions_unittest.cc',
'edns_unittest.cc',
'labelsequence_unittest.cc',
'master_lexer_inputsource_unittest.cc',
'master_lexer_state_unittest.cc',
'master_lexer_token_unittest.cc',
'master_lexer_unittest.cc',
'master_loader_callbacks_test.cc',
'master_loader_unittest.cc',
'messagerenderer_unittest.cc',
'message_unittest.cc',
'name_unittest.cc',
'opcode_unittest.cc',
'question_unittest.cc',
'rcode_unittest.cc',
'rdata_char_string_data_unittest.cc',
'rdata_char_string_unittest.cc',
'rdata_dhcid_unittest.cc',
'rdata_in_aaaa_unittest.cc',
'rdata_in_a_unittest.cc',
'rdata_ns_unittest.cc',
'rdata_opt_unittest.cc',
'rdata_ptr_unittest.cc',
'rdata_rrsig_unittest.cc',
'rdata_soa_unittest.cc',
'rdata_tkey_unittest.cc',
'rdata_tsig_unittest.cc',
'rdata_txt_like_unittest.cc',
'rdata_unittest.cc',
'rdata_unittest.h',
'rrclass_unittest.cc',
'rrparamregistry_unittest.cc',
'rrset_unittest.cc',
'rrttl_unittest.cc',
'rrtype_unittest.cc',
'run_unittests.cc',
'serial_unittest.cc',
'time_utils_unittest.cc',
'tsigerror_unittest.cc',
'tsigkey_unittest.cc',
'tsigrecord_unittest.cc',
'tsig_unittest.cc',
'unittest_util.cc',
'unittest_util.h',
cpp_args: [
'-DTEST_DATA_BUILDDIR="@0@/testdata"'.format(meson.current_build_dir()),
'-DTEST_DATA_SRCDIR="@0@/testdata"'.format(meson.current_source_dir()),
],
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_util_unittests_lib],
)
test('kea_dns_tests_exe', kea_dns_tests_exe)

24
src/lib/eval/meson.build Normal file
View File

@ -0,0 +1,24 @@
kea_eval_lib = library('kea-eval',
'dependency.cc',
'dependency.h',
'evaluate.cc',
'evaluate.h',
'eval_context.cc',
'eval_context.h',
'eval_context_decl.h',
'eval_log.cc',
'eval_log.h',
'eval_messages.cc',
'eval_messages.h',
'lexer.cc',
'parser.cc',
'parser.h',
'token.cc',
'token.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_eval_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,12 @@
kea_eval_tests_exe = executable('kea-eval-tests',
'boolean_unittest.cc',
'context_unittest.cc',
'dependency_unittest.cc',
'evaluate_unittest.cc',
'run_unittests.cc',
'token_unittest.cc',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
)
test('kea_eval_tests_exe', kea_eval_tests_exe)

View File

@ -0,0 +1,11 @@
kea_exceptions_lib = library('kea-exceptions',
'exceptions.cc',
'exceptions.h',
'isc_assert.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_exceptions_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,8 @@
kea_exceptions_tests_exe = executable('kea-exceptions-tests',
'exceptions_unittest.cc',
'run_unittests.cc',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far,
)
test('kea_exceptions_tests_exe', kea_exceptions_tests_exe)

37
src/lib/hooks/meson.build Normal file
View File

@ -0,0 +1,37 @@
kea_hooks_lib = library('kea-hooks',
'callout_handle.cc',
'callout_handle.h',
'callout_handle_associate.cc',
'callout_handle_associate.h',
'callout_manager.cc',
'callout_manager.h',
'hooks.h',
'hooks_config.cc',
'hooks_config.h',
'hooks_log.cc',
'hooks_log.h',
'hooks_manager.cc',
'hooks_manager.h',
'hooks_messages.cc',
'hooks_messages.h',
'hooks_parser.cc',
'hooks_parser.h',
'libinfo.cc',
'libinfo.h',
'library_handle.cc',
'library_handle.h',
'library_manager.cc',
'library_manager.h',
'library_manager_collection.cc',
'library_manager_collection.h',
'parking_lots.h',
'pointer_converter.h',
'server_hooks.cc',
'server_hooks.h',
cpp_args: ['-DDEFAULT_HOOKS_PATH="@0@"'.format(meson.current_build_dir())],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_hooks_lib]

65
src/lib/http/meson.build Normal file
View File

@ -0,0 +1,65 @@
kea_http_lib = library('kea-http',
'auth_config.h',
'auth_log.cc',
'auth_log.h',
'auth_messages.cc',
'auth_messages.h',
'basic_auth.cc',
'basic_auth.h',
'basic_auth_config.cc',
'basic_auth_config.h',
'cfg_http_header.cc',
'cfg_http_header.h',
'client.cc',
'client.h',
'connection.cc',
'connection.h',
'connection_pool.cc',
'connection_pool.h',
'date_time.cc',
'date_time.h',
'header_context.h',
'http_acceptor.h',
'http_header.cc',
'http_header.h',
'http_log.cc',
'http_log.h',
'http_message.cc',
'http_message.h',
'http_messages.cc',
'http_messages.h',
'http_message_parser_base.cc',
'http_message_parser_base.h',
'http_types.h',
'listener.cc',
'listener.h',
'listener_impl.cc',
'listener_impl.h',
'post_request.cc',
'post_request.h',
'post_request_json.cc',
'post_request_json.h',
'request.cc',
'request.h',
'request_context.h',
'request_parser.cc',
'request_parser.h',
'response.cc',
'response.h',
'response_context.h',
'response_creator.cc',
'response_creator.h',
'response_creator_factory.h',
'response_json.cc',
'response_json.h',
'response_parser.cc',
'response_parser.h',
'url.cc',
'url.h',
dependencies: [crypto],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_http_lib]

View File

@ -0,0 +1,8 @@
sources = [
'message.cc']
kea_msg_compiler = executable('kea-msg-compiler',
sources,
include_directories: [include_directories('.')] + includes,
link_with : [exceptions_lib, log_lib, util_lib],
install : true)

View File

@ -0,0 +1,13 @@
kea_log_interprocess_lib = library('kea-log-interprocess',
'interprocess_sync.h',
'interprocess_sync_file.cc',
'interprocess_sync_file.h',
'interprocess_sync_null.cc',
'interprocess_sync_null.h',
cpp_args: ['-DLOCKFILE_DIR="@0@"'.format(meson.current_build_dir())],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_log_interprocess_lib] + libs_built_so_far

51
src/lib/log/meson.build Normal file
View File

@ -0,0 +1,51 @@
subdir('interprocess')
kea_log_lib = library('kea-log',
'buffer_appender_impl.cc',
'buffer_appender_impl.h',
'logger.cc',
'logger.h',
'logger_impl.cc',
'logger_impl.h',
'logger_level.cc',
'logger_level.h',
'logger_level_impl.cc',
'logger_level_impl.h',
'logger_manager.cc',
'logger_manager.h',
'logger_manager_impl.cc',
'logger_manager_impl.h',
'logger_name.cc',
'logger_name.h',
'logger_specification.h',
'logger_support.cc',
'logger_support.h',
'logger_unittest_support.cc',
'logger_unittest_support.h',
'logimpl_messages.cc',
'logimpl_messages.h',
'log_dbglevels.cc',
'log_dbglevels.h',
'log_formatter.cc',
'log_formatter.h',
'log_messages.cc',
'log_messages.h',
'macros.h',
'message_dictionary.cc',
'message_dictionary.h',
'message_exception.h',
'message_initializer.cc',
'message_initializer.h',
'message_reader.cc',
'message_reader.h',
'message_types.h',
'output_option.cc',
'output_option.h',
cpp_args: ['-DTOP_BUILDDIR="@0@"'.format(meson.project_build_root())],
dependencies: [log4cplus],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_log_lib] + libs_built_so_far
subdir('tests')

View File

@ -1,4 +1,4 @@
// Copyright (C) 2011-2022 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@ -29,7 +29,6 @@
#include <log/logger_specification.h>
#include <log/message_initializer.h>
#include <log/output_option.h>
#include <log/tests/tempdir.h>
#include <testutils/gtest_utils.h>
#include <sys/types.h>
@ -109,7 +108,7 @@ public:
//
// \return Temporary file name
static std::string createTempFilename() {
string filename = TEMP_DIR + "/kea_logger_manager_test_XXXXXX";
string filename = string(TEMP_DIR) + "/kea_logger_manager_test_XXXXXX";
// Copy into writable storage for the call to mkstemp
boost::scoped_array<char> tname(new char[filename.size() + 1]);

View File

@ -0,0 +1,22 @@
kea_log_tests_exe = executable('kea-log-tests',
'buffer_appender_unittest.cc',
'logger_level_impl_unittest.cc',
'logger_level_unittest.cc',
'logger_manager_unittest.cc',
'logger_name_unittest.cc',
'logger_specification_unittest.cc',
'logger_support_unittest.cc',
'logger_unittest.cc',
'log_formatter_unittest.cc',
'log_test_messages.cc',
'log_test_messages.h',
'message_dictionary_unittest.cc',
'message_reader_unittest.cc',
'output_option_unittest.cc',
'run_unittests.cc',
cpp_args: ['-DTEMP_DIR="@0@"'.format(meson.current_build_dir())],
dependencies: [gtest, log4cplus],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_util_unittests_lib],
)
test('kea_log_tests_exe', kea_log_tests_exe)

25
src/lib/meson.build Normal file
View File

@ -0,0 +1,25 @@
subdir('exceptions')
subdir('util')
subdir('log')
subdir('cryptolink')
subdir('dns')
subdir('asiolink')
subdir('cc')
subdir('testutils')
subdir('database')
subdir('mysql')
subdir('pgsql')
subdir('config_backend')
subdir('hooks')
subdir('dhcp')
subdir('tcp')
subdir('http')
subdir('config')
subdir('stats')
subdir('yang')
subdir('asiodns')
subdir('dhcp_ddns')
subdir('eval')
subdir('process')
subdir('dhcpsrv')
subdir('d2srv')

18
src/lib/mysql/meson.build Normal file
View File

@ -0,0 +1,18 @@
if not mysql.found()
subdir_done()
endif
kea_mysql_lib = library('kea-mysql',
'mysql_binding.cc',
'mysql_binding.h',
'mysql_connection.cc',
'mysql_connection.h',
'mysql_constants.h',
cpp_args: [f'-DKEA_ADMIN="@kea_admin@"'],
dependencies: [mysql],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_mysql_lib]

17
src/lib/pgsql/meson.build Normal file
View File

@ -0,0 +1,17 @@
if not postgresql.found()
subdir_done()
endif
kea_pgsql_lib = library('kea-pgsql',
'pgsql_connection.cc',
'pgsql_connection.h',
'pgsql_exchange.cc',
'pgsql_exchange.h',
cpp_args: [f'-DKEA_ADMIN="@kea_admin@"'],
dependencies: [postgresql],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_pgsql_lib]

View File

@ -0,0 +1,18 @@
// config_report.cc. Generated from config.report by tools/mk_cfgrpt.sh
namespace isc {
namespace detail {
extern const char* const config_report[] = {
";;;; ",
";;;; Kea source configure results:",
";;;; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-",
";;;; ",
";;;; Package:",
";;;; Name: kea",
";;;; ",
""
};
}
}

View File

@ -0,0 +1,10 @@
kea_cfgrpt_lib = library('kea-cfgrpt',
'cfgrpt.cc',
'config_report.cc',
'config_report.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_cfgrpt_lib] + libs_built_so_far

View File

@ -0,0 +1,33 @@
subdir('cfgrpt')
kea_process_lib = library('kea-process',
'cb_ctl_base.h',
'config_base.cc',
'config_base.h',
'config_ctl_info.cc',
'config_ctl_info.h',
'config_ctl_parser.cc',
'config_ctl_parser.h',
'daemon.cc',
'daemon.h',
'd_cfg_mgr.cc',
'd_cfg_mgr.h',
'd_controller.cc',
'd_controller.h',
'd_log.cc',
'd_log.h',
'd_process.h',
'logging_info.cc',
'logging_info.h',
'log_parser.cc',
'log_parser.h',
'process_messages.cc',
'process_messages.h',
'redact_config.cc',
'redact_config.h',
cpp_args: ['-DDATA_DIR="@0@"'.format(meson.current_build_dir())],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_process_lib]

14
src/lib/stats/meson.build Normal file
View File

@ -0,0 +1,14 @@
kea_stats_lib = library('kea-stats',
'context.cc',
'context.h',
'observation.cc',
'observation.h',
'stats_mgr.cc',
'stats_mgr.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_stats_lib] + libs_built_so_far
subdir('tests')

View File

@ -0,0 +1,10 @@
kea_stats_tests_exe = executable('kea-stats-tests',
'context_unittest.cc',
'observation_unittest.cc',
'run_unittests.cc',
'stats_mgr_unittest.cc',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
)
test('kea_stats_tests_exe', kea_stats_tests_exe)

23
src/lib/tcp/meson.build Normal file
View File

@ -0,0 +1,23 @@
kea_tcp_lib = library('kea-tcp',
'mt_tcp_listener_mgr.cc',
'mt_tcp_listener_mgr.h',
'tcp_connection.cc',
'tcp_connection.h',
'tcp_connection_acceptor.h',
'tcp_connection_pool.cc',
'tcp_connection_pool.h',
'tcp_listener.cc',
'tcp_listener.h',
'tcp_log.cc',
'tcp_log.h',
'tcp_messages.cc',
'tcp_messages.h',
'tcp_stream_msg.cc',
'tcp_stream_msg.h',
dependencies: [crypto],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_tcp_lib]

View File

@ -0,0 +1,22 @@
kea_testutils_lib = library('kea-testutils',
'gtest_utils.h',
'io_utils.cc',
'io_utils.h',
'log_utils.cc',
'log_utils.h',
'multi_threading_utils.h',
'sandbox.h',
'test_to_element.cc',
'test_to_element.h',
'threaded_test.cc',
'threaded_test.h',
'unix_control_client.cc',
'unix_control_client.h',
'user_context_utils.cc',
'user_context_utils.h',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)

View File

@ -1,4 +1,4 @@
// Copyright (C) 2015-2024 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@ -92,7 +92,7 @@ template std::string
durationToText<system_clock::duration>(system_clock::duration dur,
size_t fsecs_precision);
#if !CHRONO_SAME_DURATION
#ifndef CHRONO_SAME_DURATION
template std::string
durationToText<steady_clock::duration>(steady_clock::duration dur,
size_t fsecs_precision);

View File

@ -0,0 +1,9 @@
kea_util_io_lib = library('kea-util-io',
'fd.cc',
'fd.h',
'pktinfo_utilities.h',
'sockaddr_util.h',
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far,
)
libs_built_so_far = [kea_util_io_lib] + libs_built_so_far

62
src/lib/util/meson.build Normal file
View File

@ -0,0 +1,62 @@
kea_util_lib = library('kea-util',
'bigints.h',
'boost_time_utils.cc',
'boost_time_utils.h',
'buffer.h',
'chrono_time_utils.cc',
'chrono_time_utils.h',
'csv_file.cc',
'csv_file.h',
'dhcp_space.cc',
'dhcp_space.h',
'doubles.h',
'encode/encode.cc',
'encode/encode.h',
'encode/utf8.cc',
'encode/utf8.h',
'filesystem.cc',
'filesystem.h',
'hash.h',
'io.h',
'labeled_value.cc',
'labeled_value.h',
'memory_segment.h',
'memory_segment_local.cc',
'memory_segment_local.h',
'multi_threading_mgr.cc',
'multi_threading_mgr.h',
'optional.h',
'pid_file.cc',
'pid_file.h',
'pointer_util.h',
'range_utilities.h',
'readwrite_mutex.h',
'reconnect_ctl.cc',
'reconnect_ctl.h',
'staged_value.h',
'state_model.cc',
'state_model.h',
'stopwatch.cc',
'stopwatch.h',
'stopwatch_impl.cc',
'stopwatch_impl.h',
'str.cc',
'str.h',
'thread_pool.h',
'triplet.h',
'unlock_guard.h',
'versioned_csv_file.cc',
'versioned_csv_file.h',
'watched_thread.cc',
'watched_thread.h',
'watch_socket.cc',
'watch_socket.h',
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: kea_exceptions_lib,
)
subdir('io')
subdir('unittests')
libs_built_so_far = [kea_util_lib] + libs_built_so_far
subdir('tests')

40
src/lib/util/tests/meson.build Executable file
View File

@ -0,0 +1,40 @@
kea_util_tests_exe = executable('kea-util-tests',
'bigint_unittest.cc',
'boost_time_utils_unittest.cc',
'buffer_unittest.cc',
'chrono_time_utils_unittest.cc',
'csv_file_unittest.cc',
'dhcp_space_unittest.cc',
'doubles_unittest.cc',
'encode_unittest.cc',
'fd_tests.cc',
'filesystem_unittests.cc',
'hash_unittest.cc',
'io_unittests.cc',
'labeled_value_unittest.cc',
'memory_segment_common_unittest.cc',
'memory_segment_common_unittest.h',
'memory_segment_local_unittest.cc',
'multi_threading_mgr_unittest.cc',
'optional_unittest.cc',
'pid_file_unittest.cc',
'range_utilities_unittest.cc',
'readwrite_mutex_unittest.cc',
'run_unittests.cc',
'staged_value_unittest.cc',
'state_model_unittest.cc',
'stopwatch_unittest.cc',
'str_unittests.cc',
'thread_pool_unittest.cc',
'triplet_unittest.cc',
'unlock_guard_unittests.cc',
'utf8_unittest.cc',
'versioned_csv_file_unittest.cc',
'watched_thread_unittest.cc',
'watch_socket_unittests.cc',
cpp_args: ['-DABS_SRCDIR="@0@"'.format(meson.current_source_dir()), '-DTEST_DATA_BUILDDIR="@0@"'.format(meson.current_build_dir())],
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far + [kea_util_unittests_lib],
)
test('kea_util_tests_exe', kea_util_tests_exe)

View File

@ -0,0 +1,22 @@
kea_util_unittests_lib = library('kea-util-unittests',
'check_valgrind.cc',
'check_valgrind.h',
'fork.cc',
'fork.h',
'interprocess_util.cc',
'interprocess_util.h',
'newhook.cc',
'newhook.h',
'resource.cc',
'resource.h',
'run_all.cc',
'run_all.h',
'testdata.cc',
'testdata.h',
'textdata.h',
'wiredata.cc',
'wiredata.h',
dependencies: [gtest],
include_directories: [include_directories('.')] + includes,
link_with: libs_built_so_far,
)

53
src/lib/yang/meson.build Normal file
View File

@ -0,0 +1,53 @@
if not netconf_deps_found
subdir_done()
endif
kea_yang_lib = library('kea-yang',
'adaptor.cc',
'adaptor.h',
'adaptor_config.cc',
'adaptor_config.h',
'adaptor_host.cc',
'adaptor_host.h',
'adaptor_option.cc',
'adaptor_option.h',
'adaptor_pool.cc',
'adaptor_pool.h',
'adaptor_subnet.cc',
'adaptor_subnet.h',
'netconf_error.h',
'translator.cc',
'translator.h',
'translator_class.cc',
'translator_class.h',
'translator_config.cc',
'translator_config.h',
'translator_control_socket.cc',
'translator_control_socket.h',
'translator_database.cc',
'translator_database.h',
'translator_host.cc',
'translator_host.h',
'translator_logger.cc',
'translator_logger.h',
'translator_option_data.cc',
'translator_option_data.h',
'translator_option_def.cc',
'translator_option_def.h',
'translator_pd_pool.cc',
'translator_pd_pool.h',
'translator_pool.cc',
'translator_pool.h',
'translator_shared_network.cc',
'translator_shared_network.h',
'translator_subnet.cc',
'translator_subnet.h',
'yang_models.h',
'yang_revisions.h',
dependencies: netconf_deps_array,
include_directories: [include_directories('.')] + includes,
install: true,
install_dir: 'lib',
link_with: libs_built_so_far,
)
libs_built_so_far += [kea_yang_lib]

4
src/meson.build Normal file
View File

@ -0,0 +1,4 @@
subdir('share')
subdir('lib')
subdir('hooks')
subdir('bin')

View File

View File

3
src/share/meson.build Normal file
View File

@ -0,0 +1,3 @@
subdir('api')
subdir('database')
subdir('yang')

View File