mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 18:54:36 +00:00
![Thomas Haller](/assets/img/avatar_default.png)
We currently use the systemd LLDP client, which we consume by forking systemd code. That is a maintenance burden, because it's not a self-contained, stable library that we use. Hence there is a need for an individual library or properly integrating the fork in our tree. Optimally, we would create a new nettools project with an LLDP library. That was not done because: - nettools may want to be dual licensed with LGPL-2.1+ and Apache. Systemd code is LGPL-2.1+ so it is fine for NetworkManager but possibly not for nettools. - nettools provides independent librares, as such they don't have an event loop, instead they expose an epoll file descriptor and the user needs to integrate it. Systemd and NetworkManager on the other hand have their established event loop (sd_event and GMainContext, respectively). It's simpler to implement the library on those terms, in particular porting the systemd library from sd_event to GMainContext. - NetworkManager uses glib and has various helper utils. While it's possible to do without them, it's more work. The main reason to not write a new NetworkManager-agnostic library from scratch, is that it's much simpler to fork the systemd library and make it part of NetworkManager, than making it a nettools library. Do it.
127 lines
2.9 KiB
Meson
127 lines
2.9 KiB
Meson
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
src_inc = include_directories('.')
|
|
|
|
###############################################################################
|
|
|
|
libc_siphash = static_library(
|
|
'c-siphash',
|
|
sources: 'c-siphash/src/c-siphash.c',
|
|
include_directories: include_directories('c-stdaux/src'),
|
|
c_args: '-std=c11',
|
|
)
|
|
|
|
libc_rbtree = static_library(
|
|
'c-rbtree',
|
|
sources: 'c-rbtree/src/c-rbtree.c',
|
|
include_directories: include_directories('c-stdaux/src'),
|
|
c_args: '-std=c11',
|
|
)
|
|
|
|
libn_acd = static_library(
|
|
'n-acd',
|
|
sources: files(
|
|
'n-acd/src/n-acd.c',
|
|
'n-acd/src/n-acd-probe.c',
|
|
'n-acd/src/util/timer.c',
|
|
enable_ebpf ? 'n-acd/src/n-acd-bpf.c' : 'n-acd/src/n-acd-bpf-fallback.c',
|
|
),
|
|
include_directories: include_directories(
|
|
'c-list/src',
|
|
'c-rbtree/src',
|
|
'c-siphash/src',
|
|
'c-stdaux/src',
|
|
),
|
|
c_args: [
|
|
'-std=c11',
|
|
'-D_GNU_SOURCE',
|
|
'-DSO_ATTACH_BPF=50',
|
|
'-Wno-pointer-arith',
|
|
'-Wno-vla',
|
|
],
|
|
)
|
|
|
|
libn_dhcp4 = static_library(
|
|
'n-dhcp4',
|
|
sources: files(
|
|
'n-dhcp4/src/n-dhcp4-c-connection.c',
|
|
'n-dhcp4/src/n-dhcp4-c-lease.c',
|
|
'n-dhcp4/src/n-dhcp4-client.c',
|
|
'n-dhcp4/src/n-dhcp4-c-probe.c',
|
|
'n-dhcp4/src/n-dhcp4-incoming.c',
|
|
'n-dhcp4/src/n-dhcp4-outgoing.c',
|
|
'n-dhcp4/src/n-dhcp4-socket.c',
|
|
'n-dhcp4/src/util/packet.c',
|
|
'n-dhcp4/src/util/socket.c',
|
|
),
|
|
include_directories: include_directories(
|
|
'c-list/src',
|
|
'c-siphash/src',
|
|
'c-stdaux/src',
|
|
),
|
|
c_args: [
|
|
'-std=c11',
|
|
'-D_GNU_SOURCE',
|
|
'-Wno-declaration-after-statement',
|
|
'-Wno-pointer-arith',
|
|
],
|
|
)
|
|
|
|
###############################################################################
|
|
|
|
subdir('libnm-std-aux')
|
|
subdir('libnm-glib-aux')
|
|
subdir('libnm-log-null')
|
|
subdir('libnm-log-core')
|
|
subdir('libnm-systemd-shared')
|
|
subdir('libnm-systemd-core')
|
|
subdir('libnm-udev-aux')
|
|
subdir('libnm-base')
|
|
subdir('libnm-platform')
|
|
subdir('libnm-lldp')
|
|
subdir('libnm-crypto')
|
|
subdir('libnm-core-public')
|
|
subdir('libnm-core-intern')
|
|
subdir('libnm-core-aux-intern')
|
|
subdir('libnm-core-impl')
|
|
subdir('libnm-core-aux-extern')
|
|
subdir('libnm-client-public')
|
|
subdir('libnm-client-impl')
|
|
subdir('libnm-client-aux-extern')
|
|
subdir('libnmc-base')
|
|
subdir('libnmc-setting')
|
|
if enable_nmtui
|
|
subdir('libnmt-newt')
|
|
endif
|
|
subdir('nmcli')
|
|
subdir('nm-dispatcher')
|
|
subdir('nm-priv-helper')
|
|
subdir('nm-daemon-helper')
|
|
subdir('nm-online')
|
|
if enable_nmtui
|
|
subdir('nmtui')
|
|
endif
|
|
subdir('nm-initrd-generator')
|
|
if enable_nm_cloud_setup
|
|
subdir('nm-cloud-setup')
|
|
endif
|
|
subdir('core')
|
|
subdir('contrib')
|
|
|
|
if enable_tests
|
|
subdir('libnm-client-test')
|
|
subdir('libnm-glib-aux/tests')
|
|
subdir('libnm-platform/tests')
|
|
subdir('libnm-core-impl/tests')
|
|
subdir('libnm-client-impl/tests')
|
|
subdir('libnm-client-aux-extern/tests')
|
|
subdir('libnmc-setting/tests')
|
|
subdir('nm-dispatcher/tests')
|
|
subdir('nm-initrd-generator/tests')
|
|
if enable_nm_cloud_setup
|
|
subdir('nm-cloud-setup/tests')
|
|
endif
|
|
subdir('tests/client')
|
|
subdir('contrib/tests')
|
|
endif
|