mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 10:46:59 +00:00
build: merge branch 'th/build-cleanup'
Some cleanup of the toplevel Makefile.am. The aim it to build every source file only once. That saves compilation time, but more importantly it guarantees that there are no differing CFLAGS and all users use exactly the same binary.
This commit is contained in:
commit
9cb2bbe658
|
@ -13,7 +13,7 @@ before_install:
|
|||
- sudo apt-get install libnl-3-dev libndp-dev automake
|
||||
|
||||
script: |
|
||||
sh autogen.sh --with-systemd-logind=no --enable-more-warnings=no &&
|
||||
sh autogen.sh --with-systemd-logind=no --enable-more-warnings=no --enable-ifcfg-rh --enable-ifupdown --enable-ifnet --enable-tests &&
|
||||
make -j4 &&
|
||||
./contrib/travis/travis-check.sh
|
||||
|
||||
|
|
551
Makefile.am
551
Makefile.am
|
@ -439,6 +439,23 @@ libnminclude_HEADERS += $(libnm_core_libnm_core_headers)
|
|||
|
||||
###############################################################################
|
||||
|
||||
dflt_cppflags_libnm_core = \
|
||||
-I${srcdir}/shared \
|
||||
-I${builddir}/shared \
|
||||
-I${srcdir}/libnm-core \
|
||||
-I${builddir}/libnm-core \
|
||||
$(CODE_COVERAGE_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(JANSSON_CFLAGS)
|
||||
|
||||
if WITH_GNUTLS
|
||||
dflt_cppflags_libnm_core += $(GNUTLS_CFLAGS)
|
||||
endif
|
||||
|
||||
if WITH_NSS
|
||||
dflt_cppflags_libnm_core += $(NSS_CFLAGS)
|
||||
endif
|
||||
|
||||
noinst_LTLIBRARIES += libnm-core/libnm-core.la
|
||||
|
||||
GLIB_GENERATED += \
|
||||
|
@ -448,20 +465,14 @@ GLIB_GENERATED += \
|
|||
nm_core_enum_types_sources = $(filter-out %nm-core-enum-types.h,$(libnm_core_libnm_core_headers))
|
||||
|
||||
libnm_core_libnm_core_la_CPPFLAGS = \
|
||||
-I${srcdir}/shared \
|
||||
-I${builddir}/shared \
|
||||
-I${srcdir}/libnm-core \
|
||||
-I${builddir}/libnm-core \
|
||||
$(dflt_cppflags_libnm_core) \
|
||||
-DG_LOG_DOMAIN=\""libnm"\" \
|
||||
-DLOCALEDIR=\"$(datadir)/locale\" \
|
||||
-DNMCONFDIR=\"$(nmconfdir)\" \
|
||||
-DNMLIBDIR=\"$(nmlibdir)\" \
|
||||
-DNMPLUGINDIR=\"$(pkglibdir)\" \
|
||||
-DLIBEXECDIR=\"$(libexecdir)\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(CODE_COVERAGE_CFLAGS) \
|
||||
$(JANSSON_CFLAGS)
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB
|
||||
|
||||
libnm_core_libnm_core_la_SOURCES = \
|
||||
$(libnm_core_libnm_core_sources) \
|
||||
|
@ -476,13 +487,11 @@ libnm_core_libnm_core_la_LDFLAGS = \
|
|||
$(CODE_COVERAGE_LDFLAGS)
|
||||
|
||||
if WITH_GNUTLS
|
||||
libnm_core_libnm_core_la_CPPFLAGS += $(GNUTLS_CFLAGS)
|
||||
libnm_core_libnm_core_la_SOURCES += libnm-core/crypto_gnutls.c
|
||||
libnm_core_libnm_core_la_LIBADD += $(GNUTLS_LIBS)
|
||||
endif
|
||||
|
||||
if WITH_NSS
|
||||
libnm_core_libnm_core_la_CPPFLAGS += $(NSS_CFLAGS)
|
||||
libnm_core_libnm_core_la_SOURCES += libnm-core/crypto_nss.c
|
||||
libnm_core_libnm_core_la_LIBADD += $(NSS_LIBS)
|
||||
endif
|
||||
|
@ -519,14 +528,9 @@ GLIB_GENERATED += \
|
|||
nm_core_tests_enum_types_sources = libnm-core/tests/test-general-enums.h
|
||||
|
||||
libnm_core_tests_cppflags = \
|
||||
-I${srcdir}/shared \
|
||||
-I${builddir}/shared \
|
||||
-I$(srcdir)/libnm-core \
|
||||
-I$(builddir)/libnm-core \
|
||||
$(dflt_cppflags_libnm_core) \
|
||||
-I$(srcdir)/libnm-core/tests \
|
||||
-I$(builddir)/libnm-core/tests \
|
||||
-DNETWORKMANAGER_COMPILATION \
|
||||
$(GLIB_CFLAGS) \
|
||||
-DTEST_CERT_DIR=\"$(abs_srcdir)/libnm-core/tests/certs\"
|
||||
|
||||
libnm_core_tests_test_compare_CPPFLAGS = $(libnm_core_tests_cppflags)
|
||||
|
@ -647,19 +651,14 @@ nm_enum_types_MKENUMS_H_FLAGS = --identifier-prefix NM --fhead '\#include <nm-co
|
|||
nm_enum_types_MKENUMS_C_FLAGS = --identifier-prefix NM --fhead '\#include "nm-default.h"\n'
|
||||
|
||||
libnm_libnm_la_CPPFLAGS = \
|
||||
-I$(srcdir)/shared \
|
||||
-I$(builddir)/shared \
|
||||
$(dflt_cppflags_libnm_core) \
|
||||
-I$(builddir)/introspection \
|
||||
-I$(srcdir)/libnm-core \
|
||||
-I$(builddir)/libnm-core \
|
||||
-I$(srcdir)/libnm \
|
||||
-I$(builddir)/libnm \
|
||||
$(GUDEV_CFLAGS) \
|
||||
-DG_LOG_DOMAIN=\""libnm"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GUDEV_CFLAGS) \
|
||||
-DNMRUNDIR=\"$(nmrundir)\" \
|
||||
$(CODE_COVERAGE_CFLAGS)
|
||||
-DNMRUNDIR=\"$(nmrundir)\"
|
||||
|
||||
libnm_libnm_la_private_headers = \
|
||||
libnm/nm-dbus-helpers.h \
|
||||
|
@ -830,15 +829,11 @@ libnm_tests_programs = \
|
|||
check_programs += $(libnm_tests_programs)
|
||||
|
||||
libnm_tests_cppflags = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
$(dflt_cppflags_libnm_core) \
|
||||
-I$(top_srcdir)/libnm \
|
||||
-I$(top_builddir)/libnm \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
|
||||
-DTEST_NM_SERVICE=\"$(abs_top_srcdir)/tools/test-networkmanager-service.py\" \
|
||||
$(GLIB_CFLAGS)
|
||||
-DTEST_NM_SERVICE=\"$(abs_top_srcdir)/tools/test-networkmanager-service.py\"
|
||||
|
||||
libnm_tests_ldadd = \
|
||||
$(top_builddir)/libnm/libnm.la \
|
||||
|
@ -894,15 +889,21 @@ libnm_tests_libnm_vpn_plugin_utils_test_la_LIBADD = \
|
|||
###############################################################################
|
||||
|
||||
src_cppflags = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
$(dflt_cppflags_libnm_core) \
|
||||
-I$(top_builddir)/introspection \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_builddir)/src \
|
||||
\
|
||||
$(foreach d,$(sort $(dir $(src_libNetworkManager_la_SOURCES))),-I$(srcdir)/$d) \
|
||||
-I$(top_srcdir)/src/devices \
|
||||
-I$(top_srcdir)/src/dhcp-manager \
|
||||
-I$(top_srcdir)/src/dns-manager \
|
||||
-I$(top_srcdir)/src/dnsmasq-manager \
|
||||
-I$(top_srcdir)/src/platform \
|
||||
-I$(top_srcdir)/src/platform/wifi \
|
||||
-I$(top_srcdir)/src/ppp-manager \
|
||||
-I$(top_srcdir)/src/rdisc \
|
||||
-I$(top_srcdir)/src/settings \
|
||||
-I$(top_srcdir)/src/supplicant-manager \
|
||||
-I$(top_srcdir)/src/vpn-manager \
|
||||
\
|
||||
-DPREFIX=\"$(prefix)\" \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
|
@ -928,7 +929,6 @@ src_cppflags = \
|
|||
-DDHCPCD_PATH=\"$(DHCPCD_PATH)\" \
|
||||
-DPPPD_PLUGIN_DIR=\"$(PPPD_PLUGIN_DIR)\" \
|
||||
\
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GUDEV_CFLAGS) \
|
||||
$(LIBNL_CFLAGS) \
|
||||
$(LIBNDP_CFLAGS) \
|
||||
|
@ -937,7 +937,6 @@ src_cppflags = \
|
|||
$(LIBAUDIT_CFLAGS) \
|
||||
$(SYSTEMD_LOGIN_CFLAGS) \
|
||||
$(SYSTEMD_JOURNAL_CFLAGS) \
|
||||
$(CODE_COVERAGE_CFLAGS) \
|
||||
\
|
||||
$(NULL)
|
||||
|
||||
|
@ -954,8 +953,6 @@ noinst_LTLIBRARIES += \
|
|||
src/libNetworkManager.la \
|
||||
src/libsystemd-nm.la
|
||||
|
||||
check_ltlibraries += src/libNetworkManagerTest.la
|
||||
|
||||
###############################################################################
|
||||
|
||||
src_libsystemd_nm_la_cppflags = \
|
||||
|
@ -970,10 +967,12 @@ src_libsystemd_nm_la_cppflags = \
|
|||
-I$(top_srcdir)/src/systemd/src/shared/ \
|
||||
-I$(top_srcdir)/src/systemd/src/libsystemd-network/ \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD \
|
||||
$(GLIB_CFLAGS)
|
||||
$(GLIB_CFLAGS) \
|
||||
$(CODE_COVERAGE_CFLAGS)
|
||||
|
||||
src_libsystemd_nm_la_libadd = \
|
||||
$(GLIB_LIBS)
|
||||
$(GLIB_LIBS) \
|
||||
$(CODE_COVERAGE_LDFLAGS)
|
||||
|
||||
src_libsystemd_nm_la_SOURCES = \
|
||||
src/systemd/nm-sd.c \
|
||||
|
@ -1119,10 +1118,68 @@ src_libNetworkManagerBase_la_SOURCES = \
|
|||
src/nm-core-utils.c \
|
||||
src/nm-core-utils.h \
|
||||
src/nm-logging.c \
|
||||
src/nm-logging.h
|
||||
src/nm-logging.h \
|
||||
\
|
||||
src/nm-multi-index.c \
|
||||
src/nm-multi-index.h \
|
||||
src/NetworkManagerUtils.c \
|
||||
src/NetworkManagerUtils.h \
|
||||
\
|
||||
src/platform/nmp-netns.c \
|
||||
src/platform/nmp-netns.h \
|
||||
src/platform/nmp-object.c \
|
||||
src/platform/nmp-object.h \
|
||||
src/platform/nm-platform-utils.c \
|
||||
src/platform/nm-platform-utils.h \
|
||||
src/platform/nm-platform.c \
|
||||
src/platform/nm-platform.h \
|
||||
src/platform/nm-linux-platform.c \
|
||||
src/platform/nm-linux-platform.h \
|
||||
src/platform/wifi/wifi-utils-nl80211.c \
|
||||
src/platform/wifi/wifi-utils-nl80211.h \
|
||||
src/platform/wifi/wifi-utils-private.h \
|
||||
src/platform/wifi/wifi-utils.c \
|
||||
src/platform/wifi/wifi-utils.h \
|
||||
\
|
||||
src/rdisc/nm-lndp-rdisc.c \
|
||||
src/rdisc/nm-lndp-rdisc.h \
|
||||
src/rdisc/nm-rdisc.c \
|
||||
src/rdisc/nm-rdisc.h \
|
||||
src/rdisc/nm-rdisc-private.h \
|
||||
\
|
||||
src/nm-exported-object.c \
|
||||
src/nm-exported-object.h \
|
||||
src/nm-ip4-config.c \
|
||||
src/nm-ip4-config.h \
|
||||
src/nm-ip6-config.c \
|
||||
src/nm-ip6-config.h \
|
||||
\
|
||||
src/nm-route-manager.c \
|
||||
src/nm-route-manager.h \
|
||||
\
|
||||
src/dhcp-manager/nm-dhcp-client.c \
|
||||
src/dhcp-manager/nm-dhcp-client.h \
|
||||
src/dhcp-manager/nm-dhcp-client-logging.h \
|
||||
src/dhcp-manager/nm-dhcp-utils.c \
|
||||
src/dhcp-manager/nm-dhcp-utils.h \
|
||||
src/dhcp-manager/nm-dhcp-systemd.c \
|
||||
src/dhcp-manager/nm-dhcp-manager.c \
|
||||
src/dhcp-manager/nm-dhcp-manager.h \
|
||||
\
|
||||
src/main-utils.c \
|
||||
src/main-utils.h \
|
||||
\
|
||||
$(NULL)
|
||||
|
||||
if WITH_WEXT
|
||||
src_libNetworkManagerBase_la_SOURCES += \
|
||||
src/platform/wifi/wifi-utils-wext.c \
|
||||
src/platform/wifi/wifi-utils-wext.h
|
||||
endif
|
||||
|
||||
src_libNetworkManagerBase_la_LIBADD = \
|
||||
$(top_builddir)/libnm-core/libnm-core.la \
|
||||
libnm-core/libnm-core.la \
|
||||
introspection/libnmdbus.la \
|
||||
$(GLIB_LIBS) \
|
||||
$(SYSTEMD_JOURNAL_LIBS) \
|
||||
$(NULL)
|
||||
|
@ -1174,16 +1231,8 @@ src_libNetworkManager_la_SOURCES = \
|
|||
src/devices/nm-device-vxlan.c \
|
||||
src/devices/nm-device-vxlan.h \
|
||||
\
|
||||
src/dhcp-manager/nm-dhcp-client.c \
|
||||
src/dhcp-manager/nm-dhcp-client.h \
|
||||
src/dhcp-manager/nm-dhcp-client-logging.h \
|
||||
src/dhcp-manager/nm-dhcp-utils.c \
|
||||
src/dhcp-manager/nm-dhcp-manager.c \
|
||||
src/dhcp-manager/nm-dhcp-manager.h \
|
||||
src/dhcp-manager/nm-dhcp-utils.h \
|
||||
src/dhcp-manager/nm-dhcp-dhclient.c \
|
||||
src/dhcp-manager/nm-dhcp-dhcpcd.c \
|
||||
src/dhcp-manager/nm-dhcp-systemd.c \
|
||||
src/dhcp-manager/nm-dhcp-helper-api.h \
|
||||
src/dhcp-manager/nm-dhcp-listener.c \
|
||||
src/dhcp-manager/nm-dhcp-listener.h \
|
||||
|
@ -1206,28 +1255,6 @@ src_libNetworkManager_la_SOURCES = \
|
|||
src/dnsmasq-manager/nm-dnsmasq-utils.c \
|
||||
src/dnsmasq-manager/nm-dnsmasq-utils.h \
|
||||
\
|
||||
src/platform/nmp-netns.c \
|
||||
src/platform/nmp-netns.h \
|
||||
src/platform/nmp-object.c \
|
||||
src/platform/nmp-object.h \
|
||||
src/platform/nm-platform-utils.c \
|
||||
src/platform/nm-platform-utils.h \
|
||||
src/platform/nm-platform.c \
|
||||
src/platform/nm-platform.h \
|
||||
src/platform/nm-linux-platform.c \
|
||||
src/platform/nm-linux-platform.h \
|
||||
src/platform/wifi/wifi-utils-nl80211.c \
|
||||
src/platform/wifi/wifi-utils-nl80211.h \
|
||||
src/platform/wifi/wifi-utils-private.h \
|
||||
src/platform/wifi/wifi-utils.c \
|
||||
src/platform/wifi/wifi-utils.h \
|
||||
\
|
||||
src/rdisc/nm-lndp-rdisc.c \
|
||||
src/rdisc/nm-lndp-rdisc.h \
|
||||
src/rdisc/nm-rdisc.c \
|
||||
src/rdisc/nm-rdisc.h \
|
||||
src/rdisc/nm-rdisc-private.h \
|
||||
\
|
||||
src/ppp-manager/nm-ppp-manager.c \
|
||||
src/ppp-manager/nm-ppp-manager.h \
|
||||
src/ppp-manager/nm-ppp-status.h \
|
||||
|
@ -1287,8 +1314,6 @@ src_libNetworkManager_la_SOURCES = \
|
|||
src/nm-connectivity.h \
|
||||
src/nm-dcb.c \
|
||||
src/nm-dcb.h \
|
||||
src/nm-route-manager.c \
|
||||
src/nm-route-manager.h \
|
||||
src/nm-default-route-manager.c \
|
||||
src/nm-default-route-manager.h \
|
||||
src/nm-dhcp4-config.c \
|
||||
|
@ -1297,18 +1322,10 @@ src_libNetworkManager_la_SOURCES = \
|
|||
src/nm-dhcp6-config.h \
|
||||
src/nm-dispatcher.c \
|
||||
src/nm-dispatcher.h \
|
||||
src/nm-src-enum-types.c \
|
||||
src/nm-src-enum-types.h \
|
||||
src/nm-exported-object.c \
|
||||
src/nm-exported-object.h \
|
||||
src/nm-firewall-manager.c \
|
||||
src/nm-firewall-manager.h \
|
||||
src/nm-proxy-config.c \
|
||||
src/nm-proxy-config.h \
|
||||
src/nm-ip4-config.c \
|
||||
src/nm-ip4-config.h \
|
||||
src/nm-ip6-config.c \
|
||||
src/nm-ip6-config.h \
|
||||
src/nm-auth-manager.c \
|
||||
src/nm-auth-manager.h \
|
||||
src/nm-auth-subject.c \
|
||||
|
@ -1317,8 +1334,6 @@ src_libNetworkManager_la_SOURCES = \
|
|||
src/nm-auth-utils.h \
|
||||
src/nm-manager.c \
|
||||
src/nm-manager.h \
|
||||
src/nm-multi-index.c \
|
||||
src/nm-multi-index.h \
|
||||
src/nm-pacrunner-manager.c \
|
||||
src/nm-pacrunner-manager.h \
|
||||
src/nm-policy.c \
|
||||
|
@ -1330,20 +1345,10 @@ src_libNetworkManager_la_SOURCES = \
|
|||
src/nm-sleep-monitor.c \
|
||||
src/nm-sleep-monitor.h \
|
||||
src/nm-types.h \
|
||||
src/NetworkManagerUtils.c \
|
||||
src/NetworkManagerUtils.h \
|
||||
\
|
||||
$(NULL)
|
||||
|
||||
if WITH_WEXT
|
||||
src_libNetworkManager_la_SOURCES += \
|
||||
src/platform/wifi/wifi-utils-wext.c \
|
||||
src/platform/wifi/wifi-utils-wext.h
|
||||
endif
|
||||
|
||||
|
||||
src_libNetworkManager_la_LIBADD = \
|
||||
libnm-core/libnm-core.la \
|
||||
introspection/libnmdbus.la \
|
||||
src/libNetworkManagerBase.la \
|
||||
src/libsystemd-nm.la \
|
||||
$(GLIB_LIBS) \
|
||||
|
@ -1354,24 +1359,40 @@ src_libNetworkManager_la_LIBADD = \
|
|||
$(DL_LIBS) \
|
||||
$(LIBM) \
|
||||
$(SELINUX_LIBS) \
|
||||
$(LIBAUDIT_LIBS)
|
||||
|
||||
if WITH_LIBSOUP
|
||||
src_libNetworkManager_la_LIBADD += $(LIBSOUP_LIBS)
|
||||
endif
|
||||
$(LIBAUDIT_LIBS) \
|
||||
$(LIBSOUP_LIBS)
|
||||
|
||||
###############################################################################
|
||||
|
||||
src_libNetworkManagerTest_la_CPPFLAGS = $(src_cppflags)
|
||||
check_ltlibraries += src/libNetworkManagerTest.la
|
||||
|
||||
src_tests_cppflags = \
|
||||
$(src_cppflags) \
|
||||
-I$(top_srcdir)/src/platform/tests
|
||||
|
||||
if REQUIRE_ROOT_TESTS
|
||||
src_tests_cppflags += -DREQUIRE_ROOT_TESTS=1
|
||||
endif
|
||||
|
||||
src_tests_cppflags_fake = $(src_tests_cppflags) -DSETUP=nm_fake_platform_setup
|
||||
src_tests_cppflags_linux = $(src_tests_cppflags) -DSETUP=nm_linux_platform_setup
|
||||
|
||||
src_libNetworkManagerTest_la_CPPFLAGS = $(src_tests_cppflags)
|
||||
|
||||
src_libNetworkManagerTest_la_SOURCES = \
|
||||
src/rdisc/nm-fake-rdisc.c \
|
||||
src/rdisc/nm-fake-rdisc.h \
|
||||
src/platform/nm-fake-platform.c \
|
||||
src/platform/nm-fake-platform.h
|
||||
src/platform/nm-fake-platform.h \
|
||||
src/platform/tests/test-common.c \
|
||||
src/platform/tests/test-common.h
|
||||
|
||||
src_libNetworkManagerTest_la_LIBADD = \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManager.la \
|
||||
$(CODE_COVERAGE_LDFLAGS) \
|
||||
$(GLIB_LIBS) \
|
||||
$(GUDEV_LIBS) \
|
||||
$(LIBNL_LIBS)
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
@ -1381,8 +1402,6 @@ EXTRA_src_NetworkManager_DEPENDENCIES = \
|
|||
src_NetworkManager_CPPFLAGS = $(src_cppflags)
|
||||
|
||||
src_NetworkManager_SOURCES = \
|
||||
src/main-utils.c \
|
||||
src/main-utils.h \
|
||||
src/main.c
|
||||
|
||||
src_NetworkManager_LDADD = \
|
||||
|
@ -1394,77 +1413,12 @@ src_NetworkManager_LDFLAGS = \
|
|||
|
||||
###############################################################################
|
||||
|
||||
src_nm_iface_helper_CPPFLAGS = \
|
||||
$(src_cppflags) \
|
||||
-DNM_DHCP_INTERNAL_ONLY
|
||||
src_nm_iface_helper_CPPFLAGS = $(src_cppflags)
|
||||
|
||||
src_nm_iface_helper_SOURCES = \
|
||||
\
|
||||
src/dhcp-manager/nm-dhcp-client.c \
|
||||
src/dhcp-manager/nm-dhcp-client.h \
|
||||
src/dhcp-manager/nm-dhcp-client-logging.h \
|
||||
src/dhcp-manager/nm-dhcp-utils.c \
|
||||
src/dhcp-manager/nm-dhcp-utils.h \
|
||||
src/dhcp-manager/nm-dhcp-manager.c \
|
||||
src/dhcp-manager/nm-dhcp-manager.h \
|
||||
src/dhcp-manager/nm-dhcp-systemd.c \
|
||||
\
|
||||
src/platform/nmp-netns.c \
|
||||
src/platform/nmp-netns.h \
|
||||
src/platform/nmp-object.c \
|
||||
src/platform/nmp-object.h \
|
||||
src/platform/nm-platform-utils.c \
|
||||
src/platform/nm-platform-utils.h \
|
||||
src/platform/nm-platform.c \
|
||||
src/platform/nm-platform.h \
|
||||
src/platform/nm-linux-platform.c \
|
||||
src/platform/nm-linux-platform.h \
|
||||
src/platform/wifi/wifi-utils-nl80211.c \
|
||||
src/platform/wifi/wifi-utils-nl80211.h \
|
||||
src/platform/wifi/wifi-utils-private.h \
|
||||
src/platform/wifi/wifi-utils.c \
|
||||
src/platform/wifi/wifi-utils.h \
|
||||
\
|
||||
src/nm-pacrunner-manager.c \
|
||||
src/nm-pacrunner-manager.h \
|
||||
\
|
||||
src/rdisc/nm-lndp-rdisc.c \
|
||||
src/rdisc/nm-lndp-rdisc.h \
|
||||
src/rdisc/nm-rdisc.c \
|
||||
src/rdisc/nm-rdisc.h \
|
||||
\
|
||||
src/nm-route-manager.c \
|
||||
src/nm-route-manager.h \
|
||||
\
|
||||
src/nm-exported-object.c \
|
||||
src/nm-exported-object.h \
|
||||
src/nm-proxy-config.c \
|
||||
src/nm-proxy-config.h \
|
||||
src/nm-ip4-config.c \
|
||||
src/nm-ip4-config.h \
|
||||
src/nm-ip6-config.c \
|
||||
src/nm-ip6-config.h \
|
||||
\
|
||||
src/nm-src-enum-types.c \
|
||||
src/nm-src-enum-types.h \
|
||||
src/nm-multi-index.c \
|
||||
src/nm-multi-index.h \
|
||||
src/NetworkManagerUtils.c \
|
||||
src/NetworkManagerUtils.h \
|
||||
\
|
||||
src/nm-iface-helper.c \
|
||||
src/main-utils.c \
|
||||
src/main-utils.h
|
||||
|
||||
if WITH_WEXT
|
||||
src_nm_iface_helper_SOURCES += \
|
||||
src/platform/wifi/wifi-utils-wext.c \
|
||||
src/platform/wifi/wifi-utils-wext.h
|
||||
endif
|
||||
src/nm-iface-helper.c
|
||||
|
||||
src_nm_iface_helper_LDADD = \
|
||||
libnm-core/libnm-core.la \
|
||||
introspection/libnmdbus.la \
|
||||
src/libNetworkManagerBase.la \
|
||||
src/libsystemd-nm.la \
|
||||
$(GLIB_LIBS) \
|
||||
|
@ -1479,21 +1433,6 @@ src_nm_iface_helper_LDFLAGS = \
|
|||
|
||||
###############################################################################
|
||||
|
||||
GLIB_GENERATED += \
|
||||
src/nm-src-enum-types.h \
|
||||
src/nm-src-enum-types.c
|
||||
nm_src_enum_types_MKENUMS_H_FLAGS = --identifier-prefix NM --fhead '\#include <nm-core-enum-types.h>\n'
|
||||
nm_src_enum_types_MKENUMS_C_FLAGS = --identifier-prefix NM --fhead '\#include "nm-default.h"\n'
|
||||
nm_src_enum_types_sources = $(filter-out \
|
||||
%/nm-device-private.h \
|
||||
%/nm-rdisc-private.h \
|
||||
%/wifi-utils-private.h \
|
||||
%/nm-dhcp-client-logging.h \
|
||||
%/nm-device-logging.h \
|
||||
, $(src_libNetworkManager_la_SOURCES))
|
||||
|
||||
###############################################################################
|
||||
|
||||
EXTRA_DIST += \
|
||||
src/org.freedesktop.NetworkManager.conf \
|
||||
src/nm-test-utils-core.h \
|
||||
|
@ -1529,27 +1468,16 @@ src_dhcp_manager_nm_dhcp_helper_LDADD = $(GLIB_LIBS)
|
|||
###############################################################################
|
||||
|
||||
src_dhcp_manager_tests_cppflags = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I${top_builddir}/shared \
|
||||
-I${top_srcdir}/libnm-core \
|
||||
-I${top_builddir}/libnm-core \
|
||||
-I$(top_srcdir)/src/dhcp-manager \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/platform \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(src_tests_cppflags) \
|
||||
-DTESTDIR="\"$(abs_srcdir)/src/dhcp-manager/tests\""
|
||||
|
||||
src_dhcp_manager_tests_ldadd = \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
src_dhcp_manager_tests_programs = \
|
||||
check_programs += \
|
||||
src/dhcp-manager/tests/test-dhcp-dhclient \
|
||||
src/dhcp-manager/tests/test-dhcp-utils
|
||||
|
||||
check_programs += $(src_dhcp_manager_tests_programs)
|
||||
|
||||
src_dhcp_manager_tests_test_dhcp_dhclient_CPPFLAGS = $(src_dhcp_manager_tests_cppflags)
|
||||
src_dhcp_manager_tests_test_dhcp_utils_CPPFLAGS = $(src_dhcp_manager_tests_cppflags)
|
||||
|
||||
|
@ -1603,27 +1531,17 @@ endif
|
|||
check_programs += src/settings/plugins/keyfile/tests/test-keyfile
|
||||
|
||||
src_settings_plugins_keyfile_tests_test_keyfile_CPPFLAGS = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/settings \
|
||||
$(src_tests_cppflags) \
|
||||
-I$(top_srcdir)/src/settings/plugins/keyfile \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(CODE_COVERAGE_CFLAGS) \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
-DTEST_KEYFILES_DIR=\"$(abs_srcdir)/src/settings/plugins/keyfile/tests/keyfiles\" \
|
||||
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/src/settings/plugins/keyfile/tests/keyfiles\" \
|
||||
-DNMCONFDIR=\"nonexistent\"
|
||||
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/src/settings/plugins/keyfile/tests/keyfiles\"
|
||||
|
||||
src_settings_plugins_keyfile_tests_test_keyfile_LDFLAGS = \
|
||||
$(GLIB_LIBS) \
|
||||
$(CODE_COVERAGE_LDFLAGS)
|
||||
|
||||
src_settings_plugins_keyfile_tests_test_keyfile_LDADD = \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
EXTRA_DIST += \
|
||||
src/settings/plugins/keyfile/tests/keyfiles/Test_Wired_Connection \
|
||||
|
@ -1732,7 +1650,7 @@ src_settings_plugins_ibft_tests_test_ibft_LDFLAGS = \
|
|||
|
||||
src_settings_plugins_ibft_tests_test_ibft_LDADD = \
|
||||
src/settings/plugins/ibft/libnms-ibft-core.la \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
EXTRA_DIST += \
|
||||
src/settings/plugins/ibft/tests/iscsiadm-test-dhcp \
|
||||
|
@ -1849,22 +1767,10 @@ src_settings_plugins_ifcfg_rh_tests_test_ifcfg_rh_SOURCES = \
|
|||
src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
|
||||
|
||||
src_settings_plugins_ifcfg_rh_tests_test_ifcfg_rh_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(CODE_COVERAGE_CFLAGS) \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/src/ \
|
||||
-I$(top_srcdir)/src/platform \
|
||||
-I$(top_srcdir)/src/settings \
|
||||
$(src_tests_cppflags) \
|
||||
-I$(top_srcdir)/src/settings/plugins/ifcfg-rh \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
-DTEST_IFCFG_DIR=\"$(abs_srcdir)/src/settings/plugins/ifcfg-rh/tests\" \
|
||||
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/src/settings/plugins/ifcfg-rh/tests\" \
|
||||
-DSYSCONFDIR=\"nonexistent\" \
|
||||
-DSBINDIR=\"nonexistent\"
|
||||
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/src/settings/plugins/ifcfg-rh/tests\"
|
||||
|
||||
src_settings_plugins_ifcfg_rh_tests_test_ifcfg_rh_LDFLAGS = \
|
||||
$(GLIB_LIBS) \
|
||||
|
@ -1872,7 +1778,7 @@ src_settings_plugins_ifcfg_rh_tests_test_ifcfg_rh_LDFLAGS = \
|
|||
|
||||
src_settings_plugins_ifcfg_rh_tests_test_ifcfg_rh_LDADD = \
|
||||
src/settings/plugins/ifcfg-rh/libnms-ifcfg-rh-core.la \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
endif
|
||||
|
||||
|
@ -2125,7 +2031,7 @@ src_settings_plugins_ifupdown_tests_test_ifupdown_LDFLAGS = \
|
|||
|
||||
src_settings_plugins_ifupdown_tests_test_ifupdown_LDADD = \
|
||||
src/settings/plugins/ifupdown/libnms-ifupdown-core.la \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
endif
|
||||
|
||||
|
@ -2238,7 +2144,7 @@ src_settings_plugins_ifnet_tests_test_ifnet_LDFLAGS = \
|
|||
|
||||
src_settings_plugins_ifnet_tests_test_ifnet_LDADD = \
|
||||
src/settings/plugins/ifnet/libnms-ifnet-core.la \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
endif
|
||||
|
||||
|
@ -2345,7 +2251,6 @@ src_devices_wwan_libnm_wwan_la_LDFLAGS = \
|
|||
-Wl,--version-script="$(srcdir)/src/devices/wwan/libnm-wwan.ver"
|
||||
|
||||
src_devices_wwan_libnm_wwan_la_LIBADD = \
|
||||
$(top_builddir)/introspection/libnmdbus.la \
|
||||
$(GLIB_LIBS) \
|
||||
$(LIBSYSTEMD_LIBS) \
|
||||
$(MM_GLIB_LIBS)
|
||||
|
@ -2533,7 +2438,7 @@ src_devices_wifi_tests_test_general_CPPFLAGS = \
|
|||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
src_devices_wifi_tests_test_general_LDADD = src/libNetworkManager.la
|
||||
src_devices_wifi_tests_test_general_LDADD = src/libNetworkManagerTest.la
|
||||
|
||||
endif
|
||||
|
||||
|
@ -2591,67 +2496,21 @@ endif
|
|||
check_programs += src/dnsmasq-manager/tests/test-dnsmasq-utils
|
||||
|
||||
src_dnsmasq_manager_tests_test_dnsmasq_utils_CPPFLAGS = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I${top_builddir}/shared \
|
||||
-I${top_srcdir}/libnm-core \
|
||||
-I${top_builddir}/libnm-core \
|
||||
-I$(top_srcdir)/src/dnsmasq-manager \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/platform \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(src_tests_cppflags) \
|
||||
-DTESTDIR="\"$(abs_srcdir)\""
|
||||
|
||||
src_dnsmasq_manager_tests_test_dnsmasq_utils_LDADD = \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
###############################################################################
|
||||
# src/platform/tests
|
||||
###############################################################################
|
||||
|
||||
src_platform_tests_cppflags = \
|
||||
-I${top_srcdir} \
|
||||
-I${top_srcdir}/shared \
|
||||
-I${top_builddir}/shared \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_builddir}/src \
|
||||
-I${top_srcdir}/libnm-core \
|
||||
-I${top_builddir}/libnm-core \
|
||||
-I${srcdir}/src/platform \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GUDEV_CFLAGS) \
|
||||
$(CODE_COVERAGE_CFLAGS) \
|
||||
$(LIBNL_CFLAGS)
|
||||
|
||||
check_ltlibraries += \
|
||||
src/platform/tests/libnm-platform-tests.la
|
||||
|
||||
src_platform_tests_libnm_platform_tests_la_SOURCES = \
|
||||
src/platform/tests/test-common.c \
|
||||
src/platform/tests/test-common.h
|
||||
src_platform_tests_libnm_platform_tests_la_CPPFLAGS = $(src_platform_tests_cppflags)
|
||||
if REQUIRE_ROOT_TESTS
|
||||
src_platform_tests_libnm_platform_tests_la_CPPFLAGS += -DREQUIRE_ROOT_TESTS=1
|
||||
endif
|
||||
src_platform_tests_libnm_platform_tests_la_LDFLAGS = \
|
||||
$(CODE_COVERAGE_LDFLAGS)
|
||||
src_platform_tests_libnm_platform_tests_la_LIBADD = \
|
||||
src/libNetworkManagerTest.la \
|
||||
$(GLIB_LIBS) \
|
||||
$(GUDEV_LIBS) \
|
||||
$(LIBNL_LIBS)
|
||||
|
||||
src_platform_tests_cppflags_linux = $(src_platform_tests_cppflags) -DSETUP=nm_linux_platform_setup
|
||||
src_platform_tests_cppflags_fake = $(src_platform_tests_cppflags) -DSETUP=nm_fake_platform_setup
|
||||
|
||||
src_platform_tests_ldflags = \
|
||||
$(CODE_COVERAGE_LDFLAGS)
|
||||
|
||||
src_platform_tests_libadd = \
|
||||
src/platform/tests/libnm-platform-tests.la \
|
||||
src/libNetworkManagerTest.la \
|
||||
$(GLIB_LIBS) \
|
||||
$(GUDEV_LIBS) \
|
||||
$(LIBNL_LIBS)
|
||||
|
@ -2671,55 +2530,55 @@ check_programs += \
|
|||
src/platform/tests/test-cleanup-fake \
|
||||
src/platform/tests/test-cleanup-linux
|
||||
|
||||
src_platform_tests_monitor_CPPFLAGS = $(src_platform_tests_cppflags)
|
||||
src_platform_tests_monitor_CPPFLAGS = $(src_tests_cppflags)
|
||||
src_platform_tests_monitor_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_monitor_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_link_fake_SOURCES = src/platform/tests/test-link.c
|
||||
src_platform_tests_test_link_fake_CPPFLAGS = $(src_platform_tests_cppflags_fake)
|
||||
src_platform_tests_test_link_fake_CPPFLAGS = $(src_tests_cppflags_fake)
|
||||
src_platform_tests_test_link_fake_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_link_fake_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_link_linux_SOURCES = src/platform/tests/test-link.c
|
||||
src_platform_tests_test_link_linux_CPPFLAGS = $(src_platform_tests_cppflags_linux)
|
||||
src_platform_tests_test_link_linux_CPPFLAGS = $(src_tests_cppflags_linux)
|
||||
src_platform_tests_test_link_linux_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_link_linux_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_address_fake_SOURCES = src/platform/tests/test-address.c
|
||||
src_platform_tests_test_address_fake_CPPFLAGS = $(src_platform_tests_cppflags_fake)
|
||||
src_platform_tests_test_address_fake_CPPFLAGS = $(src_tests_cppflags_fake)
|
||||
src_platform_tests_test_address_fake_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_address_fake_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_address_linux_SOURCES = src/platform/tests/test-address.c
|
||||
src_platform_tests_test_address_linux_CPPFLAGS = $(src_platform_tests_cppflags_linux)
|
||||
src_platform_tests_test_address_linux_CPPFLAGS = $(src_tests_cppflags_linux)
|
||||
src_platform_tests_test_address_linux_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_address_linux_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_route_fake_SOURCES = src/platform/tests/test-route.c
|
||||
src_platform_tests_test_route_fake_CPPFLAGS = $(src_platform_tests_cppflags_fake)
|
||||
src_platform_tests_test_route_fake_CPPFLAGS = $(src_tests_cppflags_fake)
|
||||
src_platform_tests_test_route_fake_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_route_fake_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_route_linux_SOURCES = src/platform/tests/test-route.c
|
||||
src_platform_tests_test_route_linux_CPPFLAGS = $(src_platform_tests_cppflags_linux)
|
||||
src_platform_tests_test_route_linux_CPPFLAGS = $(src_tests_cppflags_linux)
|
||||
src_platform_tests_test_route_linux_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_route_linux_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_cleanup_fake_SOURCES = src/platform/tests/test-cleanup.c
|
||||
src_platform_tests_test_cleanup_fake_CPPFLAGS = $(src_platform_tests_cppflags_fake)
|
||||
src_platform_tests_test_cleanup_fake_CPPFLAGS = $(src_tests_cppflags_fake)
|
||||
src_platform_tests_test_cleanup_fake_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_cleanup_fake_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_cleanup_linux_SOURCES = src/platform/tests/test-cleanup.c
|
||||
src_platform_tests_test_cleanup_linux_CPPFLAGS = $(src_platform_tests_cppflags_linux)
|
||||
src_platform_tests_test_cleanup_linux_CPPFLAGS = $(src_tests_cppflags_linux)
|
||||
src_platform_tests_test_cleanup_linux_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_cleanup_linux_LDADD = $(src_platform_tests_libadd)
|
||||
|
||||
src_platform_tests_test_nmp_object_CPPFLAGS = $(src_platform_tests_cppflags)
|
||||
src_platform_tests_test_nmp_object_CPPFLAGS = $(src_tests_cppflags)
|
||||
src_platform_tests_test_nmp_object_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_nmp_object_LDADD = src/libNetworkManagerTest.la
|
||||
|
||||
src_platform_tests_test_general_CPPFLAGS = $(src_platform_tests_cppflags)
|
||||
src_platform_tests_test_general_CPPFLAGS = $(src_tests_cppflags)
|
||||
src_platform_tests_test_general_LDFLAGS = $(src_platform_tests_ldflags)
|
||||
src_platform_tests_test_general_LDADD = src/libNetworkManagerTest.la
|
||||
|
||||
|
@ -2727,21 +2586,6 @@ src_platform_tests_test_general_LDADD = src/libNetworkManagerTest.la
|
|||
# src/devices/tests
|
||||
###############################################################################
|
||||
|
||||
src_devices_tests_cppflags = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/src/platform \
|
||||
-I$(top_srcdir)/src/devices \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_builddir)/src \
|
||||
-I$(top_srcdir)/src/platform/tests \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
$(CODE_COVERAGE_CFLAGS) \
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
src_devices_tests_ldflags = \
|
||||
$(CODE_COVERAGE_LDFLAGS)
|
||||
|
||||
|
@ -2749,35 +2593,20 @@ check_programs += \
|
|||
src/devices/tests/test-lldp \
|
||||
src/devices/tests/test-arping
|
||||
|
||||
src_devices_tests_test_lldp_CPPFLAGS = $(src_devices_tests_cppflags)
|
||||
src_devices_tests_test_lldp_CPPFLAGS = $(src_tests_cppflags)
|
||||
src_devices_tests_test_lldp_LDFLAGS = $(src_devices_tests_ldflags)
|
||||
src_devices_tests_test_lldp_LDADD = \
|
||||
src/platform/tests/libnm-platform-tests.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
src_devices_tests_test_arping_CPPFLAGS = $(src_devices_tests_cppflags)
|
||||
src_devices_tests_test_arping_CPPFLAGS = $(src_tests_cppflags)
|
||||
src_devices_tests_test_arping_LDFLAGS = $(src_devices_tests_ldflags)
|
||||
src_devices_tests_test_arping_LDADD = \
|
||||
src/platform/tests/libnm-platform-tests.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
###############################################################################
|
||||
# src/rdisc/tests
|
||||
###############################################################################
|
||||
|
||||
src_rdisc_tests_cppflags = \
|
||||
-I${top_srcdir} \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/src/platform \
|
||||
-I${top_srcdir}/libnm-core \
|
||||
-I${top_builddir}/libnm-core \
|
||||
-I${srcdir}/src/rdisc \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(CODE_COVERAGE_CFLAGS) \
|
||||
$(LIBNDP_CFLAGS)
|
||||
|
||||
src_rdisc_tests_ldflags = \
|
||||
$(CODE_COVERAGE_LDFLAGS)
|
||||
|
||||
|
@ -2788,11 +2617,11 @@ src_rdisc_tests_ldadd = \
|
|||
check_programs += src/rdisc/tests/test-rdisc-fake
|
||||
check_programs_norun += src/rdisc/tests/test-rdisc-linux
|
||||
|
||||
src_rdisc_tests_test_rdisc_linux_CPPFLAGS = $(src_rdisc_tests_cppflags)
|
||||
src_rdisc_tests_test_rdisc_linux_CPPFLAGS = $(src_tests_cppflags)
|
||||
src_rdisc_tests_test_rdisc_linux_LDFLAGS = $(src_rdisc_tests_flags)
|
||||
src_rdisc_tests_test_rdisc_linux_LDADD = $(src_rdisc_tests_ldadd)
|
||||
|
||||
src_rdisc_tests_test_rdisc_fake_CPPFLAGS = $(src_rdisc_tests_cppflags)
|
||||
src_rdisc_tests_test_rdisc_fake_CPPFLAGS = $(src_tests_cppflags)
|
||||
src_rdisc_tests_test_rdisc_fake_LDFLAGS = $(src_rdisc_tests_flags)
|
||||
src_rdisc_tests_test_rdisc_fake_LDADD = $(src_rdisc_tests_ldadd)
|
||||
|
||||
|
@ -2803,19 +2632,11 @@ src_rdisc_tests_test_rdisc_fake_LDADD = $(src_rdisc_tests_ldadd)
|
|||
check_programs += src/supplicant-manager/tests/test-supplicant-config
|
||||
|
||||
src_supplicant_manager_tests_test_supplicant_config_CPPFLAGS = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_srcdir)/src/supplicant-manager \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
-DTEST_CERT_DIR=\"$(abs_srcdir)/src/supplicant-manager/tests/certs\" \
|
||||
$(GLIB_CFLAGS)
|
||||
$(src_tests_cppflags) \
|
||||
-DTEST_CERT_DIR=\"$(abs_srcdir)/src/supplicant-manager/tests/certs\"
|
||||
|
||||
src_supplicant_manager_tests_test_supplicant_config_LDADD = \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
EXTRA_DIST += \
|
||||
src/supplicant-manager/tests/certs/test-ca-cert.pem \
|
||||
|
@ -2833,16 +2654,7 @@ src_tests_config_test_config_SOURCES = \
|
|||
src/tests/config/test-config.c
|
||||
|
||||
src_tests_config_test_config_CPPFLAGS = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/src/ \
|
||||
-I$(top_srcdir)/src/devices \
|
||||
-I${top_srcdir}/src/platform \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(src_tests_cppflags) \
|
||||
-DSRCDIR=\""$(abs_srcdir)/src/tests/config"\" \
|
||||
-DBUILDDIR=\""$(abs_builddir)/src/tests/config"\"
|
||||
|
||||
|
@ -2863,26 +2675,11 @@ EXTRA_DIST += \
|
|||
# src/tests
|
||||
###############################################################################
|
||||
|
||||
src_tests_cppflags = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/src/platform \
|
||||
-I$(top_srcdir)/src/dhcp-manager \
|
||||
-I$(top_srcdir)/src/devices \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_builddir)/src \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(CODE_COVERAGE_CFLAGS)
|
||||
|
||||
src_tests_ldflags = \
|
||||
$(CODE_COVERAGE_LDFLAGS)
|
||||
|
||||
src_tests_ldadd = \
|
||||
src/libNetworkManager.la
|
||||
src/libNetworkManagerTest.la
|
||||
|
||||
check_programs += \
|
||||
src/tests/test-general \
|
||||
|
@ -2930,30 +2727,22 @@ src_tests_test_utils_LDFLAGS = $(src_tests_ldflags)
|
|||
src_tests_test_utils_LDADD = $(src_tests_ldadd)
|
||||
|
||||
|
||||
src_tests_test_route_manager_cppflags = \
|
||||
-I$(top_srcdir)/src/platform/tests \
|
||||
$(src_tests_cppflags) \
|
||||
$(GUDEV_CFLAGS)
|
||||
|
||||
src_tests_test_route_manager_ldflags = \
|
||||
$(CODE_COVERAGE_LDFLAGS)
|
||||
|
||||
src_tests_test_route_manager_ldadd = \
|
||||
src/platform/tests/libnm-platform-tests.la \
|
||||
src/libNetworkManagerTest.la \
|
||||
$(GLIB_LIBS) \
|
||||
$(GUDEV_LIBS) \
|
||||
$(LIBNL_LIBS)
|
||||
|
||||
src_tests_test_route_manager_cppflags_fake = $(src_tests_test_route_manager_cppflags) -DSETUP=nm_fake_platform_setup
|
||||
src_tests_test_route_manager_cppflags_linux = $(src_tests_test_route_manager_cppflags) -DSETUP=nm_linux_platform_setup
|
||||
|
||||
src_tests_test_route_manager_fake_SOURCES = src/tests/test-route-manager.c
|
||||
src_tests_test_route_manager_fake_CPPFLAGS = $(src_tests_test_route_manager_cppflags_fake)
|
||||
src_tests_test_route_manager_fake_CPPFLAGS = $(src_tests_cppflags_fake)
|
||||
src_tests_test_route_manager_fake_LDFLAGS = $(src_tests_test_route_manager_ldflags)
|
||||
src_tests_test_route_manager_fake_LDADD = $(src_tests_test_route_manager_ldadd)
|
||||
|
||||
src_tests_test_route_manager_linux_SOURCES = src/tests/test-route-manager.c
|
||||
src_tests_test_route_manager_linux_CPPFLAGS = $(src_tests_test_route_manager_cppflags_linux)
|
||||
src_tests_test_route_manager_linux_CPPFLAGS = $(src_tests_cppflags_linux)
|
||||
src_tests_test_route_manager_linux_LDFLAGS = $(src_tests_test_route_manager_ldflags)
|
||||
src_tests_test_route_manager_linux_LDADD = $(src_tests_test_route_manager_ldadd)
|
||||
|
||||
|
@ -2983,7 +2772,6 @@ dispatcher_cppflags = \
|
|||
-I${top_srcdir}/dispatcher \
|
||||
-I${top_builddir}/dispatcher \
|
||||
$(GLIB_CFLAGS) \
|
||||
-DNETWORKMANAGER_COMPILATION \
|
||||
-DNMCONFDIR=\"$(nmconfdir)\" \
|
||||
-DSYSCONFDIR=\"$(sysconfdir)\" \
|
||||
-DLIBEXECDIR=\"$(libexecdir)\"
|
||||
|
@ -3076,7 +2864,6 @@ dispatcher_tests_test_dispatcher_envp_CPPFLAGS = \
|
|||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/dispatcher \
|
||||
-I$(top_builddir)/dispatcher \
|
||||
-DNETWORKMANAGER_COMPILATION \
|
||||
-DSRCDIR=\"$(abs_srcdir)/dispatcher/tests\" \
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "nm-device-private.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-platform.h"
|
||||
#include "ppp-manager/nm-ppp-manager.h"
|
||||
#include "ppp-manager/nm-ppp-status.h"
|
||||
|
@ -235,12 +234,14 @@ error:
|
|||
|
||||
static void
|
||||
link_changed_cb (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int ifindex,
|
||||
NMPlatformLink *info,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
NMDeviceAdsl *self)
|
||||
{
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
|
||||
if (change_type == NM_PLATFORM_SIGNAL_REMOVED) {
|
||||
NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (self);
|
||||
NMDevice *device = NM_DEVICE (self);
|
||||
|
@ -248,11 +249,11 @@ link_changed_cb (NMPlatform *platform,
|
|||
/* This only gets called for PPPoE connections and "nas" interfaces */
|
||||
|
||||
if (priv->nas_ifindex > 0 && ifindex == priv->nas_ifindex) {
|
||||
/* NAS device went away for some reason; kill the connection */
|
||||
_LOGD (LOGD_ADSL, "br2684 interface disappeared");
|
||||
nm_device_state_changed (device,
|
||||
NM_DEVICE_STATE_FAILED,
|
||||
NM_DEVICE_STATE_REASON_BR2684_FAILED);
|
||||
/* NAS device went away for some reason; kill the connection */
|
||||
_LOGD (LOGD_ADSL, "br2684 interface disappeared");
|
||||
nm_device_state_changed (device,
|
||||
NM_DEVICE_STATE_FAILED,
|
||||
NM_DEVICE_STATE_REASON_BR2684_FAILED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-device-private.h"
|
||||
#include "nm-platform.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-device-factory.h"
|
||||
#include "nm-core-internal.h"
|
||||
#include "nm-ip4-config.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-device-private.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-platform.h"
|
||||
#include "nm-device-factory.h"
|
||||
#include "nm-core-internal.h"
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "nm-supplicant-config.h"
|
||||
#include "ppp-manager/nm-ppp-manager.h"
|
||||
#include "ppp-manager/nm-ppp-status.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-platform.h"
|
||||
#include "nm-platform-utils.h"
|
||||
#include "nm-dcb.h"
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "nm-device-generic.h"
|
||||
|
||||
#include "nm-device-private.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-platform.h"
|
||||
#include "nm-core-internal.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-device-private.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-act-request.h"
|
||||
#include "nm-ip4-config.h"
|
||||
#include "nm-platform.h"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "nm-utils.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-device-private.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-settings.h"
|
||||
#include "nm-act-request.h"
|
||||
#include "nm-ip4-config.h"
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "nm-dhcp6-config.h"
|
||||
#include "nm-rfkill-manager.h"
|
||||
#include "nm-firewall-manager.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-settings-connection.h"
|
||||
#include "nm-settings.h"
|
||||
#include "nm-auth-utils.h"
|
||||
|
@ -2003,12 +2002,13 @@ device_ip_link_changed (NMDevice *self)
|
|||
|
||||
static void
|
||||
link_changed_cb (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int ifindex,
|
||||
NMPlatformLink *info,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
NMDevice *self)
|
||||
{
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
NMDevicePrivate *priv;
|
||||
|
||||
if (change_type != NM_PLATFORM_SIGNAL_CHANGED)
|
||||
|
@ -9719,12 +9719,14 @@ queued_ip6_config_change (gpointer user_data)
|
|||
|
||||
static void
|
||||
device_ipx_changed (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int ifindex,
|
||||
gpointer platform_object,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
NMDevice *self)
|
||||
{
|
||||
const NMPObjectType obj_type = obj_type_i;
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
NMDevicePrivate *priv;
|
||||
NMPlatformIP6Address *addr;
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-device-private.h"
|
||||
#include "nm-platform.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-core-internal.h"
|
||||
#include "nm-ip4-config.h"
|
||||
#include "nm-dbus-compat.h"
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
#include "nm-setting-connection.h"
|
||||
#include "nm-setting-olpc-mesh.h"
|
||||
#include "nm-manager.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-platform.h"
|
||||
|
||||
/* This is a bug; but we can't really change API now... */
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#include "nm-auth-utils.h"
|
||||
#include "nm-settings-connection.h"
|
||||
#include "nm-settings.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-core-internal.h"
|
||||
#include "nm-config.h"
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "nm-dhcp-helper-api.h"
|
||||
#include "nm-dhcp-client.h"
|
||||
#include "nm-core-internal.h"
|
||||
#include "nm-bus-manager.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
|
@ -39,6 +40,21 @@
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
const NMDhcpClientFactory *const _nm_dhcp_manager_factories[3] = {
|
||||
/* the order here matters, as we will try the plugins in this order to find
|
||||
* the first available plugin. */
|
||||
|
||||
#if WITH_DHCLIENT
|
||||
&_nm_dhcp_client_factory_dhclient,
|
||||
#endif
|
||||
#if WITH_DHCPCD
|
||||
&_nm_dhcp_client_factory_dhcpcd,
|
||||
#endif
|
||||
&_nm_dhcp_client_factory_internal,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
NMBusManager * dbus_mgr;
|
||||
gulong new_conn_id;
|
||||
|
|
|
@ -67,22 +67,6 @@ const char *nm_dhcp_helper_path = LIBEXECDIR "/nm-dhcp-helper";
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
const NMDhcpClientFactory *const _factories[] = {
|
||||
|
||||
/* the order here matters, as we will try the plugins in this order to find
|
||||
* the first available plugin. */
|
||||
|
||||
#ifndef NM_DHCP_INTERNAL_ONLY
|
||||
#if WITH_DHCLIENT
|
||||
&_nm_dhcp_client_factory_dhclient,
|
||||
#endif
|
||||
#if WITH_DHCPCD
|
||||
&_nm_dhcp_client_factory_dhcpcd,
|
||||
#endif
|
||||
#endif
|
||||
&_nm_dhcp_client_factory_internal,
|
||||
};
|
||||
|
||||
static const NMDhcpClientFactory *
|
||||
_client_factory_find_by_name (const char *name)
|
||||
{
|
||||
|
@ -90,10 +74,10 @@ _client_factory_find_by_name (const char *name)
|
|||
|
||||
g_return_val_if_fail (name, NULL);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (_factories); i++) {
|
||||
const NMDhcpClientFactory *f = _factories[i];
|
||||
for (i = 0; i < G_N_ELEMENTS (_nm_dhcp_manager_factories); i++) {
|
||||
const NMDhcpClientFactory *f = _nm_dhcp_manager_factories[i];
|
||||
|
||||
if (nm_streq (f->name, name))
|
||||
if (f && nm_streq (f->name, name))
|
||||
return f;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -349,8 +333,11 @@ nm_dhcp_manager_init (NMDhcpManager *self)
|
|||
int i;
|
||||
const NMDhcpClientFactory *client_factory = NULL;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (_factories); i++) {
|
||||
const NMDhcpClientFactory *f = _factories[i];
|
||||
for (i = 0; i < G_N_ELEMENTS (_nm_dhcp_manager_factories); i++) {
|
||||
const NMDhcpClientFactory *f = _nm_dhcp_manager_factories[i];
|
||||
|
||||
if (!f)
|
||||
continue;
|
||||
|
||||
nm_log_dbg (LOGD_DHCP, "dhcp-init: enabled DHCP client '%s' (%s)%s",
|
||||
f->name, g_type_name (f->get_type ()),
|
||||
|
@ -370,8 +357,8 @@ nm_dhcp_manager_init (NMDhcpManager *self)
|
|||
nm_log_warn (LOGD_DHCP, "dhcp-init: DHCP client '%s' not available", client);
|
||||
}
|
||||
if (!client_factory) {
|
||||
for (i = 0; i < G_N_ELEMENTS (_factories); i++) {
|
||||
client_factory = _client_factory_available (_factories[i]);
|
||||
for (i = 0; i < G_N_ELEMENTS (_nm_dhcp_manager_factories); i++) {
|
||||
client_factory = _client_factory_available (_nm_dhcp_manager_factories[i]);
|
||||
if (client_factory)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -81,4 +81,6 @@ GSList * nm_dhcp_manager_get_lease_ip_configs (NMDhcpManager *self,
|
|||
/* For testing only */
|
||||
extern const char* nm_dhcp_helper_path;
|
||||
|
||||
extern const NMDhcpClientFactory *const _nm_dhcp_manager_factories[3];
|
||||
|
||||
#endif /* __NETWORKMANAGER_DHCP_MANAGER_H__ */
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "nm-bus-manager.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
|
||||
enum {
|
||||
|
@ -213,7 +212,7 @@ _new_unix_process (GDBusMethodInvocation *context,
|
|||
g_return_val_if_fail (pid > 0 && pid <= MIN (G_MAXINT, G_MAXINT32), NULL);
|
||||
|
||||
self = NM_AUTH_SUBJECT (g_object_new (NM_TYPE_AUTH_SUBJECT,
|
||||
NM_AUTH_SUBJECT_SUBJECT_TYPE, NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS,
|
||||
NM_AUTH_SUBJECT_SUBJECT_TYPE, (int) NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS,
|
||||
NM_AUTH_SUBJECT_UNIX_PROCESS_DBUS_SENDER, dbus_sender,
|
||||
NM_AUTH_SUBJECT_UNIX_PROCESS_PID, (gulong) pid,
|
||||
NM_AUTH_SUBJECT_UNIX_PROCESS_UID, (gulong) uid,
|
||||
|
@ -252,7 +251,7 @@ NMAuthSubject *
|
|||
nm_auth_subject_new_internal (void)
|
||||
{
|
||||
return NM_AUTH_SUBJECT (g_object_new (NM_TYPE_AUTH_SUBJECT,
|
||||
NM_AUTH_SUBJECT_SUBJECT_TYPE, NM_AUTH_SUBJECT_TYPE_INTERNAL,
|
||||
NM_AUTH_SUBJECT_SUBJECT_TYPE, (int) NM_AUTH_SUBJECT_TYPE_INTERNAL,
|
||||
NULL));
|
||||
}
|
||||
|
||||
|
@ -265,7 +264,7 @@ get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
|
|||
|
||||
switch (prop_id) {
|
||||
case PROP_SUBJECT_TYPE:
|
||||
g_value_set_enum (value, priv->subject_type);
|
||||
g_value_set_int (value, priv->subject_type);
|
||||
break;
|
||||
case PROP_UNIX_PROCESS_DBUS_SENDER:
|
||||
g_value_set_string (value, priv->unix_process.dbus_sender);
|
||||
|
@ -287,14 +286,16 @@ set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *p
|
|||
{
|
||||
NMAuthSubjectPrivate *priv = NM_AUTH_SUBJECT_GET_PRIVATE ((NMAuthSubject *) object);
|
||||
NMAuthSubjectType subject_type;
|
||||
int i;
|
||||
const char *str;
|
||||
gulong id;
|
||||
|
||||
/* all properties are construct-only */
|
||||
switch (prop_id) {
|
||||
case PROP_SUBJECT_TYPE:
|
||||
subject_type = g_value_get_enum (value);
|
||||
g_return_if_fail (subject_type != NM_AUTH_SUBJECT_TYPE_INVALID);
|
||||
i = g_value_get_int (value);
|
||||
g_return_if_fail (NM_IN_SET (i, (int) NM_AUTH_SUBJECT_TYPE_INTERNAL, (int) NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS));
|
||||
subject_type = i;
|
||||
priv->subject_type |= subject_type;
|
||||
g_return_if_fail (priv->subject_type == subject_type);
|
||||
break;
|
||||
|
@ -414,12 +415,13 @@ nm_auth_subject_class_init (NMAuthSubjectClass *config_class)
|
|||
|
||||
g_object_class_install_property
|
||||
(object_class, PROP_SUBJECT_TYPE,
|
||||
g_param_spec_enum (NM_AUTH_SUBJECT_SUBJECT_TYPE, "", "",
|
||||
NM_TYPE_AUTH_SUBJECT_TYPE,
|
||||
NM_AUTH_SUBJECT_TYPE_INVALID,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
g_param_spec_int (NM_AUTH_SUBJECT_SUBJECT_TYPE, "", "",
|
||||
NM_AUTH_SUBJECT_TYPE_INVALID,
|
||||
NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS,
|
||||
NM_AUTH_SUBJECT_TYPE_INVALID,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_class_install_property
|
||||
(object_class, PROP_UNIX_PROCESS_DBUS_SENDER,
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "nm-utils.h"
|
||||
#include "nm-device.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-core-internal.h"
|
||||
#include "nm-keyfile-internal.h"
|
||||
|
||||
|
|
|
@ -1364,12 +1364,14 @@ _platform_ipx_route_changed_cb (const VTableIP *vtable,
|
|||
|
||||
static void
|
||||
_platform_changed_cb (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int ifindex,
|
||||
gpointer platform_object,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
NMDefaultRouteManager *self)
|
||||
{
|
||||
const NMPObjectType obj_type = obj_type_i;
|
||||
|
||||
switch (obj_type) {
|
||||
case NMP_OBJECT_TYPE_IP4_ADDRESS:
|
||||
_platform_ipx_route_changed_cb (&vtable_ip4, self, NULL);
|
||||
|
|
|
@ -333,12 +333,14 @@ do_early_setup (int *argc, char **argv[])
|
|||
|
||||
static void
|
||||
ip6_address_changed (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int iface,
|
||||
NMPlatformIP6Address *addr,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
NMRDisc *rdisc)
|
||||
{
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
|
||||
if ( (change_type == NM_PLATFORM_SIGNAL_CHANGED && addr->n_ifa_flags & IFA_F_DADFAILED)
|
||||
|| (change_type == NM_PLATFORM_SIGNAL_REMOVED && addr->n_ifa_flags & IFA_F_TENTATIVE))
|
||||
nm_rdisc_dad_failed (rdisc, &addr->address);
|
||||
|
@ -544,6 +546,12 @@ main (int argc, char *argv[])
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
const NMDhcpClientFactory *const _nm_dhcp_manager_factories[3] = {
|
||||
&_nm_dhcp_client_factory_internal,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Stub functions */
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "nm-auth-manager.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
#include "nm-device-factory.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-sleep-monitor.h"
|
||||
#include "nm-connectivity.h"
|
||||
#include "nm-policy.h"
|
||||
|
@ -2225,12 +2224,13 @@ out:
|
|||
|
||||
static void
|
||||
platform_link_cb (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int ifindex,
|
||||
NMPlatformLink *plink,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
gpointer user_data)
|
||||
{
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
PlatformLinkCbData *data;
|
||||
|
||||
switch (change_type) {
|
||||
|
|
|
@ -1027,12 +1027,13 @@ _ip4_device_routes_idle_cb (IP4DeviceRoutePurgeEntry *entry)
|
|||
|
||||
static void
|
||||
_ip4_device_routes_ip4_route_changed (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int ifindex,
|
||||
const NMPlatformIP4Route *route,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
NMRouteManager *self)
|
||||
{
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
NMRouteManagerPrivate *priv;
|
||||
NMPObject obj_needle;
|
||||
IP4DeviceRoutePurgeEntry *entry;
|
||||
|
|
|
@ -321,7 +321,7 @@ link_add (NMPlatform *platform,
|
|||
new_device = &g_array_index (priv->links, NMFakePlatformLink, priv->links->len - 1);
|
||||
|
||||
if (device.link.ifindex) {
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_LINK_CHANGED, NMP_OBJECT_TYPE_LINK, device.link.ifindex, &device, NM_PLATFORM_SIGNAL_ADDED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_LINK_CHANGED, (int) NMP_OBJECT_TYPE_LINK, device.link.ifindex, &device, (int) NM_PLATFORM_SIGNAL_ADDED);
|
||||
|
||||
link_changed (platform, &g_array_index (priv->links, NMFakePlatformLink, priv->links->len - 1), FALSE);
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ link_delete (NMPlatform *platform, int ifindex)
|
|||
memset (route, 0, sizeof (*route));
|
||||
}
|
||||
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_LINK_CHANGED, NMP_OBJECT_TYPE_LINK, ifindex, &deleted_device, NM_PLATFORM_SIGNAL_REMOVED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_LINK_CHANGED, (int) NMP_OBJECT_TYPE_LINK, ifindex, &deleted_device, (int) NM_PLATFORM_SIGNAL_REMOVED);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ link_changed (NMPlatform *platform, NMFakePlatformLink *device, gboolean raise_s
|
|||
int i;
|
||||
|
||||
if (raise_signal)
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_LINK_CHANGED, NMP_OBJECT_TYPE_LINK, device->link.ifindex, &device->link, NM_PLATFORM_SIGNAL_CHANGED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_LINK_CHANGED, (int) NMP_OBJECT_TYPE_LINK, device->link.ifindex, &device->link, (int) NM_PLATFORM_SIGNAL_CHANGED);
|
||||
|
||||
if (device->link.ifindex && !IN6_IS_ADDR_UNSPECIFIED (&device->ip6_lladdr)) {
|
||||
if (device->link.connected)
|
||||
|
@ -947,12 +947,12 @@ ip4_address_add (NMPlatform *platform,
|
|||
|
||||
memcpy (item, &address, sizeof (address));
|
||||
if (changed)
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ADDRESS_CHANGED, NMP_OBJECT_TYPE_IP4_ADDRESS, ifindex, &address, NM_PLATFORM_SIGNAL_CHANGED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ADDRESS_CHANGED, (int) NMP_OBJECT_TYPE_IP4_ADDRESS, ifindex, &address, (int) NM_PLATFORM_SIGNAL_CHANGED);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_array_append_val (priv->ip4_addresses, address);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ADDRESS_CHANGED, NMP_OBJECT_TYPE_IP4_ADDRESS, ifindex, &address, NM_PLATFORM_SIGNAL_ADDED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ADDRESS_CHANGED, (int) NMP_OBJECT_TYPE_IP4_ADDRESS, ifindex, &address, (int) NM_PLATFORM_SIGNAL_ADDED);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -994,12 +994,12 @@ ip6_address_add (NMPlatform *platform,
|
|||
|
||||
memcpy (item, &address, sizeof (address));
|
||||
if (changed)
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ADDRESS_CHANGED, NMP_OBJECT_TYPE_IP6_ADDRESS, ifindex, &address, NM_PLATFORM_SIGNAL_CHANGED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ADDRESS_CHANGED, (int) NMP_OBJECT_TYPE_IP6_ADDRESS, ifindex, &address, (int) NM_PLATFORM_SIGNAL_CHANGED);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_array_append_val (priv->ip6_addresses, address);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ADDRESS_CHANGED, NMP_OBJECT_TYPE_IP6_ADDRESS, ifindex, &address, NM_PLATFORM_SIGNAL_ADDED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ADDRESS_CHANGED, (int) NMP_OBJECT_TYPE_IP6_ADDRESS, ifindex, &address, (int) NM_PLATFORM_SIGNAL_ADDED);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1021,7 +1021,7 @@ ip4_address_delete (NMPlatform *platform, int ifindex, in_addr_t addr, guint8 pl
|
|||
|
||||
memcpy (&deleted_address, address, sizeof (deleted_address));
|
||||
memset (address, 0, sizeof (*address));
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ADDRESS_CHANGED, NMP_OBJECT_TYPE_IP4_ADDRESS, ifindex, &deleted_address, NM_PLATFORM_SIGNAL_REMOVED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ADDRESS_CHANGED, (int) NMP_OBJECT_TYPE_IP4_ADDRESS, ifindex, &deleted_address, (int) NM_PLATFORM_SIGNAL_REMOVED);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -1045,7 +1045,7 @@ ip6_address_delete (NMPlatform *platform, int ifindex, struct in6_addr addr, gui
|
|||
|
||||
memcpy (&deleted_address, address, sizeof (deleted_address));
|
||||
memset (address, 0, sizeof (*address));
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ADDRESS_CHANGED, NMP_OBJECT_TYPE_IP6_ADDRESS, ifindex, &deleted_address, NM_PLATFORM_SIGNAL_REMOVED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ADDRESS_CHANGED, (int) NMP_OBJECT_TYPE_IP6_ADDRESS, ifindex, &deleted_address, (int) NM_PLATFORM_SIGNAL_REMOVED);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -1170,7 +1170,7 @@ ip4_route_delete (NMPlatform *platform, int ifindex, in_addr_t network, guint8 p
|
|||
|
||||
memcpy (&deleted_route, route, sizeof (deleted_route));
|
||||
g_array_remove_index (priv->ip4_routes, i);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, NMP_OBJECT_TYPE_IP4_ROUTE, ifindex, &deleted_route, NM_PLATFORM_SIGNAL_REMOVED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, (int) NMP_OBJECT_TYPE_IP4_ROUTE, ifindex, &deleted_route, (int) NM_PLATFORM_SIGNAL_REMOVED);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1196,7 +1196,7 @@ ip6_route_delete (NMPlatform *platform, int ifindex, struct in6_addr network, gu
|
|||
|
||||
memcpy (&deleted_route, route, sizeof (deleted_route));
|
||||
g_array_remove_index (priv->ip6_routes, i);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ROUTE_CHANGED, NMP_OBJECT_TYPE_IP6_ROUTE, ifindex, &deleted_route, NM_PLATFORM_SIGNAL_REMOVED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ROUTE_CHANGED, (int) NMP_OBJECT_TYPE_IP6_ROUTE, ifindex, &deleted_route, (int) NM_PLATFORM_SIGNAL_REMOVED);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1260,12 +1260,12 @@ ip4_route_add (NMPlatform *platform, int ifindex, NMIPConfigSource source,
|
|||
}
|
||||
|
||||
memcpy (item, &route, sizeof (route));
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, NMP_OBJECT_TYPE_IP4_ROUTE, ifindex, &route, NM_PLATFORM_SIGNAL_CHANGED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, (int) NMP_OBJECT_TYPE_IP4_ROUTE, ifindex, &route, (int) NM_PLATFORM_SIGNAL_CHANGED);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_array_append_val (priv->ip4_routes, route);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, NMP_OBJECT_TYPE_IP4_ROUTE, ifindex, &route, NM_PLATFORM_SIGNAL_ADDED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, (int) NMP_OBJECT_TYPE_IP4_ROUTE, ifindex, &route, (int) NM_PLATFORM_SIGNAL_ADDED);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1326,12 +1326,12 @@ ip6_route_add (NMPlatform *platform, int ifindex, NMIPConfigSource source,
|
|||
}
|
||||
|
||||
memcpy (item, &route, sizeof (route));
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ROUTE_CHANGED, NMP_OBJECT_TYPE_IP6_ROUTE, ifindex, &route, NM_PLATFORM_SIGNAL_CHANGED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ROUTE_CHANGED, (int) NMP_OBJECT_TYPE_IP6_ROUTE, ifindex, &route, (int) NM_PLATFORM_SIGNAL_CHANGED);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_array_append_val (priv->ip6_routes, route);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ROUTE_CHANGED, NMP_OBJECT_TYPE_IP6_ROUTE, ifindex, &route, NM_PLATFORM_SIGNAL_ADDED);
|
||||
g_signal_emit_by_name (platform, NM_PLATFORM_SIGNAL_IP6_ROUTE_CHANGED, (int) NMP_OBJECT_TYPE_IP6_ROUTE, ifindex, &route, (int) NM_PLATFORM_SIGNAL_ADDED);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -2807,10 +2807,10 @@ do_emit_signal (NMPlatform *platform, const NMPObject *obj, NMPCacheOpsType cach
|
|||
g_signal_emit (platform,
|
||||
_nm_platform_signal_id_get (klass->signal_type_id),
|
||||
0,
|
||||
klass->obj_type,
|
||||
(int) klass->obj_type,
|
||||
obj_clone.object.ifindex,
|
||||
&obj_clone.object,
|
||||
(NMPlatformSignalChangeType) cache_op);
|
||||
(int) cache_op);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "nm-core-internal.h"
|
||||
|
||||
#include "nm-core-utils.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-platform-utils.h"
|
||||
#include "nmp-object.h"
|
||||
#include "nmp-netns.h"
|
||||
|
@ -4295,7 +4294,12 @@ nm_platform_class_init (NMPlatformClass *platform_class)
|
|||
G_SIGNAL_RUN_FIRST, \
|
||||
G_CALLBACK (method), \
|
||||
NULL, NULL, NULL, \
|
||||
G_TYPE_NONE, 4, NM_TYPE_POBJECT_TYPE, G_TYPE_INT, G_TYPE_POINTER, NM_TYPE_PLATFORM_SIGNAL_CHANGE_TYPE); \
|
||||
G_TYPE_NONE, 4, \
|
||||
G_TYPE_INT, /* (int) NMPObjectType */ \
|
||||
G_TYPE_INT, /* ifindex */ \
|
||||
G_TYPE_POINTER /* const NMPObject * */, \
|
||||
G_TYPE_INT /* (int) NMPlatformSignalChangeType */ \
|
||||
); \
|
||||
} G_STMT_END
|
||||
|
||||
/* Signals */
|
||||
|
|
|
@ -149,12 +149,15 @@ _free_signal (const char *file, int line, const char *func, SignalData *data)
|
|||
}
|
||||
|
||||
void
|
||||
link_callback (NMPlatform *platform, NMPObjectType obj_type, int ifindex, NMPlatformLink *received, NMPlatformSignalChangeType change_type, SignalData *data)
|
||||
link_callback (NMPlatform *platform, int obj_type_i, int ifindex, NMPlatformLink *received, int change_type_i, SignalData *data)
|
||||
{
|
||||
const NMPObjectType obj_type = obj_type_i;
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
GArray *links;
|
||||
NMPlatformLink *cached;
|
||||
int i;
|
||||
|
||||
g_assert_cmpint (obj_type, ==, NMP_OBJECT_TYPE_LINK);
|
||||
g_assert (received);
|
||||
g_assert_cmpint (received->ifindex, ==, ifindex);
|
||||
g_assert (data && data->name);
|
||||
|
@ -341,10 +344,10 @@ typedef struct {
|
|||
|
||||
static void
|
||||
_wait_for_signal_cb (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int ifindex,
|
||||
NMPlatformLink *plink,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
gpointer user_data)
|
||||
{
|
||||
WaitForSignalData *data = user_data;
|
||||
|
|
|
@ -80,7 +80,7 @@ void _free_signal (const char *file, int line, const char *func, SignalData *dat
|
|||
#define ensure_no_signal(data) _ensure_no_signal(__FILE__, __LINE__, G_STRFUNC, data)
|
||||
#define free_signal(data) _free_signal(__FILE__, __LINE__, G_STRFUNC, data)
|
||||
|
||||
void link_callback (NMPlatform *platform, NMPObjectType obj_type, int ifindex, NMPlatformLink *received, NMPlatformSignalChangeType change_type, SignalData *data);
|
||||
void link_callback (NMPlatform *platform, int obj_type_i, int ifindex, NMPlatformLink *received, int change_type_i, SignalData *data);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
@ -157,12 +157,15 @@ software_add (NMLinkType link_type, const char *name)
|
|||
|
||||
static void
|
||||
test_link_changed_signal_cb (NMPlatform *platform,
|
||||
NMPObjectType obj_type,
|
||||
int obj_type_i,
|
||||
int ifindex,
|
||||
const NMPlatformIP4Route *route,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
int change_type_i,
|
||||
gboolean *p_test_link_changed_signal_arg)
|
||||
{
|
||||
const NMPObjectType obj_type = obj_type_i;
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
|
||||
/* test invocation of platform signals with multiple listeners
|
||||
* connected to the signal. Platform signals have enum-typed
|
||||
* arguments and there seem to be an issue with invoking such
|
||||
|
|
|
@ -30,8 +30,12 @@
|
|||
#define DEVICE_NAME "nm-test-device"
|
||||
|
||||
static void
|
||||
ip4_route_callback (NMPlatform *platform, NMPObjectType obj_type, int ifindex, const NMPlatformIP4Route *received, NMPlatformSignalChangeType change_type, SignalData *data)
|
||||
ip4_route_callback (NMPlatform *platform, int obj_type_i, int ifindex, const NMPlatformIP4Route *received, int change_type_i, SignalData *data)
|
||||
{
|
||||
const NMPObjectType obj_type = obj_type_i;
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
|
||||
g_assert_cmpint (obj_type, ==, NMP_OBJECT_TYPE_IP4_ROUTE);
|
||||
g_assert (received);
|
||||
g_assert_cmpint (received->ifindex, ==, ifindex);
|
||||
g_assert (data && data->name);
|
||||
|
@ -50,8 +54,12 @@ ip4_route_callback (NMPlatform *platform, NMPObjectType obj_type, int ifindex, c
|
|||
}
|
||||
|
||||
static void
|
||||
ip6_route_callback (NMPlatform *platform, NMPObjectType obj_type, int ifindex, const NMPlatformIP6Route *received, NMPlatformSignalChangeType change_type, SignalData *data)
|
||||
ip6_route_callback (NMPlatform *platform, int obj_type_i, int ifindex, const NMPlatformIP6Route *received, int change_type_i, SignalData *data)
|
||||
{
|
||||
const NMPObjectType obj_type = obj_type_i;
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
|
||||
g_assert_cmpint (obj_type, ==, NMP_OBJECT_TYPE_IP6_ROUTE);
|
||||
g_assert (received);
|
||||
g_assert_cmpint (received->ifindex, ==, ifindex);
|
||||
g_assert (data && data->name);
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "nm-secret-agent.h"
|
||||
#include "nm-auth-utils.h"
|
||||
#include "nm-setting-vpn.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
#include "nm-auth-manager.h"
|
||||
#include "nm-bus-manager.h"
|
||||
#include "nm-session-monitor.h"
|
||||
|
|
|
@ -116,10 +116,11 @@ devtimeout_ready (gpointer user_data)
|
|||
}
|
||||
|
||||
static void
|
||||
link_changed (NMPlatform *platform, NMPObjectType obj_type, int ifindex, const NMPlatformLink *link,
|
||||
NMPlatformSignalChangeType change_type,
|
||||
link_changed (NMPlatform *platform, int obj_type_i, int ifindex, const NMPlatformLink *link,
|
||||
int change_type_i,
|
||||
NMConnection *self)
|
||||
{
|
||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||
NMIfcfgConnectionPrivate *priv = NM_IFCFG_CONNECTION_GET_PRIVATE ((NMIfcfgConnection *) self);
|
||||
const char *ifname;
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "nm-setting-vpn.h"
|
||||
#include "nm-vpn-dbus-interface.h"
|
||||
#include "nm-core-internal.h"
|
||||
#include "nm-src-enum-types.h"
|
||||
|
||||
typedef struct {
|
||||
GSList *plugins;
|
||||
|
|
Loading…
Reference in a new issue