diff options
Diffstat (limited to 'libnm-core')
58 files changed, 2942 insertions, 5374 deletions
diff --git a/libnm-core/Makefile.am b/libnm-core/Makefile.am deleted file mode 100644 index 695b6a3a..00000000 --- a/libnm-core/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -include $(GLIB_MAKEFILE) - -@GNOME_CODE_COVERAGE_RULES@ - -SUBDIRS = . tests - -AM_CPPFLAGS = \ - -I${top_srcdir}/shared \ - -I${top_builddir}/shared \ - -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) - -noinst_LTLIBRARIES = libnm-core.la - -# header/source defines are in Makefile.libnm-core, so they can be shared -# with libnm/Makefile.am -include Makefile.libnm-core - -libnmincludedir = $(includedir)/libnm - -libnminclude_HEADERS = $(libnm_core_headers) -libnm_core_la_SOURCES = \ - $(libnm_core_sources) \ - $(libnm_core_private_headers) - -GLIB_GENERATED = nm-core-enum-types.h nm-core-enum-types.c -nm_core_enum_types_sources = $(filter-out %nm-core-enum-types.h,$(libnminclude_HEADERS)) -GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM -GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM - -libnm_core_la_LIBADD = \ - $(GLIB_LIBS) \ - $(UUID_LIBS) \ - $(JANSSON_LIBS) - -libnm_core_la_LDFLAGS = \ - $(CODE_COVERAGE_LDFLAGS) - -if WITH_GNUTLS -AM_CPPFLAGS += $(GNUTLS_CFLAGS) -libnm_core_la_SOURCES += crypto_gnutls.c -libnm_core_la_LIBADD += $(GNUTLS_LIBS) -endif - -if WITH_NSS -AM_CPPFLAGS += $(NSS_CFLAGS) -libnm_core_la_SOURCES += crypto_nss.c -libnm_core_la_LIBADD += $(NSS_LIBS) -endif - -nm-vpn-dbus-types.xml: nm-vpn-dbus-interface.h $(top_srcdir)/tools/enums-to-docbook.pl - $(AM_V_GEN) @PERL@ $(top_srcdir)/tools/enums-to-docbook.pl 'nm-vpn-dbus-types' 'VPN Plugin D-Bus API Types' $^ >$@ - -nm-dbus-types.xml: nm-dbus-interface.h $(top_srcdir)/tools/enums-to-docbook.pl - $(AM_V_GEN) @PERL@ $(top_srcdir)/tools/enums-to-docbook.pl 'nm-dbus-types' 'NetworkManager D-Bus API Types' $^ >$@ - -BUILT_SOURCES = $(GLIB_GENERATED) nm-vpn-dbus-types.xml nm-dbus-types.xml -CLEANFILES = $(BUILT_SOURCES) diff --git a/libnm-core/Makefile.in b/libnm-core/Makefile.in deleted file mode 100644 index 81190753..00000000 --- a/libnm-core/Makefile.in +++ /dev/null @@ -1,1510 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# In order for this to work correctly from both libnm-core/ and libnm/, -# we have to specify full pathnames. (We can't just use $(addprefix) from -# libnm/, because that's incompatible with the Makefile.introspection rules.) - - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@WITH_GNUTLS_TRUE@am__append_1 = $(GNUTLS_CFLAGS) -@WITH_GNUTLS_TRUE@am__append_2 = crypto_gnutls.c -@WITH_GNUTLS_TRUE@am__append_3 = $(GNUTLS_LIBS) -@WITH_NSS_TRUE@am__append_4 = $(NSS_CFLAGS) -@WITH_NSS_TRUE@am__append_5 = crypto_nss.c -@WITH_NSS_TRUE@am__append_6 = $(NSS_LIBS) -subdir = libnm-core -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \ - $(top_srcdir)/m4/ax_lib_readline.m4 \ - $(top_srcdir)/m4/compiler_options.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/git-sha-record.m4 \ - $(top_srcdir)/m4/gnome-code-coverage.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(libnminclude_HEADERS) \ - $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -@WITH_GNUTLS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -@WITH_NSS_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) -libnm_core_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) -am__libnm_core_la_SOURCES_DIST = \ - $(top_builddir)/shared/nm-utils/nm-shared-utils.c \ - $(core_build)/nm-core-enum-types.c $(core)/crypto.c \ - $(core)/nm-connection.c $(core)/nm-dbus-utils.c \ - $(core)/nm-errors.c $(core)/nm-keyfile-reader.c \ - $(core)/nm-keyfile-utils.c $(core)/nm-keyfile-writer.c \ - $(core)/nm-property-compare.c $(core)/nm-setting-8021x.c \ - $(core)/nm-setting-adsl.c $(core)/nm-setting-bluetooth.c \ - $(core)/nm-setting-bond.c $(core)/nm-setting-bridge-port.c \ - $(core)/nm-setting-bridge.c $(core)/nm-setting-cdma.c \ - $(core)/nm-setting-connection.c $(core)/nm-setting-dcb.c \ - $(core)/nm-setting-generic.c $(core)/nm-setting-gsm.c \ - $(core)/nm-setting-infiniband.c $(core)/nm-setting-ip-config.c \ - $(core)/nm-setting-ip-tunnel.c $(core)/nm-setting-ip4-config.c \ - $(core)/nm-setting-ip6-config.c $(core)/nm-setting-macvlan.c \ - $(core)/nm-setting-olpc-mesh.c $(core)/nm-setting-ppp.c \ - $(core)/nm-setting-pppoe.c $(core)/nm-setting-serial.c \ - $(core)/nm-setting-team-port.c $(core)/nm-setting-team.c \ - $(core)/nm-setting-tun.c $(core)/nm-setting-vlan.c \ - $(core)/nm-setting-vpn.c $(core)/nm-setting-vxlan.c \ - $(core)/nm-setting-wimax.c $(core)/nm-setting-wired.c \ - $(core)/nm-setting-wireless-security.c \ - $(core)/nm-setting-wireless.c $(core)/nm-setting.c \ - $(core)/nm-simple-connection.c $(core)/nm-utils.c \ - $(core)/nm-vpn-editor-plugin.c $(core)/nm-vpn-plugin-info.c \ - $(top_builddir)/shared/nm-utils/nm-shared-utils.h \ - $(core)/crypto.h $(core)/nm-connection-private.h \ - $(core)/nm-core-internal.h $(core)/nm-core-types-internal.h \ - $(core)/nm-keyfile-internal.h $(core)/nm-keyfile-utils.h \ - $(core)/nm-property-compare.h $(core)/nm-setting-private.h \ - $(core)/nm-utils-private.h crypto_gnutls.c crypto_nss.c -am__objects_1 = nm-shared-utils.lo nm-core-enum-types.lo crypto.lo \ - nm-connection.lo nm-dbus-utils.lo nm-errors.lo \ - nm-keyfile-reader.lo nm-keyfile-utils.lo nm-keyfile-writer.lo \ - nm-property-compare.lo nm-setting-8021x.lo nm-setting-adsl.lo \ - nm-setting-bluetooth.lo nm-setting-bond.lo \ - nm-setting-bridge-port.lo nm-setting-bridge.lo \ - nm-setting-cdma.lo nm-setting-connection.lo nm-setting-dcb.lo \ - nm-setting-generic.lo nm-setting-gsm.lo \ - nm-setting-infiniband.lo nm-setting-ip-config.lo \ - nm-setting-ip-tunnel.lo nm-setting-ip4-config.lo \ - nm-setting-ip6-config.lo nm-setting-macvlan.lo \ - nm-setting-olpc-mesh.lo nm-setting-ppp.lo nm-setting-pppoe.lo \ - nm-setting-serial.lo nm-setting-team-port.lo \ - nm-setting-team.lo nm-setting-tun.lo nm-setting-vlan.lo \ - nm-setting-vpn.lo nm-setting-vxlan.lo nm-setting-wimax.lo \ - nm-setting-wired.lo nm-setting-wireless-security.lo \ - nm-setting-wireless.lo nm-setting.lo nm-simple-connection.lo \ - nm-utils.lo nm-vpn-editor-plugin.lo nm-vpn-plugin-info.lo -am__objects_2 = -@WITH_GNUTLS_TRUE@am__objects_3 = crypto_gnutls.lo -@WITH_NSS_TRUE@am__objects_4 = crypto_nss.lo -am_libnm_core_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) $(am__objects_4) -libnm_core_la_OBJECTS = $(am_libnm_core_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -libnm_core_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libnm_core_la_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libnm_core_la_SOURCES) -DIST_SOURCES = $(am__libnm_core_la_SOURCES_DIST) -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libnmincludedir)" -HEADERS = $(libnminclude_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.libnm-core \ - $(top_srcdir)/build-aux/depcomp -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -ALL_LINGUAS = @ALL_LINGUAS@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_TESTS_FD_REDIRECT = @AM_TESTS_FD_REDIRECT@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@ -BLUEZ5_LIBS = @BLUEZ5_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ -CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ -CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SYS_DIR = @DBUS_SYS_DIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DHCLIENT_PATH = @DHCLIENT_PATH@ -DHCPCD_PATH = @DHCPCD_PATH@ -DISTRO_NETWORK_SERVICE = @DISTRO_NETWORK_SERVICE@ -DLLTOOL = @DLLTOOL@ -DL_LIBS = @DL_LIBS@ -DNSMASQ_PATH = @DNSMASQ_PATH@ -DNSSEC_TRIGGER_SCRIPT = @DNSSEC_TRIGGER_SCRIPT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GENHTML = @GENHTML@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ -GLIB_LIBS = @GLIB_LIBS@ -GLIB_MAKEFILE = @GLIB_MAKEFILE@ -GLIB_MKENUMS = @GLIB_MKENUMS@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ -GNUTLS_LIBS = @GNUTLS_LIBS@ -GREP = @GREP@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -GUDEV_CFLAGS = @GUDEV_CFLAGS@ -GUDEV_LIBS = @GUDEV_LIBS@ -HTML_DIR = @HTML_DIR@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ -INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ -INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ -INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ -IPTABLES_PATH = @IPTABLES_PATH@ -JANSSON_CFLAGS = @JANSSON_CFLAGS@ -JANSSON_LIBS = @JANSSON_LIBS@ -KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@ -LCOV = @LCOV@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBAUDIT_CFLAGS = @LIBAUDIT_CFLAGS@ -LIBAUDIT_LIBS = @LIBAUDIT_LIBS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBM = @LIBM@ -LIBNDP_CFLAGS = @LIBNDP_CFLAGS@ -LIBNDP_LIBS = @LIBNDP_LIBS@ -LIBNL_CFLAGS = @LIBNL_CFLAGS@ -LIBNL_LIBS = @LIBNL_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@ -LIBSOUP_LIBS = @LIBSOUP_LIBS@ -LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ -LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ -LIBTEAMDCTL_CFLAGS = @LIBTEAMDCTL_CFLAGS@ -LIBTEAMDCTL_LIBS = @LIBTEAMDCTL_LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOG_DRIVER = @LOG_DRIVER@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MM_GLIB_CFLAGS = @MM_GLIB_CFLAGS@ -MM_GLIB_LIBS = @MM_GLIB_LIBS@ -MOC = @MOC@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NEWT_CFLAGS = @NEWT_CFLAGS@ -NEWT_LIBS = @NEWT_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@ -NM_CONFIG_DEFAULT_DNS_RC_MANAGER = @NM_CONFIG_DEFAULT_DNS_RC_MANAGER@ -NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT = @NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT@ -NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT = @NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT@ -NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ -NM_MICRO_VERSION = @NM_MICRO_VERSION@ -NM_MINOR_VERSION = @NM_MINOR_VERSION@ -NM_MODIFY_SYSTEM_POLICY = @NM_MODIFY_SYSTEM_POLICY@ -NM_VERSION = @NM_VERSION@ -NSS_CFLAGS = @NSS_CFLAGS@ -NSS_LIBS = @NSS_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POLKIT_CFLAGS = @POLKIT_CFLAGS@ -POLKIT_LIBS = @POLKIT_LIBS@ -POSUB = @POSUB@ -PPPD_PATH = @PPPD_PATH@ -PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@ -QT_CFLAGS = @QT_CFLAGS@ -QT_LIBS = @QT_LIBS@ -RANLIB = @RANLIB@ -READLINE_LIBS = @READLINE_LIBS@ -SANITIZERS = @SANITIZERS@ -SANITIZER_ENV = @SANITIZER_ENV@ -SED = @SED@ -SELINUX_CFLAGS = @SELINUX_CFLAGS@ -SELINUX_LIBS = @SELINUX_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@ -SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@ -SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@ -SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ -SYSTEMD_JOURNAL_CFLAGS = @SYSTEMD_JOURNAL_CFLAGS@ -SYSTEMD_JOURNAL_LIBS = @SYSTEMD_JOURNAL_LIBS@ -SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ -SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@ -SYSTEM_CA_PATH = @SYSTEM_CA_PATH@ -UDEV_DIR = @UDEV_DIR@ -USE_NLS = @USE_NLS@ -UUID_CFLAGS = @UUID_CFLAGS@ -UUID_LIBS = @UUID_LIBS@ -VALGRIND_RULES = @VALGRIND_RULES@ -VAPIGEN = @VAPIGEN@ -VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ -VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -intltool__v_merge_options_ = @intltool__v_merge_options_@ -intltool__v_merge_options_0 = @intltool__v_merge_options_0@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -nmbinary = @nmbinary@ -nmconfdir = @nmconfdir@ -nmdatadir = @nmdatadir@ -nmlibdir = @nmlibdir@ -nmrundir = @nmrundir@ -nmstatedir = @nmstatedir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -systemdsystemunitdir = @systemdsystemunitdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -with_dhclient = @with_dhclient@ -with_dhcpcd = @with_dhcpcd@ -with_netconfig = @with_netconfig@ -with_resolvconf = @with_resolvconf@ -with_valgrind = @with_valgrind@ -SUBDIRS = . tests -AM_CPPFLAGS = -I${top_srcdir}/shared -I${top_builddir}/shared \ - -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) \ - $(am__append_1) $(am__append_4) -noinst_LTLIBRARIES = libnm-core.la -core = $(top_srcdir)/libnm-core -core_build = $(top_builddir)/libnm-core -libnm_core_headers = \ - $(top_builddir)/shared/nm-version-macros.h \ - $(core_build)/nm-core-enum-types.h \ - $(core)/nm-connection.h \ - $(core)/nm-core-types.h \ - $(core)/nm-dbus-interface.h \ - $(core)/nm-errors.h \ - $(core)/nm-setting-8021x.h \ - $(core)/nm-setting-adsl.h \ - $(core)/nm-setting-bluetooth.h \ - $(core)/nm-setting-bond.h \ - $(core)/nm-setting-bridge-port.h \ - $(core)/nm-setting-bridge.h \ - $(core)/nm-setting-cdma.h \ - $(core)/nm-setting-connection.h \ - $(core)/nm-setting-dcb.h \ - $(core)/nm-setting-generic.h \ - $(core)/nm-setting-gsm.h \ - $(core)/nm-setting-infiniband.h \ - $(core)/nm-setting-ip-config.h \ - $(core)/nm-setting-ip-tunnel.h \ - $(core)/nm-setting-ip4-config.h \ - $(core)/nm-setting-ip6-config.h \ - $(core)/nm-setting-macvlan.h \ - $(core)/nm-setting-olpc-mesh.h \ - $(core)/nm-setting-ppp.h \ - $(core)/nm-setting-pppoe.h \ - $(core)/nm-setting-serial.h \ - $(core)/nm-setting-team-port.h \ - $(core)/nm-setting-team.h \ - $(core)/nm-setting-tun.h \ - $(core)/nm-setting-vlan.h \ - $(core)/nm-setting-vpn.h \ - $(core)/nm-setting-vxlan.h \ - $(core)/nm-setting-wimax.h \ - $(core)/nm-setting-wired.h \ - $(core)/nm-setting-wireless-security.h \ - $(core)/nm-setting-wireless.h \ - $(core)/nm-setting.h \ - $(core)/nm-simple-connection.h \ - $(core)/nm-utils.h \ - $(core)/nm-version.h \ - $(core)/nm-vpn-dbus-interface.h \ - $(core)/nm-vpn-editor-plugin.h \ - $(core)/nm-vpn-plugin-info.h - -libnm_core_private_headers = \ - $(top_builddir)/shared/nm-utils/nm-shared-utils.h \ - $(core)/crypto.h \ - $(core)/nm-connection-private.h \ - $(core)/nm-core-internal.h \ - $(core)/nm-core-types-internal.h \ - $(core)/nm-keyfile-internal.h \ - $(core)/nm-keyfile-utils.h \ - $(core)/nm-property-compare.h \ - $(core)/nm-setting-private.h \ - $(core)/nm-utils-private.h - -libnm_core_sources = \ - $(top_builddir)/shared/nm-utils/nm-shared-utils.c \ - $(core_build)/nm-core-enum-types.c \ - $(core)/crypto.c \ - $(core)/nm-connection.c \ - $(core)/nm-dbus-utils.c \ - $(core)/nm-errors.c \ - $(core)/nm-keyfile-reader.c \ - $(core)/nm-keyfile-utils.c \ - $(core)/nm-keyfile-writer.c \ - $(core)/nm-property-compare.c \ - $(core)/nm-setting-8021x.c \ - $(core)/nm-setting-adsl.c \ - $(core)/nm-setting-bluetooth.c \ - $(core)/nm-setting-bond.c \ - $(core)/nm-setting-bridge-port.c \ - $(core)/nm-setting-bridge.c \ - $(core)/nm-setting-cdma.c \ - $(core)/nm-setting-connection.c \ - $(core)/nm-setting-dcb.c \ - $(core)/nm-setting-generic.c \ - $(core)/nm-setting-gsm.c \ - $(core)/nm-setting-infiniband.c \ - $(core)/nm-setting-ip-config.c \ - $(core)/nm-setting-ip-tunnel.c \ - $(core)/nm-setting-ip4-config.c \ - $(core)/nm-setting-ip6-config.c \ - $(core)/nm-setting-macvlan.c \ - $(core)/nm-setting-olpc-mesh.c \ - $(core)/nm-setting-ppp.c \ - $(core)/nm-setting-pppoe.c \ - $(core)/nm-setting-serial.c \ - $(core)/nm-setting-team-port.c \ - $(core)/nm-setting-team.c \ - $(core)/nm-setting-tun.c \ - $(core)/nm-setting-vlan.c \ - $(core)/nm-setting-vpn.c \ - $(core)/nm-setting-vxlan.c \ - $(core)/nm-setting-wimax.c \ - $(core)/nm-setting-wired.c \ - $(core)/nm-setting-wireless-security.c \ - $(core)/nm-setting-wireless.c \ - $(core)/nm-setting.c \ - $(core)/nm-simple-connection.c \ - $(core)/nm-utils.c \ - $(core)/nm-vpn-editor-plugin.c \ - $(core)/nm-vpn-plugin-info.c - - -# header/source defines are in Makefile.libnm-core, so they can be shared -# with libnm/Makefile.am -libnmincludedir = $(includedir)/libnm -libnminclude_HEADERS = $(libnm_core_headers) -libnm_core_la_SOURCES = $(libnm_core_sources) \ - $(libnm_core_private_headers) $(am__append_2) $(am__append_5) -GLIB_GENERATED = nm-core-enum-types.h nm-core-enum-types.c -nm_core_enum_types_sources = $(filter-out %nm-core-enum-types.h,$(libnminclude_HEADERS)) -GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM -GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM -libnm_core_la_LIBADD = $(GLIB_LIBS) $(UUID_LIBS) $(JANSSON_LIBS) \ - $(am__append_3) $(am__append_6) -libnm_core_la_LDFLAGS = \ - $(CODE_COVERAGE_LDFLAGS) - -BUILT_SOURCES = $(GLIB_GENERATED) nm-vpn-dbus-types.xml nm-dbus-types.xml -CLEANFILES = $(BUILT_SOURCES) -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.libnm-core $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libnm-core/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libnm-core/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(srcdir)/Makefile.libnm-core $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libnm-core.la: $(libnm_core_la_OBJECTS) $(libnm_core_la_DEPENDENCIES) $(EXTRA_libnm_core_la_DEPENDENCIES) - $(AM_V_CCLD)$(libnm_core_la_LINK) $(libnm_core_la_OBJECTS) $(libnm_core_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto_gnutls.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto_nss.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-connection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-core-enum-types.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-dbus-utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-errors.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-keyfile-reader.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-keyfile-utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-keyfile-writer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-property-compare.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-8021x.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-adsl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-bluetooth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-bond.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-bridge-port.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-bridge.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-cdma.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-connection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-dcb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-generic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-gsm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-infiniband.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-ip-config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-ip-tunnel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-ip4-config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-ip6-config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-macvlan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-olpc-mesh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-ppp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-pppoe.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-serial.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-team-port.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-team.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-tun.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-vlan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-vpn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-vxlan.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-wimax.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-wired.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-wireless-security.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting-wireless.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-setting.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-shared-utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-simple-connection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-vpn-editor-plugin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-vpn-plugin-info.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -nm-shared-utils.lo: $(top_builddir)/shared/nm-utils/nm-shared-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-shared-utils.lo -MD -MP -MF $(DEPDIR)/nm-shared-utils.Tpo -c -o nm-shared-utils.lo `test -f '$(top_builddir)/shared/nm-utils/nm-shared-utils.c' || echo '$(srcdir)/'`$(top_builddir)/shared/nm-utils/nm-shared-utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-shared-utils.Tpo $(DEPDIR)/nm-shared-utils.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/shared/nm-utils/nm-shared-utils.c' object='nm-shared-utils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-shared-utils.lo `test -f '$(top_builddir)/shared/nm-utils/nm-shared-utils.c' || echo '$(srcdir)/'`$(top_builddir)/shared/nm-utils/nm-shared-utils.c - -nm-core-enum-types.lo: $(core_build)/nm-core-enum-types.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-core-enum-types.lo -MD -MP -MF $(DEPDIR)/nm-core-enum-types.Tpo -c -o nm-core-enum-types.lo `test -f '$(core_build)/nm-core-enum-types.c' || echo '$(srcdir)/'`$(core_build)/nm-core-enum-types.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-core-enum-types.Tpo $(DEPDIR)/nm-core-enum-types.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core_build)/nm-core-enum-types.c' object='nm-core-enum-types.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-core-enum-types.lo `test -f '$(core_build)/nm-core-enum-types.c' || echo '$(srcdir)/'`$(core_build)/nm-core-enum-types.c - -crypto.lo: $(core)/crypto.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto.lo -MD -MP -MF $(DEPDIR)/crypto.Tpo -c -o crypto.lo `test -f '$(core)/crypto.c' || echo '$(srcdir)/'`$(core)/crypto.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/crypto.Tpo $(DEPDIR)/crypto.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/crypto.c' object='crypto.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto.lo `test -f '$(core)/crypto.c' || echo '$(srcdir)/'`$(core)/crypto.c - -nm-connection.lo: $(core)/nm-connection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-connection.lo -MD -MP -MF $(DEPDIR)/nm-connection.Tpo -c -o nm-connection.lo `test -f '$(core)/nm-connection.c' || echo '$(srcdir)/'`$(core)/nm-connection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-connection.Tpo $(DEPDIR)/nm-connection.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-connection.c' object='nm-connection.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-connection.lo `test -f '$(core)/nm-connection.c' || echo '$(srcdir)/'`$(core)/nm-connection.c - -nm-dbus-utils.lo: $(core)/nm-dbus-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-dbus-utils.lo -MD -MP -MF $(DEPDIR)/nm-dbus-utils.Tpo -c -o nm-dbus-utils.lo `test -f '$(core)/nm-dbus-utils.c' || echo '$(srcdir)/'`$(core)/nm-dbus-utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-dbus-utils.Tpo $(DEPDIR)/nm-dbus-utils.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-dbus-utils.c' object='nm-dbus-utils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-dbus-utils.lo `test -f '$(core)/nm-dbus-utils.c' || echo '$(srcdir)/'`$(core)/nm-dbus-utils.c - -nm-errors.lo: $(core)/nm-errors.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-errors.lo -MD -MP -MF $(DEPDIR)/nm-errors.Tpo -c -o nm-errors.lo `test -f '$(core)/nm-errors.c' || echo '$(srcdir)/'`$(core)/nm-errors.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-errors.Tpo $(DEPDIR)/nm-errors.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-errors.c' object='nm-errors.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-errors.lo `test -f '$(core)/nm-errors.c' || echo '$(srcdir)/'`$(core)/nm-errors.c - -nm-keyfile-reader.lo: $(core)/nm-keyfile-reader.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-keyfile-reader.lo -MD -MP -MF $(DEPDIR)/nm-keyfile-reader.Tpo -c -o nm-keyfile-reader.lo `test -f '$(core)/nm-keyfile-reader.c' || echo '$(srcdir)/'`$(core)/nm-keyfile-reader.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-keyfile-reader.Tpo $(DEPDIR)/nm-keyfile-reader.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-keyfile-reader.c' object='nm-keyfile-reader.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-keyfile-reader.lo `test -f '$(core)/nm-keyfile-reader.c' || echo '$(srcdir)/'`$(core)/nm-keyfile-reader.c - -nm-keyfile-utils.lo: $(core)/nm-keyfile-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-keyfile-utils.lo -MD -MP -MF $(DEPDIR)/nm-keyfile-utils.Tpo -c -o nm-keyfile-utils.lo `test -f '$(core)/nm-keyfile-utils.c' || echo '$(srcdir)/'`$(core)/nm-keyfile-utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-keyfile-utils.Tpo $(DEPDIR)/nm-keyfile-utils.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-keyfile-utils.c' object='nm-keyfile-utils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-keyfile-utils.lo `test -f '$(core)/nm-keyfile-utils.c' || echo '$(srcdir)/'`$(core)/nm-keyfile-utils.c - -nm-keyfile-writer.lo: $(core)/nm-keyfile-writer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-keyfile-writer.lo -MD -MP -MF $(DEPDIR)/nm-keyfile-writer.Tpo -c -o nm-keyfile-writer.lo `test -f '$(core)/nm-keyfile-writer.c' || echo '$(srcdir)/'`$(core)/nm-keyfile-writer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-keyfile-writer.Tpo $(DEPDIR)/nm-keyfile-writer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-keyfile-writer.c' object='nm-keyfile-writer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-keyfile-writer.lo `test -f '$(core)/nm-keyfile-writer.c' || echo '$(srcdir)/'`$(core)/nm-keyfile-writer.c - -nm-property-compare.lo: $(core)/nm-property-compare.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-property-compare.lo -MD -MP -MF $(DEPDIR)/nm-property-compare.Tpo -c -o nm-property-compare.lo `test -f '$(core)/nm-property-compare.c' || echo '$(srcdir)/'`$(core)/nm-property-compare.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-property-compare.Tpo $(DEPDIR)/nm-property-compare.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-property-compare.c' object='nm-property-compare.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-property-compare.lo `test -f '$(core)/nm-property-compare.c' || echo '$(srcdir)/'`$(core)/nm-property-compare.c - -nm-setting-8021x.lo: $(core)/nm-setting-8021x.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-8021x.lo -MD -MP -MF $(DEPDIR)/nm-setting-8021x.Tpo -c -o nm-setting-8021x.lo `test -f '$(core)/nm-setting-8021x.c' || echo '$(srcdir)/'`$(core)/nm-setting-8021x.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-8021x.Tpo $(DEPDIR)/nm-setting-8021x.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-8021x.c' object='nm-setting-8021x.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-8021x.lo `test -f '$(core)/nm-setting-8021x.c' || echo '$(srcdir)/'`$(core)/nm-setting-8021x.c - -nm-setting-adsl.lo: $(core)/nm-setting-adsl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-adsl.lo -MD -MP -MF $(DEPDIR)/nm-setting-adsl.Tpo -c -o nm-setting-adsl.lo `test -f '$(core)/nm-setting-adsl.c' || echo '$(srcdir)/'`$(core)/nm-setting-adsl.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-adsl.Tpo $(DEPDIR)/nm-setting-adsl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-adsl.c' object='nm-setting-adsl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-adsl.lo `test -f '$(core)/nm-setting-adsl.c' || echo '$(srcdir)/'`$(core)/nm-setting-adsl.c - -nm-setting-bluetooth.lo: $(core)/nm-setting-bluetooth.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-bluetooth.lo -MD -MP -MF $(DEPDIR)/nm-setting-bluetooth.Tpo -c -o nm-setting-bluetooth.lo `test -f '$(core)/nm-setting-bluetooth.c' || echo '$(srcdir)/'`$(core)/nm-setting-bluetooth.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-bluetooth.Tpo $(DEPDIR)/nm-setting-bluetooth.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-bluetooth.c' object='nm-setting-bluetooth.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-bluetooth.lo `test -f '$(core)/nm-setting-bluetooth.c' || echo '$(srcdir)/'`$(core)/nm-setting-bluetooth.c - -nm-setting-bond.lo: $(core)/nm-setting-bond.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-bond.lo -MD -MP -MF $(DEPDIR)/nm-setting-bond.Tpo -c -o nm-setting-bond.lo `test -f '$(core)/nm-setting-bond.c' || echo '$(srcdir)/'`$(core)/nm-setting-bond.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-bond.Tpo $(DEPDIR)/nm-setting-bond.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-bond.c' object='nm-setting-bond.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-bond.lo `test -f '$(core)/nm-setting-bond.c' || echo '$(srcdir)/'`$(core)/nm-setting-bond.c - -nm-setting-bridge-port.lo: $(core)/nm-setting-bridge-port.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-bridge-port.lo -MD -MP -MF $(DEPDIR)/nm-setting-bridge-port.Tpo -c -o nm-setting-bridge-port.lo `test -f '$(core)/nm-setting-bridge-port.c' || echo '$(srcdir)/'`$(core)/nm-setting-bridge-port.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-bridge-port.Tpo $(DEPDIR)/nm-setting-bridge-port.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-bridge-port.c' object='nm-setting-bridge-port.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-bridge-port.lo `test -f '$(core)/nm-setting-bridge-port.c' || echo '$(srcdir)/'`$(core)/nm-setting-bridge-port.c - -nm-setting-bridge.lo: $(core)/nm-setting-bridge.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-bridge.lo -MD -MP -MF $(DEPDIR)/nm-setting-bridge.Tpo -c -o nm-setting-bridge.lo `test -f '$(core)/nm-setting-bridge.c' || echo '$(srcdir)/'`$(core)/nm-setting-bridge.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-bridge.Tpo $(DEPDIR)/nm-setting-bridge.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-bridge.c' object='nm-setting-bridge.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-bridge.lo `test -f '$(core)/nm-setting-bridge.c' || echo '$(srcdir)/'`$(core)/nm-setting-bridge.c - -nm-setting-cdma.lo: $(core)/nm-setting-cdma.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-cdma.lo -MD -MP -MF $(DEPDIR)/nm-setting-cdma.Tpo -c -o nm-setting-cdma.lo `test -f '$(core)/nm-setting-cdma.c' || echo '$(srcdir)/'`$(core)/nm-setting-cdma.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-cdma.Tpo $(DEPDIR)/nm-setting-cdma.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-cdma.c' object='nm-setting-cdma.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-cdma.lo `test -f '$(core)/nm-setting-cdma.c' || echo '$(srcdir)/'`$(core)/nm-setting-cdma.c - -nm-setting-connection.lo: $(core)/nm-setting-connection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-connection.lo -MD -MP -MF $(DEPDIR)/nm-setting-connection.Tpo -c -o nm-setting-connection.lo `test -f '$(core)/nm-setting-connection.c' || echo '$(srcdir)/'`$(core)/nm-setting-connection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-connection.Tpo $(DEPDIR)/nm-setting-connection.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-connection.c' object='nm-setting-connection.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-connection.lo `test -f '$(core)/nm-setting-connection.c' || echo '$(srcdir)/'`$(core)/nm-setting-connection.c - -nm-setting-dcb.lo: $(core)/nm-setting-dcb.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-dcb.lo -MD -MP -MF $(DEPDIR)/nm-setting-dcb.Tpo -c -o nm-setting-dcb.lo `test -f '$(core)/nm-setting-dcb.c' || echo '$(srcdir)/'`$(core)/nm-setting-dcb.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-dcb.Tpo $(DEPDIR)/nm-setting-dcb.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-dcb.c' object='nm-setting-dcb.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-dcb.lo `test -f '$(core)/nm-setting-dcb.c' || echo '$(srcdir)/'`$(core)/nm-setting-dcb.c - -nm-setting-generic.lo: $(core)/nm-setting-generic.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-generic.lo -MD -MP -MF $(DEPDIR)/nm-setting-generic.Tpo -c -o nm-setting-generic.lo `test -f '$(core)/nm-setting-generic.c' || echo '$(srcdir)/'`$(core)/nm-setting-generic.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-generic.Tpo $(DEPDIR)/nm-setting-generic.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-generic.c' object='nm-setting-generic.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-generic.lo `test -f '$(core)/nm-setting-generic.c' || echo '$(srcdir)/'`$(core)/nm-setting-generic.c - -nm-setting-gsm.lo: $(core)/nm-setting-gsm.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-gsm.lo -MD -MP -MF $(DEPDIR)/nm-setting-gsm.Tpo -c -o nm-setting-gsm.lo `test -f '$(core)/nm-setting-gsm.c' || echo '$(srcdir)/'`$(core)/nm-setting-gsm.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-gsm.Tpo $(DEPDIR)/nm-setting-gsm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-gsm.c' object='nm-setting-gsm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-gsm.lo `test -f '$(core)/nm-setting-gsm.c' || echo '$(srcdir)/'`$(core)/nm-setting-gsm.c - -nm-setting-infiniband.lo: $(core)/nm-setting-infiniband.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-infiniband.lo -MD -MP -MF $(DEPDIR)/nm-setting-infiniband.Tpo -c -o nm-setting-infiniband.lo `test -f '$(core)/nm-setting-infiniband.c' || echo '$(srcdir)/'`$(core)/nm-setting-infiniband.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-infiniband.Tpo $(DEPDIR)/nm-setting-infiniband.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-infiniband.c' object='nm-setting-infiniband.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-infiniband.lo `test -f '$(core)/nm-setting-infiniband.c' || echo '$(srcdir)/'`$(core)/nm-setting-infiniband.c - -nm-setting-ip-config.lo: $(core)/nm-setting-ip-config.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-ip-config.lo -MD -MP -MF $(DEPDIR)/nm-setting-ip-config.Tpo -c -o nm-setting-ip-config.lo `test -f '$(core)/nm-setting-ip-config.c' || echo '$(srcdir)/'`$(core)/nm-setting-ip-config.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-ip-config.Tpo $(DEPDIR)/nm-setting-ip-config.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-ip-config.c' object='nm-setting-ip-config.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-ip-config.lo `test -f '$(core)/nm-setting-ip-config.c' || echo '$(srcdir)/'`$(core)/nm-setting-ip-config.c - -nm-setting-ip-tunnel.lo: $(core)/nm-setting-ip-tunnel.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-ip-tunnel.lo -MD -MP -MF $(DEPDIR)/nm-setting-ip-tunnel.Tpo -c -o nm-setting-ip-tunnel.lo `test -f '$(core)/nm-setting-ip-tunnel.c' || echo '$(srcdir)/'`$(core)/nm-setting-ip-tunnel.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-ip-tunnel.Tpo $(DEPDIR)/nm-setting-ip-tunnel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-ip-tunnel.c' object='nm-setting-ip-tunnel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-ip-tunnel.lo `test -f '$(core)/nm-setting-ip-tunnel.c' || echo '$(srcdir)/'`$(core)/nm-setting-ip-tunnel.c - -nm-setting-ip4-config.lo: $(core)/nm-setting-ip4-config.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-ip4-config.lo -MD -MP -MF $(DEPDIR)/nm-setting-ip4-config.Tpo -c -o nm-setting-ip4-config.lo `test -f '$(core)/nm-setting-ip4-config.c' || echo '$(srcdir)/'`$(core)/nm-setting-ip4-config.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-ip4-config.Tpo $(DEPDIR)/nm-setting-ip4-config.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-ip4-config.c' object='nm-setting-ip4-config.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-ip4-config.lo `test -f '$(core)/nm-setting-ip4-config.c' || echo '$(srcdir)/'`$(core)/nm-setting-ip4-config.c - -nm-setting-ip6-config.lo: $(core)/nm-setting-ip6-config.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-ip6-config.lo -MD -MP -MF $(DEPDIR)/nm-setting-ip6-config.Tpo -c -o nm-setting-ip6-config.lo `test -f '$(core)/nm-setting-ip6-config.c' || echo '$(srcdir)/'`$(core)/nm-setting-ip6-config.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-ip6-config.Tpo $(DEPDIR)/nm-setting-ip6-config.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-ip6-config.c' object='nm-setting-ip6-config.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-ip6-config.lo `test -f '$(core)/nm-setting-ip6-config.c' || echo '$(srcdir)/'`$(core)/nm-setting-ip6-config.c - -nm-setting-macvlan.lo: $(core)/nm-setting-macvlan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-macvlan.lo -MD -MP -MF $(DEPDIR)/nm-setting-macvlan.Tpo -c -o nm-setting-macvlan.lo `test -f '$(core)/nm-setting-macvlan.c' || echo '$(srcdir)/'`$(core)/nm-setting-macvlan.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-macvlan.Tpo $(DEPDIR)/nm-setting-macvlan.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-macvlan.c' object='nm-setting-macvlan.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-macvlan.lo `test -f '$(core)/nm-setting-macvlan.c' || echo '$(srcdir)/'`$(core)/nm-setting-macvlan.c - -nm-setting-olpc-mesh.lo: $(core)/nm-setting-olpc-mesh.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-olpc-mesh.lo -MD -MP -MF $(DEPDIR)/nm-setting-olpc-mesh.Tpo -c -o nm-setting-olpc-mesh.lo `test -f '$(core)/nm-setting-olpc-mesh.c' || echo '$(srcdir)/'`$(core)/nm-setting-olpc-mesh.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-olpc-mesh.Tpo $(DEPDIR)/nm-setting-olpc-mesh.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-olpc-mesh.c' object='nm-setting-olpc-mesh.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-olpc-mesh.lo `test -f '$(core)/nm-setting-olpc-mesh.c' || echo '$(srcdir)/'`$(core)/nm-setting-olpc-mesh.c - -nm-setting-ppp.lo: $(core)/nm-setting-ppp.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-ppp.lo -MD -MP -MF $(DEPDIR)/nm-setting-ppp.Tpo -c -o nm-setting-ppp.lo `test -f '$(core)/nm-setting-ppp.c' || echo '$(srcdir)/'`$(core)/nm-setting-ppp.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-ppp.Tpo $(DEPDIR)/nm-setting-ppp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-ppp.c' object='nm-setting-ppp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-ppp.lo `test -f '$(core)/nm-setting-ppp.c' || echo '$(srcdir)/'`$(core)/nm-setting-ppp.c - -nm-setting-pppoe.lo: $(core)/nm-setting-pppoe.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-pppoe.lo -MD -MP -MF $(DEPDIR)/nm-setting-pppoe.Tpo -c -o nm-setting-pppoe.lo `test -f '$(core)/nm-setting-pppoe.c' || echo '$(srcdir)/'`$(core)/nm-setting-pppoe.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-pppoe.Tpo $(DEPDIR)/nm-setting-pppoe.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-pppoe.c' object='nm-setting-pppoe.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-pppoe.lo `test -f '$(core)/nm-setting-pppoe.c' || echo '$(srcdir)/'`$(core)/nm-setting-pppoe.c - -nm-setting-serial.lo: $(core)/nm-setting-serial.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-serial.lo -MD -MP -MF $(DEPDIR)/nm-setting-serial.Tpo -c -o nm-setting-serial.lo `test -f '$(core)/nm-setting-serial.c' || echo '$(srcdir)/'`$(core)/nm-setting-serial.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-serial.Tpo $(DEPDIR)/nm-setting-serial.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-serial.c' object='nm-setting-serial.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-serial.lo `test -f '$(core)/nm-setting-serial.c' || echo '$(srcdir)/'`$(core)/nm-setting-serial.c - -nm-setting-team-port.lo: $(core)/nm-setting-team-port.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-team-port.lo -MD -MP -MF $(DEPDIR)/nm-setting-team-port.Tpo -c -o nm-setting-team-port.lo `test -f '$(core)/nm-setting-team-port.c' || echo '$(srcdir)/'`$(core)/nm-setting-team-port.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-team-port.Tpo $(DEPDIR)/nm-setting-team-port.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-team-port.c' object='nm-setting-team-port.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-team-port.lo `test -f '$(core)/nm-setting-team-port.c' || echo '$(srcdir)/'`$(core)/nm-setting-team-port.c - -nm-setting-team.lo: $(core)/nm-setting-team.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-team.lo -MD -MP -MF $(DEPDIR)/nm-setting-team.Tpo -c -o nm-setting-team.lo `test -f '$(core)/nm-setting-team.c' || echo '$(srcdir)/'`$(core)/nm-setting-team.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-team.Tpo $(DEPDIR)/nm-setting-team.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-team.c' object='nm-setting-team.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-team.lo `test -f '$(core)/nm-setting-team.c' || echo '$(srcdir)/'`$(core)/nm-setting-team.c - -nm-setting-tun.lo: $(core)/nm-setting-tun.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-tun.lo -MD -MP -MF $(DEPDIR)/nm-setting-tun.Tpo -c -o nm-setting-tun.lo `test -f '$(core)/nm-setting-tun.c' || echo '$(srcdir)/'`$(core)/nm-setting-tun.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-tun.Tpo $(DEPDIR)/nm-setting-tun.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-tun.c' object='nm-setting-tun.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-tun.lo `test -f '$(core)/nm-setting-tun.c' || echo '$(srcdir)/'`$(core)/nm-setting-tun.c - -nm-setting-vlan.lo: $(core)/nm-setting-vlan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-vlan.lo -MD -MP -MF $(DEPDIR)/nm-setting-vlan.Tpo -c -o nm-setting-vlan.lo `test -f '$(core)/nm-setting-vlan.c' || echo '$(srcdir)/'`$(core)/nm-setting-vlan.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-vlan.Tpo $(DEPDIR)/nm-setting-vlan.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-vlan.c' object='nm-setting-vlan.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-vlan.lo `test -f '$(core)/nm-setting-vlan.c' || echo '$(srcdir)/'`$(core)/nm-setting-vlan.c - -nm-setting-vpn.lo: $(core)/nm-setting-vpn.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-vpn.lo -MD -MP -MF $(DEPDIR)/nm-setting-vpn.Tpo -c -o nm-setting-vpn.lo `test -f '$(core)/nm-setting-vpn.c' || echo '$(srcdir)/'`$(core)/nm-setting-vpn.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-vpn.Tpo $(DEPDIR)/nm-setting-vpn.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-vpn.c' object='nm-setting-vpn.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-vpn.lo `test -f '$(core)/nm-setting-vpn.c' || echo '$(srcdir)/'`$(core)/nm-setting-vpn.c - -nm-setting-vxlan.lo: $(core)/nm-setting-vxlan.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-vxlan.lo -MD -MP -MF $(DEPDIR)/nm-setting-vxlan.Tpo -c -o nm-setting-vxlan.lo `test -f '$(core)/nm-setting-vxlan.c' || echo '$(srcdir)/'`$(core)/nm-setting-vxlan.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-vxlan.Tpo $(DEPDIR)/nm-setting-vxlan.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-vxlan.c' object='nm-setting-vxlan.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-vxlan.lo `test -f '$(core)/nm-setting-vxlan.c' || echo '$(srcdir)/'`$(core)/nm-setting-vxlan.c - -nm-setting-wimax.lo: $(core)/nm-setting-wimax.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-wimax.lo -MD -MP -MF $(DEPDIR)/nm-setting-wimax.Tpo -c -o nm-setting-wimax.lo `test -f '$(core)/nm-setting-wimax.c' || echo '$(srcdir)/'`$(core)/nm-setting-wimax.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-wimax.Tpo $(DEPDIR)/nm-setting-wimax.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-wimax.c' object='nm-setting-wimax.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-wimax.lo `test -f '$(core)/nm-setting-wimax.c' || echo '$(srcdir)/'`$(core)/nm-setting-wimax.c - -nm-setting-wired.lo: $(core)/nm-setting-wired.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-wired.lo -MD -MP -MF $(DEPDIR)/nm-setting-wired.Tpo -c -o nm-setting-wired.lo `test -f '$(core)/nm-setting-wired.c' || echo '$(srcdir)/'`$(core)/nm-setting-wired.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-wired.Tpo $(DEPDIR)/nm-setting-wired.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-wired.c' object='nm-setting-wired.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-wired.lo `test -f '$(core)/nm-setting-wired.c' || echo '$(srcdir)/'`$(core)/nm-setting-wired.c - -nm-setting-wireless-security.lo: $(core)/nm-setting-wireless-security.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-wireless-security.lo -MD -MP -MF $(DEPDIR)/nm-setting-wireless-security.Tpo -c -o nm-setting-wireless-security.lo `test -f '$(core)/nm-setting-wireless-security.c' || echo '$(srcdir)/'`$(core)/nm-setting-wireless-security.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-wireless-security.Tpo $(DEPDIR)/nm-setting-wireless-security.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-wireless-security.c' object='nm-setting-wireless-security.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-wireless-security.lo `test -f '$(core)/nm-setting-wireless-security.c' || echo '$(srcdir)/'`$(core)/nm-setting-wireless-security.c - -nm-setting-wireless.lo: $(core)/nm-setting-wireless.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting-wireless.lo -MD -MP -MF $(DEPDIR)/nm-setting-wireless.Tpo -c -o nm-setting-wireless.lo `test -f '$(core)/nm-setting-wireless.c' || echo '$(srcdir)/'`$(core)/nm-setting-wireless.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting-wireless.Tpo $(DEPDIR)/nm-setting-wireless.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting-wireless.c' object='nm-setting-wireless.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting-wireless.lo `test -f '$(core)/nm-setting-wireless.c' || echo '$(srcdir)/'`$(core)/nm-setting-wireless.c - -nm-setting.lo: $(core)/nm-setting.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-setting.lo -MD -MP -MF $(DEPDIR)/nm-setting.Tpo -c -o nm-setting.lo `test -f '$(core)/nm-setting.c' || echo '$(srcdir)/'`$(core)/nm-setting.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-setting.Tpo $(DEPDIR)/nm-setting.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-setting.c' object='nm-setting.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-setting.lo `test -f '$(core)/nm-setting.c' || echo '$(srcdir)/'`$(core)/nm-setting.c - -nm-simple-connection.lo: $(core)/nm-simple-connection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-simple-connection.lo -MD -MP -MF $(DEPDIR)/nm-simple-connection.Tpo -c -o nm-simple-connection.lo `test -f '$(core)/nm-simple-connection.c' || echo '$(srcdir)/'`$(core)/nm-simple-connection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-simple-connection.Tpo $(DEPDIR)/nm-simple-connection.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-simple-connection.c' object='nm-simple-connection.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-simple-connection.lo `test -f '$(core)/nm-simple-connection.c' || echo '$(srcdir)/'`$(core)/nm-simple-connection.c - -nm-utils.lo: $(core)/nm-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-utils.lo -MD -MP -MF $(DEPDIR)/nm-utils.Tpo -c -o nm-utils.lo `test -f '$(core)/nm-utils.c' || echo '$(srcdir)/'`$(core)/nm-utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-utils.Tpo $(DEPDIR)/nm-utils.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-utils.c' object='nm-utils.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-utils.lo `test -f '$(core)/nm-utils.c' || echo '$(srcdir)/'`$(core)/nm-utils.c - -nm-vpn-editor-plugin.lo: $(core)/nm-vpn-editor-plugin.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-vpn-editor-plugin.lo -MD -MP -MF $(DEPDIR)/nm-vpn-editor-plugin.Tpo -c -o nm-vpn-editor-plugin.lo `test -f '$(core)/nm-vpn-editor-plugin.c' || echo '$(srcdir)/'`$(core)/nm-vpn-editor-plugin.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-vpn-editor-plugin.Tpo $(DEPDIR)/nm-vpn-editor-plugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-vpn-editor-plugin.c' object='nm-vpn-editor-plugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-vpn-editor-plugin.lo `test -f '$(core)/nm-vpn-editor-plugin.c' || echo '$(srcdir)/'`$(core)/nm-vpn-editor-plugin.c - -nm-vpn-plugin-info.lo: $(core)/nm-vpn-plugin-info.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm-vpn-plugin-info.lo -MD -MP -MF $(DEPDIR)/nm-vpn-plugin-info.Tpo -c -o nm-vpn-plugin-info.lo `test -f '$(core)/nm-vpn-plugin-info.c' || echo '$(srcdir)/'`$(core)/nm-vpn-plugin-info.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm-vpn-plugin-info.Tpo $(DEPDIR)/nm-vpn-plugin-info.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(core)/nm-vpn-plugin-info.c' object='nm-vpn-plugin-info.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm-vpn-plugin-info.lo `test -f '$(core)/nm-vpn-plugin-info.c' || echo '$(srcdir)/'`$(core)/nm-vpn-plugin-info.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-libnmincludeHEADERS: $(libnminclude_HEADERS) - @$(NORMAL_INSTALL) - @list='$(libnminclude_HEADERS)'; test -n "$(libnmincludedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(libnmincludedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libnmincludedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libnmincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libnmincludedir)" || exit $$?; \ - done - -uninstall-libnmincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libnminclude_HEADERS)'; test -n "$(libnmincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(libnmincludedir)'; $(am__uninstall_files_from_dir) - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libnmincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-libnmincludeHEADERS - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-libnmincludeHEADERS - -.MAKE: $(am__recursive_targets) all check install install-am \ - install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool \ - clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libnmincludeHEADERS install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-libnmincludeHEADERS - -.PRECIOUS: Makefile - -include $(GLIB_MAKEFILE) - -@GNOME_CODE_COVERAGE_RULES@ - -nm-vpn-dbus-types.xml: nm-vpn-dbus-interface.h $(top_srcdir)/tools/enums-to-docbook.pl - $(AM_V_GEN) @PERL@ $(top_srcdir)/tools/enums-to-docbook.pl 'nm-vpn-dbus-types' 'VPN Plugin D-Bus API Types' $^ >$@ - -nm-dbus-types.xml: nm-dbus-interface.h $(top_srcdir)/tools/enums-to-docbook.pl - $(AM_V_GEN) @PERL@ $(top_srcdir)/tools/enums-to-docbook.pl 'nm-dbus-types' 'NetworkManager D-Bus API Types' $^ >$@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libnm-core/Makefile.libnm-core b/libnm-core/Makefile.libnm-core deleted file mode 100644 index 52c71da5..00000000 --- a/libnm-core/Makefile.libnm-core +++ /dev/null @@ -1,113 +0,0 @@ -# In order for this to work correctly from both libnm-core/ and libnm/, -# we have to specify full pathnames. (We can't just use $(addprefix) from -# libnm/, because that's incompatible with the Makefile.introspection rules.) - -core = $(top_srcdir)/libnm-core -core_build = $(top_builddir)/libnm-core - -libnm_core_headers = \ - $(top_builddir)/shared/nm-version-macros.h \ - $(core_build)/nm-core-enum-types.h \ - $(core)/nm-connection.h \ - $(core)/nm-core-types.h \ - $(core)/nm-dbus-interface.h \ - $(core)/nm-errors.h \ - $(core)/nm-setting-8021x.h \ - $(core)/nm-setting-adsl.h \ - $(core)/nm-setting-bluetooth.h \ - $(core)/nm-setting-bond.h \ - $(core)/nm-setting-bridge-port.h \ - $(core)/nm-setting-bridge.h \ - $(core)/nm-setting-cdma.h \ - $(core)/nm-setting-connection.h \ - $(core)/nm-setting-dcb.h \ - $(core)/nm-setting-generic.h \ - $(core)/nm-setting-gsm.h \ - $(core)/nm-setting-infiniband.h \ - $(core)/nm-setting-ip-config.h \ - $(core)/nm-setting-ip-tunnel.h \ - $(core)/nm-setting-ip4-config.h \ - $(core)/nm-setting-ip6-config.h \ - $(core)/nm-setting-macvlan.h \ - $(core)/nm-setting-olpc-mesh.h \ - $(core)/nm-setting-ppp.h \ - $(core)/nm-setting-pppoe.h \ - $(core)/nm-setting-serial.h \ - $(core)/nm-setting-team-port.h \ - $(core)/nm-setting-team.h \ - $(core)/nm-setting-tun.h \ - $(core)/nm-setting-vlan.h \ - $(core)/nm-setting-vpn.h \ - $(core)/nm-setting-vxlan.h \ - $(core)/nm-setting-wimax.h \ - $(core)/nm-setting-wired.h \ - $(core)/nm-setting-wireless-security.h \ - $(core)/nm-setting-wireless.h \ - $(core)/nm-setting.h \ - $(core)/nm-simple-connection.h \ - $(core)/nm-utils.h \ - $(core)/nm-version.h \ - $(core)/nm-vpn-dbus-interface.h \ - $(core)/nm-vpn-editor-plugin.h \ - $(core)/nm-vpn-plugin-info.h - -libnm_core_private_headers = \ - $(top_builddir)/shared/nm-utils/nm-shared-utils.h \ - $(core)/crypto.h \ - $(core)/nm-connection-private.h \ - $(core)/nm-core-internal.h \ - $(core)/nm-core-types-internal.h \ - $(core)/nm-keyfile-internal.h \ - $(core)/nm-keyfile-utils.h \ - $(core)/nm-property-compare.h \ - $(core)/nm-setting-private.h \ - $(core)/nm-utils-private.h - -libnm_core_sources = \ - $(top_builddir)/shared/nm-utils/nm-shared-utils.c \ - $(core_build)/nm-core-enum-types.c \ - $(core)/crypto.c \ - $(core)/nm-connection.c \ - $(core)/nm-dbus-utils.c \ - $(core)/nm-errors.c \ - $(core)/nm-keyfile-reader.c \ - $(core)/nm-keyfile-utils.c \ - $(core)/nm-keyfile-writer.c \ - $(core)/nm-property-compare.c \ - $(core)/nm-setting-8021x.c \ - $(core)/nm-setting-adsl.c \ - $(core)/nm-setting-bluetooth.c \ - $(core)/nm-setting-bond.c \ - $(core)/nm-setting-bridge-port.c \ - $(core)/nm-setting-bridge.c \ - $(core)/nm-setting-cdma.c \ - $(core)/nm-setting-connection.c \ - $(core)/nm-setting-dcb.c \ - $(core)/nm-setting-generic.c \ - $(core)/nm-setting-gsm.c \ - $(core)/nm-setting-infiniband.c \ - $(core)/nm-setting-ip-config.c \ - $(core)/nm-setting-ip-tunnel.c \ - $(core)/nm-setting-ip4-config.c \ - $(core)/nm-setting-ip6-config.c \ - $(core)/nm-setting-macvlan.c \ - $(core)/nm-setting-olpc-mesh.c \ - $(core)/nm-setting-ppp.c \ - $(core)/nm-setting-pppoe.c \ - $(core)/nm-setting-serial.c \ - $(core)/nm-setting-team-port.c \ - $(core)/nm-setting-team.c \ - $(core)/nm-setting-tun.c \ - $(core)/nm-setting-vlan.c \ - $(core)/nm-setting-vpn.c \ - $(core)/nm-setting-vxlan.c \ - $(core)/nm-setting-wimax.c \ - $(core)/nm-setting-wired.c \ - $(core)/nm-setting-wireless-security.c \ - $(core)/nm-setting-wireless.c \ - $(core)/nm-setting.c \ - $(core)/nm-simple-connection.c \ - $(core)/nm-utils.c \ - $(core)/nm-vpn-editor-plugin.c \ - $(core)/nm-vpn-plugin-info.c - diff --git a/libnm-core/crypto.c b/libnm-core/crypto.c index e734f40d..c4e48475 100644 --- a/libnm-core/crypto.c +++ b/libnm-core/crypto.c @@ -771,13 +771,12 @@ crypto_md5_hash (const char *salt, gsize buflen) { GChecksum *ctx; - int nkey = buflen; gsize digest_len; - int count = 0; char digest[16]; - char *p = buffer; + gsize bufidx = 0; + int i; - g_assert_cmpint (g_checksum_type_get_length (G_CHECKSUM_MD5), ==, sizeof (digest)); + nm_assert (g_checksum_type_get_length (G_CHECKSUM_MD5) == sizeof (digest)); g_return_if_fail (password_len == 0 || password); g_return_if_fail (buffer != NULL); @@ -791,12 +790,7 @@ crypto_md5_hash (const char *salt, if (password_len < 0) password_len = strlen (password); - while (nkey > 0) { - int i = 0; - - g_checksum_reset (ctx); - if (count++) - g_checksum_update (ctx, (const guchar *) digest, sizeof (digest)); + for (;;) { if (password_len > 0) g_checksum_update (ctx, (const guchar *) password, password_len); if (salt_len > 0) @@ -804,14 +798,19 @@ crypto_md5_hash (const char *salt, digest_len = sizeof (digest); g_checksum_get_digest (ctx, (guchar *) digest, &digest_len); - g_assert (digest_len == sizeof (digest)); + nm_assert (digest_len == sizeof (digest)); - while (nkey && (i < sizeof (digest))) { - *(p++) = digest[i++]; - nkey--; + for (i = 0; i < sizeof (digest); i++) { + if (bufidx >= buflen) + goto done; + buffer[bufidx++] = digest[i]; } + + g_checksum_reset (ctx); + g_checksum_update (ctx, (const guchar *) digest, sizeof (digest)); } +done: memset (digest, 0, sizeof (digest)); g_checksum_free (ctx); } diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c index 57f96409..40322427 100644 --- a/libnm-core/nm-connection.c +++ b/libnm-core/nm-connection.c @@ -77,7 +77,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; static NMSettingVerifyResult _nm_connection_verify (NMConnection *connection, GError **error); -/*************************************************************/ +/*****************************************************************************/ static void setting_changed_cb (NMSetting *setting, @@ -718,14 +718,42 @@ _normalize_connection_slave_type (NMConnection *self) } static gboolean +_normalize_ethernet_link_neg (NMConnection *self) +{ + NMSettingWired *s_wired = nm_connection_get_setting_wired (self); + + if (s_wired) { + gboolean autoneg = nm_setting_wired_get_auto_negotiate (s_wired); + guint32 speed = nm_setting_wired_get_speed (s_wired); + const char *duplex = nm_setting_wired_get_duplex (s_wired); + + if ( (autoneg && (speed || duplex)) + || (!autoneg && ( (speed && !duplex) + || (!speed && duplex)))) { + speed = 0; + duplex = NULL; + g_object_set (s_wired, + NM_SETTING_WIRED_SPEED, (guint) speed, + NM_SETTING_WIRED_DUPLEX, duplex, + NULL); + return TRUE; + } + } + + return FALSE; +} + +static gboolean _normalize_ip_config (NMConnection *self, GHashTable *parameters) { NMSettingConnection *s_con = nm_connection_get_setting_connection (self); const char *default_ip4_method = NM_SETTING_IP4_CONFIG_METHOD_AUTO; const char *default_ip6_method = NULL; NMSettingIPConfig *s_ip4, *s_ip6; + NMSettingProxy *s_proxy; NMSetting *setting; gboolean changed = FALSE; + guint num, i; if (parameters) default_ip6_method = g_hash_table_lookup (parameters, NM_CONNECTION_NORMALIZE_PARAM_IP6_CONFIG_METHOD); @@ -734,6 +762,7 @@ _normalize_ip_config (NMConnection *self, GHashTable *parameters) s_ip4 = nm_connection_get_setting_ip4_config (self); s_ip6 = nm_connection_get_setting_ip6_config (self); + s_proxy = nm_connection_get_setting_proxy (self); if (nm_setting_connection_get_master (s_con)) { /* Slave connections don't have IP configuration. */ @@ -744,7 +773,10 @@ _normalize_ip_config (NMConnection *self, GHashTable *parameters) if (s_ip6) nm_connection_remove_setting (self, NM_TYPE_SETTING_IP6_CONFIG); - return s_ip4 || s_ip6; + if (s_proxy) + nm_connection_remove_setting (self, NM_TYPE_SETTING_PROXY); + + return s_ip4 || s_ip6 || s_proxy; } else { /* Ensure all non-slave connections have IP4 and IP6 settings objects. If no * IP6 setting was specified, then assume that means IP6 config is allowed @@ -771,6 +803,15 @@ _normalize_ip_config (NMConnection *self, GHashTable *parameters) g_object_set (s_ip4, NM_SETTING_IP_CONFIG_MAY_FAIL, TRUE, NULL); changed = TRUE; } + + num = nm_setting_ip_config_get_num_addresses (s_ip4); + if ( num > 1 + && nm_streq0 (nm_setting_ip_config_get_method (s_ip4), + NM_SETTING_IP4_CONFIG_METHOD_SHARED)) { + for (i = num - 1; i > 0; i--) + nm_setting_ip_config_remove_address (s_ip4, i); + changed = TRUE; + } } if (!s_ip6) { setting = nm_setting_ip6_config_new (); @@ -812,7 +853,13 @@ _normalize_ip_config (NMConnection *self, GHashTable *parameters) changed = TRUE; } } - return !s_ip4 || !s_ip6 || changed; + + if (!s_proxy) { + setting = nm_setting_proxy_new (); + nm_connection_add_setting (self, setting); + } + + return !s_ip4 || !s_ip6 || !s_proxy || changed; } } @@ -976,11 +1023,11 @@ _nm_connection_verify (NMConnection *connection, GError **error) NMConnectionPrivate *priv; NMSettingConnection *s_con; NMSettingIPConfig *s_ip4, *s_ip6; + NMSettingProxy *s_proxy; GHashTableIter iter; gpointer value; GSList *all_settings = NULL, *setting_i; - NMSettingVerifyResult success = NM_SETTING_VERIFY_ERROR; - GError *normalizable_error = NULL; + gs_free_error GError *normalizable_error = NULL; NMSettingVerifyResult normalizable_error_type = NM_SETTING_VERIFY_SUCCESS; g_return_val_if_fail (NM_IS_CONNECTION (connection), NM_SETTING_VERIFY_ERROR); @@ -996,7 +1043,7 @@ _nm_connection_verify (NMConnection *connection, GError **error) NM_CONNECTION_ERROR_MISSING_SETTING, _("setting not found")); g_prefix_error (error, "%s: ", NM_SETTING_CONNECTION_SETTING_NAME); - goto EXIT; + return NM_SETTING_VERIFY_ERROR; } /* Build up the list of settings */ @@ -1041,8 +1088,8 @@ _nm_connection_verify (NMConnection *connection, GError **error) } else if (verify_result != NM_SETTING_VERIFY_SUCCESS) { g_propagate_error (error, verify_error); g_slist_free (all_settings); - g_return_val_if_fail (verify_result == NM_SETTING_VERIFY_ERROR, success); - goto EXIT; + g_return_val_if_fail (verify_result == NM_SETTING_VERIFY_ERROR, NM_SETTING_VERIFY_ERROR); + return NM_SETTING_VERIFY_ERROR; } g_clear_error (&verify_error); } @@ -1050,28 +1097,39 @@ _nm_connection_verify (NMConnection *connection, GError **error) s_ip4 = nm_connection_get_setting_ip4_config (connection); s_ip6 = nm_connection_get_setting_ip6_config (connection); + s_proxy = nm_connection_get_setting_proxy (connection); if (nm_setting_connection_get_master (s_con)) { - if ((normalizable_error_type == NM_SETTING_VERIFY_SUCCESS || - (normalizable_error_type == NM_SETTING_VERIFY_NORMALIZABLE)) && (s_ip4 || s_ip6)) { + if ( NM_IN_SET (normalizable_error_type, NM_SETTING_VERIFY_SUCCESS, + NM_SETTING_VERIFY_NORMALIZABLE) + && (s_ip4 || s_ip6 || s_proxy)) { g_clear_error (&normalizable_error); g_set_error_literal (&normalizable_error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_SETTING, _("setting not allowed in slave connection")); g_prefix_error (&normalizable_error, "%s: ", - s_ip4 ? NM_SETTING_IP4_CONFIG_SETTING_NAME : NM_SETTING_IP6_CONFIG_SETTING_NAME); + s_ip4 + ? NM_SETTING_IP4_CONFIG_SETTING_NAME + : (s_ip6 + ? NM_SETTING_IP6_CONFIG_SETTING_NAME + : NM_SETTING_PROXY_SETTING_NAME)); /* having a slave with IP config *was* and is a verify() error. */ normalizable_error_type = NM_SETTING_VERIFY_NORMALIZABLE_ERROR; } } else { - if (normalizable_error_type == NM_SETTING_VERIFY_SUCCESS && (!s_ip4 || !s_ip6)) { + if ( NM_IN_SET (normalizable_error_type, NM_SETTING_VERIFY_SUCCESS) + && (!s_ip4 || !s_ip6 || !s_proxy)) { g_set_error_literal (&normalizable_error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_MISSING_SETTING, _("setting is required for non-slave connections")); g_prefix_error (&normalizable_error, "%s: ", - !s_ip4 ? NM_SETTING_IP4_CONFIG_SETTING_NAME : NM_SETTING_IP6_CONFIG_SETTING_NAME); + !s_ip4 + ? NM_SETTING_IP4_CONFIG_SETTING_NAME + : (!s_ip6 + ? NM_SETTING_IP6_CONFIG_SETTING_NAME + : NM_SETTING_PROXY_SETTING_NAME)); /* having a master without IP config was not a verify() error, accept * it for backward compatibility. */ normalizable_error_type = NM_SETTING_VERIFY_NORMALIZABLE; @@ -1081,13 +1139,10 @@ _nm_connection_verify (NMConnection *connection, GError **error) if (normalizable_error_type != NM_SETTING_VERIFY_SUCCESS) { g_propagate_error (error, normalizable_error); normalizable_error = NULL; - success = normalizable_error_type; - } else - success = NM_SETTING_VERIFY_SUCCESS; + return normalizable_error_type; + } -EXIT: - g_clear_error (&normalizable_error); - return success; + return NM_SETTING_VERIFY_SUCCESS; } /** @@ -1178,6 +1233,7 @@ nm_connection_normalize (NMConnection *connection, was_modified |= _normalize_connection_uuid (connection); was_modified |= _normalize_connection_type (connection); was_modified |= _normalize_connection_slave_type (connection); + was_modified |= _normalize_ethernet_link_neg (connection); was_modified |= _normalize_ip_config (connection, parameters); was_modified |= _normalize_infiniband_mtu (connection, parameters); was_modified |= _normalize_bond_mode (connection, parameters); @@ -1794,6 +1850,7 @@ nm_connection_is_virtual (NMConnection *connection) || !strcmp (type, NM_SETTING_VLAN_SETTING_NAME) || !strcmp (type, NM_SETTING_TUN_SETTING_NAME) || !strcmp (type, NM_SETTING_IP_TUNNEL_SETTING_NAME) + || !strcmp (type, NM_SETTING_MACSEC_SETTING_NAME) || !strcmp (type, NM_SETTING_MACVLAN_SETTING_NAME) || !strcmp (type, NM_SETTING_VXLAN_SETTING_NAME)) return TRUE; @@ -1842,7 +1899,8 @@ nm_connection_get_virtual_device_description (NMConnection *connection) else if (!strcmp (type, NM_SETTING_INFINIBAND_SETTING_NAME)) { display_type = _("InfiniBand"); iface = nm_setting_infiniband_get_virtual_interface_name (nm_connection_get_setting_infiniband (connection)); - } + } else if (!strcmp (type, NM_SETTING_IP_TUNNEL_SETTING_NAME)) + display_type = _("IP Tunnel"); if (!iface || !display_type) return NULL; @@ -1850,7 +1908,7 @@ nm_connection_get_virtual_device_description (NMConnection *connection) return g_strdup_printf ("%s (%s)", display_type, iface); } -/*************************************************************/ +/*****************************************************************************/ /** * nm_connection_get_setting_802_1x: @@ -2105,6 +2163,24 @@ nm_connection_get_setting_ip6_config (NMConnection *connection) } /** + * nm_connection_get_setting_macsec: + * @connection: the #NMConnection + * + * A shortcut to return any #NMSettingMacsec the connection might contain. + * + * Returns: (transfer none): an #NMSettingMacsec if the connection contains one, otherwise %NULL + * + * Since: 1.6 + **/ +NMSettingMacsec * +nm_connection_get_setting_macsec (NMConnection *connection) +{ + g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL); + + return (NMSettingMacsec *) nm_connection_get_setting (connection, NM_TYPE_SETTING_MACSEC); +} + +/** * nm_connection_get_setting_macvlan: * @connection: the #NMConnection * @@ -2171,6 +2247,24 @@ nm_connection_get_setting_pppoe (NMConnection *connection) } /** + * nm_connection_get_setting_proxy: + * @connection: the #NMConnection + * + * A shortcut to return any #NMSettingProxy the connection might contain. + * + * Returns: (transfer none): an #NMSettingProxy if the connection contains one, otherwise %NULL + * + * Since: 1.6 + **/ +NMSettingProxy * +nm_connection_get_setting_proxy (NMConnection *connection) +{ + g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL); + + return (NMSettingProxy *) nm_connection_get_setting (connection, NM_TYPE_SETTING_PROXY); +} + +/** * nm_connection_get_setting_serial: * @connection: the #NMConnection * @@ -2350,7 +2444,7 @@ nm_connection_get_setting_vlan (NMConnection *connection) return (NMSettingVlan *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VLAN); } -/*************************************************************/ +/*****************************************************************************/ static void nm_connection_private_free (NMConnectionPrivate *priv) diff --git a/libnm-core/nm-connection.h b/libnm-core/nm-connection.h index 21e30422..36ef7b6f 100644 --- a/libnm-core/nm-connection.h +++ b/libnm-core/nm-connection.h @@ -206,11 +206,15 @@ NM_AVAILABLE_IN_1_2 NMSettingIPTunnel * nm_connection_get_setting_ip_tunnel (NMConnection *connection); NMSettingIPConfig * nm_connection_get_setting_ip4_config (NMConnection *connection); NMSettingIPConfig * nm_connection_get_setting_ip6_config (NMConnection *connection); +NM_AVAILABLE_IN_1_6 +NMSettingMacsec * nm_connection_get_setting_macsec (NMConnection *connection); NM_AVAILABLE_IN_1_2 NMSettingMacvlan * nm_connection_get_setting_macvlan (NMConnection *connection); NMSettingOlpcMesh * nm_connection_get_setting_olpc_mesh (NMConnection *connection); NMSettingPpp * nm_connection_get_setting_ppp (NMConnection *connection); NMSettingPppoe * nm_connection_get_setting_pppoe (NMConnection *connection); +NM_AVAILABLE_IN_1_6 +NMSettingProxy * nm_connection_get_setting_proxy (NMConnection *connection); NMSettingSerial * nm_connection_get_setting_serial (NMConnection *connection); NMSettingTun * nm_connection_get_setting_tun (NMConnection *connection); NMSettingVpn * nm_connection_get_setting_vpn (NMConnection *connection); diff --git a/libnm-core/nm-core-enum-types.c b/libnm-core/nm-core-enum-types.c deleted file mode 100644 index cd26f02e..00000000 --- a/libnm-core/nm-core-enum-types.c +++ /dev/null @@ -1,1313 +0,0 @@ - - - -/* Generated by glib-mkenums. Do not edit */ - -#include "config.h" - -#include "nm-core-enum-types.h" - -#include "nm-version-macros.h" -#include "nm-connection.h" -#include "nm-core-types.h" -#include "nm-dbus-interface.h" -#include "nm-errors.h" -#include "nm-setting-8021x.h" -#include "nm-setting-adsl.h" -#include "nm-setting-bluetooth.h" -#include "nm-setting-bond.h" -#include "nm-setting-bridge-port.h" -#include "nm-setting-bridge.h" -#include "nm-setting-cdma.h" -#include "nm-setting-connection.h" -#include "nm-setting-dcb.h" -#include "nm-setting-generic.h" -#include "nm-setting-gsm.h" -#include "nm-setting-infiniband.h" -#include "nm-setting-ip-config.h" -#include "nm-setting-ip-tunnel.h" -#include "nm-setting-ip4-config.h" -#include "nm-setting-ip6-config.h" -#include "nm-setting-macvlan.h" -#include "nm-setting-olpc-mesh.h" -#include "nm-setting-ppp.h" -#include "nm-setting-pppoe.h" -#include "nm-setting-serial.h" -#include "nm-setting-team-port.h" -#include "nm-setting-team.h" -#include "nm-setting-tun.h" -#include "nm-setting-vlan.h" -#include "nm-setting-vpn.h" -#include "nm-setting-vxlan.h" -#include "nm-setting-wimax.h" -#include "nm-setting-wired.h" -#include "nm-setting-wireless-security.h" -#include "nm-setting-wireless.h" -#include "nm-setting.h" -#include "nm-simple-connection.h" -#include "nm-utils.h" -#include "nm-version.h" -#include "nm-vpn-dbus-interface.h" -#include "nm-vpn-editor-plugin.h" -#include "nm-vpn-plugin-info.h" - -GType -nm_connection_serialization_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_CONNECTION_SERIALIZE_ALL, "NM_CONNECTION_SERIALIZE_ALL", "all" }, - { NM_CONNECTION_SERIALIZE_NO_SECRETS, "NM_CONNECTION_SERIALIZE_NO_SECRETS", "no-secrets" }, - { NM_CONNECTION_SERIALIZE_ONLY_SECRETS, "NM_CONNECTION_SERIALIZE_ONLY_SECRETS", "only-secrets" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMConnectionSerializationFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_state_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_STATE_UNKNOWN, "NM_STATE_UNKNOWN", "unknown" }, - { NM_STATE_ASLEEP, "NM_STATE_ASLEEP", "asleep" }, - { NM_STATE_DISCONNECTED, "NM_STATE_DISCONNECTED", "disconnected" }, - { NM_STATE_DISCONNECTING, "NM_STATE_DISCONNECTING", "disconnecting" }, - { NM_STATE_CONNECTING, "NM_STATE_CONNECTING", "connecting" }, - { NM_STATE_CONNECTED_LOCAL, "NM_STATE_CONNECTED_LOCAL", "connected-local" }, - { NM_STATE_CONNECTED_SITE, "NM_STATE_CONNECTED_SITE", "connected-site" }, - { NM_STATE_CONNECTED_GLOBAL, "NM_STATE_CONNECTED_GLOBAL", "connected-global" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMState"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_connectivity_state_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_CONNECTIVITY_UNKNOWN, "NM_CONNECTIVITY_UNKNOWN", "unknown" }, - { NM_CONNECTIVITY_NONE, "NM_CONNECTIVITY_NONE", "none" }, - { NM_CONNECTIVITY_PORTAL, "NM_CONNECTIVITY_PORTAL", "portal" }, - { NM_CONNECTIVITY_LIMITED, "NM_CONNECTIVITY_LIMITED", "limited" }, - { NM_CONNECTIVITY_FULL, "NM_CONNECTIVITY_FULL", "full" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMConnectivityState"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_device_type_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_DEVICE_TYPE_UNKNOWN, "NM_DEVICE_TYPE_UNKNOWN", "unknown" }, - { NM_DEVICE_TYPE_ETHERNET, "NM_DEVICE_TYPE_ETHERNET", "ethernet" }, - { NM_DEVICE_TYPE_WIFI, "NM_DEVICE_TYPE_WIFI", "wifi" }, - { NM_DEVICE_TYPE_UNUSED1, "NM_DEVICE_TYPE_UNUSED1", "unused1" }, - { NM_DEVICE_TYPE_UNUSED2, "NM_DEVICE_TYPE_UNUSED2", "unused2" }, - { NM_DEVICE_TYPE_BT, "NM_DEVICE_TYPE_BT", "bt" }, - { NM_DEVICE_TYPE_OLPC_MESH, "NM_DEVICE_TYPE_OLPC_MESH", "olpc-mesh" }, - { NM_DEVICE_TYPE_WIMAX, "NM_DEVICE_TYPE_WIMAX", "wimax" }, - { NM_DEVICE_TYPE_MODEM, "NM_DEVICE_TYPE_MODEM", "modem" }, - { NM_DEVICE_TYPE_INFINIBAND, "NM_DEVICE_TYPE_INFINIBAND", "infiniband" }, - { NM_DEVICE_TYPE_BOND, "NM_DEVICE_TYPE_BOND", "bond" }, - { NM_DEVICE_TYPE_VLAN, "NM_DEVICE_TYPE_VLAN", "vlan" }, - { NM_DEVICE_TYPE_ADSL, "NM_DEVICE_TYPE_ADSL", "adsl" }, - { NM_DEVICE_TYPE_BRIDGE, "NM_DEVICE_TYPE_BRIDGE", "bridge" }, - { NM_DEVICE_TYPE_GENERIC, "NM_DEVICE_TYPE_GENERIC", "generic" }, - { NM_DEVICE_TYPE_TEAM, "NM_DEVICE_TYPE_TEAM", "team" }, - { NM_DEVICE_TYPE_TUN, "NM_DEVICE_TYPE_TUN", "tun" }, - { NM_DEVICE_TYPE_IP_TUNNEL, "NM_DEVICE_TYPE_IP_TUNNEL", "ip-tunnel" }, - { NM_DEVICE_TYPE_MACVLAN, "NM_DEVICE_TYPE_MACVLAN", "macvlan" }, - { NM_DEVICE_TYPE_VXLAN, "NM_DEVICE_TYPE_VXLAN", "vxlan" }, - { NM_DEVICE_TYPE_VETH, "NM_DEVICE_TYPE_VETH", "veth" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMDeviceType"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_device_capabilities_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_DEVICE_CAP_NONE, "NM_DEVICE_CAP_NONE", "none" }, - { NM_DEVICE_CAP_NM_SUPPORTED, "NM_DEVICE_CAP_NM_SUPPORTED", "nm-supported" }, - { NM_DEVICE_CAP_CARRIER_DETECT, "NM_DEVICE_CAP_CARRIER_DETECT", "carrier-detect" }, - { NM_DEVICE_CAP_IS_SOFTWARE, "NM_DEVICE_CAP_IS_SOFTWARE", "is-software" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMDeviceCapabilities"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_device_wifi_capabilities_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_WIFI_DEVICE_CAP_NONE, "NM_WIFI_DEVICE_CAP_NONE", "none" }, - { NM_WIFI_DEVICE_CAP_CIPHER_WEP40, "NM_WIFI_DEVICE_CAP_CIPHER_WEP40", "cipher-wep40" }, - { NM_WIFI_DEVICE_CAP_CIPHER_WEP104, "NM_WIFI_DEVICE_CAP_CIPHER_WEP104", "cipher-wep104" }, - { NM_WIFI_DEVICE_CAP_CIPHER_TKIP, "NM_WIFI_DEVICE_CAP_CIPHER_TKIP", "cipher-tkip" }, - { NM_WIFI_DEVICE_CAP_CIPHER_CCMP, "NM_WIFI_DEVICE_CAP_CIPHER_CCMP", "cipher-ccmp" }, - { NM_WIFI_DEVICE_CAP_WPA, "NM_WIFI_DEVICE_CAP_WPA", "wpa" }, - { NM_WIFI_DEVICE_CAP_RSN, "NM_WIFI_DEVICE_CAP_RSN", "rsn" }, - { NM_WIFI_DEVICE_CAP_AP, "NM_WIFI_DEVICE_CAP_AP", "ap" }, - { NM_WIFI_DEVICE_CAP_ADHOC, "NM_WIFI_DEVICE_CAP_ADHOC", "adhoc" }, - { NM_WIFI_DEVICE_CAP_FREQ_VALID, "NM_WIFI_DEVICE_CAP_FREQ_VALID", "freq-valid" }, - { NM_WIFI_DEVICE_CAP_FREQ_2GHZ, "NM_WIFI_DEVICE_CAP_FREQ_2GHZ", "freq-2ghz" }, - { NM_WIFI_DEVICE_CAP_FREQ_5GHZ, "NM_WIFI_DEVICE_CAP_FREQ_5GHZ", "freq-5ghz" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMDeviceWifiCapabilities"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_802_11_ap_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_802_11_AP_FLAGS_NONE, "NM_802_11_AP_FLAGS_NONE", "none" }, - { NM_802_11_AP_FLAGS_PRIVACY, "NM_802_11_AP_FLAGS_PRIVACY", "privacy" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NM80211ApFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_802_11_ap_security_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_802_11_AP_SEC_NONE, "NM_802_11_AP_SEC_NONE", "none" }, - { NM_802_11_AP_SEC_PAIR_WEP40, "NM_802_11_AP_SEC_PAIR_WEP40", "pair-wep40" }, - { NM_802_11_AP_SEC_PAIR_WEP104, "NM_802_11_AP_SEC_PAIR_WEP104", "pair-wep104" }, - { NM_802_11_AP_SEC_PAIR_TKIP, "NM_802_11_AP_SEC_PAIR_TKIP", "pair-tkip" }, - { NM_802_11_AP_SEC_PAIR_CCMP, "NM_802_11_AP_SEC_PAIR_CCMP", "pair-ccmp" }, - { NM_802_11_AP_SEC_GROUP_WEP40, "NM_802_11_AP_SEC_GROUP_WEP40", "group-wep40" }, - { NM_802_11_AP_SEC_GROUP_WEP104, "NM_802_11_AP_SEC_GROUP_WEP104", "group-wep104" }, - { NM_802_11_AP_SEC_GROUP_TKIP, "NM_802_11_AP_SEC_GROUP_TKIP", "group-tkip" }, - { NM_802_11_AP_SEC_GROUP_CCMP, "NM_802_11_AP_SEC_GROUP_CCMP", "group-ccmp" }, - { NM_802_11_AP_SEC_KEY_MGMT_PSK, "NM_802_11_AP_SEC_KEY_MGMT_PSK", "key-mgmt-psk" }, - { NM_802_11_AP_SEC_KEY_MGMT_802_1X, "NM_802_11_AP_SEC_KEY_MGMT_802_1X", "key-mgmt-802-1x" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NM80211ApSecurityFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_802_11_mode_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_802_11_MODE_UNKNOWN, "NM_802_11_MODE_UNKNOWN", "unknown" }, - { NM_802_11_MODE_ADHOC, "NM_802_11_MODE_ADHOC", "adhoc" }, - { NM_802_11_MODE_INFRA, "NM_802_11_MODE_INFRA", "infra" }, - { NM_802_11_MODE_AP, "NM_802_11_MODE_AP", "ap" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NM80211Mode"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_bluetooth_capabilities_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_BT_CAPABILITY_NONE, "NM_BT_CAPABILITY_NONE", "none" }, - { NM_BT_CAPABILITY_DUN, "NM_BT_CAPABILITY_DUN", "dun" }, - { NM_BT_CAPABILITY_NAP, "NM_BT_CAPABILITY_NAP", "nap" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMBluetoothCapabilities"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_device_modem_capabilities_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_DEVICE_MODEM_CAPABILITY_NONE, "NM_DEVICE_MODEM_CAPABILITY_NONE", "none" }, - { NM_DEVICE_MODEM_CAPABILITY_POTS, "NM_DEVICE_MODEM_CAPABILITY_POTS", "pots" }, - { NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO, "NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO", "cdma-evdo" }, - { NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS, "NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS", "gsm-umts" }, - { NM_DEVICE_MODEM_CAPABILITY_LTE, "NM_DEVICE_MODEM_CAPABILITY_LTE", "lte" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMDeviceModemCapabilities"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_wimax_nsp_network_type_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN, "NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN", "unknown" }, - { NM_WIMAX_NSP_NETWORK_TYPE_HOME, "NM_WIMAX_NSP_NETWORK_TYPE_HOME", "home" }, - { NM_WIMAX_NSP_NETWORK_TYPE_PARTNER, "NM_WIMAX_NSP_NETWORK_TYPE_PARTNER", "partner" }, - { NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER, "NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER", "roaming-partner" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMWimaxNspNetworkType"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_device_state_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_DEVICE_STATE_UNKNOWN, "NM_DEVICE_STATE_UNKNOWN", "unknown" }, - { NM_DEVICE_STATE_UNMANAGED, "NM_DEVICE_STATE_UNMANAGED", "unmanaged" }, - { NM_DEVICE_STATE_UNAVAILABLE, "NM_DEVICE_STATE_UNAVAILABLE", "unavailable" }, - { NM_DEVICE_STATE_DISCONNECTED, "NM_DEVICE_STATE_DISCONNECTED", "disconnected" }, - { NM_DEVICE_STATE_PREPARE, "NM_DEVICE_STATE_PREPARE", "prepare" }, - { NM_DEVICE_STATE_CONFIG, "NM_DEVICE_STATE_CONFIG", "config" }, - { NM_DEVICE_STATE_NEED_AUTH, "NM_DEVICE_STATE_NEED_AUTH", "need-auth" }, - { NM_DEVICE_STATE_IP_CONFIG, "NM_DEVICE_STATE_IP_CONFIG", "ip-config" }, - { NM_DEVICE_STATE_IP_CHECK, "NM_DEVICE_STATE_IP_CHECK", "ip-check" }, - { NM_DEVICE_STATE_SECONDARIES, "NM_DEVICE_STATE_SECONDARIES", "secondaries" }, - { NM_DEVICE_STATE_ACTIVATED, "NM_DEVICE_STATE_ACTIVATED", "activated" }, - { NM_DEVICE_STATE_DEACTIVATING, "NM_DEVICE_STATE_DEACTIVATING", "deactivating" }, - { NM_DEVICE_STATE_FAILED, "NM_DEVICE_STATE_FAILED", "failed" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMDeviceState"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_device_state_reason_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_DEVICE_STATE_REASON_NONE, "NM_DEVICE_STATE_REASON_NONE", "none" }, - { NM_DEVICE_STATE_REASON_UNKNOWN, "NM_DEVICE_STATE_REASON_UNKNOWN", "unknown" }, - { NM_DEVICE_STATE_REASON_NOW_MANAGED, "NM_DEVICE_STATE_REASON_NOW_MANAGED", "now-managed" }, - { NM_DEVICE_STATE_REASON_NOW_UNMANAGED, "NM_DEVICE_STATE_REASON_NOW_UNMANAGED", "now-unmanaged" }, - { NM_DEVICE_STATE_REASON_CONFIG_FAILED, "NM_DEVICE_STATE_REASON_CONFIG_FAILED", "config-failed" }, - { NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE, "NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE", "ip-config-unavailable" }, - { NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED, "NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED", "ip-config-expired" }, - { NM_DEVICE_STATE_REASON_NO_SECRETS, "NM_DEVICE_STATE_REASON_NO_SECRETS", "no-secrets" }, - { NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT, "NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT", "supplicant-disconnect" }, - { NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED, "NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED", "supplicant-config-failed" }, - { NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED, "NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED", "supplicant-failed" }, - { NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT, "NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT", "supplicant-timeout" }, - { NM_DEVICE_STATE_REASON_PPP_START_FAILED, "NM_DEVICE_STATE_REASON_PPP_START_FAILED", "ppp-start-failed" }, - { NM_DEVICE_STATE_REASON_PPP_DISCONNECT, "NM_DEVICE_STATE_REASON_PPP_DISCONNECT", "ppp-disconnect" }, - { NM_DEVICE_STATE_REASON_PPP_FAILED, "NM_DEVICE_STATE_REASON_PPP_FAILED", "ppp-failed" }, - { NM_DEVICE_STATE_REASON_DHCP_START_FAILED, "NM_DEVICE_STATE_REASON_DHCP_START_FAILED", "dhcp-start-failed" }, - { NM_DEVICE_STATE_REASON_DHCP_ERROR, "NM_DEVICE_STATE_REASON_DHCP_ERROR", "dhcp-error" }, - { NM_DEVICE_STATE_REASON_DHCP_FAILED, "NM_DEVICE_STATE_REASON_DHCP_FAILED", "dhcp-failed" }, - { NM_DEVICE_STATE_REASON_SHARED_START_FAILED, "NM_DEVICE_STATE_REASON_SHARED_START_FAILED", "shared-start-failed" }, - { NM_DEVICE_STATE_REASON_SHARED_FAILED, "NM_DEVICE_STATE_REASON_SHARED_FAILED", "shared-failed" }, - { NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED, "NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED", "autoip-start-failed" }, - { NM_DEVICE_STATE_REASON_AUTOIP_ERROR, "NM_DEVICE_STATE_REASON_AUTOIP_ERROR", "autoip-error" }, - { NM_DEVICE_STATE_REASON_AUTOIP_FAILED, "NM_DEVICE_STATE_REASON_AUTOIP_FAILED", "autoip-failed" }, - { NM_DEVICE_STATE_REASON_MODEM_BUSY, "NM_DEVICE_STATE_REASON_MODEM_BUSY", "modem-busy" }, - { NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE, "NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE", "modem-no-dial-tone" }, - { NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER, "NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER", "modem-no-carrier" }, - { NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT, "NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT", "modem-dial-timeout" }, - { NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED, "NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED", "modem-dial-failed" }, - { NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED, "NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED", "modem-init-failed" }, - { NM_DEVICE_STATE_REASON_GSM_APN_FAILED, "NM_DEVICE_STATE_REASON_GSM_APN_FAILED", "gsm-apn-failed" }, - { NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING, "NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING", "gsm-registration-not-searching" }, - { NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED, "NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED", "gsm-registration-denied" }, - { NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT, "NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT", "gsm-registration-timeout" }, - { NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED, "NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED", "gsm-registration-failed" }, - { NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED, "NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED", "gsm-pin-check-failed" }, - { NM_DEVICE_STATE_REASON_FIRMWARE_MISSING, "NM_DEVICE_STATE_REASON_FIRMWARE_MISSING", "firmware-missing" }, - { NM_DEVICE_STATE_REASON_REMOVED, "NM_DEVICE_STATE_REASON_REMOVED", "removed" }, - { NM_DEVICE_STATE_REASON_SLEEPING, "NM_DEVICE_STATE_REASON_SLEEPING", "sleeping" }, - { NM_DEVICE_STATE_REASON_CONNECTION_REMOVED, "NM_DEVICE_STATE_REASON_CONNECTION_REMOVED", "connection-removed" }, - { NM_DEVICE_STATE_REASON_USER_REQUESTED, "NM_DEVICE_STATE_REASON_USER_REQUESTED", "user-requested" }, - { NM_DEVICE_STATE_REASON_CARRIER, "NM_DEVICE_STATE_REASON_CARRIER", "carrier" }, - { NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED, "NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED", "connection-assumed" }, - { NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, "NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE", "supplicant-available" }, - { NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND, "NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND", "modem-not-found" }, - { NM_DEVICE_STATE_REASON_BT_FAILED, "NM_DEVICE_STATE_REASON_BT_FAILED", "bt-failed" }, - { NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED, "NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED", "gsm-sim-not-inserted" }, - { NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED, "NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED", "gsm-sim-pin-required" }, - { NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED, "NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED", "gsm-sim-puk-required" }, - { NM_DEVICE_STATE_REASON_GSM_SIM_WRONG, "NM_DEVICE_STATE_REASON_GSM_SIM_WRONG", "gsm-sim-wrong" }, - { NM_DEVICE_STATE_REASON_INFINIBAND_MODE, "NM_DEVICE_STATE_REASON_INFINIBAND_MODE", "infiniband-mode" }, - { NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED, "NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED", "dependency-failed" }, - { NM_DEVICE_STATE_REASON_BR2684_FAILED, "NM_DEVICE_STATE_REASON_BR2684_FAILED", "br2684-failed" }, - { NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE, "NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE", "modem-manager-unavailable" }, - { NM_DEVICE_STATE_REASON_SSID_NOT_FOUND, "NM_DEVICE_STATE_REASON_SSID_NOT_FOUND", "ssid-not-found" }, - { NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED, "NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED", "secondary-connection-failed" }, - { NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED, "NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED", "dcb-fcoe-failed" }, - { NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED, "NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED", "teamd-control-failed" }, - { NM_DEVICE_STATE_REASON_MODEM_FAILED, "NM_DEVICE_STATE_REASON_MODEM_FAILED", "modem-failed" }, - { NM_DEVICE_STATE_REASON_MODEM_AVAILABLE, "NM_DEVICE_STATE_REASON_MODEM_AVAILABLE", "modem-available" }, - { NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT, "NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT", "sim-pin-incorrect" }, - { NM_DEVICE_STATE_REASON_NEW_ACTIVATION, "NM_DEVICE_STATE_REASON_NEW_ACTIVATION", "new-activation" }, - { NM_DEVICE_STATE_REASON_PARENT_CHANGED, "NM_DEVICE_STATE_REASON_PARENT_CHANGED", "parent-changed" }, - { NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED, "NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED", "parent-managed-changed" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMDeviceStateReason"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_metered_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_METERED_UNKNOWN, "NM_METERED_UNKNOWN", "unknown" }, - { NM_METERED_YES, "NM_METERED_YES", "yes" }, - { NM_METERED_NO, "NM_METERED_NO", "no" }, - { NM_METERED_GUESS_YES, "NM_METERED_GUESS_YES", "guess-yes" }, - { NM_METERED_GUESS_NO, "NM_METERED_GUESS_NO", "guess-no" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMMetered"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_active_connection_state_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_ACTIVE_CONNECTION_STATE_UNKNOWN, "NM_ACTIVE_CONNECTION_STATE_UNKNOWN", "unknown" }, - { NM_ACTIVE_CONNECTION_STATE_ACTIVATING, "NM_ACTIVE_CONNECTION_STATE_ACTIVATING", "activating" }, - { NM_ACTIVE_CONNECTION_STATE_ACTIVATED, "NM_ACTIVE_CONNECTION_STATE_ACTIVATED", "activated" }, - { NM_ACTIVE_CONNECTION_STATE_DEACTIVATING, "NM_ACTIVE_CONNECTION_STATE_DEACTIVATING", "deactivating" }, - { NM_ACTIVE_CONNECTION_STATE_DEACTIVATED, "NM_ACTIVE_CONNECTION_STATE_DEACTIVATED", "deactivated" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMActiveConnectionState"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_secret_agent_get_secrets_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE, "NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE", "none" }, - { NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION, "NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION", "allow-interaction" }, - { NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW, "NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW", "request-new" }, - { NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED, "NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED", "user-requested" }, - { NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM, "NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM", "only-system" }, - { NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS, "NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS", "no-errors" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMSecretAgentGetSecretsFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_secret_agent_capabilities_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_SECRET_AGENT_CAPABILITY_NONE, "NM_SECRET_AGENT_CAPABILITY_NONE", "none" }, - { NM_SECRET_AGENT_CAPABILITY_VPN_HINTS, "NM_SECRET_AGENT_CAPABILITY_VPN_HINTS", "vpn-hints" }, - { NM_SECRET_AGENT_CAPABILITY_LAST, "NM_SECRET_AGENT_CAPABILITY_LAST", "last" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMSecretAgentCapabilities"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_ip_tunnel_mode_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_IP_TUNNEL_MODE_UNKNOWN, "NM_IP_TUNNEL_MODE_UNKNOWN", "unknown" }, - { NM_IP_TUNNEL_MODE_IPIP, "NM_IP_TUNNEL_MODE_IPIP", "ipip" }, - { NM_IP_TUNNEL_MODE_GRE, "NM_IP_TUNNEL_MODE_GRE", "gre" }, - { NM_IP_TUNNEL_MODE_SIT, "NM_IP_TUNNEL_MODE_SIT", "sit" }, - { NM_IP_TUNNEL_MODE_ISATAP, "NM_IP_TUNNEL_MODE_ISATAP", "isatap" }, - { NM_IP_TUNNEL_MODE_VTI, "NM_IP_TUNNEL_MODE_VTI", "vti" }, - { NM_IP_TUNNEL_MODE_IP6IP6, "NM_IP_TUNNEL_MODE_IP6IP6", "ip6ip6" }, - { NM_IP_TUNNEL_MODE_IPIP6, "NM_IP_TUNNEL_MODE_IPIP6", "ipip6" }, - { NM_IP_TUNNEL_MODE_IP6GRE, "NM_IP_TUNNEL_MODE_IP6GRE", "ip6gre" }, - { NM_IP_TUNNEL_MODE_VTI6, "NM_IP_TUNNEL_MODE_VTI6", "vti6" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMIPTunnelMode"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_agent_manager_error_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_AGENT_MANAGER_ERROR_FAILED, "NM_AGENT_MANAGER_ERROR_FAILED", "Failed" }, - { NM_AGENT_MANAGER_ERROR_PERMISSION_DENIED, "NM_AGENT_MANAGER_ERROR_PERMISSION_DENIED", "PermissionDenied" }, - { NM_AGENT_MANAGER_ERROR_INVALID_IDENTIFIER, "NM_AGENT_MANAGER_ERROR_INVALID_IDENTIFIER", "InvalidIdentifier" }, - { NM_AGENT_MANAGER_ERROR_NOT_REGISTERED, "NM_AGENT_MANAGER_ERROR_NOT_REGISTERED", "NotRegistered" }, - { NM_AGENT_MANAGER_ERROR_NO_SECRETS, "NM_AGENT_MANAGER_ERROR_NO_SECRETS", "NoSecrets" }, - { NM_AGENT_MANAGER_ERROR_USER_CANCELED, "NM_AGENT_MANAGER_ERROR_USER_CANCELED", "UserCanceled" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMAgentManagerError"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_connection_error_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_CONNECTION_ERROR_FAILED, "NM_CONNECTION_ERROR_FAILED", "Failed" }, - { NM_CONNECTION_ERROR_SETTING_NOT_FOUND, "NM_CONNECTION_ERROR_SETTING_NOT_FOUND", "SettingNotFound" }, - { NM_CONNECTION_ERROR_PROPERTY_NOT_FOUND, "NM_CONNECTION_ERROR_PROPERTY_NOT_FOUND", "PropertyNotFound" }, - { NM_CONNECTION_ERROR_PROPERTY_NOT_SECRET, "NM_CONNECTION_ERROR_PROPERTY_NOT_SECRET", "PropertyNotSecret" }, - { NM_CONNECTION_ERROR_MISSING_SETTING, "NM_CONNECTION_ERROR_MISSING_SETTING", "MissingSetting" }, - { NM_CONNECTION_ERROR_INVALID_SETTING, "NM_CONNECTION_ERROR_INVALID_SETTING", "InvalidSetting" }, - { NM_CONNECTION_ERROR_MISSING_PROPERTY, "NM_CONNECTION_ERROR_MISSING_PROPERTY", "MissingProperty" }, - { NM_CONNECTION_ERROR_INVALID_PROPERTY, "NM_CONNECTION_ERROR_INVALID_PROPERTY", "InvalidProperty" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMConnectionError"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_crypto_error_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_CRYPTO_ERROR_FAILED, "NM_CRYPTO_ERROR_FAILED", "failed" }, - { NM_CRYPTO_ERROR_INVALID_DATA, "NM_CRYPTO_ERROR_INVALID_DATA", "invalid-data" }, - { NM_CRYPTO_ERROR_INVALID_PASSWORD, "NM_CRYPTO_ERROR_INVALID_PASSWORD", "invalid-password" }, - { NM_CRYPTO_ERROR_UNKNOWN_CIPHER, "NM_CRYPTO_ERROR_UNKNOWN_CIPHER", "unknown-cipher" }, - { NM_CRYPTO_ERROR_DECRYPTION_FAILED, "NM_CRYPTO_ERROR_DECRYPTION_FAILED", "decryption-failed" }, - { NM_CRYPTO_ERROR_ENCRYPTION_FAILED, "NM_CRYPTO_ERROR_ENCRYPTION_FAILED", "encryption-failed" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMCryptoError"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_device_error_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_DEVICE_ERROR_FAILED, "NM_DEVICE_ERROR_FAILED", "Failed" }, - { NM_DEVICE_ERROR_CREATION_FAILED, "NM_DEVICE_ERROR_CREATION_FAILED", "CreationFailed" }, - { NM_DEVICE_ERROR_INVALID_CONNECTION, "NM_DEVICE_ERROR_INVALID_CONNECTION", "InvalidConnection" }, - { NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION, "NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION", "IncompatibleConnection" }, - { NM_DEVICE_ERROR_NOT_ACTIVE, "NM_DEVICE_ERROR_NOT_ACTIVE", "NotActive" }, - { NM_DEVICE_ERROR_NOT_SOFTWARE, "NM_DEVICE_ERROR_NOT_SOFTWARE", "NotSoftware" }, - { NM_DEVICE_ERROR_NOT_ALLOWED, "NM_DEVICE_ERROR_NOT_ALLOWED", "NotAllowed" }, - { NM_DEVICE_ERROR_SPECIFIC_OBJECT_NOT_FOUND, "NM_DEVICE_ERROR_SPECIFIC_OBJECT_NOT_FOUND", "SpecificObjectNotFound" }, - { NM_DEVICE_ERROR_VERSION_ID_MISMATCH, "NM_DEVICE_ERROR_VERSION_ID_MISMATCH", "VersionIdMismatch" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMDeviceError"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_manager_error_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_MANAGER_ERROR_FAILED, "NM_MANAGER_ERROR_FAILED", "Failed" }, - { NM_MANAGER_ERROR_PERMISSION_DENIED, "NM_MANAGER_ERROR_PERMISSION_DENIED", "PermissionDenied" }, - { NM_MANAGER_ERROR_UNKNOWN_CONNECTION, "NM_MANAGER_ERROR_UNKNOWN_CONNECTION", "UnknownConnection" }, - { NM_MANAGER_ERROR_UNKNOWN_DEVICE, "NM_MANAGER_ERROR_UNKNOWN_DEVICE", "UnknownDevice" }, - { NM_MANAGER_ERROR_CONNECTION_NOT_AVAILABLE, "NM_MANAGER_ERROR_CONNECTION_NOT_AVAILABLE", "ConnectionNotAvailable" }, - { NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE, "NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE", "ConnectionNotActive" }, - { NM_MANAGER_ERROR_CONNECTION_ALREADY_ACTIVE, "NM_MANAGER_ERROR_CONNECTION_ALREADY_ACTIVE", "ConnectionAlreadyActive" }, - { NM_MANAGER_ERROR_DEPENDENCY_FAILED, "NM_MANAGER_ERROR_DEPENDENCY_FAILED", "DependencyFailed" }, - { NM_MANAGER_ERROR_ALREADY_ASLEEP_OR_AWAKE, "NM_MANAGER_ERROR_ALREADY_ASLEEP_OR_AWAKE", "AlreadyAsleepOrAwake" }, - { NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED, "NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED", "AlreadyEnabledOrDisabled" }, - { NM_MANAGER_ERROR_UNKNOWN_LOG_LEVEL, "NM_MANAGER_ERROR_UNKNOWN_LOG_LEVEL", "UnknownLogLevel" }, - { NM_MANAGER_ERROR_UNKNOWN_LOG_DOMAIN, "NM_MANAGER_ERROR_UNKNOWN_LOG_DOMAIN", "UnknownLogDomain" }, - { NM_MANAGER_ERROR_INVALID_ARGUMENTS, "NM_MANAGER_ERROR_INVALID_ARGUMENTS", "InvalidArguments" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMManagerError"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_secret_agent_error_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SECRET_AGENT_ERROR_FAILED, "NM_SECRET_AGENT_ERROR_FAILED", "Failed" }, - { NM_SECRET_AGENT_ERROR_PERMISSION_DENIED, "NM_SECRET_AGENT_ERROR_PERMISSION_DENIED", "PermissionDenied" }, - { NM_SECRET_AGENT_ERROR_INVALID_CONNECTION, "NM_SECRET_AGENT_ERROR_INVALID_CONNECTION", "InvalidConnection" }, - { NM_SECRET_AGENT_ERROR_USER_CANCELED, "NM_SECRET_AGENT_ERROR_USER_CANCELED", "UserCanceled" }, - { NM_SECRET_AGENT_ERROR_AGENT_CANCELED, "NM_SECRET_AGENT_ERROR_AGENT_CANCELED", "AgentCanceled" }, - { NM_SECRET_AGENT_ERROR_NO_SECRETS, "NM_SECRET_AGENT_ERROR_NO_SECRETS", "NoSecrets" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSecretAgentError"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_settings_error_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTINGS_ERROR_FAILED, "NM_SETTINGS_ERROR_FAILED", "Failed" }, - { NM_SETTINGS_ERROR_PERMISSION_DENIED, "NM_SETTINGS_ERROR_PERMISSION_DENIED", "PermissionDenied" }, - { NM_SETTINGS_ERROR_NOT_SUPPORTED, "NM_SETTINGS_ERROR_NOT_SUPPORTED", "NotSupported" }, - { NM_SETTINGS_ERROR_INVALID_CONNECTION, "NM_SETTINGS_ERROR_INVALID_CONNECTION", "InvalidConnection" }, - { NM_SETTINGS_ERROR_READ_ONLY_CONNECTION, "NM_SETTINGS_ERROR_READ_ONLY_CONNECTION", "ReadOnlyConnection" }, - { NM_SETTINGS_ERROR_UUID_EXISTS, "NM_SETTINGS_ERROR_UUID_EXISTS", "UuidExists" }, - { NM_SETTINGS_ERROR_INVALID_HOSTNAME, "NM_SETTINGS_ERROR_INVALID_HOSTNAME", "InvalidHostname" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingsError"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_vpn_plugin_error_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_VPN_PLUGIN_ERROR_FAILED, "NM_VPN_PLUGIN_ERROR_FAILED", "Failed" }, - { NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS, "NM_VPN_PLUGIN_ERROR_STARTING_IN_PROGRESS", "StartingInProgress" }, - { NM_VPN_PLUGIN_ERROR_ALREADY_STARTED, "NM_VPN_PLUGIN_ERROR_ALREADY_STARTED", "AlreadyStarted" }, - { NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS, "NM_VPN_PLUGIN_ERROR_STOPPING_IN_PROGRESS", "StoppingInProgress" }, - { NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED, "NM_VPN_PLUGIN_ERROR_ALREADY_STOPPED", "AlreadyStopped" }, - { NM_VPN_PLUGIN_ERROR_WRONG_STATE, "NM_VPN_PLUGIN_ERROR_WRONG_STATE", "WrongState" }, - { NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS, "NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS", "BadArguments" }, - { NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED, "NM_VPN_PLUGIN_ERROR_LAUNCH_FAILED", "LaunchFailed" }, - { NM_VPN_PLUGIN_ERROR_INVALID_CONNECTION, "NM_VPN_PLUGIN_ERROR_INVALID_CONNECTION", "InvalidConnection" }, - { NM_VPN_PLUGIN_ERROR_INTERACTIVE_NOT_SUPPORTED, "NM_VPN_PLUGIN_ERROR_INTERACTIVE_NOT_SUPPORTED", "InteractiveNotSupported" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMVpnPluginError"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_802_1x_ck_format_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_802_1X_CK_FORMAT_UNKNOWN, "NM_SETTING_802_1X_CK_FORMAT_UNKNOWN", "unknown" }, - { NM_SETTING_802_1X_CK_FORMAT_X509, "NM_SETTING_802_1X_CK_FORMAT_X509", "x509" }, - { NM_SETTING_802_1X_CK_FORMAT_RAW_KEY, "NM_SETTING_802_1X_CK_FORMAT_RAW_KEY", "raw-key" }, - { NM_SETTING_802_1X_CK_FORMAT_PKCS12, "NM_SETTING_802_1X_CK_FORMAT_PKCS12", "pkcs12" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSetting8021xCKFormat"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_802_1x_ck_scheme_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_802_1X_CK_SCHEME_UNKNOWN, "NM_SETTING_802_1X_CK_SCHEME_UNKNOWN", "unknown" }, - { NM_SETTING_802_1X_CK_SCHEME_BLOB, "NM_SETTING_802_1X_CK_SCHEME_BLOB", "blob" }, - { NM_SETTING_802_1X_CK_SCHEME_PATH, "NM_SETTING_802_1X_CK_SCHEME_PATH", "path" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSetting8021xCKScheme"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_connection_autoconnect_slaves_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT, "NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT", "default" }, - { NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_NO, "NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_NO", "no" }, - { NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES, "NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_YES", "yes" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingConnectionAutoconnectSlaves"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_connection_lldp_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_CONNECTION_LLDP_DEFAULT, "NM_SETTING_CONNECTION_LLDP_DEFAULT", "default" }, - { NM_SETTING_CONNECTION_LLDP_DISABLE, "NM_SETTING_CONNECTION_LLDP_DISABLE", "disable" }, - { NM_SETTING_CONNECTION_LLDP_ENABLE_RX, "NM_SETTING_CONNECTION_LLDP_ENABLE_RX", "enable-rx" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingConnectionLldp"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_dcb_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_SETTING_DCB_FLAG_NONE, "NM_SETTING_DCB_FLAG_NONE", "none" }, - { NM_SETTING_DCB_FLAG_ENABLE, "NM_SETTING_DCB_FLAG_ENABLE", "enable" }, - { NM_SETTING_DCB_FLAG_ADVERTISE, "NM_SETTING_DCB_FLAG_ADVERTISE", "advertise" }, - { NM_SETTING_DCB_FLAG_WILLING, "NM_SETTING_DCB_FLAG_WILLING", "willing" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMSettingDcbFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_ip6_config_privacy_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN, "NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN", "unknown" }, - { NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED, "NM_SETTING_IP6_CONFIG_PRIVACY_DISABLED", "disabled" }, - { NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR, "NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_PUBLIC_ADDR", "prefer-public-addr" }, - { NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR, "NM_SETTING_IP6_CONFIG_PRIVACY_PREFER_TEMP_ADDR", "prefer-temp-addr" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingIP6ConfigPrivacy"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_ip6_config_addr_gen_mode_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64, "NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64", "eui64" }, - { NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY, "NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY", "stable-privacy" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingIP6ConfigAddrGenMode"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_macvlan_mode_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_MACVLAN_MODE_UNKNOWN, "NM_SETTING_MACVLAN_MODE_UNKNOWN", "unknown" }, - { NM_SETTING_MACVLAN_MODE_VEPA, "NM_SETTING_MACVLAN_MODE_VEPA", "vepa" }, - { NM_SETTING_MACVLAN_MODE_BRIDGE, "NM_SETTING_MACVLAN_MODE_BRIDGE", "bridge" }, - { NM_SETTING_MACVLAN_MODE_PRIVATE, "NM_SETTING_MACVLAN_MODE_PRIVATE", "private" }, - { NM_SETTING_MACVLAN_MODE_PASSTHRU, "NM_SETTING_MACVLAN_MODE_PASSTHRU", "passthru" }, - { NM_SETTING_MACVLAN_MODE_SOURCE, "NM_SETTING_MACVLAN_MODE_SOURCE", "source" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingMacvlanMode"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_serial_parity_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_SERIAL_PARITY_NONE, "NM_SETTING_SERIAL_PARITY_NONE", "none" }, - { NM_SETTING_SERIAL_PARITY_EVEN, "NM_SETTING_SERIAL_PARITY_EVEN", "even" }, - { NM_SETTING_SERIAL_PARITY_ODD, "NM_SETTING_SERIAL_PARITY_ODD", "odd" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingSerialParity"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_tun_mode_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_TUN_MODE_UNKNOWN, "NM_SETTING_TUN_MODE_UNKNOWN", "unknown" }, - { NM_SETTING_TUN_MODE_TUN, "NM_SETTING_TUN_MODE_TUN", "tun" }, - { NM_SETTING_TUN_MODE_TAP, "NM_SETTING_TUN_MODE_TAP", "tap" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingTunMode"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_vlan_priority_map_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_VLAN_INGRESS_MAP, "NM_VLAN_INGRESS_MAP", "ingress-map" }, - { NM_VLAN_EGRESS_MAP, "NM_VLAN_EGRESS_MAP", "egress-map" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMVlanPriorityMap"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_vlan_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_VLAN_FLAG_REORDER_HEADERS, "NM_VLAN_FLAG_REORDER_HEADERS", "reorder-headers" }, - { NM_VLAN_FLAG_GVRP, "NM_VLAN_FLAG_GVRP", "gvrp" }, - { NM_VLAN_FLAG_LOOSE_BINDING, "NM_VLAN_FLAG_LOOSE_BINDING", "loose-binding" }, - { NM_VLAN_FLAG_MVRP, "NM_VLAN_FLAG_MVRP", "mvrp" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMVlanFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_wired_wake_on_lan_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_SETTING_WIRED_WAKE_ON_LAN_PHY, "NM_SETTING_WIRED_WAKE_ON_LAN_PHY", "phy" }, - { NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST, "NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST", "unicast" }, - { NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST, "NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST", "multicast" }, - { NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST, "NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST", "broadcast" }, - { NM_SETTING_WIRED_WAKE_ON_LAN_ARP, "NM_SETTING_WIRED_WAKE_ON_LAN_ARP", "arp" }, - { NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC, "NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC", "magic" }, - { NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT, "NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT", "default" }, - { NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE, "NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE", "ignore" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMSettingWiredWakeOnLan"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_wep_key_type_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_WEP_KEY_TYPE_UNKNOWN, "NM_WEP_KEY_TYPE_UNKNOWN", "unknown" }, - { NM_WEP_KEY_TYPE_KEY, "NM_WEP_KEY_TYPE_KEY", "key" }, - { NM_WEP_KEY_TYPE_PASSPHRASE, "NM_WEP_KEY_TYPE_PASSPHRASE", "passphrase" }, - { NM_WEP_KEY_TYPE_LAST, "NM_WEP_KEY_TYPE_LAST", "last" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMWepKeyType"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_wireless_powersave_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_WIRELESS_POWERSAVE_DEFAULT, "NM_SETTING_WIRELESS_POWERSAVE_DEFAULT", "default" }, - { NM_SETTING_WIRELESS_POWERSAVE_IGNORE, "NM_SETTING_WIRELESS_POWERSAVE_IGNORE", "ignore" }, - { NM_SETTING_WIRELESS_POWERSAVE_DISABLE, "NM_SETTING_WIRELESS_POWERSAVE_DISABLE", "disable" }, - { NM_SETTING_WIRELESS_POWERSAVE_ENABLE, "NM_SETTING_WIRELESS_POWERSAVE_ENABLE", "enable" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingWirelessPowersave"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_secret_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_SETTING_SECRET_FLAG_NONE, "NM_SETTING_SECRET_FLAG_NONE", "none" }, - { NM_SETTING_SECRET_FLAG_AGENT_OWNED, "NM_SETTING_SECRET_FLAG_AGENT_OWNED", "agent-owned" }, - { NM_SETTING_SECRET_FLAG_NOT_SAVED, "NM_SETTING_SECRET_FLAG_NOT_SAVED", "not-saved" }, - { NM_SETTING_SECRET_FLAG_NOT_REQUIRED, "NM_SETTING_SECRET_FLAG_NOT_REQUIRED", "not-required" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMSettingSecretFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_compare_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_COMPARE_FLAG_EXACT, "NM_SETTING_COMPARE_FLAG_EXACT", "exact" }, - { NM_SETTING_COMPARE_FLAG_FUZZY, "NM_SETTING_COMPARE_FLAG_FUZZY", "fuzzy" }, - { NM_SETTING_COMPARE_FLAG_IGNORE_ID, "NM_SETTING_COMPARE_FLAG_IGNORE_ID", "ignore-id" }, - { NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS, "NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS", "ignore-secrets" }, - { NM_SETTING_COMPARE_FLAG_IGNORE_AGENT_OWNED_SECRETS, "NM_SETTING_COMPARE_FLAG_IGNORE_AGENT_OWNED_SECRETS", "ignore-agent-owned-secrets" }, - { NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS, "NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS", "ignore-not-saved-secrets" }, - { NM_SETTING_COMPARE_FLAG_DIFF_RESULT_WITH_DEFAULT, "NM_SETTING_COMPARE_FLAG_DIFF_RESULT_WITH_DEFAULT", "diff-result-with-default" }, - { NM_SETTING_COMPARE_FLAG_DIFF_RESULT_NO_DEFAULT, "NM_SETTING_COMPARE_FLAG_DIFF_RESULT_NO_DEFAULT", "diff-result-no-default" }, - { NM_SETTING_COMPARE_FLAG_IGNORE_TIMESTAMP, "NM_SETTING_COMPARE_FLAG_IGNORE_TIMESTAMP", "ignore-timestamp" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingCompareFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_mac_randomization_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_MAC_RANDOMIZATION_DEFAULT, "NM_SETTING_MAC_RANDOMIZATION_DEFAULT", "default" }, - { NM_SETTING_MAC_RANDOMIZATION_NEVER, "NM_SETTING_MAC_RANDOMIZATION_NEVER", "never" }, - { NM_SETTING_MAC_RANDOMIZATION_ALWAYS, "NM_SETTING_MAC_RANDOMIZATION_ALWAYS", "always" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingMacRandomization"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_setting_diff_result_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_SETTING_DIFF_RESULT_UNKNOWN, "NM_SETTING_DIFF_RESULT_UNKNOWN", "unknown" }, - { NM_SETTING_DIFF_RESULT_IN_A, "NM_SETTING_DIFF_RESULT_IN_A", "in-a" }, - { NM_SETTING_DIFF_RESULT_IN_B, "NM_SETTING_DIFF_RESULT_IN_B", "in-b" }, - { NM_SETTING_DIFF_RESULT_IN_A_DEFAULT, "NM_SETTING_DIFF_RESULT_IN_A_DEFAULT", "in-a-default" }, - { NM_SETTING_DIFF_RESULT_IN_B_DEFAULT, "NM_SETTING_DIFF_RESULT_IN_B_DEFAULT", "in-b-default" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMSettingDiffResult"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_utils_security_type_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NMU_SEC_INVALID, "NMU_SEC_INVALID", "invalid" }, - { NMU_SEC_NONE, "NMU_SEC_NONE", "none" }, - { NMU_SEC_STATIC_WEP, "NMU_SEC_STATIC_WEP", "static-wep" }, - { NMU_SEC_LEAP, "NMU_SEC_LEAP", "leap" }, - { NMU_SEC_DYNAMIC_WEP, "NMU_SEC_DYNAMIC_WEP", "dynamic-wep" }, - { NMU_SEC_WPA_PSK, "NMU_SEC_WPA_PSK", "wpa-psk" }, - { NMU_SEC_WPA_ENTERPRISE, "NMU_SEC_WPA_ENTERPRISE", "wpa-enterprise" }, - { NMU_SEC_WPA2_PSK, "NMU_SEC_WPA2_PSK", "wpa2-psk" }, - { NMU_SEC_WPA2_ENTERPRISE, "NMU_SEC_WPA2_ENTERPRISE", "wpa2-enterprise" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMUtilsSecurityType"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_vpn_service_state_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_VPN_SERVICE_STATE_UNKNOWN, "NM_VPN_SERVICE_STATE_UNKNOWN", "unknown" }, - { NM_VPN_SERVICE_STATE_INIT, "NM_VPN_SERVICE_STATE_INIT", "init" }, - { NM_VPN_SERVICE_STATE_SHUTDOWN, "NM_VPN_SERVICE_STATE_SHUTDOWN", "shutdown" }, - { NM_VPN_SERVICE_STATE_STARTING, "NM_VPN_SERVICE_STATE_STARTING", "starting" }, - { NM_VPN_SERVICE_STATE_STARTED, "NM_VPN_SERVICE_STATE_STARTED", "started" }, - { NM_VPN_SERVICE_STATE_STOPPING, "NM_VPN_SERVICE_STATE_STOPPING", "stopping" }, - { NM_VPN_SERVICE_STATE_STOPPED, "NM_VPN_SERVICE_STATE_STOPPED", "stopped" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMVpnServiceState"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_vpn_connection_state_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_VPN_CONNECTION_STATE_UNKNOWN, "NM_VPN_CONNECTION_STATE_UNKNOWN", "unknown" }, - { NM_VPN_CONNECTION_STATE_PREPARE, "NM_VPN_CONNECTION_STATE_PREPARE", "prepare" }, - { NM_VPN_CONNECTION_STATE_NEED_AUTH, "NM_VPN_CONNECTION_STATE_NEED_AUTH", "need-auth" }, - { NM_VPN_CONNECTION_STATE_CONNECT, "NM_VPN_CONNECTION_STATE_CONNECT", "connect" }, - { NM_VPN_CONNECTION_STATE_IP_CONFIG_GET, "NM_VPN_CONNECTION_STATE_IP_CONFIG_GET", "ip-config-get" }, - { NM_VPN_CONNECTION_STATE_ACTIVATED, "NM_VPN_CONNECTION_STATE_ACTIVATED", "activated" }, - { NM_VPN_CONNECTION_STATE_FAILED, "NM_VPN_CONNECTION_STATE_FAILED", "failed" }, - { NM_VPN_CONNECTION_STATE_DISCONNECTED, "NM_VPN_CONNECTION_STATE_DISCONNECTED", "disconnected" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMVpnConnectionState"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_vpn_connection_state_reason_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_VPN_CONNECTION_STATE_REASON_UNKNOWN, "NM_VPN_CONNECTION_STATE_REASON_UNKNOWN", "unknown" }, - { NM_VPN_CONNECTION_STATE_REASON_NONE, "NM_VPN_CONNECTION_STATE_REASON_NONE", "none" }, - { NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED, "NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED", "user-disconnected" }, - { NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED, "NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED", "device-disconnected" }, - { NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED, "NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED", "service-stopped" }, - { NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID, "NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID", "ip-config-invalid" }, - { NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT, "NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT", "connect-timeout" }, - { NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT, "NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT", "service-start-timeout" }, - { NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED, "NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED", "service-start-failed" }, - { NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS, "NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS", "no-secrets" }, - { NM_VPN_CONNECTION_STATE_REASON_LOGIN_FAILED, "NM_VPN_CONNECTION_STATE_REASON_LOGIN_FAILED", "login-failed" }, - { NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED, "NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED", "connection-removed" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMVpnConnectionStateReason"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_vpn_plugin_failure_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED, "NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED", "login-failed" }, - { NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED, "NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED", "connect-failed" }, - { NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG, "NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG", "bad-ip-config" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMVpnPluginFailure"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_vpn_editor_plugin_capability_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE, "NM_VPN_EDITOR_PLUGIN_CAPABILITY_NONE", "none" }, - { NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT, "NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT", "import" }, - { NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT, "NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT", "export" }, - { NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6, "NM_VPN_EDITOR_PLUGIN_CAPABILITY_IPV6", "ipv6" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMVpnEditorPluginCapability"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} - - - diff --git a/libnm-core/nm-core-enum-types.h b/libnm-core/nm-core-enum-types.h deleted file mode 100644 index d316b5e0..00000000 --- a/libnm-core/nm-core-enum-types.h +++ /dev/null @@ -1,121 +0,0 @@ - - - -/* Generated by glib-mkenums. Do not edit */ - -#ifndef __NM_CORE_ENUM_TYPES_H__ -#define __NM_CORE_ENUM_TYPES_H__ - -#include <glib-object.h> - -G_BEGIN_DECLS -GType nm_connection_serialization_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_CONNECTION_SERIALIZATION_FLAGS (nm_connection_serialization_flags_get_type ()) -GType nm_state_get_type (void) G_GNUC_CONST; -#define NM_TYPE_STATE (nm_state_get_type ()) -GType nm_connectivity_state_get_type (void) G_GNUC_CONST; -#define NM_TYPE_CONNECTIVITY_STATE (nm_connectivity_state_get_type ()) -GType nm_device_type_get_type (void) G_GNUC_CONST; -#define NM_TYPE_DEVICE_TYPE (nm_device_type_get_type ()) -GType nm_device_capabilities_get_type (void) G_GNUC_CONST; -#define NM_TYPE_DEVICE_CAPABILITIES (nm_device_capabilities_get_type ()) -GType nm_device_wifi_capabilities_get_type (void) G_GNUC_CONST; -#define NM_TYPE_DEVICE_WIFI_CAPABILITIES (nm_device_wifi_capabilities_get_type ()) -GType nm_802_11_ap_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_802_11_AP_FLAGS (nm_802_11_ap_flags_get_type ()) -GType nm_802_11_ap_security_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_802_11_AP_SECURITY_FLAGS (nm_802_11_ap_security_flags_get_type ()) -GType nm_802_11_mode_get_type (void) G_GNUC_CONST; -#define NM_TYPE_802_11_MODE (nm_802_11_mode_get_type ()) -GType nm_bluetooth_capabilities_get_type (void) G_GNUC_CONST; -#define NM_TYPE_BLUETOOTH_CAPABILITIES (nm_bluetooth_capabilities_get_type ()) -GType nm_device_modem_capabilities_get_type (void) G_GNUC_CONST; -#define NM_TYPE_DEVICE_MODEM_CAPABILITIES (nm_device_modem_capabilities_get_type ()) -GType nm_wimax_nsp_network_type_get_type (void) G_GNUC_CONST; -#define NM_TYPE_WIMAX_NSP_NETWORK_TYPE (nm_wimax_nsp_network_type_get_type ()) -GType nm_device_state_get_type (void) G_GNUC_CONST; -#define NM_TYPE_DEVICE_STATE (nm_device_state_get_type ()) -GType nm_device_state_reason_get_type (void) G_GNUC_CONST; -#define NM_TYPE_DEVICE_STATE_REASON (nm_device_state_reason_get_type ()) -GType nm_metered_get_type (void) G_GNUC_CONST; -#define NM_TYPE_METERED (nm_metered_get_type ()) -GType nm_active_connection_state_get_type (void) G_GNUC_CONST; -#define NM_TYPE_ACTIVE_CONNECTION_STATE (nm_active_connection_state_get_type ()) -GType nm_secret_agent_get_secrets_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SECRET_AGENT_GET_SECRETS_FLAGS (nm_secret_agent_get_secrets_flags_get_type ()) -GType nm_secret_agent_capabilities_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SECRET_AGENT_CAPABILITIES (nm_secret_agent_capabilities_get_type ()) -GType nm_ip_tunnel_mode_get_type (void) G_GNUC_CONST; -#define NM_TYPE_IP_TUNNEL_MODE (nm_ip_tunnel_mode_get_type ()) -GType nm_agent_manager_error_get_type (void) G_GNUC_CONST; -#define NM_TYPE_AGENT_MANAGER_ERROR (nm_agent_manager_error_get_type ()) -GType nm_connection_error_get_type (void) G_GNUC_CONST; -#define NM_TYPE_CONNECTION_ERROR (nm_connection_error_get_type ()) -GType nm_crypto_error_get_type (void) G_GNUC_CONST; -#define NM_TYPE_CRYPTO_ERROR (nm_crypto_error_get_type ()) -GType nm_device_error_get_type (void) G_GNUC_CONST; -#define NM_TYPE_DEVICE_ERROR (nm_device_error_get_type ()) -GType nm_manager_error_get_type (void) G_GNUC_CONST; -#define NM_TYPE_MANAGER_ERROR (nm_manager_error_get_type ()) -GType nm_secret_agent_error_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SECRET_AGENT_ERROR (nm_secret_agent_error_get_type ()) -GType nm_settings_error_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTINGS_ERROR (nm_settings_error_get_type ()) -GType nm_vpn_plugin_error_get_type (void) G_GNUC_CONST; -#define NM_TYPE_VPN_PLUGIN_ERROR (nm_vpn_plugin_error_get_type ()) -GType nm_setting_802_1x_ck_format_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_802_1X_CK_FORMAT (nm_setting_802_1x_ck_format_get_type ()) -GType nm_setting_802_1x_ck_scheme_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_802_1X_CK_SCHEME (nm_setting_802_1x_ck_scheme_get_type ()) -GType nm_setting_connection_autoconnect_slaves_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_CONNECTION_AUTOCONNECT_SLAVES (nm_setting_connection_autoconnect_slaves_get_type ()) -GType nm_setting_connection_lldp_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_CONNECTION_LLDP (nm_setting_connection_lldp_get_type ()) -GType nm_setting_dcb_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_DCB_FLAGS (nm_setting_dcb_flags_get_type ()) -GType nm_setting_ip6_config_privacy_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_IP6_CONFIG_PRIVACY (nm_setting_ip6_config_privacy_get_type ()) -GType nm_setting_ip6_config_addr_gen_mode_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_IP6_CONFIG_ADDR_GEN_MODE (nm_setting_ip6_config_addr_gen_mode_get_type ()) -GType nm_setting_macvlan_mode_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_MACVLAN_MODE (nm_setting_macvlan_mode_get_type ()) -GType nm_setting_serial_parity_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_SERIAL_PARITY (nm_setting_serial_parity_get_type ()) -GType nm_setting_tun_mode_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_TUN_MODE (nm_setting_tun_mode_get_type ()) -GType nm_vlan_priority_map_get_type (void) G_GNUC_CONST; -#define NM_TYPE_VLAN_PRIORITY_MAP (nm_vlan_priority_map_get_type ()) -GType nm_vlan_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_VLAN_FLAGS (nm_vlan_flags_get_type ()) -GType nm_setting_wired_wake_on_lan_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_WIRED_WAKE_ON_LAN (nm_setting_wired_wake_on_lan_get_type ()) -GType nm_wep_key_type_get_type (void) G_GNUC_CONST; -#define NM_TYPE_WEP_KEY_TYPE (nm_wep_key_type_get_type ()) -GType nm_setting_wireless_powersave_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_WIRELESS_POWERSAVE (nm_setting_wireless_powersave_get_type ()) -GType nm_setting_secret_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_SECRET_FLAGS (nm_setting_secret_flags_get_type ()) -GType nm_setting_compare_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_COMPARE_FLAGS (nm_setting_compare_flags_get_type ()) -GType nm_setting_mac_randomization_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_MAC_RANDOMIZATION (nm_setting_mac_randomization_get_type ()) -GType nm_setting_diff_result_get_type (void) G_GNUC_CONST; -#define NM_TYPE_SETTING_DIFF_RESULT (nm_setting_diff_result_get_type ()) -GType nm_utils_security_type_get_type (void) G_GNUC_CONST; -#define NM_TYPE_UTILS_SECURITY_TYPE (nm_utils_security_type_get_type ()) -GType nm_vpn_service_state_get_type (void) G_GNUC_CONST; -#define NM_TYPE_VPN_SERVICE_STATE (nm_vpn_service_state_get_type ()) -GType nm_vpn_connection_state_get_type (void) G_GNUC_CONST; -#define NM_TYPE_VPN_CONNECTION_STATE (nm_vpn_connection_state_get_type ()) -GType nm_vpn_connection_state_reason_get_type (void) G_GNUC_CONST; -#define NM_TYPE_VPN_CONNECTION_STATE_REASON (nm_vpn_connection_state_reason_get_type ()) -GType nm_vpn_plugin_failure_get_type (void) G_GNUC_CONST; -#define NM_TYPE_VPN_PLUGIN_FAILURE (nm_vpn_plugin_failure_get_type ()) -GType nm_vpn_editor_plugin_capability_get_type (void) G_GNUC_CONST; -#define NM_TYPE_VPN_EDITOR_PLUGIN_CAPABILITY (nm_vpn_editor_plugin_capability_get_type ()) -G_END_DECLS - -#endif /* __NM_CORE_ENUM_TYPES_H__ */ - - - diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 5d3c190a..74f45100 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -49,8 +49,10 @@ #include "nm-setting-gsm.h" #include "nm-setting-infiniband.h" #include "nm-setting-ip-tunnel.h" +#include "nm-setting-proxy.h" #include "nm-setting-ip4-config.h" #include "nm-setting-ip6-config.h" +#include "nm-setting-macsec.h" #include "nm-setting-macvlan.h" #include "nm-setting-olpc-mesh.h" #include "nm-setting-ppp.h" @@ -147,9 +149,10 @@ GPtrArray *_nm_utils_copy_array (const GPtrArray *array, GDestroyNotify free_func); GPtrArray *_nm_utils_copy_object_array (const GPtrArray *array); -gssize _nm_utils_ptrarray_find_first (gpointer *list, gssize len, gconstpointer needle); +gssize _nm_utils_ptrarray_find_first (gconstpointer *list, gssize len, gconstpointer needle); -gssize _nm_utils_ptrarray_find_binary_search (gpointer *list, gsize len, gpointer needle, GCompareDataFunc cmpfcn, gpointer user_data); +gssize _nm_utils_ptrarray_find_binary_search (gconstpointer *list, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data); +gssize _nm_utils_array_find_binary_search (gconstpointer list, gsize elem_size, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data); gssize _nm_utils_strv_find_first (char **list, gssize len, const char *needle); @@ -192,6 +195,14 @@ char *nm_utils_uuid_generate_from_string (const char *s, gssize slen, int uuid_t char *_nm_utils_uuid_generate_from_strings (const char *string1, ...) G_GNUC_NULL_TERMINATED; +char *nm_utils_uuid_generate_buf_ (char *buf); +#define nm_utils_uuid_generate_buf(buf) \ + ({ \ + G_STATIC_ASSERT (sizeof (buf) == G_N_ELEMENTS (buf) && sizeof (buf) >= 37); \ + nm_utils_uuid_generate_buf_ (buf); \ + }) +#define nm_utils_uuid_generate_a() (nm_utils_uuid_generate_buf_ (g_alloca (37))) + void _nm_dbus_errors_init (void); extern gboolean _nm_utils_is_manager_process; @@ -229,7 +240,7 @@ GVariant *_nm_dbus_proxy_call_sync (GDBusProxy *proxy, gboolean _nm_dbus_error_has_name (GError *error, const char *dbus_error_name); -/***********************************************************/ +/*****************************************************************************/ gboolean _nm_vpn_plugin_info_check_file (const char *filename, gboolean check_absolute, @@ -249,7 +260,7 @@ GSList *_nm_vpn_plugin_info_list_load_dir (const char *dirname, NMUtilsCheckFilePredicate check_file, gpointer user_data); -/***********************************************************/ +/*****************************************************************************/ typedef struct { const char *name; @@ -264,7 +275,7 @@ gboolean _nm_utils_dns_option_validate (const char *option, char **out_name, const NMUtilsDNSOptionDesc *option_descs); int _nm_utils_dns_option_find_idx (GPtrArray *array, const char *option); -/***********************************************************/ +/*****************************************************************************/ typedef struct _NMUtilsStrStrDictKey NMUtilsStrStrDictKey; guint _nm_utils_strstrdictkey_hash (gconstpointer a); @@ -274,7 +285,7 @@ NMUtilsStrStrDictKey *_nm_utils_strstrdictkey_create (const char *v1, const char #define _nm_utils_strstrdictkey_static(v1, v2) \ ( (NMUtilsStrStrDictKey *) ("\03" v1 "\0" v2 "") ) -/***********************************************************/ +/*****************************************************************************/ gboolean _nm_setting_vlan_set_priorities (NMSettingVlan *setting, NMVlanPriorityMap map, @@ -285,7 +296,7 @@ void _nm_setting_vlan_get_priorities (NMSettingVlan *setting, NMVlanQosMapping **out_qos_map, guint *out_n_qos_map); -/***********************************************************/ +/*****************************************************************************/ struct ether_addr; @@ -295,7 +306,7 @@ gboolean _nm_utils_generate_mac_address_mask_parse (const char *value, gsize *out_ouis_len, GError **error); -/***********************************************************/ +/*****************************************************************************/ typedef enum { NM_BOND_OPTION_TYPE_INT, @@ -309,7 +320,7 @@ typedef enum { NMBondOptionType _nm_setting_bond_get_option_type (NMSettingBond *setting, const char *name); -/***********************************************************/ +/*****************************************************************************/ typedef enum { NM_BOND_MODE_UNKNOWN = 0, @@ -325,13 +336,12 @@ typedef enum { NMBondMode _nm_setting_bond_mode_from_string (const char *str); gboolean _nm_setting_bond_option_supported (const char *option, NMBondMode mode); -/***********************************************************/ +/*****************************************************************************/ gboolean _nm_utils_inet6_is_token (const struct in6_addr *in6addr); -/***********************************************************/ +/*****************************************************************************/ -gboolean _nm_utils_check_valid_json (const char *json, GError **error); gboolean _nm_utils_team_config_equal (const char *conf1, const char *conf2, gboolean port); #endif diff --git a/libnm-core/nm-core-types.h b/libnm-core/nm-core-types.h index cd19923b..2948b5f5 100644 --- a/libnm-core/nm-core-types.h +++ b/libnm-core/nm-core-types.h @@ -43,8 +43,10 @@ typedef struct _NMSettingGsm NMSettingGsm; typedef struct _NMSettingInfiniband NMSettingInfiniband; typedef struct _NMSettingIPConfig NMSettingIPConfig; typedef struct _NMSettingIPTunnel NMSettingIPTunnel; +typedef struct _NMSettingProxy NMSettingProxy; typedef struct _NMSettingIP4Config NMSettingIP4Config; typedef struct _NMSettingIP6Config NMSettingIP6Config; +typedef struct _NMSettingMacsec NMSettingMacsec; typedef struct _NMSettingMacvlan NMSettingMacvlan; typedef struct _NMSettingOlpcMesh NMSettingOlpcMesh; typedef struct _NMSettingPpp NMSettingPpp; diff --git a/libnm-core/nm-dbus-interface.h b/libnm-core/nm-dbus-interface.h index e5b1b3d6..d2d54f69 100644 --- a/libnm-core/nm-dbus-interface.h +++ b/libnm-core/nm-dbus-interface.h @@ -64,6 +64,7 @@ #define NM_DBUS_INTERFACE_DEVICE_GENERIC NM_DBUS_INTERFACE_DEVICE ".Generic" #define NM_DBUS_INTERFACE_DEVICE_VETH NM_DBUS_INTERFACE_DEVICE ".Veth" #define NM_DBUS_INTERFACE_DEVICE_TUN NM_DBUS_INTERFACE_DEVICE ".Tun" +#define NM_DBUS_INTERFACE_DEVICE_MACSEC NM_DBUS_INTERFACE_DEVICE ".Macsec" #define NM_DBUS_INTERFACE_DEVICE_MACVLAN NM_DBUS_INTERFACE_DEVICE ".Macvlan" #define NM_DBUS_INTERFACE_DEVICE_VXLAN NM_DBUS_INTERFACE_DEVICE ".Vxlan" #define NM_DBUS_INTERFACE_DEVICE_GRE NM_DBUS_INTERFACE_DEVICE ".Gre" @@ -83,6 +84,25 @@ #define NM_DBUS_INTERFACE_SECRET_AGENT NM_DBUS_INTERFACE ".SecretAgent" #define NM_DBUS_PATH_SECRET_AGENT "/org/freedesktop/NetworkManager/SecretAgent" +#define NM_DBUS_INTERFACE_DNS_MANAGER "org.freedesktop.NetworkManager.DnsManager" +#define NM_DBUS_PATH_DNS_MANAGER "/org/freedesktop/NetworkManager/DnsManager" + +/** + * NMCapability: + * @NM_CAPABILITY_TEAM: Teams can be managed + * + * #NMCapability names the numbers in the Capabilities property. + * Capabilities are positive numbers. They are part of stable API + * and a certain capability number is guaranteed not to change. + * + * The range 0x7000 - 0x7FFF of capabilities is guaranteed not to be + * used by upstream NetworkManager. It could thus be used for downstream + * extensions. + */ +typedef enum { + NM_CAPABILITY_TEAM = 1, +} NMCapability; + /** * NMState: * @NM_STATE_UNKNOWN: networking state is unknown @@ -104,7 +124,7 @@ typedef enum { NM_STATE_CONNECTING = 40, NM_STATE_CONNECTED_LOCAL = 50, NM_STATE_CONNECTED_SITE = 60, - NM_STATE_CONNECTED_GLOBAL = 70 + NM_STATE_CONNECTED_GLOBAL = 70, } NMState; /** @@ -119,11 +139,11 @@ typedef enum { * appears to be able to reach the full Internet. */ typedef enum { - NM_CONNECTIVITY_UNKNOWN, - NM_CONNECTIVITY_NONE, - NM_CONNECTIVITY_PORTAL, - NM_CONNECTIVITY_LIMITED, - NM_CONNECTIVITY_FULL + NM_CONNECTIVITY_UNKNOWN = 0, + NM_CONNECTIVITY_NONE = 1, + NM_CONNECTIVITY_PORTAL = 2, + NM_CONNECTIVITY_LIMITED = 3, + NM_CONNECTIVITY_FULL = 4, } NMConnectivityState; /** @@ -150,6 +170,7 @@ typedef enum { * @NM_DEVICE_TYPE_MACVLAN: a MACVLAN interface * @NM_DEVICE_TYPE_VXLAN: a VXLAN interface * @NM_DEVICE_TYPE_VETH: a VETH interface + * @NM_DEVICE_TYPE_MACSEC: a MACsec interface * * #NMDeviceType values indicate the type of hardware represented by a * device object. @@ -176,6 +197,7 @@ typedef enum { NM_DEVICE_TYPE_MACVLAN = 18, NM_DEVICE_TYPE_VXLAN = 19, NM_DEVICE_TYPE_VETH = 20, + NM_DEVICE_TYPE_MACSEC = 21, } NMDeviceType; /** @@ -238,7 +260,7 @@ typedef enum { /*< flags >*/ **/ typedef enum { /*< underscore_name=nm_802_11_ap_flags, flags >*/ NM_802_11_AP_FLAGS_NONE = 0x00000000, - NM_802_11_AP_FLAGS_PRIVACY = 0x00000001 + NM_802_11_AP_FLAGS_PRIVACY = 0x00000001, } NM80211ApFlags; /** @@ -277,7 +299,7 @@ typedef enum { /*< underscore_name=nm_802_11_ap_security_flags, flags >*/ NM_802_11_AP_SEC_GROUP_TKIP = 0x00000040, NM_802_11_AP_SEC_GROUP_CCMP = 0x00000080, NM_802_11_AP_SEC_KEY_MGMT_PSK = 0x00000100, - NM_802_11_AP_SEC_KEY_MGMT_802_1X = 0x00000200 + NM_802_11_AP_SEC_KEY_MGMT_802_1X = 0x00000200, } NM80211ApSecurityFlags; /** @@ -297,9 +319,9 @@ typedef enum { /*< underscore_name=nm_802_11_ap_security_flags, flags >*/ **/ typedef enum { /*< underscore_name=nm_802_11_mode >*/ NM_802_11_MODE_UNKNOWN = 0, - NM_802_11_MODE_ADHOC, - NM_802_11_MODE_INFRA, - NM_802_11_MODE_AP + NM_802_11_MODE_ADHOC = 1, + NM_802_11_MODE_INFRA = 2, + NM_802_11_MODE_AP = 3, } NM80211Mode; /** @@ -354,7 +376,7 @@ typedef enum { NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN = 0, NM_WIMAX_NSP_NETWORK_TYPE_HOME = 1, NM_WIMAX_NSP_NETWORK_TYPE_PARTNER = 2, - NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER = 3 + NM_WIMAX_NSP_NETWORK_TYPE_ROAMING_PARTNER = 3, } NMWimaxNspNetworkType; /** @@ -408,7 +430,7 @@ typedef enum { NM_DEVICE_STATE_SECONDARIES = 90, NM_DEVICE_STATE_ACTIVATED = 100, NM_DEVICE_STATE_DEACTIVATING = 110, - NM_DEVICE_STATE_FAILED = 120 + NM_DEVICE_STATE_FAILED = 120, } NMDeviceState; /** @@ -480,69 +502,69 @@ typedef enum { * Device state change reason codes */ typedef enum { - NM_DEVICE_STATE_REASON_NONE = 0, - NM_DEVICE_STATE_REASON_UNKNOWN = 1, - NM_DEVICE_STATE_REASON_NOW_MANAGED = 2, - NM_DEVICE_STATE_REASON_NOW_UNMANAGED = 3, - NM_DEVICE_STATE_REASON_CONFIG_FAILED = 4, - NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE = 5, - NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED = 6, - NM_DEVICE_STATE_REASON_NO_SECRETS = 7, - NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT = 8, - NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED = 9, - NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED = 10, - NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT = 11, - NM_DEVICE_STATE_REASON_PPP_START_FAILED = 12, - NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13, - NM_DEVICE_STATE_REASON_PPP_FAILED = 14, - NM_DEVICE_STATE_REASON_DHCP_START_FAILED = 15, - NM_DEVICE_STATE_REASON_DHCP_ERROR = 16, - NM_DEVICE_STATE_REASON_DHCP_FAILED = 17, - NM_DEVICE_STATE_REASON_SHARED_START_FAILED = 18, - NM_DEVICE_STATE_REASON_SHARED_FAILED = 19, - NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED = 20, - NM_DEVICE_STATE_REASON_AUTOIP_ERROR = 21, - NM_DEVICE_STATE_REASON_AUTOIP_FAILED = 22, - NM_DEVICE_STATE_REASON_MODEM_BUSY = 23, - NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE = 24, - NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER = 25, - NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT = 26, - NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED = 27, - NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED = 28, - NM_DEVICE_STATE_REASON_GSM_APN_FAILED = 29, + NM_DEVICE_STATE_REASON_NONE = 0, + NM_DEVICE_STATE_REASON_UNKNOWN = 1, + NM_DEVICE_STATE_REASON_NOW_MANAGED = 2, + NM_DEVICE_STATE_REASON_NOW_UNMANAGED = 3, + NM_DEVICE_STATE_REASON_CONFIG_FAILED = 4, + NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE = 5, + NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED = 6, + NM_DEVICE_STATE_REASON_NO_SECRETS = 7, + NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT = 8, + NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED = 9, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED = 10, + NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT = 11, + NM_DEVICE_STATE_REASON_PPP_START_FAILED = 12, + NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13, + NM_DEVICE_STATE_REASON_PPP_FAILED = 14, + NM_DEVICE_STATE_REASON_DHCP_START_FAILED = 15, + NM_DEVICE_STATE_REASON_DHCP_ERROR = 16, + NM_DEVICE_STATE_REASON_DHCP_FAILED = 17, + NM_DEVICE_STATE_REASON_SHARED_START_FAILED = 18, + NM_DEVICE_STATE_REASON_SHARED_FAILED = 19, + NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED = 20, + NM_DEVICE_STATE_REASON_AUTOIP_ERROR = 21, + NM_DEVICE_STATE_REASON_AUTOIP_FAILED = 22, + NM_DEVICE_STATE_REASON_MODEM_BUSY = 23, + NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE = 24, + NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER = 25, + NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT = 26, + NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED = 27, + NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED = 28, + NM_DEVICE_STATE_REASON_GSM_APN_FAILED = 29, NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING = 30, - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED = 31, - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT = 32, - NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED = 33, - NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED = 34, - NM_DEVICE_STATE_REASON_FIRMWARE_MISSING = 35, - NM_DEVICE_STATE_REASON_REMOVED = 36, - NM_DEVICE_STATE_REASON_SLEEPING = 37, - NM_DEVICE_STATE_REASON_CONNECTION_REMOVED = 38, - NM_DEVICE_STATE_REASON_USER_REQUESTED = 39, - NM_DEVICE_STATE_REASON_CARRIER = 40, - NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED = 41, - NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE = 42, - NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND = 43, - NM_DEVICE_STATE_REASON_BT_FAILED = 44, - NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED = 45, - NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED = 46, - NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED = 47, - NM_DEVICE_STATE_REASON_GSM_SIM_WRONG = 48, - NM_DEVICE_STATE_REASON_INFINIBAND_MODE = 49, - NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED = 50, - NM_DEVICE_STATE_REASON_BR2684_FAILED = 51, - NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE = 52, - NM_DEVICE_STATE_REASON_SSID_NOT_FOUND = 53, - NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED = 54, - NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED = 55, - NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED = 56, - NM_DEVICE_STATE_REASON_MODEM_FAILED = 57, - NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58, - NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT = 59, - NM_DEVICE_STATE_REASON_NEW_ACTIVATION = 60, - NM_DEVICE_STATE_REASON_PARENT_CHANGED = 61, - NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED = 62, + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED = 31, + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT = 32, + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED = 33, + NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED = 34, + NM_DEVICE_STATE_REASON_FIRMWARE_MISSING = 35, + NM_DEVICE_STATE_REASON_REMOVED = 36, + NM_DEVICE_STATE_REASON_SLEEPING = 37, + NM_DEVICE_STATE_REASON_CONNECTION_REMOVED = 38, + NM_DEVICE_STATE_REASON_USER_REQUESTED = 39, + NM_DEVICE_STATE_REASON_CARRIER = 40, + NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED = 41, + NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE = 42, + NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND = 43, + NM_DEVICE_STATE_REASON_BT_FAILED = 44, + NM_DEVICE_STATE_REASON_GSM_SIM_NOT_INSERTED = 45, + NM_DEVICE_STATE_REASON_GSM_SIM_PIN_REQUIRED = 46, + NM_DEVICE_STATE_REASON_GSM_SIM_PUK_REQUIRED = 47, + NM_DEVICE_STATE_REASON_GSM_SIM_WRONG = 48, + NM_DEVICE_STATE_REASON_INFINIBAND_MODE = 49, + NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED = 50, + NM_DEVICE_STATE_REASON_BR2684_FAILED = 51, + NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE = 52, + NM_DEVICE_STATE_REASON_SSID_NOT_FOUND = 53, + NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED = 54, + NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED = 55, + NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED = 56, + NM_DEVICE_STATE_REASON_MODEM_FAILED = 57, + NM_DEVICE_STATE_REASON_MODEM_AVAILABLE = 58, + NM_DEVICE_STATE_REASON_SIM_PIN_INCORRECT = 59, + NM_DEVICE_STATE_REASON_NEW_ACTIVATION = 60, + NM_DEVICE_STATE_REASON_PARENT_CHANGED = 61, + NM_DEVICE_STATE_REASON_PARENT_MANAGED_CHANGED = 62, } NMDeviceStateReason; /** @@ -579,11 +601,11 @@ typedef enum { * network. **/ typedef enum { - NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0, - NM_ACTIVE_CONNECTION_STATE_ACTIVATING, - NM_ACTIVE_CONNECTION_STATE_ACTIVATED, - NM_ACTIVE_CONNECTION_STATE_DEACTIVATING, - NM_ACTIVE_CONNECTION_STATE_DEACTIVATED + NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0, + NM_ACTIVE_CONNECTION_STATE_ACTIVATING = 1, + NM_ACTIVE_CONNECTION_STATE_ACTIVATED = 2, + NM_ACTIVE_CONNECTION_STATE_DEACTIVATING = 3, + NM_ACTIVE_CONNECTION_STATE_DEACTIVATED = 4, } NMActiveConnectionState; /** @@ -610,14 +632,14 @@ typedef enum { * #NMSecretAgentGetSecretsFlags values modify the behavior of a GetSecrets request. */ typedef enum { /*< flags >*/ - NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE = 0x0, + NM_SECRET_AGENT_GET_SECRETS_FLAG_NONE = 0x0, NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION = 0x1, - NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW = 0x2, - NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED = 0x4, + NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW = 0x2, + NM_SECRET_AGENT_GET_SECRETS_FLAG_USER_REQUESTED = 0x4, /* Internal to NM; not part of the D-Bus API */ - NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM = 0x80000000, - NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS = 0x40000000, + NM_SECRET_AGENT_GET_SECRETS_FLAG_ONLY_SYSTEM = 0x80000000, + NM_SECRET_AGENT_GET_SECRETS_FLAG_NO_ERRORS = 0x40000000, } NMSecretAgentGetSecretsFlags; /** @@ -630,33 +652,33 @@ typedef enum { /*< flags >*/ * #NMSecretAgentCapabilities indicate various capabilities of the agent. */ typedef enum /*< flags >*/ { - NM_SECRET_AGENT_CAPABILITY_NONE = 0x0, + NM_SECRET_AGENT_CAPABILITY_NONE = 0x0, NM_SECRET_AGENT_CAPABILITY_VPN_HINTS = 0x1, /* boundary value */ - NM_SECRET_AGENT_CAPABILITY_LAST = NM_SECRET_AGENT_CAPABILITY_VPN_HINTS + NM_SECRET_AGENT_CAPABILITY_LAST = NM_SECRET_AGENT_CAPABILITY_VPN_HINTS, } NMSecretAgentCapabilities; #ifndef NM_VERSION_H #undef NM_AVAILABLE_IN_1_2 #endif -#define NM_LLDP_ATTR_DESTINATION "destination" -#define NM_LLDP_ATTR_CHASSIS_ID_TYPE "chassis-id-type" -#define NM_LLDP_ATTR_CHASSIS_ID "chassis-id" -#define NM_LLDP_ATTR_PORT_ID_TYPE "port-id-type" -#define NM_LLDP_ATTR_PORT_ID "port-id" -#define NM_LLDP_ATTR_PORT_DESCRIPTION "port-description" -#define NM_LLDP_ATTR_SYSTEM_NAME "system-name" -#define NM_LLDP_ATTR_SYSTEM_DESCRIPTION "system-description" -#define NM_LLDP_ATTR_SYSTEM_CAPABILITIES "system-capabilities" -#define NM_LLDP_ATTR_IEEE_802_1_PVID "ieee-802-1-pvid" -#define NM_LLDP_ATTR_IEEE_802_1_PPVID "ieee-802-1-ppvid" -#define NM_LLDP_ATTR_IEEE_802_1_PPVID_FLAGS "ieee-802-1-ppvid-flags" -#define NM_LLDP_ATTR_IEEE_802_1_VID "ieee-802-1-vid" -#define NM_LLDP_ATTR_IEEE_802_1_VLAN_NAME "ieee-802-1-vlan-name" - -#define NM_LLDP_DEST_NEAREST_BRIDGE "nearest-bridge" +#define NM_LLDP_ATTR_DESTINATION "destination" +#define NM_LLDP_ATTR_CHASSIS_ID_TYPE "chassis-id-type" +#define NM_LLDP_ATTR_CHASSIS_ID "chassis-id" +#define NM_LLDP_ATTR_PORT_ID_TYPE "port-id-type" +#define NM_LLDP_ATTR_PORT_ID "port-id" +#define NM_LLDP_ATTR_PORT_DESCRIPTION "port-description" +#define NM_LLDP_ATTR_SYSTEM_NAME "system-name" +#define NM_LLDP_ATTR_SYSTEM_DESCRIPTION "system-description" +#define NM_LLDP_ATTR_SYSTEM_CAPABILITIES "system-capabilities" +#define NM_LLDP_ATTR_IEEE_802_1_PVID "ieee-802-1-pvid" +#define NM_LLDP_ATTR_IEEE_802_1_PPVID "ieee-802-1-ppvid" +#define NM_LLDP_ATTR_IEEE_802_1_PPVID_FLAGS "ieee-802-1-ppvid-flags" +#define NM_LLDP_ATTR_IEEE_802_1_VID "ieee-802-1-vid" +#define NM_LLDP_ATTR_IEEE_802_1_VLAN_NAME "ieee-802-1-vlan-name" + +#define NM_LLDP_DEST_NEAREST_BRIDGE "nearest-bridge" #define NM_LLDP_DEST_NEAREST_NON_TPMR_BRIDGE "nearest-non-tpmr-bridge" #define NM_LLDP_DEST_NEAREST_CUSTOMER_BRIDGE "nearest-customer-bridge" @@ -696,14 +718,20 @@ typedef enum { * @NM_CHECKPOINT_CREATE_FLAG_NONE: no flags * @NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL: when creating * a new checkpoint, destroy all existing ones. + * @NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS: upon rollback, + * delete any new connection added after the checkpoint. + * @NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES: upon rollback, + * disconnect any new device appeared after the checkpoint. * * The flags for CheckpointCreate call * * Since: 1.4 */ typedef enum { /*< skip >*/ - NM_CHECKPOINT_CREATE_FLAG_NONE = 0, - NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL = 0x01, + NM_CHECKPOINT_CREATE_FLAG_NONE = 0, + NM_CHECKPOINT_CREATE_FLAG_DESTROY_ALL = 0x01, + NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS = 0x02, + NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES = 0x04, } NMCheckpointCreateFlags; /** diff --git a/libnm-core/nm-dbus-types.xml b/libnm-core/nm-dbus-types.xml index 1fae76f6..7c6389d4 100644 --- a/libnm-core/nm-dbus-types.xml +++ b/libnm-core/nm-dbus-types.xml @@ -13,6 +13,31 @@ <refpurpose></refpurpose> </refnamediv> + <refsect2 id="NMCapability" role="enum"> + <title>enum NMCapability</title> + <indexterm zone="NMCapability"> + <primary>NMCapability</primary> + </indexterm> + <para><para><link linkend="NMCapability">NMCapability</link> names the numbers in the Capabilities property. Capabilities are positive numbers. They are part of stable API and a certain capability number is guaranteed not to change.</para><para>The range 0x7000 - 0x7FFF of capabilities is guaranteed not to be used by upstream NetworkManager. It could thus be used for downstream extensions.</para><para></para></para> + <refsect3 role="enum_members"> + <title>Values</title> + <informaltable role="enum_members_table" pgwide="1" frame="none"> + <tgroup cols="4"> + <colspec colname="enum_members_name" colwidth="300px" /> + <colspec colname="enum_members_value" colwidth="100px"/> + <colspec colname="enum_members_description" /> + <tbody> + <row role="constant"> + <entry role="enum_member_name"><para>NM_CAPABILITY_TEAM</para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>1</literal></para><para></para></entry> + <entry role="enum_member_description"><para>Teams can be managed</para><para></para></entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect3> + </refsect2> + <refsect2 id="NMState" role="enum"> <title>enum NMState</title> <indexterm zone="NMState"> @@ -89,27 +114,27 @@ <tbody> <row role="constant"> <entry role="enum_member_name"><para>NM_CONNECTIVITY_UNKNOWN</para><para></para></entry> - <entry role="enum_member_value"><para>= <literal>1</literal></para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>0</literal></para><para></para></entry> <entry role="enum_member_description"><para>Network connectivity is unknown.</para><para></para></entry> </row> <row role="constant"> <entry role="enum_member_name"><para>NM_CONNECTIVITY_NONE</para><para></para></entry> - <entry role="enum_member_value"><para>= <literal>2</literal></para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>1</literal></para><para></para></entry> <entry role="enum_member_description"><para>The host is not connected to any network.</para><para></para></entry> </row> <row role="constant"> <entry role="enum_member_name"><para>NM_CONNECTIVITY_PORTAL</para><para></para></entry> - <entry role="enum_member_value"><para>= <literal>3</literal></para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>2</literal></para><para></para></entry> <entry role="enum_member_description"><para>The host is behind a captive portal and cannot reach the full Internet.</para><para></para></entry> </row> <row role="constant"> <entry role="enum_member_name"><para>NM_CONNECTIVITY_LIMITED</para><para></para></entry> - <entry role="enum_member_value"><para>= <literal>4</literal></para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>3</literal></para><para></para></entry> <entry role="enum_member_description"><para>The host is connected to a network, but does not appear to be able to reach the full Internet.</para><para></para></entry> </row> <row role="constant"> <entry role="enum_member_name"><para>NM_CONNECTIVITY_FULL</para><para></para></entry> - <entry role="enum_member_value"><para>= <literal>5</literal></para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>4</literal></para><para></para></entry> <entry role="enum_member_description"><para>The host is connected to a network, and appears to be able to reach the full Internet.</para><para></para></entry> </row> </tbody> @@ -237,6 +262,11 @@ <entry role="enum_member_value"><para>= <literal>20</literal></para><para></para></entry> <entry role="enum_member_description"><para>a VETH interface</para><para></para></entry> </row> + <row role="constant"> + <entry role="enum_member_name"><para>NM_DEVICE_TYPE_MACSEC</para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>21</literal></para><para></para></entry> + <entry role="enum_member_description"><para>a MACsec interface</para><para></para></entry> + </row> </tbody> </tgroup> </informaltable> @@ -1312,6 +1342,16 @@ <entry role="enum_member_value"><para>= <literal>0x01</literal></para><para></para></entry> <entry role="enum_member_description"><para>when creating a new checkpoint, destroy all existing ones.</para><para></para></entry> </row> + <row role="constant"> + <entry role="enum_member_name"><para>NM_CHECKPOINT_CREATE_FLAG_DELETE_NEW_CONNECTIONS</para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>0x02</literal></para><para></para></entry> + <entry role="enum_member_description"><para>upon rollback, delete any new connection added after the checkpoint.</para><para></para></entry> + </row> + <row role="constant"> + <entry role="enum_member_name"><para>NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES</para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>0x04</literal></para><para></para></entry> + <entry role="enum_member_description"><para>upon rollback, disconnect any new device appeared after the checkpoint.</para><para></para></entry> + </row> </tbody> </tgroup> </informaltable> diff --git a/libnm-core/nm-errors.h b/libnm-core/nm-errors.h index 2a572f4e..35f7dc2f 100644 --- a/libnm-core/nm-errors.h +++ b/libnm-core/nm-errors.h @@ -186,6 +186,8 @@ GQuark nm_device_error_quark (void); * @NM_MANAGER_ERROR_UNKNOWN_LOG_LEVEL: Unknown log level in SetLogging * @NM_MANAGER_ERROR_UNKNOWN_LOG_DOMAIN: Unknown log domain in SetLogging * @NM_MANAGER_ERROR_INVALID_ARGUMENTS: Invalid arguments for D-Bus request + * @NM_MANAGER_ERROR_MISSING_PLUGIN: A plug-in was needed to complete the + * activation but is not available. * * Errors related to the main "network management" interface of NetworkManager. * These may be returned from #NMClient methods that invoke D-Bus operations on @@ -206,6 +208,7 @@ typedef enum { NM_MANAGER_ERROR_UNKNOWN_LOG_LEVEL, /*< nick=UnknownLogLevel >*/ NM_MANAGER_ERROR_UNKNOWN_LOG_DOMAIN, /*< nick=UnknownLogDomain >*/ NM_MANAGER_ERROR_INVALID_ARGUMENTS, /*< nick=InvalidArguments >*/ + NM_MANAGER_ERROR_MISSING_PLUGIN, /*< nick=MissingPlugin >*/ } NMManagerError; GQuark nm_manager_error_quark (void); diff --git a/libnm-core/nm-keyfile-internal.h b/libnm-core/nm-keyfile-internal.h index 41bec0cf..30c6c200 100644 --- a/libnm-core/nm-keyfile-internal.h +++ b/libnm-core/nm-keyfile-internal.h @@ -27,10 +27,11 @@ #include "nm-connection.h" #include "nm-setting-8021x.h" -/*********************************************************/ +/*****************************************************************************/ -#define NM_KEYFILE_CERT_SCHEME_PREFIX_BLOB "data:;base64," #define NM_KEYFILE_CERT_SCHEME_PREFIX_PATH "file://" +#define NM_KEYFILE_CERT_SCHEME_PREFIX_PKCS11 "pkcs11:" +#define NM_KEYFILE_CERT_SCHEME_PREFIX_BLOB "data:;base64," char *nm_keyfile_detect_unqualified_path_scheme (const char *base_dir, gconstpointer pdata, @@ -94,7 +95,7 @@ NMConnection *nm_keyfile_read (GKeyFile *keyfile, void *user_data, GError **error); -/*********************************************************/ +/*****************************************************************************/ typedef enum { NM_KEYFILE_WRITE_TYPE_CERT = 1, @@ -147,6 +148,7 @@ typedef struct { NMSetting8021xCKFormat (*format_func) (NMSetting8021x *setting); const char * (*path_func) (NMSetting8021x *setting); GBytes * (*blob_func) (NMSetting8021x *setting); + const char * (*uri_func) (NMSetting8021x *setting); } NMKeyfileWriteTypeDataCert; @@ -155,7 +157,7 @@ GKeyFile *nm_keyfile_write (NMConnection *connection, void *user_data, GError **error); -/*********************************************************/ +/*****************************************************************************/ char *nm_keyfile_plugin_kf_get_string (GKeyFile *kf, const char *group, const char *key, GError **error); void nm_keyfile_plugin_kf_set_string (GKeyFile *kf, const char *group, const char *key, const char *value); diff --git a/libnm-core/nm-keyfile-reader.c b/libnm-core/nm-keyfile-reader.c index 16f0c225..c071264d 100644 --- a/libnm-core/nm-keyfile-reader.c +++ b/libnm-core/nm-keyfile-reader.c @@ -108,19 +108,24 @@ read_array_of_uint (GKeyFile *file, NMSetting *setting, const char *key) { - GArray *array = NULL; + gs_unref_array GArray *array = NULL; gsize length; - int i; - gint *tmp; + gsize i; + gs_free int *tmp = NULL; tmp = nm_keyfile_plugin_kf_get_integer_list (file, nm_setting_get_name (setting), key, &length, NULL); - array = g_array_sized_new (FALSE, FALSE, sizeof (guint32), length); + if (length > G_MAXUINT) + return; - for (i = 0; i < length; i++) + array = g_array_sized_new (FALSE, FALSE, sizeof (guint), length); + + for (i = 0; i < length; i++) { + if (tmp[i] < 0) + return; g_array_append_val (array, tmp[i]); + } g_object_set (setting, key, array, NULL); - g_array_unref (array); } static gboolean @@ -706,19 +711,18 @@ read_hash_of_string (GKeyFile *file, NMSetting *setting, const char *key) g_strfreev (keys); } -static void +static gsize unescape_semicolons (char *str) { - int i; - gsize len = strlen (str); + gsize i, j; - for (i = 0; i < len; i++) { - if (str[i] == '\\' && str[i+1] == ';') { - memmove(str + i, str + i + 1, len - (i + 1)); - len--; - } - str[len] = '\0'; + for (i = 0, j = 0; str[i]; ) { + if (str[i] == '\\' && str[i+1] == ';') + i++; + str[j++] = str[i++];; } + str[j] = '\0'; + return j; } static GBytes * @@ -728,77 +732,121 @@ get_bytes (KeyfileReaderInfo *info, gboolean zero_terminate, gboolean unescape_semicolon) { - GByteArray *array = NULL; - char *tmp_string; - gint *tmp_list; + gs_free char *tmp_string = NULL; + gboolean may_be_int_list = TRUE; gsize length; - int i; - - if (!nm_keyfile_plugin_kf_has_key (info->keyfile, setting_name, key, NULL)) - return NULL; /* New format: just a string * Old format: integer list; e.g. 11;25;38; */ tmp_string = nm_keyfile_plugin_kf_get_string (info->keyfile, setting_name, key, NULL); - if (tmp_string) { - GRegex *regex; - GMatchInfo *match_info; - const char *pattern = "^[[:space:]]*[[:digit:]]{1,3}[[:space:]]*;([[:space:]]*[[:digit:]]{1,3}[[:space:]]*;)*([[:space:]]*)?$"; - - regex = g_regex_new (pattern, 0, 0, NULL); - g_regex_match (regex, tmp_string, 0, &match_info); - if (!g_match_info_matches (match_info)) { - /* Handle as a simple string (ie, new format) */ - if (unescape_semicolon) - unescape_semicolons (tmp_string); - length = strlen (tmp_string); - if (zero_terminate) - length++; - array = g_byte_array_sized_new (length); - g_byte_array_append (array, (guint8 *) tmp_string, length); - } - g_match_info_free (match_info); - g_regex_unref (regex); - g_free (tmp_string); + if (!tmp_string) + return NULL; + + /* if the string is empty, we return an empty GBytes array. + * Note that for NM_SETTING_802_1X_PASSWORD_RAW both %NULL and + * an empty GBytes are valid, and shall be destinguished. */ + if (!tmp_string[0]) { + /* note that even if @zero_terminate is TRUE, we return an empty + * byte-array. The reason is that zero_terminate is there to terminate + * *valid* strings. It's not there to terminated invalid (empty) strings. + */ + return g_bytes_new_take (tmp_string, 0); } - if (!array) { - gboolean already_warned = FALSE; + for (length = 0; tmp_string[length]; length++) { + const char ch = tmp_string[length]; - /* Old format; list of ints */ - tmp_list = nm_keyfile_plugin_kf_get_integer_list (info->keyfile, setting_name, key, &length, NULL); - if (!tmp_list) { - handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN, - _("ignoring invalid binary property")); - return NULL; + if ( !g_ascii_isspace (ch) + && !g_ascii_isdigit (ch) + && ch != ';') { + may_be_int_list = FALSE; + length += strlen (&tmp_string[length]); + break; } - array = g_byte_array_sized_new (length); - for (i = 0; i < length; i++) { - int val = tmp_list[i]; - unsigned char v = (unsigned char) (val & 0xFF); + } - if (val < 0 || val > 255) { - if ( !already_warned - && !handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN, - _("ignoring invalid byte element '%d' (not between 0 and 255 inclusive)"), - val)) { - g_free (tmp_list); - g_byte_array_free (array, TRUE); - return NULL; + /* Try to parse the string as a integer list. */ + if (may_be_int_list && length > 0) { + gs_free guint8 *bin_data = NULL; + const char *const s = tmp_string; + gsize i, d; + const gsize BIN_DATA_LEN = (length / 2 + 3); + + bin_data = g_malloc (BIN_DATA_LEN); + +#define DIGIT(c) ((c) - '0') + i = 0; + d = 0; + while (TRUE) { + int n; + + /* leading whitespace */ + while (g_ascii_isspace (s[i])) + i++; + if (s[i] == '\0') + break; + /* then expect 1 to 3 digits */ + if (!g_ascii_isdigit (s[i])) { + d = 0; + break; + } + n = DIGIT (s[i]); + i++; + if (g_ascii_isdigit (s[i])) { + n = 10 * n + DIGIT (s[i]); + i++; + if (g_ascii_isdigit (s[i])) { + n = 10 * n + DIGIT (s[i]); + i++; } - already_warned = TRUE; - } else - g_byte_array_append (array, (const unsigned char *) &v, sizeof (v)); + } + if (n > 255) { + d = 0; + break; + } + + bin_data[d++] = n; + nm_assert (d < BIN_DATA_LEN); + + /* allow whitespace after the digit. */ + while (g_ascii_isspace (s[i])) + i++; + /* need a semicolon as separator. */ + if (s[i] != ';') { + d = 0; + break; + } + i++; + } +#undef DIGIT + + /* Old format; list of ints. We already did a strict validation of the + * string format before. We expect that this conversion cannot fail. */ + if (d > 0) { + /* note that @zero_terminate does not add a terminating '\0' to + * binary data as an integer list. + * + * But we add a '\0' to the bin_data pointer, just to avoid somebody + * (erronously!) reading the binary data as C-string. + * + * @d itself does not entail the '\0'. */ + nm_assert (d + 1 <= BIN_DATA_LEN); + bin_data = g_realloc (bin_data, d + 1); + bin_data[d] = '\0'; + return g_bytes_new_take (g_steal_pointer (&bin_data), d); } - g_free (tmp_list); } - if (array->len == 0) { - g_byte_array_free (array, TRUE); + /* Handle as a simple string (ie, new format) */ + if (unescape_semicolon) + length = unescape_semicolons (tmp_string); + if (zero_terminate) + length++; + if (length == 0) return NULL; - } else - return g_byte_array_free_to_bytes (array); + tmp_string = g_realloc (tmp_string, length + (zero_terminate ? 0 : 1)); + return g_bytes_new_take (g_steal_pointer (&tmp_string), length); } static void @@ -913,6 +961,16 @@ handle_as_scheme (KeyfileReaderInfo *info, GBytes *bytes, NMSetting *setting, co } return TRUE; } + if ( data_len >= NM_STRLEN (NM_KEYFILE_CERT_SCHEME_PREFIX_PKCS11) + && g_str_has_prefix (data, NM_KEYFILE_CERT_SCHEME_PREFIX_PKCS11)) { + if (nm_setting_802_1x_check_cert_scheme (data, data_len + 1, NULL) == NM_SETTING_802_1X_CK_SCHEME_PKCS11) { + g_object_set (setting, key, bytes, NULL); + } else { + handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN, + _("invalid PKCS#11 URI \"%s\""), data); + } + return TRUE; + } if ( data_len > NM_STRLEN (NM_KEYFILE_CERT_SCHEME_PREFIX_BLOB) && g_str_has_prefix (data, NM_KEYFILE_CERT_SCHEME_PREFIX_BLOB)) { const char *cdata = data + NM_STRLEN (NM_KEYFILE_CERT_SCHEME_PREFIX_BLOB); @@ -1175,7 +1233,7 @@ team_config_parser (KeyfileReaderInfo *info, NMSetting *setting, const char *key gs_free_error GError *error = NULL; conf = nm_keyfile_plugin_kf_get_string (info->keyfile, setting_name, key, NULL); - if (conf && conf[0] && !_nm_utils_check_valid_json (conf, &error)) { + if (conf && conf[0] && !nm_utils_is_json_object (conf, &error)) { handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN, _("ignoring invalid team configuration: %s"), error->message); @@ -1318,11 +1376,6 @@ static void set_default_for_missing_key (NMSetting *setting, const char *property) { /* Set a value different from the default value of the property's spec */ - - if (NM_IS_SETTING_WIRELESS (setting)) { - if (!strcmp (property, NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION)) - g_object_set (setting, property, (NMSettingMacRandomization) NM_SETTING_MAC_RANDOMIZATION_NEVER, NULL); - } } static void diff --git a/libnm-core/nm-keyfile-utils.c b/libnm-core/nm-keyfile-utils.c index bdd18bab..13cf6161 100644 --- a/libnm-core/nm-keyfile-utils.c +++ b/libnm-core/nm-keyfile-utils.c @@ -68,7 +68,7 @@ nm_keyfile_plugin_get_setting_name_for_alias (const char *alias) return NULL; } -/**********************************************************************/ +/*****************************************************************************/ /* List helpers */ #define DEFINE_KF_LIST_WRAPPER(stype, get_ctype, set_ctype) \ @@ -112,6 +112,30 @@ nm_keyfile_plugin_kf_set_##stype##_list (GKeyFile *kf, \ DEFINE_KF_LIST_WRAPPER(integer, gint*, gint); DEFINE_KF_LIST_WRAPPER(string, gchar **, const gchar* const); +void +nm_keyfile_plugin_kf_set_integer_list_uint8 (GKeyFile *kf, + const char *group, + const char *key, + const guint8 *data, + gsize length) +{ + gsize i; + gsize l = length * 4 + 2; + gs_free char *value = g_malloc (l); + char *s = value; + + g_return_if_fail (kf); + g_return_if_fail (!length || data); + g_return_if_fail (group && group[0]); + g_return_if_fail (key && key[0]); + + value[0] = '\0'; + for (i = 0; i < length; i++) + nm_utils_strbuf_append (&s, &l, "%d;", (int) data[i]); + nm_assert (l > 0); + nm_keyfile_plugin_kf_set_value (kf, group, key, value); +} + /* Single value helpers */ #define DEFINE_KF_WRAPPER(stype, get_ctype, set_ctype) \ get_ctype \ @@ -202,7 +226,7 @@ nm_keyfile_plugin_kf_has_key (GKeyFile *kf, return has; } -/************************************************************************/ +/*****************************************************************************/ void _nm_keyfile_copy (GKeyFile *dst, GKeyFile *src) @@ -232,7 +256,7 @@ _nm_keyfile_copy (GKeyFile *dst, GKeyFile *src) } } -/************************************************************************/ +/*****************************************************************************/ gboolean _nm_keyfile_a_contains_all_in_b (GKeyFile *kf_a, GKeyFile *kf_b) diff --git a/libnm-core/nm-keyfile-utils.h b/libnm-core/nm-keyfile-utils.h index faa027db..89fd3041 100644 --- a/libnm-core/nm-keyfile-utils.h +++ b/libnm-core/nm-keyfile-utils.h @@ -29,7 +29,7 @@ const char *nm_keyfile_plugin_get_alias_for_setting_name (const char *setting_na const char *nm_keyfile_plugin_get_setting_name_for_alias (const char *alias); -/*********************************************************/ +/*****************************************************************************/ /* List helpers */ #define DEFINE_KF_LIST_WRAPPER_PROTO(stype, get_ctype, set_ctype) \ @@ -47,6 +47,12 @@ void nm_keyfile_plugin_kf_set_##stype##_list (GKeyFile *kf, \ DEFINE_KF_LIST_WRAPPER_PROTO(integer, gint*, gint) DEFINE_KF_LIST_WRAPPER_PROTO(string, gchar**, const gchar* const) +void nm_keyfile_plugin_kf_set_integer_list_uint8 (GKeyFile *kf, + const char *group, + const char *key, + const guint8 *list, + gsize length); + /* Single-value helpers */ #define DEFINE_KF_WRAPPER_PROTO(stype, get_ctype, set_ctype) \ get_ctype nm_keyfile_plugin_kf_get_##stype (GKeyFile *kf, \ diff --git a/libnm-core/nm-keyfile-writer.c b/libnm-core/nm-keyfile-writer.c index e0e6ba4b..3a7007d9 100644 --- a/libnm-core/nm-keyfile-writer.c +++ b/libnm-core/nm-keyfile-writer.c @@ -73,19 +73,25 @@ write_array_of_uint (GKeyFile *file, const GValue *value) { GArray *array; - int i; - int *tmp_array; + guint i; + gs_free int *tmp_array = NULL; array = (GArray *) g_value_get_boxed (value); if (!array || !array->len) return; + g_return_if_fail (g_array_get_element_size (array) == sizeof (guint)); + tmp_array = g_new (gint, array->len); - for (i = 0; i < array->len; i++) - tmp_array[i] = g_array_index (array, int, i); + for (i = 0; i < array->len; i++) { + guint v = g_array_index (array, guint, i); + + if (v > G_MAXINT) + g_return_if_reached (); + tmp_array[i] = (int) v; + } nm_keyfile_plugin_kf_set_integer_list (file, nm_setting_get_name (setting), key, tmp_array, array->len); - g_free (tmp_array); } static void @@ -294,9 +300,8 @@ ssid_writer (KeyfileWriterInfo *info, gsize ssid_len; const char *setting_name = nm_setting_get_name (setting); gboolean new_format = TRUE; - unsigned int semicolons = 0; - int i, *tmp_array; - char *ssid; + gsize semicolons = 0; + gsize i; g_return_if_fail (G_VALUE_HOLDS (value, G_TYPE_BYTES)); @@ -304,14 +309,17 @@ ssid_writer (KeyfileWriterInfo *info, if (!bytes) return; ssid_data = g_bytes_get_data (bytes, &ssid_len); - if (ssid_len == 0) + if (!ssid_data || !ssid_len) { + nm_keyfile_plugin_kf_set_string (info->keyfile, setting_name, key, ""); return; + } /* Check whether each byte is printable. If not, we have to use an * integer list, otherwise we can just use a string. */ for (i = 0; i < ssid_len; i++) { - char c = ssid_data[i] & 0xFF; + const char c = ssid_data[i]; + if (!g_ascii_isprint (c)) { new_format = FALSE; break; @@ -321,28 +329,26 @@ ssid_writer (KeyfileWriterInfo *info, } if (new_format) { - ssid = g_malloc0 (ssid_len + semicolons + 1); + gs_free char *ssid = NULL; + if (semicolons == 0) - memcpy (ssid, ssid_data, ssid_len); + ssid = g_strndup ((char *) ssid_data, ssid_len); else { /* Escape semicolons with backslashes to make strings * containing ';', such as '16;17;' unambiguous */ - int j = 0; + gsize j = 0; + + ssid = g_malloc (ssid_len + semicolons + 1); for (i = 0; i < ssid_len; i++) { if (ssid_data[i] == ';') ssid[j++] = '\\'; ssid[j++] = ssid_data[i]; } + ssid[j] = '\0'; } nm_keyfile_plugin_kf_set_string (info->keyfile, setting_name, key, ssid); - g_free (ssid); - } else { - tmp_array = g_new (gint, ssid_len); - for (i = 0; i < ssid_len; i++) - tmp_array[i] = (int) ssid_data[i]; - nm_keyfile_plugin_kf_set_integer_list (info->keyfile, setting_name, key, tmp_array, ssid_len); - g_free (tmp_array); - } + } else + nm_keyfile_plugin_kf_set_integer_list_uint8 (info->keyfile, setting_name, key, ssid_data, ssid_len); } static void @@ -353,9 +359,8 @@ password_raw_writer (KeyfileWriterInfo *info, { const char *setting_name = nm_setting_get_name (setting); GBytes *array; - int *tmp_array; - gsize i, len; - const char *data; + gsize len; + const guint8 *data; g_return_if_fail (G_VALUE_HOLDS (value, G_TYPE_BYTES)); @@ -363,14 +368,9 @@ password_raw_writer (KeyfileWriterInfo *info, if (!array) return; data = g_bytes_get_data (array, &len); - if (!data || !len) - return; - - tmp_array = g_new (gint, len); - for (i = 0; i < len; i++) - tmp_array[i] = (int) data[i]; - nm_keyfile_plugin_kf_set_integer_list (info->keyfile, setting_name, key, tmp_array, len); - g_free (tmp_array); + if (!data) + len = 0; + nm_keyfile_plugin_kf_set_integer_list_uint8 (info->keyfile, setting_name, key, data, len); } typedef struct ObjectType { @@ -380,6 +380,7 @@ typedef struct ObjectType { NMSetting8021xCKFormat (*format_func) (NMSetting8021x *setting); const char * (*path_func) (NMSetting8021x *setting); GBytes * (*blob_func) (NMSetting8021x *setting); + const char * (*uri_func) (NMSetting8021x *setting); } ObjectType; static const ObjectType objtypes[10] = { @@ -388,47 +389,53 @@ static const ObjectType objtypes[10] = { nm_setting_802_1x_get_ca_cert_scheme, NULL, nm_setting_802_1x_get_ca_cert_path, - nm_setting_802_1x_get_ca_cert_blob }, + nm_setting_802_1x_get_ca_cert_blob, + nm_setting_802_1x_get_ca_cert_uri }, { NM_SETTING_802_1X_PHASE2_CA_CERT, "inner-ca-cert", nm_setting_802_1x_get_phase2_ca_cert_scheme, NULL, nm_setting_802_1x_get_phase2_ca_cert_path, - nm_setting_802_1x_get_phase2_ca_cert_blob }, + nm_setting_802_1x_get_phase2_ca_cert_blob, + nm_setting_802_1x_get_phase2_ca_cert_uri }, { NM_SETTING_802_1X_CLIENT_CERT, "client-cert", nm_setting_802_1x_get_client_cert_scheme, NULL, nm_setting_802_1x_get_client_cert_path, - nm_setting_802_1x_get_client_cert_blob }, + nm_setting_802_1x_get_client_cert_blob, + nm_setting_802_1x_get_client_cert_uri }, { NM_SETTING_802_1X_PHASE2_CLIENT_CERT, "inner-client-cert", nm_setting_802_1x_get_phase2_client_cert_scheme, NULL, nm_setting_802_1x_get_phase2_client_cert_path, - nm_setting_802_1x_get_phase2_client_cert_blob }, + nm_setting_802_1x_get_phase2_client_cert_blob, + nm_setting_802_1x_get_phase2_client_cert_uri }, { NM_SETTING_802_1X_PRIVATE_KEY, "private-key", nm_setting_802_1x_get_private_key_scheme, nm_setting_802_1x_get_private_key_format, nm_setting_802_1x_get_private_key_path, - nm_setting_802_1x_get_private_key_blob }, + nm_setting_802_1x_get_private_key_blob, + nm_setting_802_1x_get_private_key_uri }, { NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, "inner-private-key", nm_setting_802_1x_get_phase2_private_key_scheme, nm_setting_802_1x_get_phase2_private_key_format, nm_setting_802_1x_get_phase2_private_key_path, - nm_setting_802_1x_get_phase2_private_key_blob }, + nm_setting_802_1x_get_phase2_private_key_blob, + nm_setting_802_1x_get_phase2_private_key_uri }, { NULL }, }; -/**************************************************************************/ +/*****************************************************************************/ static void cert_writer_default (NMConnection *connection, @@ -487,6 +494,9 @@ cert_writer_default (NMConnection *connection, nm_keyfile_plugin_kf_set_string (file, setting_name, cert_data->property_name, val); g_free (val); g_free (blob_base64); + } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) { + nm_keyfile_plugin_kf_set_string (file, setting_name, cert_data->property_name, + cert_data->uri_func (cert_data->setting)); } else { /* scheme_func() returns UNKNOWN in all other cases. The only valid case * where a scheme is allowed to be UNKNOWN, is unsetting the value. In this @@ -524,6 +534,7 @@ cert_writer (KeyfileWriterInfo *info, type_data.format_func = objtype->format_func; type_data.path_func = objtype->path_func; type_data.blob_func = objtype->blob_func; + type_data.uri_func = objtype->uri_func; if (info->handler) { if (info->handler (info->connection, @@ -540,7 +551,7 @@ cert_writer (KeyfileWriterInfo *info, cert_writer_default (info->connection, info->keyfile, &type_data); } -/**************************************************************************/ +/*****************************************************************************/ typedef struct { const char *setting_name; @@ -627,9 +638,6 @@ can_omit_default_value (NMSetting *setting, const char *property) } else if (NM_IS_SETTING_IP6_CONFIG (setting)) { if (!strcmp (property, NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE)) return FALSE; - } else if (NM_IS_SETTING_WIRELESS (setting)) { - if (!strcmp (property, NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION)) - return FALSE; } return TRUE; @@ -729,17 +737,8 @@ write_setting_value (NMSetting *setting, bytes = g_value_get_boxed (value); data = bytes ? g_bytes_get_data (bytes, &len) : NULL; - if (data != NULL && len > 0) { - int *tmp_array; - int i; - - tmp_array = g_new (gint, len); - for (i = 0; i < len; i++) - tmp_array[i] = (int) data[i]; - - nm_keyfile_plugin_kf_set_integer_list (info->keyfile, setting_name, key, tmp_array, len); - g_free (tmp_array); - } + if (data != NULL && len > 0) + nm_keyfile_plugin_kf_set_integer_list_uint8 (info->keyfile, setting_name, key, data, len); } else if (type == G_TYPE_STRV) { char **array; diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c index 12dc5a62..97296650 100644 --- a/libnm-core/nm-setting-8021x.c +++ b/libnm-core/nm-setting-8021x.c @@ -438,6 +438,8 @@ NMSetting8021xCKScheme nm_setting_802_1x_check_cert_scheme (gconstpointer pdata, gsize length, GError **error) { const char *data = pdata; + NMSetting8021xCKScheme scheme; + gsize prefix_length; g_return_val_if_fail (!length || data, NM_SETTING_802_1X_CK_SCHEME_UNKNOWN); @@ -449,10 +451,21 @@ nm_setting_802_1x_check_cert_scheme (gconstpointer pdata, gsize length, GError * return NM_SETTING_802_1X_CK_SCHEME_UNKNOWN; } - /* interpret the blob as PATH if it starts with "file://". */ if ( length >= NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH) && !memcmp (data, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH))) { - /* But it must also be NUL terminated, contain at least + scheme = NM_SETTING_802_1X_CK_SCHEME_PATH; + prefix_length = NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); + } else if ( length >= NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11) + && !memcmp (data, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11))) { + scheme = NM_SETTING_802_1X_CK_SCHEME_PKCS11; + prefix_length = NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11); + } else { + scheme = NM_SETTING_802_1X_CK_SCHEME_BLOB; + prefix_length = 0; + } + + if (scheme != NM_SETTING_802_1X_CK_SCHEME_BLOB) { + /* An actual URI must be NUL terminated, contain at least * one non-NUL character, and contain only one trailing NUL * chracter. * And ensure it's UTF-8 valid too so we can pass it through @@ -462,31 +475,29 @@ nm_setting_802_1x_check_cert_scheme (gconstpointer pdata, gsize length, GError * g_set_error_literal (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("file:// URI not NUL terminated")); + _("URI not NUL terminated")); return NM_SETTING_802_1X_CK_SCHEME_UNKNOWN; } length--; - if (length <= NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) { + if (length <= prefix_length) { g_set_error_literal (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("file:// URI is empty")); + _("URI is empty")); return NM_SETTING_802_1X_CK_SCHEME_UNKNOWN; } - if (!g_utf8_validate (data + NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH), length - NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH), NULL)) { + if (!g_utf8_validate (data + prefix_length, length - prefix_length, NULL)) { g_set_error_literal (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("file:// URI is not valid UTF-8")); + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("URI is not valid UTF-8")); return NM_SETTING_802_1X_CK_SCHEME_UNKNOWN; } - - return NM_SETTING_802_1X_CK_SCHEME_PATH; } - return NM_SETTING_802_1X_CK_SCHEME_BLOB; + return scheme; } static GByteArray * @@ -524,7 +535,8 @@ load_and_verify_certificate (const char *cert_path, * * Returns the scheme used to store the CA certificate. If the returned scheme * is %NM_SETTING_802_1X_CK_SCHEME_BLOB, use nm_setting_802_1x_get_ca_cert_blob(); - * if %NM_SETTING_802_1X_CK_SCHEME_PATH, use nm_setting_802_1x_get_ca_cert_path(). + * if %NM_SETTING_802_1X_CK_SCHEME_PATH, use nm_setting_802_1x_get_ca_cert_path(); + * if %NM_SETTING_802_1X_CK_SCHEME_PKCS11, use nm_setting_802_1x_get_ca_cert_uri(). * * Returns: scheme used to store the CA certificate (blob or path) **/ @@ -590,6 +602,37 @@ nm_setting_802_1x_get_ca_cert_path (NMSetting8021x *setting) return (const char *)data + strlen (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); } +/** + * nm_setting_802_1x_get_ca_cert_uri: + * @setting: the #NMSetting8021x + * + * Returns the CA certificate URI analogously to + * nm_setting_802_1x_get_ca_cert_blob() and + * nm_setting_802_1x_get_ca_cert_path(). + * + * Currently it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * 7512), but may be extended to other schemes in future (such as 'file' URIs + * for local files and 'data' URIs for inline certificate data). + * + * Returns: the URI string + * + * Since: 1.6 + **/ +const char * +nm_setting_802_1x_get_ca_cert_uri (NMSetting8021x *setting) +{ + NMSetting8021xCKScheme scheme; + gconstpointer data; + + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL); + + scheme = nm_setting_802_1x_get_ca_cert_scheme (setting); + g_return_val_if_fail (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, NULL); + + data = g_bytes_get_data (NM_SETTING_802_1X_GET_PRIVATE (setting)->ca_cert, NULL); + return (const char *)data; +} + static GBytes * path_to_scheme_value (const char *path) { @@ -612,7 +655,7 @@ path_to_scheme_value (const char *path) /** * nm_setting_802_1x_set_ca_cert: * @setting: the #NMSetting8021x - * @cert_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH + * @value: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH * or %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the CA certificate * file (PEM or DER format). The path must be UTF-8 encoded; use * g_filename_to_utf8() to convert if needed. Passing %NULL with any @scheme @@ -630,7 +673,7 @@ path_to_scheme_value (const char *path) **/ gboolean nm_setting_802_1x_set_ca_cert (NMSetting8021x *setting, - const char *cert_path, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, GError **error) @@ -641,10 +684,11 @@ nm_setting_802_1x_set_ca_cert (NMSetting8021x *setting, g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), FALSE); - if (cert_path) { - g_return_val_if_fail (g_utf8_validate (cert_path, -1, NULL), FALSE); + if (value) { + g_return_val_if_fail (g_utf8_validate (value, -1, NULL), FALSE); g_return_val_if_fail ( scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB - || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH, + || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH + || scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, FALSE); } @@ -655,12 +699,18 @@ nm_setting_802_1x_set_ca_cert (NMSetting8021x *setting, g_clear_pointer (&priv->ca_cert, g_bytes_unref); - if (!cert_path) { + if (!value) { + g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_CA_CERT); + return TRUE; + } + + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) { + priv->ca_cert = g_bytes_new (value, strlen (value) + 1); g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_CA_CERT); return TRUE; } - data = load_and_verify_certificate (cert_path, scheme, &format, error); + data = load_and_verify_certificate (value, scheme, &format, error); if (data) { /* wpa_supplicant can only use raw x509 CA certs */ if (format == NM_CRYPTO_FILE_FORMAT_X509) { @@ -671,7 +721,7 @@ nm_setting_802_1x_set_ca_cert (NMSetting8021x *setting, priv->ca_cert = g_byte_array_free_to_bytes (data); data = NULL; } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) - priv->ca_cert = path_to_scheme_value (cert_path); + priv->ca_cert = path_to_scheme_value (value); else g_assert_not_reached (); } else { @@ -875,7 +925,8 @@ nm_setting_802_1x_get_domain_suffix_match (NMSetting8021x *setting) * * Returns the scheme used to store the client certificate. If the returned scheme * is %NM_SETTING_802_1X_CK_SCHEME_BLOB, use nm_setting_802_1x_get_client_cert_blob(); - * if %NM_SETTING_802_1X_CK_SCHEME_PATH, use nm_setting_802_1x_get_client_cert_path(). + * if %NM_SETTING_802_1X_CK_SCHEME_PATH, use nm_setting_802_1x_get_client_cert_path(); + * if %NM_SETTING_802_1X_CK_SCHEME_PKCS11, use nm_setting_802_1x_get_client_cert_uri(). * * Returns: scheme used to store the client certificate (blob or path) **/ @@ -936,9 +987,40 @@ nm_setting_802_1x_get_client_cert_path (NMSetting8021x *setting) } /** + * nm_setting_802_1x_get_client_cert_uri: + * @setting: the #NMSetting8021x + * + * Returns the client certificate URI analogously to + * nm_setting_802_1x_get_client_cert_blob() and + * nm_setting_802_1x_get_client_cert_path(). + * + * Currently it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * 7512), but may be extended to other schemes in future (such as 'file' URIs + * for local files and 'data' URIs for inline certificate data). + * + * Returns: the URI string + * + * Since: 1.6 + **/ +const char * +nm_setting_802_1x_get_client_cert_uri (NMSetting8021x *setting) +{ + NMSetting8021xCKScheme scheme; + gconstpointer data; + + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL); + + scheme = nm_setting_802_1x_get_client_cert_scheme (setting); + g_return_val_if_fail (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, NULL); + + data = g_bytes_get_data (NM_SETTING_802_1X_GET_PRIVATE (setting)->client_cert, NULL); + return (const char *)data; +} + +/** * nm_setting_802_1x_set_client_cert: * @setting: the #NMSetting8021x - * @cert_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH + * @value: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH * or %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the client * certificate file (PEM, DER, or PKCS#<!-- -->12 format). The path must be UTF-8 * encoded; use g_filename_to_utf8() to convert if needed. Passing %NULL with @@ -960,7 +1042,7 @@ nm_setting_802_1x_get_client_cert_path (NMSetting8021x *setting) **/ gboolean nm_setting_802_1x_set_client_cert (NMSetting8021x *setting, - const char *cert_path, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, GError **error) @@ -971,10 +1053,11 @@ nm_setting_802_1x_set_client_cert (NMSetting8021x *setting, g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), FALSE); - if (cert_path) { - g_return_val_if_fail (g_utf8_validate (cert_path, -1, NULL), FALSE); + if (value) { + g_return_val_if_fail (g_utf8_validate (value, -1, NULL), FALSE); g_return_val_if_fail ( scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB - || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH, + || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH + || scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, FALSE); } @@ -985,12 +1068,18 @@ nm_setting_802_1x_set_client_cert (NMSetting8021x *setting, g_clear_pointer (&priv->client_cert, g_bytes_unref); - if (!cert_path) { + if (!value) { + g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_CLIENT_CERT); + return TRUE; + } + + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) { + priv->client_cert = g_bytes_new (value, strlen (value) + 1); g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_CLIENT_CERT); return TRUE; } - data = load_and_verify_certificate (cert_path, scheme, &format, error); + data = load_and_verify_certificate (value, scheme, &format, error); if (data) { gboolean valid = FALSE; @@ -1019,7 +1108,7 @@ nm_setting_802_1x_set_client_cert (NMSetting8021x *setting, priv->client_cert = g_byte_array_free_to_bytes (data); data = NULL; } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) - priv->client_cert = path_to_scheme_value (cert_path); + priv->client_cert = path_to_scheme_value (value); else g_assert_not_reached (); } @@ -1138,7 +1227,8 @@ nm_setting_802_1x_get_phase2_ca_path (NMSetting8021x *setting) * Returns the scheme used to store the "phase 2" CA certificate. If the * returned scheme is %NM_SETTING_802_1X_CK_SCHEME_BLOB, use * nm_setting_802_1x_get_ca_cert_blob(); if %NM_SETTING_802_1X_CK_SCHEME_PATH, - * use nm_setting_802_1x_get_ca_cert_path(). + * use nm_setting_802_1x_get_ca_cert_path(); if %NM_SETTING_802_1X_CK_SCHEME_PKCS11, + * use nm_setting_802_1x_get_ca_cert_uri(). * * Returns: scheme used to store the "phase 2" CA certificate (blob or path) **/ @@ -1205,9 +1295,40 @@ nm_setting_802_1x_get_phase2_ca_cert_path (NMSetting8021x *setting) } /** + * nm_setting_802_1x_get_phase2_ca_cert_uri: + * @setting: the #NMSetting8021x + * + * Returns the "phase 2" CA certificate URI analogously to + * nm_setting_802_1x_get_phase2_ca_cert_blob() and + * nm_setting_802_1x_get_phase2_ca_cert_path(). + * + * Currently it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * 7512), but may be extended to other schemes in future (such as 'file' URIs + * for local files and 'data' URIs for inline certificate data). + * + * Returns: the URI string + * + * Since: 1.6 + **/ +const char * +nm_setting_802_1x_get_phase2_ca_cert_uri (NMSetting8021x *setting) +{ + NMSetting8021xCKScheme scheme; + gconstpointer data; + + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL); + + scheme = nm_setting_802_1x_get_phase2_ca_cert_scheme (setting); + g_return_val_if_fail (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, NULL); + + data = g_bytes_get_data (NM_SETTING_802_1X_GET_PRIVATE (setting)->phase2_ca_cert, NULL); + return (const char *)data; +} + +/** * nm_setting_802_1x_set_phase2_ca_cert: * @setting: the #NMSetting8021x - * @cert_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH + * @value: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH * or %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the "phase2" CA * certificate file (PEM or DER format). The path must be UTF-8 encoded; use * g_filename_to_utf8() to convert if needed. Passing %NULL with any @scheme @@ -1225,7 +1346,7 @@ nm_setting_802_1x_get_phase2_ca_cert_path (NMSetting8021x *setting) **/ gboolean nm_setting_802_1x_set_phase2_ca_cert (NMSetting8021x *setting, - const char *cert_path, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, GError **error) @@ -1236,10 +1357,11 @@ nm_setting_802_1x_set_phase2_ca_cert (NMSetting8021x *setting, g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), FALSE); - if (cert_path) { - g_return_val_if_fail (g_utf8_validate (cert_path, -1, NULL), FALSE); + if (value) { + g_return_val_if_fail (g_utf8_validate (value, -1, NULL), FALSE); g_return_val_if_fail ( scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB - || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH, + || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH + || scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, FALSE); } @@ -1250,12 +1372,18 @@ nm_setting_802_1x_set_phase2_ca_cert (NMSetting8021x *setting, g_clear_pointer (&priv->phase2_ca_cert, g_bytes_unref); - if (!cert_path) { + if (!value) { + g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_PHASE2_CA_CERT); + return TRUE; + } + + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) { + priv->phase2_ca_cert = g_bytes_new (value, strlen (value) + 1); g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_PHASE2_CA_CERT); return TRUE; } - data = load_and_verify_certificate (cert_path, scheme, &format, error); + data = load_and_verify_certificate (value, scheme, &format, error); if (data) { /* wpa_supplicant can only use raw x509 CA certs */ if (format == NM_CRYPTO_FILE_FORMAT_X509) { @@ -1266,7 +1394,7 @@ nm_setting_802_1x_set_phase2_ca_cert (NMSetting8021x *setting, priv->phase2_ca_cert = g_byte_array_free_to_bytes (data); data = NULL; } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) - priv->phase2_ca_cert = path_to_scheme_value (cert_path); + priv->phase2_ca_cert = path_to_scheme_value (value); else g_assert_not_reached (); } else { @@ -1474,7 +1602,9 @@ nm_setting_802_1x_clear_phase2_altsubject_matches (NMSetting8021x *setting) * returned scheme is %NM_SETTING_802_1X_CK_SCHEME_BLOB, use * nm_setting_802_1x_get_client_cert_blob(); if * %NM_SETTING_802_1X_CK_SCHEME_PATH, use - * nm_setting_802_1x_get_client_cert_path(). + * nm_setting_802_1x_get_client_cert_path(); if + * %NM_SETTING_802_1X_CK_SCHEME_PKCS11, use + * nm_setting_802_1x_get_client_cert_uri(). * * Returns: scheme used to store the "phase 2" client certificate (blob or path) **/ @@ -1535,9 +1665,40 @@ nm_setting_802_1x_get_phase2_client_cert_path (NMSetting8021x *setting) } /** + * nm_setting_802_1x_get_phase2_client_cert_uri: + * @setting: the #NMSetting8021x + * + * Returns the "phase 2" client certificate URI analogously to + * nm_setting_802_1x_get_phase2_ca_cert_blob() and + * nm_setting_802_1x_get_phase2_ca_cert_path(). + * + * Currently it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * 7512), but may be extended to other schemes in future (such as 'file' URIs + * for local files and 'data' URIs for inline certificate data). + * + * Returns: the URI string + * + * Since: 1.6 + **/ +const char * +nm_setting_802_1x_get_phase2_client_cert_uri (NMSetting8021x *setting) +{ + NMSetting8021xCKScheme scheme; + gconstpointer data; + + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL); + + scheme = nm_setting_802_1x_get_phase2_client_cert_scheme (setting); + g_return_val_if_fail (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, NULL); + + data = g_bytes_get_data (NM_SETTING_802_1X_GET_PRIVATE (setting)->phase2_client_cert, NULL); + return (const char *)data; +} + +/** * nm_setting_802_1x_set_phase2_client_cert: * @setting: the #NMSetting8021x - * @cert_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH + * @value: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH * or %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the "phase2" client * certificate file (PEM, DER, or PKCS#<!-- -->12 format). The path must be UTF-8 * encoded; use g_filename_to_utf8() to convert if needed. Passing %NULL with @@ -1559,7 +1720,7 @@ nm_setting_802_1x_get_phase2_client_cert_path (NMSetting8021x *setting) **/ gboolean nm_setting_802_1x_set_phase2_client_cert (NMSetting8021x *setting, - const char *cert_path, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, GError **error) @@ -1570,10 +1731,11 @@ nm_setting_802_1x_set_phase2_client_cert (NMSetting8021x *setting, g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), FALSE); - if (cert_path) { - g_return_val_if_fail (g_utf8_validate (cert_path, -1, NULL), FALSE); + if (value) { + g_return_val_if_fail (g_utf8_validate (value, -1, NULL), FALSE); g_return_val_if_fail ( scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB - || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH, + || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH + || scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, FALSE); } @@ -1584,12 +1746,18 @@ nm_setting_802_1x_set_phase2_client_cert (NMSetting8021x *setting, g_clear_pointer (&priv->phase2_client_cert, g_bytes_unref); - if (!cert_path) { + if (!value) { + g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_PHASE2_CLIENT_CERT); + return TRUE; + } + + if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) { + priv->phase2_client_cert = g_bytes_new (value, strlen (value) + 1); g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_PHASE2_CLIENT_CERT); return TRUE; } - data = load_and_verify_certificate (cert_path, scheme, &format, error); + data = load_and_verify_certificate (value, scheme, &format, error); if (data) { gboolean valid = FALSE; @@ -1619,7 +1787,7 @@ nm_setting_802_1x_set_phase2_client_cert (NMSetting8021x *setting, priv->phase2_client_cert = g_byte_array_free_to_bytes (data); data = NULL; } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) - priv->phase2_client_cert = path_to_scheme_value (cert_path); + priv->phase2_client_cert = path_to_scheme_value (value); else g_assert_not_reached (); } @@ -1729,7 +1897,9 @@ nm_setting_802_1x_get_pin_flags (NMSetting8021x *setting) * %NM_SETTING_802_1X_CK_SCHEME_BLOB, use * nm_setting_802_1x_get_client_cert_blob(); if * %NM_SETTING_802_1X_CK_SCHEME_PATH, use - * nm_setting_802_1x_get_client_cert_path(). + * nm_setting_802_1x_get_client_cert_path(); if + * %NM_SETTING_802_1X_CK_SCHEME_PKCS11, use + * nm_setting_802_1x_get_client_cert_uri(). * * Returns: scheme used to store the private key (blob or path) **/ @@ -1793,6 +1963,37 @@ nm_setting_802_1x_get_private_key_path (NMSetting8021x *setting) return (const char *)data + strlen (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); } +/** + * nm_setting_802_1x_get_private_key_uri: + * @setting: the #NMSetting8021x + * + * Returns the private key URI analogously to + * nm_setting_802_1x_get_private_key_blob() and + * nm_setting_802_1x_get_private_key_path(). + * + * Currently it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * 7512), but may be extended to other schemes in future (such as 'file' URIs + * for local files and 'data' URIs for inline certificate data). + * + * Returns: the URI string + * + * Since: 1.6 + **/ +const char * +nm_setting_802_1x_get_private_key_uri (NMSetting8021x *setting) +{ + NMSetting8021xCKScheme scheme; + gconstpointer data; + + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL); + + scheme = nm_setting_802_1x_get_private_key_scheme (setting); + g_return_val_if_fail (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, NULL); + + data = g_bytes_get_data (NM_SETTING_802_1X_GET_PRIVATE (setting)->private_key, NULL); + return (const char *)data; +} + static void free_secure_bytes (gpointer data) { @@ -1822,7 +2023,7 @@ file_to_secure_bytes (const char *filename) /** * nm_setting_802_1x_set_private_key: * @setting: the #NMSetting8021x - * @key_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH or + * @value: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH or * %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the private key file * (PEM, DER, or PKCS#<!-- -->12 format). The path must be UTF-8 encoded; use * g_filename_to_utf8() to convert if needed. Passing %NULL with any @scheme @@ -1860,7 +2061,7 @@ file_to_secure_bytes (const char *filename) **/ gboolean nm_setting_802_1x_set_private_key (NMSetting8021x *setting, - const char *key_path, + const char *value, const char *password, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, @@ -1873,10 +2074,11 @@ nm_setting_802_1x_set_private_key (NMSetting8021x *setting, g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), FALSE); - if (key_path) { - g_return_val_if_fail (g_utf8_validate (key_path, -1, NULL), FALSE); + if (value) { + g_return_val_if_fail (g_utf8_validate (value, -1, NULL), FALSE); g_return_val_if_fail ( scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB - || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH, + || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH + || scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, FALSE); } @@ -1886,8 +2088,8 @@ nm_setting_802_1x_set_private_key (NMSetting8021x *setting, /* Ensure the private key is a recognized format and if the password was * given, that it decrypts the private key. */ - if (key_path) { - format = crypto_verify_private_key (key_path, password, NULL, &local_err); + if (value && scheme != NM_SETTING_802_1X_CK_SCHEME_PKCS11) { + format = crypto_verify_private_key (value, password, NULL, &local_err); if (format == NM_CRYPTO_FILE_FORMAT_UNKNOWN) { g_set_error_literal (error, NM_CONNECTION_ERROR, @@ -1914,7 +2116,7 @@ nm_setting_802_1x_set_private_key (NMSetting8021x *setting, password_cleared = TRUE; } - if (key_path == NULL) { + if (value == NULL) { if (key_cleared) g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_PRIVATE_KEY); if (password_cleared) @@ -1926,17 +2128,18 @@ nm_setting_802_1x_set_private_key (NMSetting8021x *setting, if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) { /* FIXME: potential race after verifying the private key above */ /* FIXME: ensure blob doesn't start with file:// */ - priv->private_key = file_to_secure_bytes (key_path); + priv->private_key = file_to_secure_bytes (value); g_assert (priv->private_key); } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) - priv->private_key = path_to_scheme_value (key_path); + priv->private_key = path_to_scheme_value (value); + else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) + priv->private_key = g_bytes_new (value, strlen (value) + 1); else g_assert_not_reached (); /* As required by NM and wpa_supplicant, set the client-cert * property to the same PKCS#12 data. */ - g_assert (format != NM_CRYPTO_FILE_FORMAT_UNKNOWN); if (format == NM_CRYPTO_FILE_FORMAT_PKCS12) { if (priv->client_cert) g_bytes_unref (priv->client_cert); @@ -2067,7 +2270,9 @@ nm_setting_802_1x_get_phase2_private_key_password_flags (NMSetting8021x *setting * scheme is %NM_SETTING_802_1X_CK_SCHEME_BLOB, use * nm_setting_802_1x_get_client_cert_blob(); if * %NM_SETTING_802_1X_CK_SCHEME_PATH, use - * nm_setting_802_1x_get_client_cert_path(). + * nm_setting_802_1x_get_client_cert_path(); if + * %NM_SETTING_802_1X_CK_SCHEME_PKCS11, use + * nm_setting_802_1x_get_client_cert_uri(). * * Returns: scheme used to store the "phase 2" private key (blob or path) **/ @@ -2132,9 +2337,40 @@ nm_setting_802_1x_get_phase2_private_key_path (NMSetting8021x *setting) } /** + * nm_setting_802_1x_get_phase2_private_key_uri: + * @setting: the #NMSetting8021x + * + * Returns the "phase 2" private key URI analogously to + * nm_setting_802_1x_get_phase2_private_key_blob() and + * nm_setting_802_1x_get_phase2_private_key_path(). + * + * Currently it's limited to PKCS#11 URIs ('pkcs11' scheme as defined by RFC + * 7512), but may be extended to other schemes in future (such as 'file' URIs + * for local files and 'data' URIs for inline certificate data). + * + * Returns: the URI string + * + * Since: 1.6 + **/ +const char * +nm_setting_802_1x_get_phase2_private_key_uri (NMSetting8021x *setting) +{ + NMSetting8021xCKScheme scheme; + gconstpointer data; + + g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), NULL); + + scheme = nm_setting_802_1x_get_phase2_private_key_scheme (setting); + g_return_val_if_fail (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, NULL); + + data = g_bytes_get_data (NM_SETTING_802_1X_GET_PRIVATE (setting)->phase2_private_key, NULL); + return (const char *)data; +} + +/** * nm_setting_802_1x_set_phase2_private_key: * @setting: the #NMSetting8021x - * @key_path: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH or + * @value: when @scheme is set to either %NM_SETTING_802_1X_CK_SCHEME_PATH or * %NM_SETTING_802_1X_CK_SCHEME_BLOB, pass the path of the "phase2" private * key file (PEM, DER, or PKCS#<!-- -->12 format). The path must be UTF-8 encoded; * use g_filename_to_utf8() to convert if needed. Passing %NULL with any @@ -2172,7 +2408,7 @@ nm_setting_802_1x_get_phase2_private_key_path (NMSetting8021x *setting) **/ gboolean nm_setting_802_1x_set_phase2_private_key (NMSetting8021x *setting, - const char *key_path, + const char *value, const char *password, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, @@ -2185,10 +2421,11 @@ nm_setting_802_1x_set_phase2_private_key (NMSetting8021x *setting, g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), FALSE); - if (key_path) { - g_return_val_if_fail (g_utf8_validate (key_path, -1, NULL), FALSE); + if (value) { + g_return_val_if_fail (g_utf8_validate (value, -1, NULL), FALSE); g_return_val_if_fail ( scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB - || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH, + || scheme == NM_SETTING_802_1X_CK_SCHEME_PATH + || scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11, FALSE); } @@ -2198,8 +2435,8 @@ nm_setting_802_1x_set_phase2_private_key (NMSetting8021x *setting, /* Ensure the private key is a recognized format and if the password was * given, that it decrypts the private key. */ - if (key_path) { - format = crypto_verify_private_key (key_path, password, NULL, &local_err); + if (value && scheme != NM_SETTING_802_1X_CK_SCHEME_PKCS11) { + format = crypto_verify_private_key (value, password, NULL, &local_err); if (format == NM_CRYPTO_FILE_FORMAT_UNKNOWN) { g_set_error_literal (error, NM_CONNECTION_ERROR, @@ -2226,7 +2463,7 @@ nm_setting_802_1x_set_phase2_private_key (NMSetting8021x *setting, password_cleared = TRUE; } - if (key_path == NULL) { + if (value == NULL) { if (key_cleared) g_object_notify (G_OBJECT (setting), NM_SETTING_802_1X_PHASE2_PRIVATE_KEY); if (password_cleared) @@ -2238,17 +2475,18 @@ nm_setting_802_1x_set_phase2_private_key (NMSetting8021x *setting, if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) { /* FIXME: potential race after verifying the private key above */ /* FIXME: ensure blob doesn't start with file:// */ - priv->phase2_private_key = file_to_secure_bytes (key_path); + priv->phase2_private_key = file_to_secure_bytes (value); g_assert (priv->phase2_private_key); } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) - priv->phase2_private_key = path_to_scheme_value (key_path); + priv->phase2_private_key = path_to_scheme_value (value); + else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) + priv->phase2_private_key = g_bytes_new (value, strlen (value) + 1); else g_assert_not_reached (); /* As required by NM and wpa_supplicant, set the client-cert * property to the same PKCS#12 data. */ - g_assert (format != NM_CRYPTO_FILE_FORMAT_UNKNOWN); if (format == NM_CRYPTO_FILE_FORMAT_PKCS12) { if (priv->phase2_client_cert) g_bytes_unref (priv->phase2_client_cert); @@ -2371,6 +2609,8 @@ need_secrets_tls (NMSetting8021x *self, scheme = nm_setting_802_1x_get_phase2_private_key_scheme (self); if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) path = nm_setting_802_1x_get_phase2_private_key_path (self); + else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) + return; else if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) blob = nm_setting_802_1x_get_phase2_private_key_blob (self); else { @@ -2385,6 +2625,8 @@ need_secrets_tls (NMSetting8021x *self, scheme = nm_setting_802_1x_get_private_key_scheme (self); if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) path = nm_setting_802_1x_get_private_key_path (self); + else if (scheme == NM_SETTING_802_1X_CK_SCHEME_PKCS11) + return; else if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) blob = nm_setting_802_1x_get_private_key_blob (self); else { diff --git a/libnm-core/nm-setting-8021x.h b/libnm-core/nm-setting-8021x.h index 5cdcb3d5..9e58e4e2 100644 --- a/libnm-core/nm-setting-8021x.h +++ b/libnm-core/nm-setting-8021x.h @@ -32,6 +32,7 @@ G_BEGIN_DECLS #define NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH "file://" +#define NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PKCS11 "pkcs11:" /** * NMSetting8021xCKFormat: @@ -60,6 +61,8 @@ typedef enum { /*< underscore_name=nm_setting_802_1x_ck_format >*/ * item data * @NM_SETTING_802_1X_CK_SCHEME_PATH: certificate or key is stored as a path * to a file containing the certificate or key data + * @NM_SETTING_802_1X_CK_SCHEME_PKCS11: certificate or key is stored as a + * URI of an object on a PKCS#11 token * * #NMSetting8021xCKScheme values indicate how a certificate or private key is * stored in the setting properties, either as a blob of the item's data, or as @@ -68,7 +71,8 @@ typedef enum { /*< underscore_name=nm_setting_802_1x_ck_format >*/ typedef enum { /*< underscore_name=nm_setting_802_1x_ck_scheme >*/ NM_SETTING_802_1X_CK_SCHEME_UNKNOWN = 0, NM_SETTING_802_1X_CK_SCHEME_BLOB, - NM_SETTING_802_1X_CK_SCHEME_PATH + NM_SETTING_802_1X_CK_SCHEME_PATH, + NM_SETTING_802_1X_CK_SCHEME_PKCS11, } NMSetting8021xCKScheme; @@ -177,8 +181,10 @@ const char * nm_setting_802_1x_get_phase2_ca_path (NMSetting8 NMSetting8021xCKScheme nm_setting_802_1x_get_ca_cert_scheme (NMSetting8021x *setting); GBytes * nm_setting_802_1x_get_ca_cert_blob (NMSetting8021x *setting); const char * nm_setting_802_1x_get_ca_cert_path (NMSetting8021x *setting); +NM_AVAILABLE_IN_1_6 +const char * nm_setting_802_1x_get_ca_cert_uri (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_ca_cert (NMSetting8021x *setting, - const char *cert_path, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, GError **error); @@ -201,8 +207,10 @@ const char * nm_setting_802_1x_get_domain_suffix_match (NMSetting8 NMSetting8021xCKScheme nm_setting_802_1x_get_client_cert_scheme (NMSetting8021x *setting); GBytes * nm_setting_802_1x_get_client_cert_blob (NMSetting8021x *setting); const char * nm_setting_802_1x_get_client_cert_path (NMSetting8021x *setting); +NM_AVAILABLE_IN_1_6 +const char * nm_setting_802_1x_get_client_cert_uri (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_client_cert (NMSetting8021x *setting, - const char *cert_path, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, GError **error); @@ -220,8 +228,10 @@ const char * nm_setting_802_1x_get_phase2_autheap (NMSetting8 NMSetting8021xCKScheme nm_setting_802_1x_get_phase2_ca_cert_scheme (NMSetting8021x *setting); GBytes * nm_setting_802_1x_get_phase2_ca_cert_blob (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase2_ca_cert_path (NMSetting8021x *setting); +NM_AVAILABLE_IN_1_6 +const char * nm_setting_802_1x_get_phase2_ca_cert_uri (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_phase2_ca_cert (NMSetting8021x *setting, - const char *cert_path, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, GError **error); @@ -244,8 +254,10 @@ const char * nm_setting_802_1x_get_phase2_domain_suffix_match (NMS NMSetting8021xCKScheme nm_setting_802_1x_get_phase2_client_cert_scheme (NMSetting8021x *setting); GBytes * nm_setting_802_1x_get_phase2_client_cert_blob (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase2_client_cert_path (NMSetting8021x *setting); +NM_AVAILABLE_IN_1_6 +const char * nm_setting_802_1x_get_phase2_client_cert_uri (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_phase2_client_cert (NMSetting8021x *setting, - const char *cert_path, + const char *value, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, GError **error); @@ -261,8 +273,10 @@ NMSettingSecretFlags nm_setting_802_1x_get_pin_flags (NMSetting8 NMSetting8021xCKScheme nm_setting_802_1x_get_private_key_scheme (NMSetting8021x *setting); GBytes * nm_setting_802_1x_get_private_key_blob (NMSetting8021x *setting); const char * nm_setting_802_1x_get_private_key_path (NMSetting8021x *setting); +NM_AVAILABLE_IN_1_6 +const char * nm_setting_802_1x_get_private_key_uri (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_private_key (NMSetting8021x *setting, - const char *key_path, + const char *value, const char *password, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, @@ -275,8 +289,10 @@ NMSetting8021xCKFormat nm_setting_802_1x_get_private_key_format (NMSett NMSetting8021xCKScheme nm_setting_802_1x_get_phase2_private_key_scheme (NMSetting8021x *setting); GBytes * nm_setting_802_1x_get_phase2_private_key_blob (NMSetting8021x *setting); const char * nm_setting_802_1x_get_phase2_private_key_path (NMSetting8021x *setting); +NM_AVAILABLE_IN_1_6 +const char * nm_setting_802_1x_get_phase2_private_key_uri (NMSetting8021x *setting); gboolean nm_setting_802_1x_set_phase2_private_key (NMSetting8021x *setting, - const char *key_path, + const char *value, const char *password, NMSetting8021xCKScheme scheme, NMSetting8021xCKFormat *out_format, diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c index 0364c49d..a01adc12 100644 --- a/libnm-core/nm-setting-bond.c +++ b/libnm-core/nm-setting-bond.c @@ -245,7 +245,7 @@ validate_ifname (const char *name, const char *value) if (!value || !value[0]) return FALSE; - return nm_utils_iface_valid_name (value); + return nm_utils_is_valid_iface_name (value, NULL); } /** @@ -618,13 +618,16 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) primary = g_hash_table_lookup (priv->options, NM_SETTING_BOND_OPTION_PRIMARY); if (strcmp (mode_new, "active-backup") == 0) { - if (primary && !nm_utils_iface_valid_name (primary)) { + GError *tmp_error = NULL; + + if (primary && !nm_utils_is_valid_iface_name (primary, &tmp_error)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("'%s' is not a valid interface name for '%s' option"), - primary, NM_SETTING_BOND_OPTION_PRIMARY); + _("'%s' is not a valid for '%s' option: %s"), + primary, NM_SETTING_BOND_OPTION_PRIMARY, tmp_error->message); g_prefix_error (error, "%s.%s: ", NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS); + g_error_free (tmp_error); return FALSE; } } else { diff --git a/libnm-core/nm-setting-bridge-port.c b/libnm-core/nm-setting-bridge-port.c index df2e7bd3..331fa5ae 100644 --- a/libnm-core/nm-setting-bridge-port.c +++ b/libnm-core/nm-setting-bridge-port.c @@ -60,7 +60,7 @@ enum { LAST_PROP }; -/**************************************************************************/ +/*****************************************************************************/ /** * nm_setting_bridge_port_get_priority: @@ -104,7 +104,7 @@ nm_setting_bridge_port_get_hairpin_mode (NMSettingBridgePort *setting) return NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting)->hairpin_mode; } -/**************************************************************************/ +/*****************************************************************************/ #define BR_MAX_PORT_PRIORITY 63 #define BR_DEF_PRIORITY 32 @@ -174,7 +174,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return TRUE; } -/**************************************************************************/ +/*****************************************************************************/ /** * nm_setting_bridge_port_new: diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c index f6b801c6..ac8bdf2d 100644 --- a/libnm-core/nm-setting-connection.c +++ b/libnm-core/nm-setting-connection.c @@ -72,6 +72,7 @@ typedef struct { GSList *permissions; /* list of Permission structs */ gboolean autoconnect; gint autoconnect_priority; + gint autoconnect_retries; guint64 timestamp; gboolean read_only; char *zone; @@ -90,6 +91,7 @@ enum { PROP_PERMISSIONS, PROP_AUTOCONNECT, PROP_AUTOCONNECT_PRIORITY, + PROP_AUTOCONNECT_RETRIES, PROP_TIMESTAMP, PROP_READ_ONLY, PROP_ZONE, @@ -105,7 +107,7 @@ enum { LAST_PROP }; -/***********************************************************************/ +/*****************************************************************************/ #define PERM_USER_PREFIX "user:" @@ -186,7 +188,7 @@ permission_free (Permission *p) g_slice_free (Permission, p); } -/***********************************************************************/ +/*****************************************************************************/ /** * nm_setting_connection_new: @@ -532,6 +534,25 @@ nm_setting_connection_get_autoconnect_priority (NMSettingConnection *setting) } /** + * nm_setting_connection_get_autoconnect_retries: + * @setting: the #NMSettingConnection + * + * Returns the #NMSettingConnection:autoconnect-retries property of the connection. + * Zero means infinite, -1 means the global default value. + * + * Returns: the connection's autoconnect retries + * + * Since: 1.6 + **/ +gint +nm_setting_connection_get_autoconnect_retries (NMSettingConnection *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), -1); + + return NM_SETTING_CONNECTION_GET_PRIVATE (setting)->autoconnect_retries; +} + +/** * nm_setting_connection_get_timestamp: * @setting: the #NMSettingConnection * @@ -647,9 +668,6 @@ nm_setting_connection_get_autoconnect_slaves (NMSettingConnection *setting) return NM_SETTING_CONNECTION_GET_PRIVATE (setting)->autoconnect_slaves; } -NM_BACKPORT_SYMBOL (libnm_1_0_4, NMSettingConnectionAutoconnectSlaves, nm_setting_connection_get_autoconnect_slaves, (NMSettingConnection *setting), (setting)); - -NM_BACKPORT_SYMBOL (libnm_1_0_4, GType, nm_setting_connection_autoconnect_slaves_get_type, (void), ()); /** * nm_setting_connection_get_num_secondaries: @@ -804,10 +822,6 @@ nm_setting_connection_get_metered (NMSettingConnection *setting) return NM_SETTING_CONNECTION_GET_PRIVATE (setting)->metered; } -NM_BACKPORT_SYMBOL (libnm_1_0_6, NMMetered, nm_setting_connection_get_metered, (NMSettingConnection *setting), (setting)); - -NM_BACKPORT_SYMBOL (libnm_1_0_6, GType, nm_metered_get_type, (void), ()); - /** * nm_setting_connection_get_lldp: * @setting: the #NMSettingConnection @@ -877,13 +891,15 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } if (priv->interface_name) { - if (!nm_utils_iface_valid_name (priv->interface_name)) { + GError *tmp_error = NULL; + + if (!nm_utils_is_valid_iface_name (priv->interface_name, &tmp_error)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("'%s' is not a valid interface name"), - priv->interface_name); + "'%s': %s", priv->interface_name, tmp_error->message); g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_INTERFACE_NAME); + g_error_free (tmp_error); return FALSE; } } @@ -1090,7 +1106,7 @@ nm_setting_connection_set_interface_name (NMSetting *setting, * overridden by a valid connection.interface-name. */ interface_name = find_virtual_interface_name (connection_dict); - if (!interface_name || nm_utils_iface_valid_name (interface_name)) + if (!interface_name || nm_utils_is_valid_iface_name (interface_name, NULL)) interface_name = g_variant_get_string (value, NULL); g_object_set (G_OBJECT (setting), @@ -1217,6 +1233,9 @@ set_property (GObject *object, guint prop_id, case PROP_AUTOCONNECT_PRIORITY: priv->autoconnect_priority = g_value_get_int (value); break; + case PROP_AUTOCONNECT_RETRIES: + priv->autoconnect_retries = g_value_get_int (value); + break; case PROP_TIMESTAMP: priv->timestamp = g_value_get_uint64 (value); break; @@ -1303,6 +1322,9 @@ get_property (GObject *object, guint prop_id, case PROP_AUTOCONNECT_PRIORITY: g_value_set_int (value, nm_setting_connection_get_autoconnect_priority (setting)); break; + case PROP_AUTOCONNECT_RETRIES: + g_value_set_int (value, nm_setting_connection_get_autoconnect_retries (setting)); + break; case PROP_TIMESTAMP: g_value_set_uint64 (value, nm_setting_connection_get_timestamp (setting)); break; @@ -1410,13 +1432,32 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class) /** * NMSettingConnection:stable-id: * - * This token to generate stable IDs for the connection. If unset, - * the UUID will be used instead. + * Token to generate stable IDs for the connection. * - * The stable-id is used instead of the connection UUID for generating - * IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. - * It is also used to seed the generated cloned MAC address for - * ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. + * The stable-id is used for generating IPv6 stable private addresses + * with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the + * generated cloned MAC address for ethernet.cloned-mac-address=stable + * and wifi.cloned-mac-address=stable. Note that also the interface name + * of the activating connection and a per-host secret key is included + * into the address generation so that the same stable-id on different + * hosts/devices yields different addresses. + * + * If the value is unset, an ID unique for the connection is used. + * Specifing a stable-id allows multiple connections to generate the + * same addresses. Another use is to generate IDs at runtime via + * dynamic substitutions. + * + * The '$' character is treated special to perform dynamic substitutions + * at runtime. Currently supported are "${CONNECTION}", "${BOOT}", "${RANDOM}". + * These effectively create unique IDs per-connection, per-boot, or every time. + * Any unrecognized patterns following '$' are treated verbatim, however + * are reserved for future use. You are thus advised to avoid '$' or + * escape it as "$$". + * For example, set it to "${CONNECTION}/${BOOT}" to create a unique id for + * this connection that changes with every reboot. + * + * Note that two connections only use the same effective id if + * their stable-id is also identical before performing dynamic substitutions. * * Since: 1.4 **/ @@ -1578,6 +1619,32 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class) NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS)); + + /** + * NMSettingConnection:autoconnect-retries: + * + * The number of times a connection should be tried when autoctivating before + * giving up. Zero means forever, -1 means the global default (4 times if not + * overridden). + */ + /* ---ifcfg-rh--- + * property: autoconnect-retries + * variable: AUTOCONNECT_RETRIES(+) + * description: The number of times a connection should be autoactivated + * before giving up and switching to the next one. + * values: -1 (use global default), 0 (forever) or a positive value + * example: AUTOCONNECT_RETRIES=1 + * ---end--- + */ + g_object_class_install_property + (object_class, PROP_AUTOCONNECT_RETRIES, + g_param_spec_int (NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES, "", "", + -1, G_MAXINT32, -1, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + NM_SETTING_PARAM_FUZZY_IGNORE | + G_PARAM_STATIC_STRINGS)); + /** * NMSettingConnection:timestamp: * @@ -1650,9 +1717,11 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class) **/ /* ---ifcfg-rh--- * property: master - * variable: MASTER, TEAM_MASTER, BRIDGE + * variable: MASTER, MASTER_UUID, TEAM_MASTER, TEAM_MASTER_UUID, BRIDGE, BRIDGE_UUID * description: Reference to master connection. The variable used depends on - * the connection type. + * the connection type and the value. In general, if the *_UUID variant is present, + * the variant without *_UUID is ignored. NetworkManager attempts to write both + * for compatibility with legacy tooling. * ---end--- */ g_object_class_install_property @@ -1673,10 +1742,12 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class) **/ /* ---ifcfg-rh--- * property: slave-type - * variable: MASTER, TEAM_MASTER, DEVICETYPE, BRIDGE + * variable: MASTER, MASTER_UUID, TEAM_MASTER, TEAM_MASTER_UUID, DEVICETYPE, + * BRIDGE, BRIDGE_UUID * description: Slave type doesn't map directly to a variable, but it is - * recognized using different variables. MASTER for bonding, - * TEAM_MASTER and DEVICETYPE for teaming, BRIDGE for bridging. + * recognized using different variables. MASTER and MASTER_UUID for bonding, + * TEAM_MASTER, TEAM_MASTER_UUID and DEVICETYPE for teaming, BRIDGE + * and BRIDGE_UUID for bridging. * ---end--- */ g_object_class_install_property @@ -1776,7 +1847,7 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class) **/ /* ---ifcfg-rh--- * property: metered - * variable: CONNECTION_METERED + * variable: CONNECTION_METERED(+) * values: yes,no,unknown * description: Whether the device is metered * example: CONNECTION_METERED=yes @@ -1800,7 +1871,7 @@ nm_setting_connection_class_init (NMSettingConnectionClass *setting_class) **/ /* ---ifcfg-rh--- * property: lldp - * variable: LLDP + * variable: LLDP(+) * values: boolean value or 'rx' * default: missing variable means global default * description: whether LLDP is enabled for the connection diff --git a/libnm-core/nm-setting-connection.h b/libnm-core/nm-setting-connection.h index 67263d1f..89fa64ce 100644 --- a/libnm-core/nm-setting-connection.h +++ b/libnm-core/nm-setting-connection.h @@ -51,6 +51,7 @@ G_BEGIN_DECLS #define NM_SETTING_CONNECTION_TYPE "type" #define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect" #define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY "autoconnect-priority" +#define NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES "autoconnect-retries" #define NM_SETTING_CONNECTION_TIMESTAMP "timestamp" #define NM_SETTING_CONNECTION_READ_ONLY "read-only" #define NM_SETTING_CONNECTION_PERMISSIONS "permissions" @@ -123,6 +124,8 @@ const char *nm_setting_connection_get_interface_name (NMSettingConnection *set const char *nm_setting_connection_get_connection_type (NMSettingConnection *setting); gboolean nm_setting_connection_get_autoconnect (NMSettingConnection *setting); gint nm_setting_connection_get_autoconnect_priority (NMSettingConnection *setting); +NM_AVAILABLE_IN_1_6 +gint nm_setting_connection_get_autoconnect_retries (NMSettingConnection *setting); guint64 nm_setting_connection_get_timestamp (NMSettingConnection *setting); gboolean nm_setting_connection_get_read_only (NMSettingConnection *setting); diff --git a/libnm-core/nm-setting-dcb.c b/libnm-core/nm-setting-dcb.c index 751904b5..140dc021 100644 --- a/libnm-core/nm-setting-dcb.c +++ b/libnm-core/nm-setting-dcb.c @@ -506,7 +506,7 @@ nm_setting_dcb_set_priority_traffic_class (NMSettingDcb *setting, } } -/******************************************************************/ +/*****************************************************************************/ #define DCB_FLAGS_ALL (NM_SETTING_DCB_FLAG_ENABLE | \ NM_SETTING_DCB_FLAG_ADVERTISE | \ @@ -724,7 +724,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return TRUE; } -/******************************************************************/ +/*****************************************************************************/ static void nm_setting_dcb_init (NMSettingDcb *setting) diff --git a/libnm-core/nm-setting-generic.c b/libnm-core/nm-setting-generic.c index a44f83cb..09edeb6e 100644 --- a/libnm-core/nm-setting-generic.c +++ b/libnm-core/nm-setting-generic.c @@ -46,7 +46,7 @@ typedef struct { int dummy; } NMSettingGenericPrivate; -/**************************************************************************/ +/*****************************************************************************/ /** * nm_setting_generic_new: diff --git a/libnm-core/nm-setting-infiniband.c b/libnm-core/nm-setting-infiniband.c index 6086f076..1bbe2b3f 100644 --- a/libnm-core/nm-setting-infiniband.c +++ b/libnm-core/nm-setting-infiniband.c @@ -210,12 +210,15 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } if (priv->parent) { - if (!nm_utils_iface_valid_name (priv->parent)) { - g_set_error_literal (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("not a valid interface name")); + GError *tmp_error = NULL; + + if (!nm_utils_is_valid_iface_name (priv->parent, &tmp_error)) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + "'%s': %s", priv->parent, tmp_error->message); g_prefix_error (error, "%s: ", NM_SETTING_INFINIBAND_PARENT); + g_error_free (tmp_error); return FALSE; } if (priv->p_key == -1) { @@ -241,10 +244,11 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) s_con = nm_connection_get_setting_connection (connection); if (s_con) { const char *interface_name = nm_setting_connection_get_interface_name (s_con); + GError *tmp_error = NULL; if (!interface_name) ; - else if (!nm_utils_iface_valid_name (interface_name)) { + else if (!nm_utils_is_valid_iface_name (interface_name, &tmp_error)) { /* report the error for NMSettingConnection:interface-name, because * it's that property that is invalid -- although we currently verify() * NMSettingInfiniband. @@ -252,9 +256,9 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("'%s' is not a valid interface name"), - interface_name); + "'%s': %s", interface_name, tmp_error->message); g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_INTERFACE_NAME); + g_error_free (tmp_error); return FALSE; } else { if (priv->p_key != -1) { @@ -406,7 +410,10 @@ nm_setting_infiniband_class_init (NMSettingInfinibandClass *setting_class) * property: mac-address * variable: HWADDR * description: IBoIP 20-byte hardware address of the device (in traditional - * hex-digits-and-colons notation). + * hex-digits-and-colons notation). + * Note that for initscripts this is the current MAC address of the device as found + * during ifup. For NetworkManager this is the permanent MAC address. Or in case no + * permanent MAC address exists, the MAC address initially configured on the device. * example: HWADDR=01:02:03:04:05:06:07:08:09:0A:01:02:03:04:05:06:07:08:09:11 * ---end--- */ diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c index 55ad7bb0..09c5798a 100644 --- a/libnm-core/nm-setting-ip-config.c +++ b/libnm-core/nm-setting-ip-config.c @@ -1773,7 +1773,6 @@ nm_setting_ip_config_get_dns_priority (NMSettingIPConfig *setting) return NM_SETTING_IP_CONFIG_GET_PRIVATE (setting)->dns_priority; } -NM_BACKPORT_SYMBOL (libnm_1_2_4, gint, nm_setting_ip_config_get_dns_priority, (NMSettingIPConfig *setting), (setting)); /** * nm_setting_ip_config_get_num_addresses: @@ -2234,7 +2233,7 @@ verify_label (const char *label) if (!p) return FALSE; iface = g_strndup (label, p - label); - if (!nm_utils_iface_valid_name (iface)) { + if (!nm_utils_is_valid_iface_name (iface, NULL)) { g_free (iface); return FALSE; } @@ -2711,7 +2710,7 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *setting_class) /** * NMSettingIPConfig:dns-options: * - * Array of DNS options. + * Array of DNS options as described in man 5 resolv.conf. * * %NULL means that the options are unset and left at the default. * In this case NetworkManager will use default options. This is @@ -2729,19 +2728,23 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *setting_class) /** * NMSettingIPConfig:dns-priority: * - * DNS priority. + * Intra-connection DNS priority. * * The relative priority to be used when determining the order of DNS * servers in resolv.conf. A lower value means that servers will be on top * of the file. Zero selects the default value, which is 50 for VPNs and - * 100 for other connections. When multiple devices have configurations - * with the same priority, the one with an active default route will be - * preferred. Note that when using dns=dnsmasq the order is meaningless + * 100 for other connections. Note that the priority is to order DNS + * settings for multiple active connections. It does not disambiguate + * multiple DNS servers within the same connection profile. For that, + * just specify the DNS servers in the desired order. + * When multiple devices have configurations with the same priority, the + * one with an active default route will be preferred. + * Note that when using dns=dnsmasq the order is meaningless * since dnsmasq forwards queries to all known servers at the same time. * * Negative values have the special effect of excluding other configurations * with a greater priority value; so in presence of at least a negative - * priority, only DNS servers from configurations with the lowest priority + * priority, only DNS servers from connections with the lowest priority * value will be used. * * Since: 1.4 @@ -2879,7 +2882,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *setting_class) g_param_spec_string (NM_SETTING_IP_CONFIG_DHCP_HOSTNAME, "", "", NULL, G_PARAM_READWRITE | - NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS)); /** diff --git a/libnm-core/nm-setting-ip-tunnel.c b/libnm-core/nm-setting-ip-tunnel.c index f75a51b6..4589f766 100644 --- a/libnm-core/nm-setting-ip-tunnel.c +++ b/libnm-core/nm-setting-ip-tunnel.c @@ -285,13 +285,13 @@ nm_setting_ip_tunnel_get_mtu (NMSettingIPTunnel *setting) return NM_SETTING_IP_TUNNEL_GET_PRIVATE (setting)->mtu; } -/*********************************************************************/ +/*****************************************************************************/ static gboolean verify (NMSetting *setting, NMConnection *connection, GError **error) { NMSettingIPTunnelPrivate *priv = NM_SETTING_IP_TUNNEL_GET_PRIVATE (setting); - int family; + int family = AF_UNSPEC; switch (priv->mode) { case NM_IP_TUNNEL_MODE_IPIP: @@ -307,8 +307,8 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) case NM_IP_TUNNEL_MODE_VTI6: family = AF_INET6; break; - default: - family = AF_UNSPEC; + case NM_IP_TUNNEL_MODE_UNKNOWN: + break; } if (family == AF_UNSPEC) { @@ -322,7 +322,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } if ( priv->parent - && !nm_utils_iface_valid_name (priv->parent) + && !nm_utils_is_valid_iface_name (priv->parent, NULL) && !nm_utils_is_uuid (priv->parent)) { g_set_error (error, NM_CONNECTION_ERROR, @@ -345,7 +345,16 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if (priv->remote && !nm_utils_ipaddr_valid (family, priv->remote)) { + if (!priv->remote) { + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("property is missing")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_IP_TUNNEL_SETTING_NAME, NM_SETTING_IP_TUNNEL_REMOTE); + return FALSE; + } + + if (!nm_utils_ipaddr_valid (family, priv->remote)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, diff --git a/libnm-core/nm-setting-ip4-config.c b/libnm-core/nm-setting-ip4-config.c index 70fab0e2..91a4a3f5 100644 --- a/libnm-core/nm-setting-ip4-config.c +++ b/libnm-core/nm-setting-ip4-config.c @@ -225,6 +225,20 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } + /* Failures from here on are NORMALIZABLE_ERROR... */ + + if ( nm_streq (method, NM_SETTING_IP4_CONFIG_METHOD_SHARED) + && nm_setting_ip_config_get_num_addresses (s_ip) > 1) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("multiple addresses are not allowed for '%s=%s'"), + NM_SETTING_IP_CONFIG_METHOD, + NM_SETTING_IP4_CONFIG_METHOD_SHARED); + g_prefix_error (error, "%s.%s: ", NM_SETTING_IP4_CONFIG_SETTING_NAME, NM_SETTING_IP_CONFIG_ADDRESSES); + return NM_SETTING_VERIFY_NORMALIZABLE_ERROR; + } + /* Failures from here on are NORMALIZABLE... */ if ( !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) diff --git a/libnm-core/nm-setting-ip6-config.c b/libnm-core/nm-setting-ip6-config.c index 50b36543..429f27c9 100644 --- a/libnm-core/nm-setting-ip6-config.c +++ b/libnm-core/nm-setting-ip6-config.c @@ -172,34 +172,38 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } else if ( !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) || !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) || !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_SHARED)) { - if (nm_setting_ip_config_get_num_dns (s_ip) > 0) { - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("this property is not allowed for '%s=%s'"), - NM_SETTING_IP_CONFIG_METHOD, method); - g_prefix_error (error, "%s.%s: ", NM_SETTING_IP6_CONFIG_SETTING_NAME, NM_SETTING_IP_CONFIG_DNS); - return FALSE; - } - if (nm_setting_ip_config_get_num_dns_searches (s_ip) > 0) { - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("this property is not allowed for '%s=%s'"), - NM_SETTING_IP_CONFIG_METHOD, method); - g_prefix_error (error, "%s.%s: ", NM_SETTING_IP6_CONFIG_SETTING_NAME, NM_SETTING_IP_CONFIG_DNS_SEARCH); - return FALSE; - } + /* Shared allows IP addresses and DNS; link-local and disabled do not */ + if (strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_SHARED) != 0) { + if (nm_setting_ip_config_get_num_dns (s_ip) > 0) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("this property is not allowed for '%s=%s'"), + NM_SETTING_IP_CONFIG_METHOD, method); + g_prefix_error (error, "%s.%s: ", NM_SETTING_IP6_CONFIG_SETTING_NAME, NM_SETTING_IP_CONFIG_DNS); + return FALSE; + } - if (nm_setting_ip_config_get_num_addresses (s_ip) > 0) { - g_set_error (error, - NM_CONNECTION_ERROR, - NM_CONNECTION_ERROR_INVALID_PROPERTY, - _("this property is not allowed for '%s=%s'"), - NM_SETTING_IP_CONFIG_METHOD, method); - g_prefix_error (error, "%s.%s: ", NM_SETTING_IP6_CONFIG_SETTING_NAME, NM_SETTING_IP_CONFIG_ADDRESSES); - return FALSE; + if (nm_setting_ip_config_get_num_dns_searches (s_ip) > 0) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("this property is not allowed for '%s=%s'"), + NM_SETTING_IP_CONFIG_METHOD, method); + g_prefix_error (error, "%s.%s: ", NM_SETTING_IP6_CONFIG_SETTING_NAME, NM_SETTING_IP_CONFIG_DNS_SEARCH); + return FALSE; + } + + if (nm_setting_ip_config_get_num_addresses (s_ip) > 0) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("this property is not allowed for '%s=%s'"), + NM_SETTING_IP_CONFIG_METHOD, method); + g_prefix_error (error, "%s.%s: ", NM_SETTING_IP6_CONFIG_SETTING_NAME, NM_SETTING_IP_CONFIG_ADDRESSES); + return FALSE; + } } } else if ( !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) || !strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_DHCP)) { @@ -713,8 +717,8 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *ip6_class) * when the interface hardware is replaced. * * The value of "stable-privacy" enables use of cryptographically - * secure hash of a secret host-specific key along with the connection - * identification and the network address as specified by RFC7217. + * secure hash of a secret host-specific key along with the connection's + * stable-id and the network address as specified by RFC7217. * This makes it impossible to use the address track host's presence, * and makes the address stable when the network interface hardware is * replaced. diff --git a/libnm-core/nm-setting-ip6-config.h b/libnm-core/nm-setting-ip6-config.h index 3b29aaa2..8e2c7771 100644 --- a/libnm-core/nm-setting-ip6-config.h +++ b/libnm-core/nm-setting-ip6-config.h @@ -127,7 +127,7 @@ typedef enum { * key along with the connection identification and the network address as * specified by RFC7217. * - * #NMSettingIP6ConfigAddrGenMode controls how the the Interface Identifier for + * #NMSettingIP6ConfigAddrGenMode controls how the Interface Identifier for * RFC4862 Stateless Address Autoconfiguration is created. * * Since: 1.2 diff --git a/libnm-core/nm-setting-macsec.c b/libnm-core/nm-setting-macsec.c new file mode 100644 index 00000000..60df6839 --- /dev/null +++ b/libnm-core/nm-setting-macsec.c @@ -0,0 +1,592 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright 2017 Red Hat, Inc. + */ + +#include "nm-default.h" + +#include "nm-setting-macsec.h" + +#include <stdlib.h> +#include <string.h> + +#include "nm-utils.h" +#include "nm-core-types-internal.h" +#include "nm-setting-connection.h" +#include "nm-setting-private.h" +#include "nm-setting-wired.h" +#include "nm-connection-private.h" + +/** + * SECTION:nm-setting-macsec + * @short_description: Describes connection properties for MACSEC interfaces + * + * The #NMSettingMacsec object is a #NMSetting subclass that describes properties + * necessary for connection to MACsec (IEEE 802.1AE) interfaces. + **/ + +G_DEFINE_TYPE_WITH_CODE (NMSettingMacsec, nm_setting_macsec, NM_TYPE_SETTING, + _nm_register_setting (MACSEC, 1)) +NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_MACSEC) + +#define NM_SETTING_MACSEC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_MACSEC, NMSettingMacsecPrivate)) + +typedef struct { + char *parent; + NMSettingMacsecMode mode; + gboolean encrypt; + char *mka_cak; + NMSettingSecretFlags mka_cak_flags; + char *mka_ckn; + int port; + NMSettingMacsecValidation validation; +} NMSettingMacsecPrivate; + +NM_GOBJECT_PROPERTIES_DEFINE_BASE ( + PROP_PARENT, + PROP_MODE, + PROP_ENCRYPT, + PROP_MKA_CAK, + PROP_MKA_CAK_FLAGS, + PROP_MKA_CKN, + PROP_PORT, + PROP_VALIDATION, +); + +/** + * nm_setting_macsec_new: + * + * Creates a new #NMSettingMacsec object with default values. + * + * Returns: (transfer full): the new empty #NMSettingMacsec object + * + * Since: 1.6 + **/ +NMSetting * +nm_setting_macsec_new (void) +{ + return (NMSetting *) g_object_new (NM_TYPE_SETTING_MACSEC, NULL); +} + +/** + * nm_setting_macsec_get_parent: + * @setting: the #NMSettingMacsec + * + * Returns: the #NMSettingMacsec:parent property of the setting + * + * Since: 1.6 + **/ +const char * +nm_setting_macsec_get_parent (NMSettingMacsec *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_MACSEC (setting), NULL); + return NM_SETTING_MACSEC_GET_PRIVATE (setting)->parent; +} + +/** + * nm_setting_macsec_get_mode: + * @setting: the #NMSettingMacsec + * + * Returns: the #NMSettingMacsec:mode property of the setting + * + * Since: 1.6 + **/ +NMSettingMacsecMode +nm_setting_macsec_get_mode (NMSettingMacsec *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_MACSEC (setting), NM_SETTING_MACSEC_MODE_PSK); + return NM_SETTING_MACSEC_GET_PRIVATE (setting)->mode; +} + +/** + * nm_setting_macsec_get_encrypt: + * @setting: the #NMSettingMacsec + * + * Returns: the #NMSettingMacsec:encrypt property of the setting + * + * Since: 1.6 + **/ +gboolean +nm_setting_macsec_get_encrypt (NMSettingMacsec *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_MACSEC (setting), TRUE); + return NM_SETTING_MACSEC_GET_PRIVATE (setting)->encrypt; +} + +/** + * nm_setting_macsec_get_mka_cak + * @setting: the #NMSettingMacsec + * + * Returns: the #NMSettingMacsec:mka-cak property of the setting + * + * Since: 1.6 + **/ +const char * +nm_setting_macsec_get_mka_cak (NMSettingMacsec *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_MACSEC (setting), NULL); + return NM_SETTING_MACSEC_GET_PRIVATE (setting)->mka_cak; +} + +/** + * nm_setting_macsec_get_mka_cak_flags: + * @setting: the #NMSettingMacsec + * + * Returns: the #NMSettingSecretFlags pertaining to the #NMSettingMacsec:mka-cak + * + * Since: 1.6 + **/ +NMSettingSecretFlags +nm_setting_macsec_get_mka_cak_flags (NMSettingMacsec *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_MACSEC (setting), NM_SETTING_SECRET_FLAG_NONE); + + return NM_SETTING_MACSEC_GET_PRIVATE (setting)->mka_cak_flags; +} + +/** + * nm_setting_macsec_get_mka_ckn: + * @setting: the #NMSettingMacsec + * + * Returns: the #NMSettingMacsec:mka-ckn property of the setting + * + * Since: 1.6 + **/ +const char * +nm_setting_macsec_get_mka_ckn (NMSettingMacsec *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_MACSEC (setting), NULL); + return NM_SETTING_MACSEC_GET_PRIVATE (setting)->mka_ckn; +} + +/** + * nm_setting_macsec_get_port: + * @setting: the #NMSettingMacsec + * + * Returns: the #NMSettingMacsec:port property of the setting + * + * Since: 1.6 + **/ +int +nm_setting_macsec_get_port (NMSettingMacsec *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_MACSEC (setting), 1); + return NM_SETTING_MACSEC_GET_PRIVATE (setting)->port; +} + +/** + * nm_setting_macsec_get_validation: + * @setting: the #NMSettingMacsec + * + * Returns: the #NMSettingMacsec:validation property of the setting + * + * Since: 1.6 + **/ +NMSettingMacsecValidation +nm_setting_macsec_get_validation (NMSettingMacsec *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_MACSEC (setting), NM_SETTING_MACSEC_VALIDATION_DISABLE); + return NM_SETTING_MACSEC_GET_PRIVATE (setting)->validation; +} + +static GPtrArray * +need_secrets (NMSetting *setting) +{ + NMSettingMacsecPrivate *priv = NM_SETTING_MACSEC_GET_PRIVATE (setting); + GPtrArray *secrets = NULL; + + if (priv->mode == NM_SETTING_MACSEC_MODE_PSK) { + if ( !priv->mka_cak + && !NM_FLAGS_HAS (priv->mka_cak_flags, NM_SETTING_SECRET_FLAG_NOT_REQUIRED)) { + secrets = g_ptr_array_sized_new (1); + g_ptr_array_add (secrets, NM_SETTING_MACSEC_MKA_CAK); + } + } + + return secrets; +} + +/*********************************************************************/ + +static gboolean +verify_macsec_key (const char *key, gboolean cak, GError **error) +{ + int req_len; + + if (!key || !key[0]) { + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("the key is empty")); + return FALSE; + } + + req_len = cak ? + NM_SETTING_MACSEC_MKA_CAK_LENGTH : + NM_SETTING_MACSEC_MKA_CKN_LENGTH; + if (strlen (key) != req_len) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("the key must be %d characters"), req_len); + return FALSE; + } + + if (!NM_STRCHAR_ALL (key, ch, g_ascii_isxdigit (ch))) { + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("the key contais non-hexadecimal characters")); + return FALSE; + } + + return TRUE; +} + +static gboolean +verify (NMSetting *setting, NMConnection *connection, GError **error) +{ + NMSettingMacsecPrivate *priv = NM_SETTING_MACSEC_GET_PRIVATE (setting); + NMSettingConnection *s_con = NULL; + NMSettingWired *s_wired = NULL; + NMSetting8021x *s_8021x = NULL; + + if (connection) { + s_con = nm_connection_get_setting_connection (connection); + s_wired = nm_connection_get_setting_wired (connection); + s_8021x = nm_connection_get_setting_802_1x (connection); + } + + if (priv->parent) { + if (nm_utils_is_uuid (priv->parent)) { + /* If we have an NMSettingConnection:master with slave-type="macsec", + * then it must be the same UUID. + */ + if (s_con) { + const char *master = NULL, *slave_type = NULL; + + slave_type = nm_setting_connection_get_slave_type (s_con); + if (!g_strcmp0 (slave_type, NM_SETTING_MACSEC_SETTING_NAME)) + master = nm_setting_connection_get_master (s_con); + + if (master && g_strcmp0 (priv->parent, master) != 0) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("'%s' value doesn't match '%s=%s'"), + priv->parent, NM_SETTING_CONNECTION_MASTER, master); + g_prefix_error (error, "%s.%s: ", NM_SETTING_MACSEC_SETTING_NAME, NM_SETTING_MACSEC_PARENT); + return FALSE; + } + } + } else if (!nm_utils_iface_valid_name (priv->parent)) { + /* parent must be either a UUID or an interface name */ + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("'%s' is neither an UUID nor an interface name"), + priv->parent); + g_prefix_error (error, "%s.%s: ", NM_SETTING_MACSEC_SETTING_NAME, NM_SETTING_MACSEC_PARENT); + return FALSE; + } + } else { + /* If parent is NULL, the parent must be specified via + * NMSettingWired:mac-address. + */ + if ( connection + && (!s_wired || !nm_setting_wired_get_mac_address (s_wired))) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_MISSING_PROPERTY, + _("property is not specified and neither is '%s:%s'"), + NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_MAC_ADDRESS); + g_prefix_error (error, "%s.%s: ", NM_SETTING_MACSEC_SETTING_NAME, NM_SETTING_MACSEC_PARENT); + return FALSE; + } + } + + if (priv->mode == NM_SETTING_MACSEC_MODE_PSK) { + if (!verify_macsec_key (priv->mka_ckn, FALSE, error)) { + g_prefix_error (error, "%s.%s: ", NM_SETTING_MACSEC_SETTING_NAME, NM_SETTING_MACSEC_MKA_CKN); + return FALSE; + } + } else if (priv->mode == NM_SETTING_MACSEC_MODE_EAP) { + if (!s_8021x) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_MISSING_SETTING, + _("EAP key management requires '%s' setting presence"), + NM_SETTING_802_1X_SETTING_NAME); + g_prefix_error (error, "%s: ", NM_SETTING_MACSEC_SETTING_NAME); + return FALSE; + } + } + + if (priv->port <= 0 || priv->port > 65534) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_MISSING_PROPERTY, + _("invalid port %d"), + priv->port); + g_prefix_error (error, "%s.%s: ", NM_SETTING_MACSEC_SETTING_NAME, NM_SETTING_MACSEC_PORT); + return FALSE; + } + + return TRUE; +} + +static void +nm_setting_macsec_init (NMSettingMacsec *setting) +{ +} + +static void +set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ + NMSettingMacsec *setting = NM_SETTING_MACSEC (object); + NMSettingMacsecPrivate *priv = NM_SETTING_MACSEC_GET_PRIVATE (setting); + + switch (prop_id) { + case PROP_PARENT: + g_free (priv->parent); + priv->parent = g_value_dup_string (value); + break; + case PROP_MODE: + priv->mode = g_value_get_int (value); + break; + case PROP_ENCRYPT: + priv->encrypt = g_value_get_boolean (value); + break; + case PROP_MKA_CAK: + g_free (priv->mka_cak); + priv->mka_cak = g_value_dup_string (value); + break; + case PROP_MKA_CAK_FLAGS: + priv->mka_cak_flags = g_value_get_flags (value); + break; + case PROP_MKA_CKN: + g_free (priv->mka_ckn); + priv->mka_ckn = g_value_dup_string (value); + break; + case PROP_PORT: + priv->port = g_value_get_int (value); + break; + case PROP_VALIDATION: + priv->validation = g_value_get_int (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + NMSettingMacsec *setting = NM_SETTING_MACSEC (object); + NMSettingMacsecPrivate *priv = NM_SETTING_MACSEC_GET_PRIVATE (setting); + + switch (prop_id) { + case PROP_PARENT: + g_value_set_string (value, priv->parent); + break; + case PROP_MODE: + g_value_set_int (value, priv->mode); + break; + case PROP_ENCRYPT: + g_value_set_boolean (value, priv->encrypt); + break; + case PROP_MKA_CAK: + g_value_set_string (value, priv->mka_cak); + break; + case PROP_MKA_CAK_FLAGS: + g_value_set_flags (value, priv->mka_cak_flags); + break; + case PROP_MKA_CKN: + g_value_set_string (value, priv->mka_ckn); + break; + case PROP_PORT: + g_value_set_int (value, priv->port); + break; + case PROP_VALIDATION: + g_value_set_int (value, priv->validation); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +finalize (GObject *object) +{ + NMSettingMacsec *setting = NM_SETTING_MACSEC (object); + NMSettingMacsecPrivate *priv = NM_SETTING_MACSEC_GET_PRIVATE (setting); + + g_free (priv->parent); + if (priv->mka_cak) { + memset (priv->mka_cak, 0, strlen (priv->mka_cak)); + g_free (priv->mka_cak); + } + g_free (priv->mka_ckn); + + G_OBJECT_CLASS (nm_setting_macsec_parent_class)->finalize (object); +} + +static void +nm_setting_macsec_class_init (NMSettingMacsecClass *setting_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (setting_class); + NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class); + + g_type_class_add_private (setting_class, sizeof (NMSettingMacsecPrivate)); + + object_class->set_property = set_property; + object_class->get_property = get_property; + object_class->finalize = finalize; + parent_class->verify = verify; + parent_class->need_secrets = need_secrets; + + /** + * NMSettingMacsec:parent: + * + * If given, specifies the parent interface name or parent connection UUID + * from which this MACSEC interface should be created. If this property is + * not specified, the connection must contain an #NMSettingWired setting + * with a #NMSettingWired:mac-address property. + * + * Since: 1.6 + **/ + obj_properties[PROP_PARENT] = + g_param_spec_string (NM_SETTING_MACSEC_PARENT, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + NM_SETTING_PARAM_INFERRABLE | + G_PARAM_STATIC_STRINGS); + + /** + * NMSettingMacsec:mode: + * + * Specifies how the CAK (Connectivity Association Key) for MKA (MACsec Key + * Agreement) is obtained. + * + * Since: 1.6 + **/ + obj_properties[PROP_MODE] = + g_param_spec_int (NM_SETTING_MACSEC_MODE, "", "", + G_MININT, G_MAXINT, NM_SETTING_MACSEC_MODE_PSK, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + NM_SETTING_PARAM_INFERRABLE | + G_PARAM_STATIC_STRINGS); + + /** + * NMSettingMacsec:encrypt: + * + * Whether the transmitted traffic must be encrypted. + * + * Since: 1.6 + **/ + obj_properties[PROP_ENCRYPT] = + g_param_spec_boolean (NM_SETTING_MACSEC_ENCRYPT, "", "", + TRUE, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_STRINGS); + + /** + * NMSettingMacsec:mka-cak: + * + * The pre-shared CAK (Connectivity Association Key) for MACsec + * Key Agreement. + * + * Since: 1.6 + **/ + obj_properties[PROP_MKA_CAK] = + g_param_spec_string (NM_SETTING_MACSEC_MKA_CAK, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + NM_SETTING_PARAM_SECRET | + G_PARAM_STATIC_STRINGS); + + /** + * NMSettingMacsec:mka-cak-flags: + * + * Flags indicating how to handle the #NMSettingMacsec:mka-cak + * property. + * + * Since: 1.6 + **/ + obj_properties[PROP_MKA_CAK_FLAGS] = + g_param_spec_flags (NM_SETTING_MACSEC_MKA_CAK_FLAGS, "", "", + NM_TYPE_SETTING_SECRET_FLAGS, + NM_SETTING_SECRET_FLAG_NONE, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS); + + /** + * NMSettingMacsec:mka-ckn: + * + * The pre-shared CKN (Connectivity-association Key Name) for + * MACsec Key Agreement. + * + * Since: 1.6 + **/ + obj_properties[PROP_MKA_CKN] = + g_param_spec_string (NM_SETTING_MACSEC_MKA_CKN, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_STRINGS); + + /** + * NMSettingMacsec:port: + * + * The port component of the SCI (Secure Channel Identifier), between 1 and 65534. + * + * Since: 1.6 + **/ + obj_properties[PROP_PORT] = + g_param_spec_int (NM_SETTING_MACSEC_PORT, "", "", + 1, 65534, 1, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + NM_SETTING_PARAM_INFERRABLE | + G_PARAM_STATIC_STRINGS); + + /** + * NMSettingMacsec:validation: + * + * Specifies the validation mode for incoming frames. + * + * Since: 1.6 + **/ + obj_properties[PROP_VALIDATION] = + g_param_spec_int (NM_SETTING_MACSEC_VALIDATION, "", "", + G_MININT, G_MAXINT, NM_SETTING_MACSEC_VALIDATION_STRICT, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + NM_SETTING_PARAM_INFERRABLE | + G_PARAM_STATIC_STRINGS); + + g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); +} diff --git a/libnm-core/nm-setting-macsec.h b/libnm-core/nm-setting-macsec.h new file mode 100644 index 00000000..f9431dfe --- /dev/null +++ b/libnm-core/nm-setting-macsec.h @@ -0,0 +1,126 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ + +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright 2017 Red Hat, Inc. + */ + +#ifndef __NM_SETTING_MACSEC_H__ +#define __NM_SETTING_MACSEC_H__ + +#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION) +#error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-setting.h" + +G_BEGIN_DECLS + +#define NM_TYPE_SETTING_MACSEC (nm_setting_macsec_get_type ()) +#define NM_SETTING_MACSEC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_MACSEC, NMSettingMacsec)) +#define NM_SETTING_MACSEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_MACSECCONFIG, NMSettingMacsecClass)) +#define NM_IS_SETTING_MACSEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_MACSEC)) +#define NM_IS_SETTING_MACSEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_MACSEC)) +#define NM_SETTING_MACSEC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_MACSEC, NMSettingMacsecClass)) + +#define NM_SETTING_MACSEC_SETTING_NAME "macsec" + +#define NM_SETTING_MACSEC_PARENT "parent" +#define NM_SETTING_MACSEC_MODE "mode" +#define NM_SETTING_MACSEC_ENCRYPT "encrypt" +#define NM_SETTING_MACSEC_MKA_CAK "mka-cak" +#define NM_SETTING_MACSEC_MKA_CAK_FLAGS "mka-cak-flags" +#define NM_SETTING_MACSEC_MKA_CKN "mka-ckn" +#define NM_SETTING_MACSEC_PORT "port" +#define NM_SETTING_MACSEC_VALIDATION "validation" + +/** + * NMSettingMacsec: + */ +struct _NMSettingMacsec { + NMSetting parent; +}; + +typedef struct { + NMSettingClass parent; + + /*< private >*/ + gpointer padding[4]; +} NMSettingMacsecClass; + +/** + * NMSettingMacsecMode: + * @NM_SETTING_MACSEC_MODE_PSK: The CAK is pre-shared + * @NM_SETTING_MACSEC_MODE_EAP: The CAK is the result of participation in EAP + * + * #NMSettingMacsecMode controls how the CAK (Connectivity Association Key) used + * in MKA (MACsec Key Agreement) is obtained. + * + * Since: 1.6 + */ +typedef enum { + NM_SETTING_MACSEC_MODE_PSK = 0, + NM_SETTING_MACSEC_MODE_EAP = 1, +} NMSettingMacsecMode; + +/** + * NMSettingMacsecValidation: + * @NM_SETTING_MACSEC_VALIDATION_DISABLE: All incoming frames are accepted if + * possible + * @NM_SETTING_MACSEC_VALIDATION_CHECK: Non protected, invalid, or impossible to + * verify frames are accepted and counted as "invalid" + * @NM_SETTING_MACSEC_VALIDATION_STRICT: Non protected, invalid, or impossible to + * verify frames are dropped + * + * #NMSettingMacsecValidation specifies a validation mode for incoming frames. + * + * Since: 1.6 + */ +typedef enum { + NM_SETTING_MACSEC_VALIDATION_DISABLE = 0, + NM_SETTING_MACSEC_VALIDATION_CHECK = 1, + NM_SETTING_MACSEC_VALIDATION_STRICT = 2, +} NMSettingMacsecValidation; + +#define NM_SETTING_MACSEC_MKA_CAK_LENGTH 32 +#define NM_SETTING_MACSEC_MKA_CKN_LENGTH 64 + +NM_AVAILABLE_IN_1_6 +GType nm_setting_macsec_get_type (void); +NM_AVAILABLE_IN_1_6 +NMSetting *nm_setting_macsec_new (void); + +NM_AVAILABLE_IN_1_6 +const char *nm_setting_macsec_get_parent (NMSettingMacsec *setting); +NM_AVAILABLE_IN_1_6 +NMSettingMacsecMode nm_setting_macsec_get_mode (NMSettingMacsec *setting); +NM_AVAILABLE_IN_1_6 +gboolean nm_setting_macsec_get_encrypt (NMSettingMacsec *setting); +NM_AVAILABLE_IN_1_6 +const char *nm_setting_macsec_get_mka_cak (NMSettingMacsec *setting); +NM_AVAILABLE_IN_1_6 +NMSettingSecretFlags nm_setting_macsec_get_mka_cak_flags (NMSettingMacsec *setting); +NM_AVAILABLE_IN_1_6 +const char *nm_setting_macsec_get_mka_ckn (NMSettingMacsec *setting); +NM_AVAILABLE_IN_1_6 +int nm_setting_macsec_get_port (NMSettingMacsec *setting); +NM_AVAILABLE_IN_1_6 +NMSettingMacsecValidation nm_setting_macsec_get_validation (NMSettingMacsec *setting); + +G_END_DECLS + +#endif /* __NM_SETTING_MACSEC_H__ */ diff --git a/libnm-core/nm-setting-macvlan.c b/libnm-core/nm-setting-macvlan.c index aec3b4f9..f5edc6e8 100644 --- a/libnm-core/nm-setting-macvlan.c +++ b/libnm-core/nm-setting-macvlan.c @@ -136,7 +136,7 @@ nm_setting_macvlan_get_tap (NMSettingMacvlan *setting) return NM_SETTING_MACVLAN_GET_PRIVATE (setting)->tap; } -/*********************************************************************/ +/*****************************************************************************/ static void nm_setting_macvlan_init (NMSettingMacvlan *setting) @@ -160,7 +160,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) if (priv->parent) { if ( !nm_utils_is_uuid (priv->parent) - && !nm_utils_iface_valid_name (priv->parent)) { + && !nm_utils_is_valid_iface_name (priv->parent, NULL)) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, diff --git a/libnm-core/nm-setting-proxy.c b/libnm-core/nm-setting-proxy.c new file mode 100644 index 00000000..1492892c --- /dev/null +++ b/libnm-core/nm-setting-proxy.c @@ -0,0 +1,387 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ + +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * (C) Copyright 2016 Atul Anand <atulhjp@gmail.com>. + */ + +#include "nm-default.h" + +#include "nm-setting-proxy.h" +#include "nm-utils.h" +#include "nm-setting-private.h" + +/** + * SECTION:nm-setting-proxy + * @short_description: Describes proxy URL, script and other related properties + * + * The #NMSettingProxy object is a #NMSetting subclass that describes properties + * related to Proxy settings like PAC URL, PAC script etc. + * + * NetworkManager support 2 values for the #NMSettingProxy:method property for + * proxy. If "auto" is specified then WPAD takes place and the appropriate details + * are pushed into PacRunner or user can override this URL with a new PAC URL or a + * PAC script. If "none" is selected then no proxy configuration is given to PacRunner + * to fulfill client queries. + **/ + +G_DEFINE_TYPE_WITH_CODE (NMSettingProxy, nm_setting_proxy, NM_TYPE_SETTING, + _nm_register_setting (PROXY, 4)) +NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_PROXY) + +#define NM_SETTING_PROXY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_PROXY, NMSettingProxyPrivate)) + +typedef struct { + NMSettingProxyMethod method; + gboolean browser_only; + char *pac_url; + char *pac_script; +} NMSettingProxyPrivate; + +enum { + PROP_0, + PROP_METHOD, + PROP_BROWSER_ONLY, + PROP_PAC_URL, + PROP_PAC_SCRIPT, + + LAST_PROP +}; + +/** + * nm_setting_proxy_new: + * + * Creates a new #NMSettingProxy object. + * + * Returns: the new empty #NMSettingProxy object + * + * Since: 1.6 + **/ +NMSetting * +nm_setting_proxy_new (void) +{ + return (NMSetting *) g_object_new (NM_TYPE_SETTING_PROXY, NULL); +} + +/** + * nm_setting_proxy_get_method: + * @setting: the #NMSettingProxy + * + * Returns the proxy configuration method. By default the value is %NM_SETTING_PROXY_METHOD_NONE. + * %NM_SETTING_PROXY_METHOD_NONE should be selected for a connection intended for direct network + * access. + * + * Returns: the proxy configuration method + * + * Since: 1.6 + **/ +NMSettingProxyMethod +nm_setting_proxy_get_method (NMSettingProxy *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_PROXY (setting), NM_SETTING_PROXY_METHOD_NONE); + + return NM_SETTING_PROXY_GET_PRIVATE (setting)->method; +} + +/** + * nm_setting_proxy_get_browser_only: + * @setting: the #NMSettingProxy + * + * Returns: %TRUE if this proxy configuration is only for browser + * clients/schemes, %FALSE otherwise. + * + * Since: 1.6 + **/ +gboolean +nm_setting_proxy_get_browser_only (NMSettingProxy *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_PROXY (setting), FALSE); + + return NM_SETTING_PROXY_GET_PRIVATE (setting)->browser_only; +} + +/** + * nm_setting_proxy_get_pac_url: + * @setting: the #NMSettingProxy + * + * Returns: the PAC URL for obtaining PAC file + * + * Since: 1.6 + **/ +const char * +nm_setting_proxy_get_pac_url (NMSettingProxy *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_PROXY (setting), NULL); + + return NM_SETTING_PROXY_GET_PRIVATE (setting)->pac_url; +} + +/** + * nm_setting_proxy_get_pac_script: + * @setting: the #NMSettingProxy + * + * Returns: the PAC script + * + * Since: 1.6 + **/ +const char * +nm_setting_proxy_get_pac_script (NMSettingProxy *setting) +{ + g_return_val_if_fail (NM_IS_SETTING_PROXY (setting), NULL); + + return NM_SETTING_PROXY_GET_PRIVATE (setting)->pac_script; +} + +static gboolean +verify (NMSetting *setting, NMConnection *connection, GError **error) +{ + NMSettingProxyPrivate *priv = NM_SETTING_PROXY_GET_PRIVATE (setting); + NMSettingProxyMethod method; + + method = priv->method; + + if (!NM_IN_SET (method, + NM_SETTING_PROXY_METHOD_NONE, + NM_SETTING_PROXY_METHOD_AUTO)) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("invalid proxy method")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_PROXY_SETTING_NAME, NM_SETTING_PROXY_PAC_URL); + return FALSE; + } + + if (method != NM_SETTING_PROXY_METHOD_AUTO) { + if (priv->pac_url) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("this property is not allowed for method none")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_PROXY_SETTING_NAME, NM_SETTING_PROXY_PAC_URL); + return FALSE; + } + + if (priv->pac_script) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("this property is not allowed for method none")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_PROXY_SETTING_NAME, NM_SETTING_PROXY_PAC_SCRIPT); + return FALSE; + } + } + + if (priv->pac_script) { + if (strlen (priv->pac_script) > 1*1024*1024) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("the script is too large")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_PROXY_SETTING_NAME, NM_SETTING_PROXY_PAC_SCRIPT); + return FALSE; + } + if (!g_utf8_validate (priv->pac_script, -1, NULL)) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("the script is not valid utf8")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_PROXY_SETTING_NAME, NM_SETTING_PROXY_PAC_SCRIPT); + return FALSE; + } + if (!strstr (priv->pac_script, "FindProxyForURL")) { + g_set_error (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("the script lacks FindProxyForURL function")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_PROXY_SETTING_NAME, NM_SETTING_PROXY_PAC_SCRIPT); + return FALSE; + } + } + + return TRUE; +} + +static void +nm_setting_proxy_init (NMSettingProxy *setting) +{ +} + +static void +finalize (GObject *object) +{ + NMSettingProxy *self = NM_SETTING_PROXY (object); + NMSettingProxyPrivate *priv = NM_SETTING_PROXY_GET_PRIVATE (self); + + g_free (priv->pac_url); + g_free (priv->pac_script); + + G_OBJECT_CLASS (nm_setting_proxy_parent_class)->finalize (object); +} + +static void +get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + NMSettingProxy *setting = NM_SETTING_PROXY (object); + + switch (prop_id) { + case PROP_METHOD: + g_value_set_int (value, nm_setting_proxy_get_method (setting)); + break; + case PROP_BROWSER_ONLY: + g_value_set_boolean (value, nm_setting_proxy_get_browser_only (setting)); + break; + case PROP_PAC_URL: + g_value_set_string (value, nm_setting_proxy_get_pac_url (setting)); + break; + case PROP_PAC_SCRIPT: + g_value_set_string (value, nm_setting_proxy_get_pac_script (setting)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ + NMSettingProxyPrivate *priv = NM_SETTING_PROXY_GET_PRIVATE (object); + + switch (prop_id) { + case PROP_METHOD: + priv->method = g_value_get_int (value); + break; + case PROP_BROWSER_ONLY: + priv->browser_only = g_value_get_boolean (value); + break; + case PROP_PAC_URL: + g_free (priv->pac_url); + priv->pac_url = g_value_dup_string (value); + break; + case PROP_PAC_SCRIPT: + g_free (priv->pac_script); + priv->pac_script = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +nm_setting_proxy_class_init (NMSettingProxyClass *setting_class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (setting_class); + NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class); + + g_type_class_add_private (setting_class, sizeof (NMSettingProxyPrivate)); + + /* virtual methods */ + object_class->set_property = set_property; + object_class->get_property = get_property; + object_class->finalize = finalize; + parent_class->verify = verify; + + /** + * NMSettingProxy:method: + * + * Method for proxy configuration, Default is %NM_SETTING_PROXY_METHOD_NONE + * + * Since: 1.6 + **/ + /* ---ifcfg-rh--- + * property: method + * variable: PROXY_METHOD(+) + * default: none + * description: Method for proxy configuration. For "auto", WPAD is used for + * proxy configuration, or set the PAC file via PAC_URL or PAC_SCRIPT. + * values: none, auto + * ---end--- + */ + g_object_class_install_property + (object_class, PROP_METHOD, + g_param_spec_int (NM_SETTING_PROXY_METHOD, "", "", + G_MININT32, G_MAXINT32, NM_SETTING_PROXY_METHOD_NONE, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_STRINGS)); + + /** + * NMSettingProxy:browser-only: + * + * Whether the proxy configuration is for browser only. + * + * Since: 1.6 + **/ + /* ---ifcfg-rh--- + * property: browser-only + * variable: BROWSER_ONLY(+) + * default: no + * description: Whether the proxy configuration is for browser only. + * ---end--- + */ + g_object_class_install_property + (object_class, PROP_BROWSER_ONLY, + g_param_spec_boolean (NM_SETTING_PROXY_BROWSER_ONLY, "", "", + FALSE, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); + + /** + * NMSettingProxy:pac-url: + * + * PAC URL for obtaining PAC file. + * + * Since: 1.6 + **/ + /* ---ifcfg-rh--- + * property: pac-url + * variable: PAC_URL(+) + * description: URL for PAC file. + * example: PAC_URL=http://wpad.mycompany.com/wpad.dat + * ---end--- + */ + g_object_class_install_property + (object_class, PROP_PAC_URL, + g_param_spec_string (NM_SETTING_PROXY_PAC_URL, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); + + /** + * NMSettingProxy:pac-script: + * + * PAC script for the connection. + * + * Since: 1.6 + **/ + /* ---ifcfg-rh--- + * property: pac-script + * variable: PAC_SCRIPT(+) + * description: Path of the PAC script. + * example: PAC_SCRIPT=/home/joe/proxy.pac + * ---end--- + */ + g_object_class_install_property + (object_class, PROP_PAC_SCRIPT, + g_param_spec_string (NM_SETTING_PROXY_PAC_SCRIPT, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); +} diff --git a/libnm-core/nm-setting-proxy.h b/libnm-core/nm-setting-proxy.h new file mode 100644 index 00000000..2009dfab --- /dev/null +++ b/libnm-core/nm-setting-proxy.h @@ -0,0 +1,88 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ + +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * (C) Copyright 2016 Atul Anand <atulhjp@gmail.com>. + */ + +#ifndef __NM_SETTING_PROXY_H__ +#define __NM_SETTING_PROXY_H__ + +#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION) +#error "Only <NetworkManager.h> can be included directly." +#endif + +#include <nm-setting.h> + +G_BEGIN_DECLS + +/** + * NMSettingProxyMethod: + * @NM_SETTING_PROXY_METHOD_NONE: No Proxy for the Connection + * @NM_SETTING_PROXY_METHOD_AUTO: DHCP obtained Proxy/ Manual override + * + * The Proxy method. + * + * Since: 1.6 + */ +typedef enum { + NM_SETTING_PROXY_METHOD_NONE = 0, + NM_SETTING_PROXY_METHOD_AUTO = 1, +} NMSettingProxyMethod; + +#define NM_TYPE_SETTING_PROXY (nm_setting_proxy_get_type ()) +#define NM_SETTING_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_PROXY, NMSettingProxy)) +#define NM_SETTING_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_PROXY, NMSettingProxyClass)) +#define NM_IS_SETTING_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_PROXY)) +#define NM_IS_SETTING_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_PROXY)) +#define NM_SETTING_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_PROXY, NMSettingProxyClass)) + +#define NM_SETTING_PROXY_SETTING_NAME "proxy" + +#define NM_SETTING_PROXY_METHOD "method" +#define NM_SETTING_PROXY_BROWSER_ONLY "browser-only" +#define NM_SETTING_PROXY_PAC_URL "pac-url" +#define NM_SETTING_PROXY_PAC_SCRIPT "pac-script" + +struct _NMSettingProxy { + NMSetting parent; +}; + +typedef struct { + NMSettingClass parent; + + gpointer padding[4]; +} NMSettingProxyClass; + +NM_AVAILABLE_IN_1_6 +GType nm_setting_proxy_get_type (void); + +NM_AVAILABLE_IN_1_6 +NMSetting *nm_setting_proxy_new (void); + +NM_AVAILABLE_IN_1_6 +NMSettingProxyMethod nm_setting_proxy_get_method (NMSettingProxy *setting); +NM_AVAILABLE_IN_1_6 +gboolean nm_setting_proxy_get_browser_only (NMSettingProxy *setting); +NM_AVAILABLE_IN_1_6 +const char *nm_setting_proxy_get_pac_url (NMSettingProxy *setting); +NM_AVAILABLE_IN_1_6 +const char *nm_setting_proxy_get_pac_script (NMSettingProxy *setting); + +G_END_DECLS + +#endif /* __NM_SETTING_PROXY_H__ */ diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c index e3ddbdad..f64aa5f9 100644 --- a/libnm-core/nm-setting-team-port.c +++ b/libnm-core/nm-setting-team-port.c @@ -117,7 +117,17 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } if (priv->config) { - if (!_nm_utils_check_valid_json (priv->config, error)) { + if (strlen (priv->config) > 1*1024*1024) { + g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("team config exceeds size limit")); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_TEAM_PORT_SETTING_NAME, + NM_SETTING_TEAM_PORT_CONFIG); + return FALSE; + } + + if (!nm_utils_is_json_object (priv->config, error)) { g_prefix_error (error, "%s.%s: ", NM_SETTING_TEAM_PORT_SETTING_NAME, diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c index 5bf11ed9..e83ce309 100644 --- a/libnm-core/nm-setting-team.c +++ b/libnm-core/nm-setting-team.c @@ -89,7 +89,17 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; if (priv->config) { - if (!_nm_utils_check_valid_json (priv->config, error)) { + if (strlen (priv->config) > 1*1024*1024) { + g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("team config exceeds size limit")); + g_prefix_error (error, + "%s.%s: ", + NM_SETTING_TEAM_SETTING_NAME, + NM_SETTING_TEAM_CONFIG); + return FALSE; + } + + if (!nm_utils_is_json_object (priv->config, error)) { g_prefix_error (error, "%s.%s: ", NM_SETTING_TEAM_SETTING_NAME, diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c index 020f448c..61264784 100644 --- a/libnm-core/nm-setting-vlan.c +++ b/libnm-core/nm-setting-vlan.c @@ -147,13 +147,11 @@ priority_map_new_from_str (NMVlanPriorityMap map, const char *str) to = g_ascii_strtoull (t[1], NULL, 10); if ((from <= get_max_prio (map, TRUE)) && (to <= get_max_prio (map, FALSE))) { - p = g_malloc0 (sizeof (NMVlanQosMapping)); + G_STATIC_ASSERT (sizeof (*p) == sizeof (p->from) + sizeof (p->to)); + p = g_malloc (sizeof (NMVlanQosMapping)); p->from = from; p->to = to; } - } else { - /* Warn */ - g_warn_if_fail (len == 2); } g_strfreev (t); @@ -595,7 +593,7 @@ nm_setting_vlan_clear_priorities (NMSettingVlan *setting, NMVlanPriorityMap map) set_map (setting, map, NULL); } -/*********************************************************************/ +/*****************************************************************************/ static void nm_setting_vlan_init (NMSettingVlan *setting) @@ -639,7 +637,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } } - } else if (!nm_utils_iface_valid_name (priv->parent)) { + } else if (!nm_utils_is_valid_iface_name (priv->parent, NULL)) { /* parent must be either a UUID or an interface name */ g_set_error (error, NM_CONNECTION_ERROR, @@ -747,13 +745,11 @@ set_property (GObject *object, guint prop_id, break; case PROP_INGRESS_PRIORITY_MAP: g_slist_free_full (priv->ingress_priority_map, g_free); - priv->ingress_priority_map = - priority_strv_to_maplist (NM_VLAN_INGRESS_MAP, g_value_get_boxed (value)); + priv->ingress_priority_map = priority_strv_to_maplist (NM_VLAN_INGRESS_MAP, g_value_get_boxed (value)); break; case PROP_EGRESS_PRIORITY_MAP: g_slist_free_full (priv->egress_priority_map, g_free); - priv->egress_priority_map = - priority_strv_to_maplist (NM_VLAN_EGRESS_MAP, g_value_get_boxed (value)); + priv->egress_priority_map = priority_strv_to_maplist (NM_VLAN_EGRESS_MAP, g_value_get_boxed (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/libnm-core/nm-setting-vxlan.c b/libnm-core/nm-setting-vxlan.c index 57fbfd79..f6717a2f 100644 --- a/libnm-core/nm-setting-vxlan.c +++ b/libnm-core/nm-setting-vxlan.c @@ -340,7 +340,7 @@ nm_setting_vxlan_get_l3_miss (NMSettingVxlan *setting) return NM_SETTING_VXLAN_GET_PRIVATE (setting)->l3_miss; } -/*********************************************************************/ +/*****************************************************************************/ static void nm_setting_vxlan_init (NMSettingVxlan *setting) @@ -395,7 +395,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } if ( priv->parent - && !nm_utils_iface_valid_name (priv->parent) + && !nm_utils_is_valid_iface_name (priv->parent, NULL) && !nm_utils_is_uuid (priv->parent)) { g_set_error (error, NM_CONNECTION_ERROR, diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c index fc5ab3e5..fcd8e837 100644 --- a/libnm-core/nm-setting-wired.c +++ b/libnm-core/nm-setting-wired.c @@ -594,8 +594,6 @@ nm_setting_wired_get_wake_on_lan (NMSettingWired *setting) return NM_SETTING_WIRED_GET_PRIVATE (setting)->wol; } -NM_BACKPORT_SYMBOL (libnm_1_0_6, NMSettingWiredWakeOnLan, nm_setting_wired_get_wake_on_lan, - (NMSettingWired *setting), (setting)); /** * nm_setting_wired_get_wake_on_lan_password: @@ -615,24 +613,17 @@ nm_setting_wired_get_wake_on_lan_password (NMSettingWired *setting) return NM_SETTING_WIRED_GET_PRIVATE (setting)->wol_password; } -NM_BACKPORT_SYMBOL (libnm_1_0_6, const char *, nm_setting_wired_get_wake_on_lan_password, - (NMSettingWired *setting), (setting)); - -NM_BACKPORT_SYMBOL (libnm_1_0_6, GType, nm_setting_wired_wake_on_lan_get_type, (void), ()); static gboolean verify (NMSetting *setting, NMConnection *connection, GError **error) { NMSettingWiredPrivate *priv = NM_SETTING_WIRED_GET_PRIVATE (setting); - const char *valid_ports[] = { "tp", "aui", "bnc", "mii", NULL }; - const char *valid_duplex[] = { "half", "full", NULL }; - const char *valid_nettype[] = { "qeth", "lcs", "ctc", NULL }; GHashTableIter iter; const char *key, *value; int i; GError *local = NULL; - if (priv->port && !g_strv_contains (valid_ports, priv->port)) { + if (!NM_IN_STRSET (priv->port, NULL, "tp", "aui", "bnc", "mii")) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -642,7 +633,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if (priv->duplex && !g_strv_contains (valid_duplex, priv->duplex)) { + if (!NM_IN_STRSET (priv->duplex, NULL, "half", "full")) { g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -688,7 +679,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) } } - if (priv->s390_nettype && !g_strv_contains (valid_nettype, priv->s390_nettype)) { + if (!NM_IN_STRSET (priv->s390_nettype, NULL, "qeth", "lcs", "ctc")) { g_set_error_literal (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, @@ -765,6 +756,38 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } + /* Normalizable properties - just return NM_SETTING_VERIFY_NORMALIZABLE for compatibility + * with legacy nm-connection-editor which used to save "full" duplex connection as default + */ + + if (priv->auto_negotiate) { + if (priv->duplex) { + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("when link autonegotiation is enabled no duplex value is accepted")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_DUPLEX); + return NM_SETTING_VERIFY_NORMALIZABLE; + } + if (priv->speed) { + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("when link autonegotiation is enabled speed should be 0")); + g_prefix_error (error, "%s.%s: ", NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_SPEED); + return NM_SETTING_VERIFY_NORMALIZABLE; + } + } else { + if ( ((priv->speed) && (!priv->duplex)) + || ((!priv->speed) && (priv->duplex))) { + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("both speed and duplex are required for static link configuration")); + return NM_SETTING_VERIFY_NORMALIZABLE; + } + } + return TRUE; } @@ -785,6 +808,12 @@ compare_property (NMSetting *setting, return parent_class->compare_property (setting, other, prop_spec, flags); } +static GVariant * +_override_autoneg_get (NMSetting *setting, const char *property) +{ + return g_variant_new_boolean (nm_setting_wired_get_auto_negotiate ((NMSettingWired *) setting)); +} + /*****************************************************************************/ static void @@ -1002,13 +1031,17 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) /** * NMSettingWired:speed: * - * If non-zero, request that the device use only the specified speed. In - * Mbit/s, ie 100 == 100Mbit/s. + * Can be set to a value grater than zero only when "auto-negotiate" is "off". + * In that case, statically configures the device to use that specified speed. + * In Mbit/s, ie 100 == 100Mbit/s. + * Must be set together with the "duplex" property when non-zero. + * Before specifying a speed value be sure your device supports it. **/ /* ---ifcfg-rh--- * property: speed - * variable: (none) - * description: The property is not saved by the plugin. + * variable: ETHTOOL_OPTS + * description: Fixed speed for the ethernet link. It is added as "speed" + * parameter in the ETHTOOL_OPTS variable. * ---end--- */ g_object_class_install_property @@ -1022,13 +1055,16 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) /** * NMSettingWired:duplex: * - * If specified, request that the device only use the specified duplex mode. - * Either "half" or "full". + * Can be specified only when "auto-negotiate" is "off". In that case, statically + * configures the device to use that specified duplex mode, either "half" or "full". + * Must be set together with the "speed" property if specified. + * Before specifying a duplex mode be sure your device supports it. **/ /* ---ifcfg-rh--- * property: duplex - * variable: (none) - * description: The property is not saved by the plugin. + * variable: ETHTOOL_OPTS + * description: Fixed duplex mode for the ethernet link. It is added as + * "duplex" parameter in the ETHOOL_OPTS variable. * ---end--- */ g_object_class_install_property @@ -1041,23 +1077,31 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) /** * NMSettingWired:auto-negotiate: * - * If %TRUE, allow auto-negotiation of port speed and duplex mode. If - * %FALSE, do not allow auto-negotiation, in which case the "speed" and - * "duplex" properties should be set. + * If %TRUE, enforce auto-negotiation of port speed and duplex mode. If + * %FALSE, "speed" and "duplex" properties should be both set or link configuration + * will be skipped. **/ /* ---ifcfg-rh--- * property: auto-negotiate - * variable: (none) - * description: The property is not saved by the plugin. + * variable: ETHTOOL_OPTS + * description: Whether link speed and duplex autonegotiation is enabled. + * It is not saved only if disabled and no values are provided for the + * "speed" and "duplex" parameters (skips link configuration). * ---end--- */ g_object_class_install_property (object_class, PROP_AUTO_NEGOTIATE, g_param_spec_boolean (NM_SETTING_WIRED_AUTO_NEGOTIATE, "", "", - TRUE, + FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); + _nm_setting_class_override_property (setting_class, + NM_SETTING_WIRED_AUTO_NEGOTIATE, + G_VARIANT_TYPE_BOOLEAN, + _override_autoneg_get, + NULL, + NULL); /** * NMSettingWired:mac-address: @@ -1078,6 +1122,9 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) * variable: HWADDR * description: Hardware address of the device in traditional hex-digits-and-colons * notation (e.g. 00:22:68:14:5A:05). + * Note that for initscripts this is the current MAC address of the device as found + * during ifup. For NetworkManager this is the permanent MAC address. Or in case no + * permanent MAC address exists, the MAC address initially configured on the device. * ---end--- */ g_object_class_install_property @@ -1095,19 +1142,20 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) /** * NMSettingWired:cloned-mac-address: * - * If specified, request that the device use this MAC address instead of its - * permanent MAC address. This is known as MAC cloning or spoofing. + * If specified, request that the device use this MAC address instead. + * This is known as MAC cloning or spoofing. * * Beside explicitly specifing a MAC address, the special values "preserve", "permanent", * "random" and "stable" are supported. * "preserve" means not to touch the MAC address on activation. * "permanent" means to use the permanent hardware address of the device. * "random" creates a random MAC address on each connect. - * "stable" creates a hashed MAC address based on connection.stable-id (or - * the connection's UUID) and a machine dependent key. + * "stable" creates a hashed MAC address based on connection.stable-id and a + * machine dependent key. * * If unspecified, the value can be overwritten via global defaults, see manual - * of NetworkManager.conf. If still unspecified, it defaults to "permanent". + * of NetworkManager.conf. If still unspecified, it defaults to "preserve" + * (older versions of NetworkManager may use a different default value). * * On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated * "cloned-mac-address". @@ -1130,6 +1178,7 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) * format: byte array * description: This D-Bus field is deprecated in favor of "assigned-mac-address" * which is more flexible and allows specifying special variants like "random". + * For libnm and nmcli, this field is called "cloned-mac-address". * ---end--- */ g_object_class_install_property @@ -1153,7 +1202,9 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) * a hardware address in ASCII representation, or one of the special values * "preserve", "permanent", "random" or "stable". * This field replaces the deprecated "cloned-mac-address" on D-Bus, which - * can only contain explict hardware addresses. + * can only contain explict hardware addresses. Note that this property + * only exists in D-Bus API. libnm and nmcli continue to call this property + * "cloned-mac-address". * ---end--- */ _nm_setting_class_add_dbus_only_property (setting_class, @@ -1196,7 +1247,7 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_wired_class) **/ /* ---ifcfg-rh--- * property: generate-mac-address-mask - * variable: GENERATE_MAC_ADDRESS_MASK + * variable: GENERATE_MAC_ADDRESS_MASK(+) * description: the MAC address mask for generating randomized and stable * cloned-mac-address. * ---end--- diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c index a7f58fe5..1d129f66 100644 --- a/libnm-core/nm-setting-wireless.c +++ b/libnm-core/nm-setting-wireless.c @@ -1321,6 +1321,9 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_wireless_class) * variable: HWADDR * description: Hardware address of the device in traditional hex-digits-and-colons * notation (e.g. 00:22:68:14:5A:05). + * Note that for initscripts this is the current MAC address of the device as found + * during ifup. For NetworkManager this is the permanent MAC address. Or in case no + * permanent MAC address exists, the MAC address initially configured on the device. * ---end--- */ g_object_class_install_property @@ -1337,19 +1340,20 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_wireless_class) /** * NMSettingWireless:cloned-mac-address: * - * If specified, request that the device use this MAC address instead of its - * permanent MAC address. This is known as MAC cloning or spoofing. + * If specified, request that the device use this MAC address instead. + * This is known as MAC cloning or spoofing. * * Beside explicitly specifing a MAC address, the special values "preserve", "permanent", * "random" and "stable" are supported. * "preserve" means not to touch the MAC address on activation. * "permanent" means to use the permanent hardware address of the device. * "random" creates a random MAC address on each connect. - * "stable" creates a hashed MAC address based on connection.stable-id (or - * the connection's UUID) and a machine dependent key. + * "stable" creates a hashed MAC address based on connection.stable-id and a + * machine dependent key. * * If unspecified, the value can be overwritten via global defaults, see manual - * of NetworkManager.conf. If still unspecified, it defaults to "permanent". + * of NetworkManager.conf. If still unspecified, it defaults to "preserve" + * (older versions of NetworkManager may use a different default value). * * On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated * "cloned-mac-address". @@ -1372,6 +1376,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_wireless_class) * format: byte array * description: This D-Bus field is deprecated in favor of "assigned-mac-address" * which is more flexible and allows specifying special variants like "random". + * For libnm and nmcli, this field is called "cloned-mac-address". * ---end--- */ g_object_class_install_property @@ -1394,7 +1399,9 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_wireless_class) * a hardware address in ASCII representation, or one of the special values * "preserve", "permanent", "random" or "stable". * This field replaces the deprecated "cloned-mac-address" on D-Bus, which - * can only contain explict hardware addresses. + * can only contain explict hardware addresses. Note that this property + * only exists in D-Bus API. libnm and nmcli continue to call this property + * "cloned-mac-address". * ---end--- */ _nm_setting_class_add_dbus_only_property (setting_class, @@ -1437,7 +1444,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_wireless_class) **/ /* ---ifcfg-rh--- * property: generate-mac-address-mask - * variable: GENERATE_MAC_ADDRESS_MASK + * variable: GENERATE_MAC_ADDRESS_MASK(+) * description: the MAC address mask for generating randomized and stable * cloned-mac-address. * ---end--- @@ -1578,7 +1585,8 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_wireless_class) * the user has set a global default to randomize and the supplicant * supports randomization), %NM_SETTING_MAC_RANDOMIZATION_NEVER (never * randomize the MAC address), or %NM_SETTING_MAC_RANDOMIZATION_ALWAYS - * (always randomize the MAC address). + * (always randomize the MAC address). This property is deprecated for + * 'cloned-mac-address'. * * Since: 1.2 * Deprecated: 1.4: Deprecated by NMSettingWireless:cloned-mac-address property diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c index fcd8dff7..82467c9c 100644 --- a/libnm-core/nm-setting.c +++ b/libnm-core/nm-setting.c @@ -74,7 +74,7 @@ enum { PROP_LAST }; -/*************************************************************/ +/*****************************************************************************/ static GHashTable *registered_settings = NULL; static GHashTable *registered_settings_by_type = NULL; @@ -115,7 +115,7 @@ _ensure_registered_constructor (void) } \ } G_STMT_END -/*************************************************************/ +/*****************************************************************************/ /* * _nm_register_setting: @@ -264,7 +264,7 @@ _nm_setting_compare_priority (gconstpointer a, gconstpointer b) return 1; } -/*************************************************************/ +/*****************************************************************************/ gboolean _nm_setting_slave_type_is_valid (const char *slave_type, const char **out_port_type) @@ -288,7 +288,7 @@ _nm_setting_slave_type_is_valid (const char *slave_type, const char **out_port_t return found; } -/*************************************************************/ +/*****************************************************************************/ typedef struct { const char *name; @@ -592,7 +592,7 @@ nm_setting_class_find_property (NMSettingClass *setting_class, const char *prope return find_property (properties, property_name); } -/*************************************************************/ +/*****************************************************************************/ static const GVariantType * variant_type_for_gtype (GType type) diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index fe8a3714..5b4566bf 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -667,10 +667,8 @@ _nm_utils_copy_object_array (const GPtrArray *array) return _nm_utils_copy_array (array, g_object_ref, g_object_unref); } -/* have @list of type 'gpointer *' instead of 'gconstpointer *' to - * reduce the necessity for annoying const-casts. */ gssize -_nm_utils_ptrarray_find_first (gpointer *list, gssize len, gconstpointer needle) +_nm_utils_ptrarray_find_first (gconstpointer *list, gssize len, gconstpointer needle) { gssize i; @@ -694,7 +692,7 @@ _nm_utils_ptrarray_find_first (gpointer *list, gssize len, gconstpointer needle) } gssize -_nm_utils_ptrarray_find_binary_search (gpointer *list, gsize len, gpointer needle, GCompareDataFunc cmpfcn, gpointer user_data) +_nm_utils_ptrarray_find_binary_search (gconstpointer *list, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data) { gssize imin, imax, imid; int cmp; @@ -726,6 +724,40 @@ _nm_utils_ptrarray_find_binary_search (gpointer *list, gsize len, gpointer needl return ~imin; } +gssize +_nm_utils_array_find_binary_search (gconstpointer list, gsize elem_size, gsize len, gconstpointer needle, GCompareDataFunc cmpfcn, gpointer user_data) +{ + gssize imin, imax, imid; + int cmp; + + g_return_val_if_fail (list || !len, ~((gssize) 0)); + g_return_val_if_fail (cmpfcn, ~((gssize) 0)); + g_return_val_if_fail (elem_size > 0, ~((gssize) 0)); + + imin = 0; + if (len == 0) + return ~imin; + + imax = len - 1; + + while (imin <= imax) { + imid = imin + (imax - imin) / 2; + + cmp = cmpfcn (&((const char *) list)[elem_size * imid], needle, user_data); + if (cmp == 0) + return imid; + + if (cmp < 0) + imin = imid + 1; + else + imax = imid - 1; + } + + /* return the inverse of @imin. This is a negative number, but + * also is ~imin the position where the value should be inserted. */ + return ~imin; +} + GVariant * _nm_utils_bytes_to_dbus (const GValue *prop_value) { @@ -2112,27 +2144,37 @@ next: return routes; } -/**********************************************************************************************/ +/*****************************************************************************/ /** - * nm_utils_uuid_generate: + * nm_utils_uuid_generate_buf_: + * @buf: input buffer, must contain at least 37 bytes * - * Returns: a newly allocated UUID suitable for use as the #NMSettingConnection - * object's #NMSettingConnection:id: property. Should be freed with g_free() + * Returns: generates a new random UUID, writes it to @buf and returns @buf. **/ char * -nm_utils_uuid_generate (void) +nm_utils_uuid_generate_buf_ (char *buf) { uuid_t uuid; - char *buf; - buf = g_malloc0 (37); uuid_generate_random (uuid); - uuid_unparse_lower (uuid, &buf[0]); + uuid_unparse_lower (uuid, buf); return buf; } /** + * nm_utils_uuid_generate: + * + * Returns: a newly allocated UUID suitable for use as the #NMSettingConnection + * object's #NMSettingConnection:id: property. Should be freed with g_free() + **/ +char * +nm_utils_uuid_generate (void) +{ + return nm_utils_uuid_generate_buf_ (g_malloc (37)); +} + +/** * nm_utils_uuid_generate_from_string: * @s: a string to use as the seed for the UUID * @slen: if negative, treat @s as zero terminated C string. @@ -2180,7 +2222,7 @@ nm_utils_uuid_generate_from_string (const char *s, gssize slen, int uuid_type, g g_return_val_if_reached (NULL); } - buf = g_malloc0 (37); + buf = g_malloc (37); uuid_unparse_lower (uuid, &buf[0]); return buf; @@ -2228,7 +2270,7 @@ _nm_utils_uuid_generate_from_strings (const char *string1, ...) return uuid; } -/**********************************************************************************************/ +/*****************************************************************************/ /** * nm_utils_rsa_key_encrypt: @@ -2422,7 +2464,7 @@ nm_utils_file_is_pkcs12 (const char *filename) return crypto_is_pkcs12_file (filename, NULL); } -/**********************************************************************************************/ +/*****************************************************************************/ gboolean _nm_utils_check_file (const char *filename, @@ -2548,7 +2590,7 @@ _nm_utils_check_module_file (const char *name, error); } -/**********************************************************************************************/ +/*****************************************************************************/ /** * nm_utils_file_search_in_paths: @@ -2622,7 +2664,7 @@ NOT_FOUND: return NULL; } -/**********************************************************************************************/ +/*****************************************************************************/ /* Band, channel/frequency stuff for wireless */ struct cf_pair { @@ -2872,7 +2914,6 @@ nm_utils_wifi_2ghz_freqs (void) { return _wifi_freqs (TRUE); } -NM_BACKPORT_SYMBOL (libnm_1_0_6, const guint *, nm_utils_wifi_2ghz_freqs, (void), ()); /** * nm_utils_wifi_5ghz_freqs: @@ -2888,7 +2929,6 @@ nm_utils_wifi_5ghz_freqs (void) { return _wifi_freqs (FALSE); } -NM_BACKPORT_SYMBOL (libnm_1_0_6, const guint *, nm_utils_wifi_5ghz_freqs, (void), ()); /** * nm_utils_wifi_strength_bars: @@ -2974,10 +3014,16 @@ nm_utils_hwaddr_len (int type) } static guint8 * -hwaddr_aton (const char *asc, guint8 *buffer, gsize buffer_length, gsize *out_len) +_str2bin (const char *asc, + gboolean delimiter_required, + const char *delimiter_candidates, + guint8 *buffer, + gsize buffer_length, + gsize *out_len) { const char *in = asc; guint8 *out = buffer; + gboolean delimiter_has = TRUE; guint8 delimiter = '\0'; nm_assert (asc); @@ -2999,24 +3045,43 @@ hwaddr_aton (const char *asc, guint8 *buffer, gsize buffer_length, gsize *out_le if (d2 && g_ascii_isxdigit (d2)) { *out++ = (HEXVAL (d1) << 4) + HEXVAL (d2); d2 = in[2]; - in += 3; + if (!d2) + break; + in += 2; } else { /* Fake leading zero */ *out++ = HEXVAL (d1); - in += 2; + if (!d2) { + if (!delimiter_has) { + /* when using no delimiter, there must be pairs of hex chars */ + return NULL; + } + break; + } + in += 1; } - if (!d2) - break; if (--buffer_length == 0) return NULL; - if (d2 != delimiter) { - if ( delimiter == '\0' - && (d2 == ':' || d2 == '-')) - delimiter = d2; - else - return NULL; + if (delimiter_has) { + if (d2 != delimiter) { + if (delimiter) + return NULL; + if (delimiter_candidates) { + while (delimiter_candidates[0]) { + if (delimiter_candidates++[0] == d2) + delimiter = d2; + } + } + if (!delimiter) { + if (delimiter_required) + return NULL; + delimiter_has = FALSE; + continue; + } + } + in++; } } @@ -3024,6 +3089,40 @@ hwaddr_aton (const char *asc, guint8 *buffer, gsize buffer_length, gsize *out_le return buffer; } +#define hwaddr_aton(asc, buffer, buffer_length, out_len) _str2bin ((asc), TRUE, ":-", (buffer), (buffer_length), (out_len)) + +/** + * nm_utils_hexstr2bin: + * @hex: a string of hexadecimal characters with optional ':' separators + * + * Converts a hexadecimal string @hex into an array of bytes. The optional + * separator ':' may be used between single or pairs of hexadecimal characters, + * eg "00:11" or "0:1". Any "0x" at the beginning of @hex is ignored. @hex + * may not start or end with ':'. + * + * Return value: (transfer full): the converted bytes, or %NULL on error + */ +GBytes * +nm_utils_hexstr2bin (const char *hex) +{ + guint8 *buffer; + gsize buffer_length, len; + + g_return_val_if_fail (hex != NULL, NULL); + + if (hex[0] == '0' && hex[1] == 'x') + hex += 2; + + buffer_length = strlen (hex) / 2 + 3; + buffer = g_malloc (buffer_length); + if (!_str2bin (hex, FALSE, ":", buffer, buffer_length, &len)) { + g_free (buffer); + return NULL; + } + buffer = g_realloc (buffer, len); + return g_bytes_new_take (buffer, len); +} + /** * nm_utils_hwaddr_atoba: * @asc: the ASCII representation of a hardware address @@ -3117,7 +3216,7 @@ nm_utils_hwaddr_aton (const char *asc, gpointer buffer, gsize length) } static void -_bin2str_buf (gconstpointer addr, gsize length, gboolean upper_case, char *out) +_bin2str (gconstpointer addr, gsize length, const char delimiter, gboolean upper_case, char *out) { const guint8 *in = addr; const char *LOOKUP = upper_case ? "0123456789ABCDEF" : "0123456789abcdef"; @@ -3126,7 +3225,8 @@ _bin2str_buf (gconstpointer addr, gsize length, gboolean upper_case, char *out) nm_assert (out); nm_assert (length > 0); - /* @out must contain at least @length*3 bytes */ + /* @out must contain at least @length*3 bytes if @delimiter is set, + * otherwise, @length*2+1. */ for (;;) { const guint8 v = *in++; @@ -3136,22 +3236,42 @@ _bin2str_buf (gconstpointer addr, gsize length, gboolean upper_case, char *out) length--; if (!length) break; - *out++ = ':'; + if (delimiter) + *out++ = delimiter; } *out = 0; } -static char * -_bin2str (gconstpointer addr, gsize length, gboolean upper_case) +/** + * nm_utils_bin2hexstr: + * @src: (type guint8) (array length=len): an array of bytes + * @len: the length of the @src array + * @final_len: an index where to cut off the returned string, or -1 + * + * Converts the byte array @src into a hexadecimal string. If @final_len is + * greater than -1, the returned string is terminated at that index + * (returned_string[final_len] == '\0'), + * + * Return value: (transfer full): the textual form of @bytes + */ +char * +nm_utils_bin2hexstr (gconstpointer src, gsize len, int final_len) { char *result; + gsize buflen = (len * 2) + 1; - nm_assert (addr); - nm_assert (length > 0); + g_return_val_if_fail (src != NULL, NULL); + g_return_val_if_fail (len > 0 && (buflen - 1) / 2 == len, NULL); + g_return_val_if_fail (final_len < 0 || (gsize) final_len < buflen, NULL); + + result = g_malloc (buflen); + _bin2str (src, len, '\0', FALSE, result); + + /* Cut converted key off at the correct length for this cipher type */ + if (final_len >= 0 && (gsize) final_len < buflen) + result[final_len] = '\0'; - result = g_malloc (length * 3); - _bin2str_buf (addr, length, upper_case, result); return result; } @@ -3167,10 +3287,14 @@ _bin2str (gconstpointer addr, gsize length, gboolean upper_case) char * nm_utils_hwaddr_ntoa (gconstpointer addr, gsize length) { + char *result; + g_return_val_if_fail (addr, g_strdup ("")); g_return_val_if_fail (length > 0, g_strdup ("")); - return _bin2str (addr, length, TRUE); + result = g_malloc (length * 3); + _bin2str (addr, length, ':', TRUE, result); + return result; } const char * @@ -3182,7 +3306,7 @@ nm_utils_hwaddr_ntoa_buf (gconstpointer addr, gsize addr_len, gboolean upper_cas if (buf_len < addr_len * 3) g_return_val_if_reached (NULL); - _bin2str_buf (addr, addr_len, TRUE, buf); + _bin2str (addr, addr_len, ':', TRUE, buf); return buf; } @@ -3199,10 +3323,14 @@ nm_utils_hwaddr_ntoa_buf (gconstpointer addr, gsize addr_len, gboolean upper_cas char * _nm_utils_bin2str (gconstpointer addr, gsize length, gboolean upper_case) { + char *result; + g_return_val_if_fail (addr, g_strdup ("")); g_return_val_if_fail (length > 0, g_strdup ("")); - return _bin2str (addr, length, upper_case); + result = g_malloc (length * 3); + _bin2str (addr, length, ':', upper_case, result); + return result; } /** @@ -3360,7 +3488,6 @@ nm_utils_hwaddr_matches (gconstpointer hwaddr1, if (l != hwaddr1_len) return FALSE; hwaddr2 = buf2; - hwaddr2_len = hwaddr1_len; } else { g_return_val_if_fail (hwaddr2_len > 0 && hwaddr2_len <= NM_UTILS_HWADDR_LEN_MAX, FALSE); @@ -3376,7 +3503,7 @@ nm_utils_hwaddr_matches (gconstpointer hwaddr1, if (hwaddr1_len == INFINIBAND_ALEN) { hwaddr1 = (guint8 *)hwaddr1 + INFINIBAND_ALEN - 8; hwaddr2 = (guint8 *)hwaddr2 + INFINIBAND_ALEN - 8; - hwaddr1_len = hwaddr2_len = 8; + hwaddr1_len = 8; } return !memcmp (hwaddr1, hwaddr2, hwaddr1_len); @@ -3478,7 +3605,7 @@ _nm_utils_hwaddr_cloned_data_synth (NMSetting *setting, * to "" and it just worked as the value was not serialized in * an ill form. * - * To preserve that behavior, seralize "" as NULL. + * To preserve that behavior, serialize "" as NULL. */ return addr && addr[0] ? g_variant_new_string (addr) : NULL; @@ -3610,136 +3737,66 @@ _nm_utils_generate_mac_address_mask_parse (const char *value, /*****************************************************************************/ /** - * nm_utils_bin2hexstr: - * @src: (type guint8) (array length=len): an array of bytes - * @len: the length of the @src array - * @final_len: an index where to cut off the returned string, or -1 + * nm_utils_is_valid_iface_name: + * @name: Name of interface + * @error: location to store the error occurring, or %NULL to ignore * - * Converts the byte array @src into a hexadecimal string. If @final_len is - * greater than -1, the returned string is terminated at that index - * (returned_string[final_len] == '\0'), + * Validate the network interface name. * - * Return value: (transfer full): the textual form of @bytes - */ -/* - * Code originally by Alex Larsson <alexl@redhat.com> and - * copyright Red Hat, Inc. under terms of the LGPL. - */ -char * -nm_utils_bin2hexstr (gconstpointer src, gsize len, int final_len) -{ - static char hex_digits[] = "0123456789abcdef"; - const guint8 *bytes = src; - char *result; - int i; - gsize buflen = (len * 2) + 1; - - g_return_val_if_fail (bytes != NULL, NULL); - g_return_val_if_fail (len > 0, NULL); - g_return_val_if_fail (len < 4096, NULL); /* Arbitrary limit */ - if (final_len > -1) - g_return_val_if_fail (final_len < buflen, NULL); - - result = g_malloc0 (buflen); - for (i = 0; i < len; i++) { - result[2*i] = hex_digits[(bytes[i] >> 4) & 0xf]; - result[2*i+1] = hex_digits[bytes[i] & 0xf]; - } - /* Cut converted key off at the correct length for this cipher type */ - if (final_len > -1) - result[final_len] = '\0'; - else - result[buflen - 1] = '\0'; - - return result; -} - -/** - * nm_utils_hexstr2bin: - * @hex: a string of hexadecimal characters with optional ':' separators - * - * Converts a hexadecimal string @hex into an array of bytes. The optional - * separator ':' may be used between single or pairs of hexadecimal characters, - * eg "00:11" or "0:1". Any "0x" at the beginning of @hex is ignored. @hex - * may not start or end with ':'. + * This function is a 1:1 copy of the kernel's interface validation + * function in net/core/dev.c. * - * Return value: (transfer full): the converted bytes, or %NULL on error + * Returns: %TRUE if interface name is valid, otherwise %FALSE is returned. */ -GBytes * -nm_utils_hexstr2bin (const char *hex) +gboolean +nm_utils_is_valid_iface_name (const char *name, GError **error) { - guint i = 0, x = 0; - gs_free guint8 *c = NULL; - int a, b; - gboolean found_colon = FALSE; - - g_return_val_if_fail (hex != NULL, NULL); + g_return_val_if_fail (name != NULL, FALSE); - if (strncasecmp (hex, "0x", 2) == 0) - hex += 2; - found_colon = !!strchr (hex, ':'); + if (*name == '\0') { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name is too short")); + return FALSE; + } - c = g_malloc (strlen (hex) / 2 + 1); - for (;;) { - a = g_ascii_xdigit_value (hex[i++]); - if (a < 0) - return NULL; + if (strlen (name) >= 16) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name is longer than 15 characters")); + return FALSE; + } - if (hex[i] && hex[i] != ':') { - b = g_ascii_xdigit_value (hex[i++]); - if (b < 0) - return NULL; - c[x++] = ((guint) a << 4) | ((guint) b); - } else - c[x++] = (guint) a; + if (!strcmp (name, ".") || !strcmp (name, "..")) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name is reserved")); + return FALSE; + } - if (!hex[i]) - break; - if (hex[i] == ':') { - if (!hex[i + 1]) { - /* trailing ':' is invalid */ - return NULL; - } - i++; - } else if (found_colon) { - /* If colons exist, they must delimit 1 or 2 hex chars */ - return NULL; + while (*name) { + if (*name == '/' || g_ascii_isspace (*name)) { + g_set_error_literal (error, NM_UTILS_ERROR, NM_UTILS_ERROR_UNKNOWN, + _("interface name contains an invalid character")); + return FALSE; } + name++; } - return g_bytes_new (c, x); + return TRUE; } /** * nm_utils_iface_valid_name: * @name: Name of interface * - * This function is a 1:1 copy of the kernel's interface validation - * function in net/core/dev.c. + * Validate the network interface name. + * + * Deprecated: 1.6: use nm_utils_is_valid_iface_name() insteead, with better error reporting. * * Returns: %TRUE if interface name is valid, otherwise %FALSE is returned. */ gboolean nm_utils_iface_valid_name (const char *name) { - g_return_val_if_fail (name != NULL, FALSE); - - if (*name == '\0') - return FALSE; - - if (strlen (name) >= 16) - return FALSE; - - if (!strcmp (name, ".") || !strcmp (name, "..")) - return FALSE; - - while (*name) { - if (*name == '/' || g_ascii_isspace (*name)) - return FALSE; - name++; - } - - return TRUE; + return nm_utils_is_valid_iface_name (name, NULL); } /** @@ -4010,7 +4067,7 @@ nm_utils_bond_mode_string_to_int (const char *mode) return -1; } -/**********************************************************************************************/ +/*****************************************************************************/ #define STRSTRDICTKEY_V1_SET 0x01 #define STRSTRDICTKEY_V2_SET 0x02 @@ -4286,8 +4343,6 @@ char *nm_utils_enum_to_str (GType type, int value) g_type_class_unref (class); return ret; } -NM_BACKPORT_SYMBOL (libnm_1_0_6, char *, nm_utils_enum_to_str, - (GType type, int value), (type, value)); /** * nm_utils_enum_from_str: @@ -4359,9 +4414,6 @@ gboolean nm_utils_enum_from_str (GType type, const char *str, g_type_class_unref (class); return ret; } -NM_BACKPORT_SYMBOL (libnm_1_0_6, gboolean, nm_utils_enum_from_str, - (GType type, const char *str, int *out_value, char **err_token), - (type, str, out_value, err_token)); /** * nm_utils_enum_get_values: @@ -4416,8 +4468,20 @@ const char **nm_utils_enum_get_values (GType type, gint from, gint to) } #if WITH_JANSSON +/** + * nm_utils_is_json_object: + * @str: the JSON string to test + * @error: optional error reason + * + * Returns: whether the passed string is valid JSON. + * If libnm is not compiled with libjansson support, this check will + * also return %TRUE for possibly invalid inputs. If that is a problem + * for you, you must validate the JSON yourself. + * + * Since: 1.6 + */ gboolean -_nm_utils_check_valid_json (const char *str, GError **error) +nm_utils_is_json_object (const char *str, GError **error) { json_t *json; json_error_t jerror; @@ -4428,7 +4492,7 @@ _nm_utils_check_valid_json (const char *str, GError **error) g_set_error_literal (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - "value is NULL or empty"); + str ? _("value is NULL") : _("value is empty")); return FALSE; } @@ -4437,9 +4501,19 @@ _nm_utils_check_valid_json (const char *str, GError **error) g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - "%s at position %d", - jerror.text, - jerror.position); + _("invalid JSON at position %d (%s)"), + jerror.position, + jerror.text); + return FALSE; + } + + /* valid JSON (depending on the definition) can also be a literal. + * Here we only allow objects. */ + if (!json_is_object (json)) { + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("is not a JSON object")); return FALSE; } @@ -4531,17 +4605,48 @@ out: #else /* WITH_JANSSON */ gboolean -_nm_utils_check_valid_json (const char *str, GError **error) +nm_utils_is_json_object (const char *str, GError **error) { + g_return_val_if_fail (!error || !*error, FALSE); + + if (str) { + /* libjansson also requires only utf-8 encoding. */ + if (!g_utf8_validate (str, -1, NULL)) { + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("not valid utf-8")); + return FALSE; + } + while (g_ascii_isspace (str[0])) + str++; + } + if (!str || !str[0]) { g_set_error_literal (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_PROPERTY, - "value is NULL or empty"); + str ? _("value is NULL") : _("value is empty")); return FALSE; } - return TRUE; + /* do some very basic validation to see if this might be a JSON object. */ + if (str[0] == '{') { + gsize l; + + l = strlen (str) - 1; + while (l > 0 && g_ascii_isspace (str[l])) + l--; + + if (str[l] == '}') + return TRUE; + } + + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY, + _("is not a JSON object")); + return FALSE; } gboolean @@ -4552,3 +4657,20 @@ _nm_utils_team_config_equal (const char *conf1, return nm_streq0 (conf1, conf2); } #endif + +/*****************************************************************************/ + +/** + * nm_utils_version: + * + * Returns: the version ID of the libnm version. That is, the %NM_VERSION + * at runtime. + * + * Since: 1.6.0 + */ +guint +nm_utils_version (void) +{ + return NM_VERSION; +} + diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h index 407c14e2..caf2e62e 100644 --- a/libnm-core/nm-utils.h +++ b/libnm-core/nm-utils.h @@ -90,6 +90,9 @@ gboolean nm_utils_ap_mode_security_valid (NMUtilsSecurityType type, gboolean nm_utils_wep_key_valid (const char *key, NMWepKeyType wep_type); gboolean nm_utils_wpa_psk_valid (const char *psk); +NM_AVAILABLE_IN_1_6 +gboolean nm_utils_is_json_object (const char *str, GError **error); + GVariant *nm_utils_ip4_dns_to_variant (char **dns); char **nm_utils_ip4_dns_from_variant (GVariant *value); GVariant *nm_utils_ip4_addresses_to_variant (GPtrArray *addresses, @@ -174,7 +177,10 @@ gboolean nm_utils_hwaddr_matches (gconstpointer hwaddr1, char *nm_utils_bin2hexstr (gconstpointer src, gsize len, int final_len); GBytes *nm_utils_hexstr2bin (const char *hex); -gboolean nm_utils_iface_valid_name(const char *name); +NM_DEPRECATED_IN_1_6_FOR(nm_utils_is_valid_iface_name) +gboolean nm_utils_iface_valid_name (const char *name); +NM_AVAILABLE_IN_1_6 +gboolean nm_utils_is_valid_iface_name (const char *name, GError **error); gboolean nm_utils_is_uuid (const char *str); @@ -206,6 +212,9 @@ gboolean nm_utils_enum_from_str (GType type, const char *str, int *out_value, ch NM_AVAILABLE_IN_1_2 const char **nm_utils_enum_get_values (GType type, gint from, gint to); +NM_AVAILABLE_IN_1_6 +guint nm_utils_version (void); + G_END_DECLS #endif /* __NM_UTILS_H__ */ diff --git a/libnm-core/nm-version.h b/libnm-core/nm-version.h index d7f112bf..aa92c3f8 100644 --- a/libnm-core/nm-version.h +++ b/libnm-core/nm-version.h @@ -104,4 +104,18 @@ # define NM_AVAILABLE_IN_1_4 #endif +#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_6 +# define NM_DEPRECATED_IN_1_6 G_DEPRECATED +# define NM_DEPRECATED_IN_1_6_FOR(f) G_DEPRECATED_FOR(f) +#else +# define NM_DEPRECATED_IN_1_6 +# define NM_DEPRECATED_IN_1_6_FOR(f) +#endif + +#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_6 +# define NM_AVAILABLE_IN_1_6 G_UNAVAILABLE(1,6) +#else +# define NM_AVAILABLE_IN_1_6 +#endif + #endif /* NM_VERSION_H */ diff --git a/libnm-core/nm-vpn-dbus-interface.h b/libnm-core/nm-vpn-dbus-interface.h index 3295a1ae..1495c955 100644 --- a/libnm-core/nm-vpn-dbus-interface.h +++ b/libnm-core/nm-vpn-dbus-interface.h @@ -183,6 +183,9 @@ typedef enum { /* string: VPN interface name (tun0, tap0, etc) */ #define NM_VPN_PLUGIN_CONFIG_TUNDEV "tundev" +/* string: Proxy PAC */ +#define NM_VPN_PLUGIN_CONFIG_PROXY_PAC "pac" + /* string: Login message */ #define NM_VPN_PLUGIN_CONFIG_BANNER "banner" diff --git a/libnm-core/nm-vpn-dbus-types.xml b/libnm-core/nm-vpn-dbus-types.xml index 6e10060c..5da02420 100644 --- a/libnm-core/nm-vpn-dbus-types.xml +++ b/libnm-core/nm-vpn-dbus-types.xml @@ -224,17 +224,17 @@ <tbody> <row role="constant"> <entry role="enum_member_name"><para>NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED</para><para></para></entry> - <entry role="enum_member_value"><para>= <literal>1</literal></para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>0</literal></para><para></para></entry> <entry role="enum_member_description"><para>Login failed.</para><para></para></entry> </row> <row role="constant"> <entry role="enum_member_name"><para>NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED</para><para></para></entry> - <entry role="enum_member_value"><para>= <literal>2</literal></para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>1</literal></para><para></para></entry> <entry role="enum_member_description"><para>Connect failed.</para><para></para></entry> </row> <row role="constant"> <entry role="enum_member_name"><para>NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG</para><para></para></entry> - <entry role="enum_member_value"><para>= <literal>3</literal></para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>2</literal></para><para></para></entry> <entry role="enum_member_description"><para>Invalid IP configuration returned from the VPN plugin.</para><para></para></entry> </row> </tbody> diff --git a/libnm-core/nm-vpn-editor-plugin.c b/libnm-core/nm-vpn-editor-plugin.c index 7cb02abd..32e2a4ed 100644 --- a/libnm-core/nm-vpn-editor-plugin.c +++ b/libnm-core/nm-vpn-editor-plugin.c @@ -72,7 +72,7 @@ nm_vpn_editor_plugin_default_init (NMVpnEditorPluginInterface *iface) G_PARAM_STATIC_STRINGS)); } -/*********************************************************************/ +/*****************************************************************************/ typedef struct { NMVpnPluginInfo *plugin_info; @@ -113,7 +113,7 @@ _private_get (NMVpnEditorPlugin *plugin, gboolean create) #define NM_VPN_EDITOR_PLUGIN_GET_PRIVATE(plugin) _private_get (plugin, TRUE) #define NM_VPN_EDITOR_PLUGIN_TRY_GET_PRIVATE(plugin) _private_get (plugin, FALSE) -/*********************************************************************/ +/*****************************************************************************/ /** * nm_vpn_editor_plugin_get_plugin_info: @@ -178,7 +178,7 @@ nm_vpn_editor_plugin_set_plugin_info (NMVpnEditorPlugin *plugin, NMVpnPluginInfo } -/*********************************************************************/ +/*****************************************************************************/ /** * nm_vpn_editor_plugin_get_vt: @@ -225,7 +225,7 @@ nm_vpn_editor_plugin_get_vt (NMVpnEditorPlugin *plugin, return p_vt_size; } -/*********************************************************************/ +/*****************************************************************************/ static NMVpnEditorPlugin * _nm_vpn_editor_plugin_load (const char *plugin_name, @@ -446,7 +446,7 @@ nm_vpn_editor_plugin_load (const char *plugin_name, error); } -/*********************************************************************/ +/*****************************************************************************/ /** * nm_vpn_editor_plugin_get_editor: diff --git a/libnm-core/nm-vpn-editor-plugin.h b/libnm-core/nm-vpn-editor-plugin.h index fb51f7e6..e93d8fbd 100644 --- a/libnm-core/nm-vpn-editor-plugin.h +++ b/libnm-core/nm-vpn-editor-plugin.h @@ -48,9 +48,9 @@ NMVpnEditorPlugin *nm_vpn_editor_plugin_factory (GError **error); #endif -/**************************************************/ +/*****************************************************************************/ /* Editor plugin interface */ -/**************************************************/ +/*****************************************************************************/ #define NM_TYPE_VPN_EDITOR_PLUGIN (nm_vpn_editor_plugin_get_type ()) #define NM_VPN_EDITOR_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_EDITOR_PLUGIN, NMVpnEditorPlugin)) @@ -101,6 +101,7 @@ typedef struct _NMVpnEditorPluginVT NMVpnEditorPluginVT; * @get_suggested_filename: For a given connection, return a suggested file * name. Returned value will be %NULL or a suggested file name to be freed by * the caller. + * @notify_plugin_info_set: A callback to be called when the plugin info is set. * @get_vt: return a virtual function table to implement further functions in * the plugin, without requiring to update libnm. Used by nm_vpn_editor_plugin_get_vt(). * diff --git a/libnm-core/nm-vpn-plugin-info.c b/libnm-core/nm-vpn-plugin-info.c index d3bc4893..14c3588e 100644 --- a/libnm-core/nm-vpn-plugin-info.c +++ b/libnm-core/nm-vpn-plugin-info.c @@ -67,7 +67,7 @@ G_DEFINE_TYPE_WITH_CODE (NMVpnPluginInfo, nm_vpn_plugin_info, G_TYPE_OBJECT, #define NM_VPN_PLUGIN_INFO_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_VPN_PLUGIN_INFO, NMVpnPluginInfoPrivate)) -/*********************************************************************/ +/*****************************************************************************/ /** * nm_vpn_plugin_info_validate_filename: @@ -412,7 +412,7 @@ nm_vpn_plugin_info_new_search_file (const char *name, const char *service) return plugin_info; } -/*********************************************************************/ +/*****************************************************************************/ static gboolean _check_no_conflict (NMVpnPluginInfo *i1, NMVpnPluginInfo *i2, GError **error) @@ -775,7 +775,7 @@ nm_vpn_plugin_info_list_get_service_types (GSList *list, return (char **) g_ptr_array_free (l, FALSE); } -/*********************************************************************/ +/*****************************************************************************/ /** * nm_vpn_plugin_info_get_filename: @@ -987,7 +987,7 @@ nm_vpn_plugin_info_lookup_property (NMVpnPluginInfo *self, const char *group, co return g_hash_table_lookup (priv->keys, k); } -/*********************************************************************/ +/*****************************************************************************/ /** * nm_vpn_plugin_info_get_editor_plugin: @@ -1094,7 +1094,7 @@ nm_vpn_plugin_info_load_editor_plugin (NMVpnPluginInfo *self, GError **error) return priv->editor_plugin; } -/*********************************************************************/ +/*****************************************************************************/ /** * nm_vpn_plugin_info_new_from_file: @@ -1152,7 +1152,7 @@ nm_vpn_plugin_info_new_with_data (const char *filename, NULL)); } -/*********************************************************************/ +/*****************************************************************************/ static void nm_vpn_plugin_info_init (NMVpnPluginInfo *plugin) diff --git a/libnm-core/tests/Makefile.am b/libnm-core/tests/Makefile.am deleted file mode 100644 index 485fd141..00000000 --- a/libnm-core/tests/Makefile.am +++ /dev/null @@ -1,74 +0,0 @@ -include $(GLIB_MAKEFILE) - -GLIB_GENERATED = nm-core-tests-enum-types.h nm-core-tests-enum-types.c -nm_core_tests_enum_types_sources = test-general-enums.h -GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM -GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM - -BUILT_SOURCES = $(GLIB_GENERATED) - -if ENABLE_TESTS - -AM_CPPFLAGS = \ - -I${top_srcdir}/shared \ - -I${top_builddir}/shared \ - -I$(top_srcdir)/libnm-core \ - -I$(top_builddir)/libnm-core \ - -DNETWORKMANAGER_COMPILATION \ - $(GLIB_CFLAGS) \ - -DTEST_CERT_DIR=\"$(abs_srcdir)/certs\" - -noinst_PROGRAMS = \ - test-compare \ - test-crypto \ - test-general \ - test-keyfile \ - test-secrets \ - test-setting-8021x \ - test-setting-bond \ - test-setting-dcb \ - test-settings-defaults - -LDADD = \ - $(top_builddir)/libnm-core/libnm-core.la \ - $(GLIB_LIBS) - -@VALGRIND_RULES@ -TESTS = $(noinst_PROGRAMS) - -test_general_SOURCES = \ - test-general.c \ - test-general-enums.h \ - nm-core-tests-enum-types.c \ - nm-core-tests-enum-types.h - -endif - -# test-cert.p12 created with: -# -# openssl pkcs12 -export \ -# -in test_key_and_cert.pem \ -# -inkey test_key_and_cert.pem \ -# -certfile test_ca_cert.pem \ -# -name "test-pkcs12" \ -# -out test-cert.p12 - -EXTRA_DIST = \ - certs/ca-no-ending-newline.pem \ - certs/pkcs8-decrypted.der \ - certs/pkcs8-enc-key.pem \ - certs/pkcs8-noenc-key.pem \ - certs/test2_ca_cert.pem \ - certs/test2-cert.p12 \ - certs/test2_key_and_cert.pem \ - certs/test-aes-key.pem \ - certs/test_ca_cert.der \ - certs/test_ca_cert.pem \ - certs/test-ca-cert.pem \ - certs/test-cert.p12 \ - certs/test_key_and_cert.pem \ - certs/test-key-and-cert.pem \ - certs/test-key-only-decrypted.der \ - certs/test-key-only-decrypted.pem \ - certs/test-key-only.pem - diff --git a/libnm-core/tests/Makefile.in b/libnm-core/tests/Makefile.in deleted file mode 100644 index 4fbcb07d..00000000 --- a/libnm-core/tests/Makefile.in +++ /dev/null @@ -1,1342 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_TESTS_TRUE@noinst_PROGRAMS = test-compare$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ test-crypto$(EXEEXT) test-general$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ test-keyfile$(EXEEXT) test-secrets$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ test-setting-8021x$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ test-setting-bond$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ test-setting-dcb$(EXEEXT) \ -@ENABLE_TESTS_TRUE@ test-settings-defaults$(EXEEXT) -subdir = libnm-core/tests -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/attributes.m4 \ - $(top_srcdir)/m4/ax_lib_readline.m4 \ - $(top_srcdir)/m4/compiler_options.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/git-sha-record.m4 \ - $(top_srcdir)/m4/gnome-code-coverage.m4 \ - $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -test_compare_SOURCES = test-compare.c -test_compare_OBJECTS = test-compare.$(OBJEXT) -test_compare_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -@ENABLE_TESTS_TRUE@test_compare_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -test_crypto_SOURCES = test-crypto.c -test_crypto_OBJECTS = test-crypto.$(OBJEXT) -test_crypto_LDADD = $(LDADD) -@ENABLE_TESTS_TRUE@test_crypto_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -am__test_general_SOURCES_DIST = test-general.c test-general-enums.h \ - nm-core-tests-enum-types.c nm-core-tests-enum-types.h -@ENABLE_TESTS_TRUE@am_test_general_OBJECTS = test-general.$(OBJEXT) \ -@ENABLE_TESTS_TRUE@ nm-core-tests-enum-types.$(OBJEXT) -test_general_OBJECTS = $(am_test_general_OBJECTS) -test_general_LDADD = $(LDADD) -@ENABLE_TESTS_TRUE@test_general_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -test_keyfile_SOURCES = test-keyfile.c -test_keyfile_OBJECTS = test-keyfile.$(OBJEXT) -test_keyfile_LDADD = $(LDADD) -@ENABLE_TESTS_TRUE@test_keyfile_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -test_secrets_SOURCES = test-secrets.c -test_secrets_OBJECTS = test-secrets.$(OBJEXT) -test_secrets_LDADD = $(LDADD) -@ENABLE_TESTS_TRUE@test_secrets_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -test_setting_8021x_SOURCES = test-setting-8021x.c -test_setting_8021x_OBJECTS = test-setting-8021x.$(OBJEXT) -test_setting_8021x_LDADD = $(LDADD) -@ENABLE_TESTS_TRUE@test_setting_8021x_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -test_setting_bond_SOURCES = test-setting-bond.c -test_setting_bond_OBJECTS = test-setting-bond.$(OBJEXT) -test_setting_bond_LDADD = $(LDADD) -@ENABLE_TESTS_TRUE@test_setting_bond_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -test_setting_dcb_SOURCES = test-setting-dcb.c -test_setting_dcb_OBJECTS = test-setting-dcb.$(OBJEXT) -test_setting_dcb_LDADD = $(LDADD) -@ENABLE_TESTS_TRUE@test_setting_dcb_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -test_settings_defaults_SOURCES = test-settings-defaults.c -test_settings_defaults_OBJECTS = test-settings-defaults.$(OBJEXT) -test_settings_defaults_LDADD = $(LDADD) -@ENABLE_TESTS_TRUE@test_settings_defaults_DEPENDENCIES = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(am__DEPENDENCIES_1) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = test-compare.c test-crypto.c $(test_general_SOURCES) \ - test-keyfile.c test-secrets.c test-setting-8021x.c \ - test-setting-bond.c test-setting-dcb.c \ - test-settings-defaults.c -DIST_SOURCES = test-compare.c test-crypto.c \ - $(am__test_general_SOURCES_DIST) test-keyfile.c test-secrets.c \ - test-setting-8021x.c test-setting-bond.c test-setting-dcb.c \ - test-settings-defaults.c -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -am__tty_colors_dummy = \ - mgn= red= grn= lgn= blu= brg= std=; \ - am__color_tests=no -am__tty_colors = { \ - $(am__tty_colors_dummy); \ - if test "X$(AM_COLOR_TESTS)" = Xno; then \ - am__color_tests=no; \ - elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ - am__color_tests=yes; \ - elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ - am__color_tests=yes; \ - fi; \ - if test $$am__color_tests = yes; then \ - red='[0;31m'; \ - grn='[0;32m'; \ - lgn='[1;32m'; \ - blu='[1;34m'; \ - mgn='[0;35m'; \ - brg='[1m'; \ - std='[m'; \ - fi; \ -} -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__recheck_rx = ^[ ]*:recheck:[ ]* -am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* -am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* -# A command that, given a newline-separated list of test names on the -# standard input, print the name of the tests that are to be re-run -# upon "make recheck". -am__list_recheck_tests = $(AWK) '{ \ - recheck = 1; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - { \ - if ((getline line2 < ($$0 ".log")) < 0) \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ - { \ - recheck = 0; \ - break; \ - } \ - else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ - { \ - break; \ - } \ - }; \ - if (recheck) \ - print $$0; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# A command that, given a newline-separated list of test names on the -# standard input, create the global log from their .trs and .log files. -am__create_global_log = $(AWK) ' \ -function fatal(msg) \ -{ \ - print "fatal: making $@: " msg | "cat >&2"; \ - exit 1; \ -} \ -function rst_section(header) \ -{ \ - print header; \ - len = length(header); \ - for (i = 1; i <= len; i = i + 1) \ - printf "="; \ - printf "\n\n"; \ -} \ -{ \ - copy_in_global_log = 1; \ - global_test_result = "RUN"; \ - while ((rc = (getline line < ($$0 ".trs"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".trs"); \ - if (line ~ /$(am__global_test_result_rx)/) \ - { \ - sub("$(am__global_test_result_rx)", "", line); \ - sub("[ ]*$$", "", line); \ - global_test_result = line; \ - } \ - else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ - copy_in_global_log = 0; \ - }; \ - if (copy_in_global_log) \ - { \ - rst_section(global_test_result ": " $$0); \ - while ((rc = (getline line < ($$0 ".log"))) != 0) \ - { \ - if (rc < 0) \ - fatal("failed to read from " $$0 ".log"); \ - print line; \ - }; \ - printf "\n"; \ - }; \ - close ($$0 ".trs"); \ - close ($$0 ".log"); \ -}' -# Restructured Text title. -am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } -# Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it -# by disabling -e (using the XSI extension "set +e") if it's set. -am__sh_e_setup = case $$- in *e*) set +e;; esac -# Default flags passed to test drivers. -am__common_driver_flags = \ - --color-tests "$$am__color_tests" \ - --enable-hard-errors "$$am__enable_hard_errors" \ - --expect-failure "$$am__expect_failure" -# To be inserted before the command running the test. Creates the -# directory for the log if needed. Stores in $dir the directory -# containing $f, in $tst the test, in $log the log. Executes the -# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and -# passes TESTS_ENVIRONMENT. Set up options for the wrapper that -# will run the test scripts (or their associated LOG_COMPILER, if -# thy have one). -am__check_pre = \ -$(am__sh_e_setup); \ -$(am__vpath_adj_setup) $(am__vpath_adj) \ -$(am__tty_colors); \ -srcdir=$(srcdir); export srcdir; \ -case "$@" in \ - */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ - *) am__odir=.;; \ -esac; \ -test "x$$am__odir" = x"." || test -d "$$am__odir" \ - || $(MKDIR_P) "$$am__odir" || exit $$?; \ -if test -f "./$$f"; then dir=./; \ -elif test -f "$$f"; then dir=; \ -else dir="$(srcdir)/"; fi; \ -tst=$$dir$$f; log='$@'; \ -if test -n '$(DISABLE_HARD_ERRORS)'; then \ - am__enable_hard_errors=no; \ -else \ - am__enable_hard_errors=yes; \ -fi; \ -case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ - am__expect_failure=yes;; \ - *) \ - am__expect_failure=no;; \ -esac; \ -$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) -# A shell command to get the names of the tests scripts with any registered -# extension removed (i.e., equivalently, the names of the test logs, with -# the '.log' extension removed). The result is saved in the shell variable -# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, -# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", -# since that might cause problem with VPATH rewrites for suffix-less tests. -# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. -am__set_TESTS_bases = \ - bases='$(TEST_LOGS)'; \ - bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ - bases=`echo $$bases` -RECHECK_LOGS = $(TEST_LOGS) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -TEST_EXTENSIONS = @EXEEXT@ .test -LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) -am__set_b = \ - case '$@' in \ - */*) \ - case '$*' in \ - */*) b='$*';; \ - *) b=`echo '$@' | sed 's/\.log$$//'`; \ - esac;; \ - *) \ - b='$*';; \ - esac -am__test_logs1 = $(TESTS:=.log) -am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) -TEST_LOGS = $(am__test_logs2:.test.log=.log) -TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver -TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ - $(TEST_LOG_FLAGS) -am__DIST_COMMON = $(srcdir)/Makefile.in \ - $(top_srcdir)/build-aux/depcomp \ - $(top_srcdir)/build-aux/test-driver -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALL_LINGUAS = @ALL_LINGUAS@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_TESTS_FD_REDIRECT = @AM_TESTS_FD_REDIRECT@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@ -BLUEZ5_LIBS = @BLUEZ5_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ -CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ -CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DBUS_SYS_DIR = @DBUS_SYS_DIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DHCLIENT_PATH = @DHCLIENT_PATH@ -DHCPCD_PATH = @DHCPCD_PATH@ -DISTRO_NETWORK_SERVICE = @DISTRO_NETWORK_SERVICE@ -DLLTOOL = @DLLTOOL@ -DL_LIBS = @DL_LIBS@ -DNSMASQ_PATH = @DNSMASQ_PATH@ -DNSSEC_TRIGGER_SCRIPT = @DNSSEC_TRIGGER_SCRIPT@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GENHTML = @GENHTML@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ -GLIB_LIBS = @GLIB_LIBS@ -GLIB_MAKEFILE = @GLIB_MAKEFILE@ -GLIB_MKENUMS = @GLIB_MKENUMS@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ -GNUTLS_LIBS = @GNUTLS_LIBS@ -GREP = @GREP@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -GUDEV_CFLAGS = @GUDEV_CFLAGS@ -GUDEV_LIBS = @GUDEV_LIBS@ -HTML_DIR = @HTML_DIR@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ -INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ -INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ -INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ -INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ -INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ -INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ -INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ -INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ -INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ -INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ -IPTABLES_PATH = @IPTABLES_PATH@ -JANSSON_CFLAGS = @JANSSON_CFLAGS@ -JANSSON_LIBS = @JANSSON_LIBS@ -KERNEL_FIRMWARE_DIR = @KERNEL_FIRMWARE_DIR@ -LCOV = @LCOV@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBAUDIT_CFLAGS = @LIBAUDIT_CFLAGS@ -LIBAUDIT_LIBS = @LIBAUDIT_LIBS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBM = @LIBM@ -LIBNDP_CFLAGS = @LIBNDP_CFLAGS@ -LIBNDP_LIBS = @LIBNDP_LIBS@ -LIBNL_CFLAGS = @LIBNL_CFLAGS@ -LIBNL_LIBS = @LIBNL_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBSOUP_CFLAGS = @LIBSOUP_CFLAGS@ -LIBSOUP_LIBS = @LIBSOUP_LIBS@ -LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ -LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ -LIBTEAMDCTL_CFLAGS = @LIBTEAMDCTL_CFLAGS@ -LIBTEAMDCTL_LIBS = @LIBTEAMDCTL_LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOG_DRIVER = @LOG_DRIVER@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MM_GLIB_CFLAGS = @MM_GLIB_CFLAGS@ -MM_GLIB_LIBS = @MM_GLIB_LIBS@ -MOC = @MOC@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NEWT_CFLAGS = @NEWT_CFLAGS@ -NEWT_LIBS = @NEWT_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@ -NM_CONFIG_DEFAULT_DNS_RC_MANAGER = @NM_CONFIG_DEFAULT_DNS_RC_MANAGER@ -NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT = @NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT@ -NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT = @NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT@ -NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ -NM_MICRO_VERSION = @NM_MICRO_VERSION@ -NM_MINOR_VERSION = @NM_MINOR_VERSION@ -NM_MODIFY_SYSTEM_POLICY = @NM_MODIFY_SYSTEM_POLICY@ -NM_VERSION = @NM_VERSION@ -NSS_CFLAGS = @NSS_CFLAGS@ -NSS_LIBS = @NSS_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POLKIT_CFLAGS = @POLKIT_CFLAGS@ -POLKIT_LIBS = @POLKIT_LIBS@ -POSUB = @POSUB@ -PPPD_PATH = @PPPD_PATH@ -PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@ -QT_CFLAGS = @QT_CFLAGS@ -QT_LIBS = @QT_LIBS@ -RANLIB = @RANLIB@ -READLINE_LIBS = @READLINE_LIBS@ -SANITIZERS = @SANITIZERS@ -SANITIZER_ENV = @SANITIZER_ENV@ -SED = @SED@ -SELINUX_CFLAGS = @SELINUX_CFLAGS@ -SELINUX_LIBS = @SELINUX_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SYSTEMD_200_CFLAGS = @SYSTEMD_200_CFLAGS@ -SYSTEMD_200_LIBS = @SYSTEMD_200_LIBS@ -SYSTEMD_INHIBIT_CFLAGS = @SYSTEMD_INHIBIT_CFLAGS@ -SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ -SYSTEMD_JOURNAL_CFLAGS = @SYSTEMD_JOURNAL_CFLAGS@ -SYSTEMD_JOURNAL_LIBS = @SYSTEMD_JOURNAL_LIBS@ -SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ -SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@ -SYSTEM_CA_PATH = @SYSTEM_CA_PATH@ -UDEV_DIR = @UDEV_DIR@ -USE_NLS = @USE_NLS@ -UUID_CFLAGS = @UUID_CFLAGS@ -UUID_LIBS = @UUID_LIBS@ -VALGRIND_RULES = @VALGRIND_RULES@ -VAPIGEN = @VAPIGEN@ -VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ -VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -intltool__v_merge_options_ = @intltool__v_merge_options_@ -intltool__v_merge_options_0 = @intltool__v_merge_options_0@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -nmbinary = @nmbinary@ -nmconfdir = @nmconfdir@ -nmdatadir = @nmdatadir@ -nmlibdir = @nmlibdir@ -nmrundir = @nmrundir@ -nmstatedir = @nmstatedir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -systemdsystemunitdir = @systemdsystemunitdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -with_dhclient = @with_dhclient@ -with_dhcpcd = @with_dhcpcd@ -with_netconfig = @with_netconfig@ -with_resolvconf = @with_resolvconf@ -with_valgrind = @with_valgrind@ -GLIB_GENERATED = nm-core-tests-enum-types.h nm-core-tests-enum-types.c -nm_core_tests_enum_types_sources = test-general-enums.h -GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM -GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM -BUILT_SOURCES = $(GLIB_GENERATED) -@ENABLE_TESTS_TRUE@AM_CPPFLAGS = \ -@ENABLE_TESTS_TRUE@ -I${top_srcdir}/shared \ -@ENABLE_TESTS_TRUE@ -I${top_builddir}/shared \ -@ENABLE_TESTS_TRUE@ -I$(top_srcdir)/libnm-core \ -@ENABLE_TESTS_TRUE@ -I$(top_builddir)/libnm-core \ -@ENABLE_TESTS_TRUE@ -DNETWORKMANAGER_COMPILATION \ -@ENABLE_TESTS_TRUE@ $(GLIB_CFLAGS) \ -@ENABLE_TESTS_TRUE@ -DTEST_CERT_DIR=\"$(abs_srcdir)/certs\" - -@ENABLE_TESTS_TRUE@LDADD = \ -@ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-core/libnm-core.la \ -@ENABLE_TESTS_TRUE@ $(GLIB_LIBS) - -@ENABLE_TESTS_TRUE@TESTS = $(noinst_PROGRAMS) -@ENABLE_TESTS_TRUE@test_general_SOURCES = \ -@ENABLE_TESTS_TRUE@ test-general.c \ -@ENABLE_TESTS_TRUE@ test-general-enums.h \ -@ENABLE_TESTS_TRUE@ nm-core-tests-enum-types.c \ -@ENABLE_TESTS_TRUE@ nm-core-tests-enum-types.h - - -# test-cert.p12 created with: -# -# openssl pkcs12 -export \ -# -in test_key_and_cert.pem \ -# -inkey test_key_and_cert.pem \ -# -certfile test_ca_cert.pem \ -# -name "test-pkcs12" \ -# -out test-cert.p12 -EXTRA_DIST = \ - certs/ca-no-ending-newline.pem \ - certs/pkcs8-decrypted.der \ - certs/pkcs8-enc-key.pem \ - certs/pkcs8-noenc-key.pem \ - certs/test2_ca_cert.pem \ - certs/test2-cert.p12 \ - certs/test2_key_and_cert.pem \ - certs/test-aes-key.pem \ - certs/test_ca_cert.der \ - certs/test_ca_cert.pem \ - certs/test-ca-cert.pem \ - certs/test-cert.p12 \ - certs/test_key_and_cert.pem \ - certs/test-key-and-cert.pem \ - certs/test-key-only-decrypted.der \ - certs/test-key-only-decrypted.pem \ - certs/test-key-only.pem - -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libnm-core/tests/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu libnm-core/tests/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -test-compare$(EXEEXT): $(test_compare_OBJECTS) $(test_compare_DEPENDENCIES) $(EXTRA_test_compare_DEPENDENCIES) - @rm -f test-compare$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_compare_OBJECTS) $(test_compare_LDADD) $(LIBS) - -test-crypto$(EXEEXT): $(test_crypto_OBJECTS) $(test_crypto_DEPENDENCIES) $(EXTRA_test_crypto_DEPENDENCIES) - @rm -f test-crypto$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_crypto_OBJECTS) $(test_crypto_LDADD) $(LIBS) - -test-general$(EXEEXT): $(test_general_OBJECTS) $(test_general_DEPENDENCIES) $(EXTRA_test_general_DEPENDENCIES) - @rm -f test-general$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_general_OBJECTS) $(test_general_LDADD) $(LIBS) - -test-keyfile$(EXEEXT): $(test_keyfile_OBJECTS) $(test_keyfile_DEPENDENCIES) $(EXTRA_test_keyfile_DEPENDENCIES) - @rm -f test-keyfile$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_keyfile_OBJECTS) $(test_keyfile_LDADD) $(LIBS) - -test-secrets$(EXEEXT): $(test_secrets_OBJECTS) $(test_secrets_DEPENDENCIES) $(EXTRA_test_secrets_DEPENDENCIES) - @rm -f test-secrets$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_secrets_OBJECTS) $(test_secrets_LDADD) $(LIBS) - -test-setting-8021x$(EXEEXT): $(test_setting_8021x_OBJECTS) $(test_setting_8021x_DEPENDENCIES) $(EXTRA_test_setting_8021x_DEPENDENCIES) - @rm -f test-setting-8021x$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_setting_8021x_OBJECTS) $(test_setting_8021x_LDADD) $(LIBS) - -test-setting-bond$(EXEEXT): $(test_setting_bond_OBJECTS) $(test_setting_bond_DEPENDENCIES) $(EXTRA_test_setting_bond_DEPENDENCIES) - @rm -f test-setting-bond$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_setting_bond_OBJECTS) $(test_setting_bond_LDADD) $(LIBS) - -test-setting-dcb$(EXEEXT): $(test_setting_dcb_OBJECTS) $(test_setting_dcb_DEPENDENCIES) $(EXTRA_test_setting_dcb_DEPENDENCIES) - @rm -f test-setting-dcb$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_setting_dcb_OBJECTS) $(test_setting_dcb_LDADD) $(LIBS) - -test-settings-defaults$(EXEEXT): $(test_settings_defaults_OBJECTS) $(test_settings_defaults_DEPENDENCIES) $(EXTRA_test_settings_defaults_DEPENDENCIES) - @rm -f test-settings-defaults$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_settings_defaults_OBJECTS) $(test_settings_defaults_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm-core-tests-enum-types.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-compare.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-crypto.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-general.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-keyfile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-secrets.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setting-8021x.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setting-bond.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setting-dcb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-settings-defaults.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -# Recover from deleted '.trs' file; this should ensure that -# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create -# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells -# to avoid problems with "make -n". -.log.trs: - rm -f $< $@ - $(MAKE) $(AM_MAKEFLAGS) $< - -# Leading 'am--fnord' is there to ensure the list of targets does not -# expand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) -am--force-recheck: - @: - -$(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__set_TESTS_bases); \ - am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ - redo_bases=`for i in $$bases; do \ - am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ - done`; \ - if test -n "$$redo_bases"; then \ - redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ - redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ - if $(am__make_dryrun); then :; else \ - rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ - fi; \ - fi; \ - if test -n "$$am__remaking_logs"; then \ - echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ - "recursion detected" >&2; \ - elif test -n "$$redo_logs"; then \ - am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ - fi; \ - if $(am__make_dryrun); then :; else \ - st=0; \ - errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ - for i in $$redo_bases; do \ - test -f $$i.trs && test -r $$i.trs \ - || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ - test -f $$i.log && test -r $$i.log \ - || { echo "$$errmsg $$i.log" >&2; st=1; }; \ - done; \ - test $$st -eq 0 || exit 1; \ - fi - @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ - ws='[ ]'; \ - results=`for b in $$bases; do echo $$b.trs; done`; \ - test -n "$$results" || results=/dev/null; \ - all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ - pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ - fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ - skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ - xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ - xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ - error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ - if test `expr $$fail + $$xpass + $$error` -eq 0; then \ - success=true; \ - else \ - success=false; \ - fi; \ - br='==================='; br=$$br$$br$$br$$br; \ - result_count () \ - { \ - if test x"$$1" = x"--maybe-color"; then \ - maybe_colorize=yes; \ - elif test x"$$1" = x"--no-color"; then \ - maybe_colorize=no; \ - else \ - echo "$@: invalid 'result_count' usage" >&2; exit 4; \ - fi; \ - shift; \ - desc=$$1 count=$$2; \ - if test $$maybe_colorize = yes && test $$count -gt 0; then \ - color_start=$$3 color_end=$$std; \ - else \ - color_start= color_end=; \ - fi; \ - echo "$${color_start}# $$desc $$count$${color_end}"; \ - }; \ - create_testsuite_report () \ - { \ - result_count $$1 "TOTAL:" $$all "$$brg"; \ - result_count $$1 "PASS: " $$pass "$$grn"; \ - result_count $$1 "SKIP: " $$skip "$$blu"; \ - result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ - result_count $$1 "FAIL: " $$fail "$$red"; \ - result_count $$1 "XPASS:" $$xpass "$$red"; \ - result_count $$1 "ERROR:" $$error "$$mgn"; \ - }; \ - { \ - echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ - $(am__rst_title); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - for b in $$bases; do echo $$b; done \ - | $(am__create_global_log); \ - } >$(TEST_SUITE_LOG).tmp || exit 1; \ - mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if $$success; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ - fi; \ - echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ - echo "$${col}$$br$${std}"; \ - create_testsuite_report --maybe-color; \ - echo "$$col$$br$$std"; \ - if $$success; then :; else \ - echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ - if test -n "$(PACKAGE_BUGREPORT)"; then \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list - @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - trs_list=`for i in $$bases; do echo $$i.trs; done`; \ - log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ - exit $$?; -recheck: all - @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set +e; $(am__set_TESTS_bases); \ - bases=`for i in $$bases; do echo $$i; done \ - | $(am__list_recheck_tests)` || exit 1; \ - log_list=`for i in $$bases; do echo $$i.log; done`; \ - log_list=`echo $$log_list`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ - am__force_recheck=am--force-recheck \ - TEST_LOGS="$$log_list"; \ - exit $$? -test-compare.log: test-compare$(EXEEXT) - @p='test-compare$(EXEEXT)'; \ - b='test-compare'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-crypto.log: test-crypto$(EXEEXT) - @p='test-crypto$(EXEEXT)'; \ - b='test-crypto'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-general.log: test-general$(EXEEXT) - @p='test-general$(EXEEXT)'; \ - b='test-general'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-keyfile.log: test-keyfile$(EXEEXT) - @p='test-keyfile$(EXEEXT)'; \ - b='test-keyfile'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-secrets.log: test-secrets$(EXEEXT) - @p='test-secrets$(EXEEXT)'; \ - b='test-secrets'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-setting-8021x.log: test-setting-8021x$(EXEEXT) - @p='test-setting-8021x$(EXEEXT)'; \ - b='test-setting-8021x'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-setting-bond.log: test-setting-bond$(EXEEXT) - @p='test-setting-bond$(EXEEXT)'; \ - b='test-setting-bond'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-setting-dcb.log: test-setting-dcb$(EXEEXT) - @p='test-setting-dcb$(EXEEXT)'; \ - b='test-setting-dcb'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -test-settings-defaults.log: test-settings-defaults$(EXEEXT) - @p='test-settings-defaults$(EXEEXT)'; \ - b='test-settings-defaults'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -.test.log: - @p='$<'; \ - $(am__set_b); \ - $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) -@am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; \ -@am__EXEEXT_TRUE@ $(am__set_b); \ -@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ -@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ -@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ -@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: all check check-am install install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - -include $(GLIB_MAKEFILE) - -@ENABLE_TESTS_TRUE@@VALGRIND_RULES@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libnm-core/tests/nm-core-tests-enum-types.c b/libnm-core/tests/nm-core-tests-enum-types.c deleted file mode 100644 index e6eaa60b..00000000 --- a/libnm-core/tests/nm-core-tests-enum-types.c +++ /dev/null @@ -1,76 +0,0 @@ - - - -/* Generated by glib-mkenums. Do not edit */ - -#include "config.h" - -#include "nm-core-tests-enum-types.h" - -#include "test-general-enums.h" - -GType -nm_test_general_bool_enum_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GEnumValue values[] = { - { NM_TEST_GENERAL_BOOL_ENUM_NO, "NM_TEST_GENERAL_BOOL_ENUM_NO", "no" }, - { NM_TEST_GENERAL_BOOL_ENUM_YES, "NM_TEST_GENERAL_BOOL_ENUM_YES", "yes" }, - { NM_TEST_GENERAL_BOOL_ENUM_MAYBE, "NM_TEST_GENERAL_BOOL_ENUM_MAYBE", "maybe" }, - { NM_TEST_GENERAL_BOOL_ENUM_UNKNOWN, "NM_TEST_GENERAL_BOOL_ENUM_UNKNOWN", "unknown" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_enum_register_static (g_intern_static_string ("NMTestGeneralBoolEnum"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_test_general_meta_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_TEST_GENERAL_META_FLAGS_NONE, "NM_TEST_GENERAL_META_FLAGS_NONE", "none" }, - { NM_TEST_GENERAL_META_FLAGS_FOO, "NM_TEST_GENERAL_META_FLAGS_FOO", "foo" }, - { NM_TEST_GENERAL_META_FLAGS_BAR, "NM_TEST_GENERAL_META_FLAGS_BAR", "bar" }, - { NM_TEST_GENERAL_META_FLAGS_BAZ, "NM_TEST_GENERAL_META_FLAGS_BAZ", "baz" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMTestGeneralMetaFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} -GType -nm_test_general_color_flags_get_type (void) -{ - static volatile gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) - { - static const GFlagsValue values[] = { - { NM_TEST_GENERAL_COLOR_FLAGS_BLUE, "NM_TEST_GENERAL_COLOR_FLAGS_BLUE", "blue" }, - { NM_TEST_GENERAL_COLOR_FLAGS_RED, "NM_TEST_GENERAL_COLOR_FLAGS_RED", "red" }, - { NM_TEST_GENERAL_COLOR_FLAGS_GREEN, "NM_TEST_GENERAL_COLOR_FLAGS_GREEN", "green" }, - { 0, NULL, NULL } - }; - GType g_define_type_id = - g_flags_register_static (g_intern_static_string ("NMTestGeneralColorFlags"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); - } - - return g_define_type_id__volatile; -} - - - diff --git a/libnm-core/tests/nm-core-tests-enum-types.h b/libnm-core/tests/nm-core-tests-enum-types.h deleted file mode 100644 index 90257866..00000000 --- a/libnm-core/tests/nm-core-tests-enum-types.h +++ /dev/null @@ -1,23 +0,0 @@ - - - -/* Generated by glib-mkenums. Do not edit */ - -#ifndef __NM_CORE_TESTS_ENUM_TYPES_H__ -#define __NM_CORE_TESTS_ENUM_TYPES_H__ - -#include <glib-object.h> - -G_BEGIN_DECLS -GType nm_test_general_bool_enum_get_type (void) G_GNUC_CONST; -#define NM_TYPE_TEST_GENERAL_BOOL_ENUM (nm_test_general_bool_enum_get_type ()) -GType nm_test_general_meta_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_TEST_GENERAL_META_FLAGS (nm_test_general_meta_flags_get_type ()) -GType nm_test_general_color_flags_get_type (void) G_GNUC_CONST; -#define NM_TYPE_TEST_GENERAL_COLOR_FLAGS (nm_test_general_color_flags_get_type ()) -G_END_DECLS - -#endif /* __NM_CORE_TESTS_ENUM_TYPES_H__ */ - - - diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c index 6631c896..1cb8d7af 100644 --- a/libnm-core/tests/test-general.c +++ b/libnm-core/tests/test-general.c @@ -1922,6 +1922,7 @@ test_connection_diff_a_only (void) { NM_SETTING_CONNECTION_TIMESTAMP, NM_SETTING_DIFF_RESULT_IN_A }, { NM_SETTING_CONNECTION_AUTOCONNECT, NM_SETTING_DIFF_RESULT_IN_A }, { NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY, NM_SETTING_DIFF_RESULT_IN_A }, + { NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES, NM_SETTING_DIFF_RESULT_IN_A }, { NM_SETTING_CONNECTION_READ_ONLY, NM_SETTING_DIFF_RESULT_IN_A }, { NM_SETTING_CONNECTION_PERMISSIONS, NM_SETTING_DIFF_RESULT_IN_A }, { NM_SETTING_CONNECTION_ZONE, NM_SETTING_DIFF_RESULT_IN_A }, @@ -3318,7 +3319,7 @@ test_setting_old_uuid (void) nmtst_assert_setting_verifies (NM_SETTING (setting)); } -/******************************************************************************/ +/*****************************************************************************/ static void test_connection_normalize_uuid (void) @@ -3335,7 +3336,7 @@ test_connection_normalize_uuid (void) nmtst_assert_connection_verifies_after_normalization (con, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_MISSING_PROPERTY); } -/******************************************************************************/ +/*****************************************************************************/ /* * Test normalization of interface-name @@ -3900,6 +3901,7 @@ test_connection_normalize_gateway_never_default (void) nm_connection_add_setting (con, (NMSetting *) s_ip4); nm_connection_add_setting (con, (NMSetting *) s_ip6); + nm_connection_add_setting (con, nm_setting_proxy_new ()); nmtst_assert_connection_verifies_without_normalization (con); g_assert_cmpstr ("1.1.1.254", ==, nm_setting_ip_config_get_gateway (s_ip4)); @@ -3942,7 +3944,7 @@ test_connection_normalize_may_fail (void) nm_connection_add_setting (con, (NMSetting *) s_ip4); nm_connection_add_setting (con, (NMSetting *) s_ip6); - nmtst_assert_connection_verifies_without_normalization (con); + nmtst_assert_connection_verifies_and_normalizable (con); /* Now set method=disabled/ignore and check that may-fail becomes TRUE * after normalization @@ -3961,6 +3963,59 @@ test_connection_normalize_may_fail (void) } static void +test_connection_normalize_shared_addresses (void) +{ + gs_unref_object NMConnection *con = NULL; + NMSettingIPConfig *s_ip4, *s_ip6; + NMIPAddress *addr; + gs_free_error GError *error = NULL; + + con = nmtst_create_minimal_connection ("test1", NULL, NM_SETTING_WIRED_SETTING_NAME, NULL); + nmtst_assert_connection_verifies_and_normalizable (con); + + s_ip4 = (NMSettingIPConfig *) nm_setting_ip4_config_new (); + g_object_set (G_OBJECT (s_ip4), + NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_SHARED, + NULL); + + addr = nm_ip_address_new (AF_INET, "1.1.1.1", 24, &error); + g_assert_no_error (error); + nm_setting_ip_config_add_address (s_ip4, addr); + nm_ip_address_unref (addr); + + s_ip6 = (NMSettingIPConfig *) nm_setting_ip6_config_new (); + g_object_set (s_ip6, + NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_AUTO, + NULL); + + nm_connection_add_setting (con, (NMSetting *) s_ip4); + nm_connection_add_setting (con, (NMSetting *) s_ip6); + + nmtst_assert_connection_verifies_and_normalizable (con); + + /* Now we add other addresses and check that they are + * removed during normalization + * */ + addr = nm_ip_address_new (AF_INET, "2.2.2.2", 24, &error); + g_assert_no_error (error); + nm_setting_ip_config_add_address (s_ip4, addr); + nm_ip_address_unref (addr); + + addr = nm_ip_address_new (AF_INET, "3.3.3.3", 24, &error); + g_assert_no_error (error); + nm_setting_ip_config_add_address (s_ip4, addr); + nm_ip_address_unref (addr); + + nmtst_assert_connection_verifies_after_normalization (con, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY); + nmtst_connection_normalize (con); + g_assert_cmpuint (nm_setting_ip_config_get_num_addresses (s_ip4), ==, 1); + addr = nm_setting_ip_config_get_address (s_ip4, 0); + g_assert_cmpstr (nm_ip_address_get_address (addr), ==, "1.1.1.1"); +} + +static void test_setting_ip4_gateway (void) { NMConnection *conn; @@ -4239,6 +4294,10 @@ test_hexstr2bin (void) { "0xccddeeff", { 0xcc, 0xdd, 0xee, 0xff }, 4 }, { "1:2:66:77:80", { 0x01, 0x02, 0x66, 0x77, 0x80 }, 5 }, { "e", { 0x0e }, 1 }, + { "ef", { 0xef }, 1 }, + { "efa" }, + { "efad", { 0xef, 0xad }, 2 }, + { "ef:a", { 0xef, 0x0a }, 2 }, { "aabb1199:" }, { ":aabb1199" }, { "aabb$$dd" }, @@ -4260,7 +4319,7 @@ test_hexstr2bin (void) } } -/******************************************************************************/ +/*****************************************************************************/ #define UUID_NIL "00000000-0000-0000-0000-000000000000" #define UUID_NS_DNS "6ba7b810-9dad-11d1-80b4-00c04fd430c8" @@ -4314,7 +4373,7 @@ test_nm_utils_uuid_generate_from_string (void) _test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "002a0ada-f547-375a-bab5-896a11d1927e", "a\0b", 3, UUID_NS_DNS); } -/*******************************************/ +/*****************************************************************************/ static void __test_uuid (const char *expected_uuid, const char *str, gssize slen, char *uuid_test) @@ -4361,7 +4420,7 @@ test_nm_utils_uuid_generate_from_strings (void) _test_uuid ("dd265bf7-c05a-3037-9939-b9629858a477", "a\0b\0", 4, "a", "b"); } -/******************************************************************************/ +/*****************************************************************************/ static void test_nm_utils_ascii_str_to_int64_check (const char *str, guint base, gint64 min, @@ -4492,7 +4551,7 @@ test_nm_utils_ascii_str_to_int64 (void) test_nm_utils_ascii_str_to_int64_do ("0x70", 0, G_MININT64, G_MAXINT64, -1, 0, 0x70); } -/******************************************************************************/ +/*****************************************************************************/ static void test_nm_utils_strstrdictkey (void) @@ -4540,7 +4599,7 @@ test_nm_utils_strstrdictkey (void) } } -/******************************************************************************/ +/*****************************************************************************/ static void test_nm_utils_dns_option_validate_do (char *option, gboolean ipv6, const NMUtilsDNSOptionDesc *descs, @@ -4624,7 +4683,7 @@ test_nm_utils_dns_option_find_idx (void) g_ptr_array_free (options, TRUE); } -/******************************************************************************/ +/*****************************************************************************/ static void _json_config_check_valid (const char *conf, gboolean expected) @@ -4632,7 +4691,7 @@ _json_config_check_valid (const char *conf, gboolean expected) gs_free_error GError *error = NULL; gboolean res; - res = _nm_utils_check_valid_json (conf, &error); + res = nm_utils_is_json_object (conf, &error); g_assert_cmpint (res, ==, expected); g_assert (res || error); } @@ -4728,7 +4787,7 @@ test_nm_utils_team_config_equal (void) #endif } -/******************************************************************************/ +/*****************************************************************************/ enum TEST_IS_POWER_OF_TWP_ENUM_SIGNED { _DUMMY_1 = -1, @@ -4825,7 +4884,7 @@ again: } } -/******************************************************************************/ +/*****************************************************************************/ static void test_g_ptr_array_insert (void) @@ -4850,7 +4909,7 @@ test_g_ptr_array_insert (void) #endif } -/******************************************************************************/ +/*****************************************************************************/ static void test_g_hash_table_get_keys_as_array (void) @@ -4885,7 +4944,7 @@ test_g_hash_table_get_keys_as_array (void) g_hash_table_unref (table); } -/******************************************************************************/ +/*****************************************************************************/ static int _test_find_binary_search_cmp (gconstpointer a, gconstpointer b, gpointer dummy) @@ -4907,9 +4966,9 @@ _test_find_binary_search_do (const int *array, gsize len) { gsize i; gssize idx; - gs_free gpointer *parray = g_new (gpointer, len); - const int needle = 0; - gpointer pneedle = GINT_TO_POINTER (needle); + gs_free gconstpointer *parray = g_new (gconstpointer, len); + const int NEEDLE = 0; + gconstpointer pneedle = GINT_TO_POINTER (NEEDLE); gssize expected_result; for (i = 0; i < len; i++) @@ -4953,16 +5012,56 @@ _test_find_binary_search_do (const int *array, gsize len) } } } + +static void +_test_find_binary_search_do_uint32 (const int *int_array, gsize len) +{ + gssize idx; + const int OFFSET = 100; + const int NEEDLE = 0 + OFFSET; + gssize expected_result = -1; + guint32 array[len]; + + /* the test data has negative values. Shift them... */ + for (idx = 0; idx < len; idx++) { + int v = int_array[idx]; + + g_assert (v > -OFFSET); + g_assert (v < OFFSET); + g_assert (idx == 0 || v > int_array[idx - 1]); + array[idx] = (guint32) (int_array[idx] + OFFSET); + if (array[idx] == NEEDLE) + expected_result = idx; + } + + idx = _nm_utils_array_find_binary_search (array, + sizeof (guint32), + len, + &NEEDLE, + nm_cmp_uint32_p_with_data, + NULL); + if (expected_result >= 0) + g_assert_cmpint (expected_result, ==, idx); + else { + gssize idx2 = ~idx; + g_assert_cmpint (idx, <, 0); + + g_assert (idx2 >= 0); + g_assert (idx2 <= len); + g_assert (idx2 - 1 < 0 || array[idx2 - 1] < NEEDLE); + g_assert (idx2 >= len || array[idx2] > NEEDLE); + } +} #define test_find_binary_search_do(...) \ G_STMT_START { \ - const int _array[] = { __VA_ARGS__ } ; \ + const int _array[] = { __VA_ARGS__ }; \ _test_find_binary_search_do (_array, G_N_ELEMENTS (_array)); \ + _test_find_binary_search_do_uint32 (_array, G_N_ELEMENTS (_array)); \ } G_STMT_END static void test_nm_utils_ptrarray_find_binary_search (void) { -#define _NOT(idx) (~ ((gssize) (idx))) test_find_binary_search_do ( 0); test_find_binary_search_do ( -1, 0); test_find_binary_search_do ( -2, -1, 0); @@ -4989,7 +5088,7 @@ test_nm_utils_ptrarray_find_binary_search (void) test_find_binary_search_do (-3, -2, -1, 1, 2, 3, 4); } -/******************************************************************************/ +/*****************************************************************************/ static void test_nm_utils_enum_from_str_do (GType type, const char *str, gboolean exp_result, int exp_flags, @@ -5084,7 +5183,7 @@ static void test_nm_utils_enum (void) test_nm_utils_enum_get_values_do (color_flags, 0, G_MAXINT, "blue,red,green"); } -/******************************************************************************/ +/*****************************************************************************/ static int _test_nm_in_set_get (int *call_counter, gboolean allow_called, int value) @@ -5176,7 +5275,7 @@ test_nm_in_set (void) #undef _ASSERT } -/******************************************************************************/ +/*****************************************************************************/ static const char * _test_nm_in_set_getstr (int *call_counter, gboolean allow_called, const char *value) @@ -5304,7 +5403,46 @@ test_nm_in_strset (void) #undef _ASSERT } -/******************************************************************************/ +/*****************************************************************************/ + +static gboolean +do_test_nm_set_out_called (gint *call_count) +{ + (*call_count)++; + return TRUE; +} + +static void +test_nm_set_out (void) +{ + gboolean val; + gboolean *p_val; + int call_count; + + /* NM_SET_OUT() has an unexpected non-function like behavior + * wrt. side-effects of the value argument. Test it */ + + p_val = &val; + call_count = 0; + NM_SET_OUT (p_val, do_test_nm_set_out_called (&call_count)); + g_assert_cmpint (call_count, ==, 1); + + p_val = NULL; + call_count = 0; + NM_SET_OUT (p_val, do_test_nm_set_out_called (&call_count)); + g_assert_cmpint (call_count, ==, 0); + + /* test that we successfully re-defined _G_BOOLEAN_EXPR() */ +#define _T1(a) \ + ({ \ + g_assert (a > 2); \ + a; \ + }) + g_assert (_T1 (3) > 1); +#undef _T1 +} + +/*****************************************************************************/ NMTST_DEFINE (); @@ -5368,6 +5506,7 @@ int main (int argc, char **argv) g_test_add_func ("/core/general/test_connection_normalize_infiniband_mtu", test_connection_normalize_infiniband_mtu); g_test_add_func ("/core/general/test_connection_normalize_gateway_never_default", test_connection_normalize_gateway_never_default); g_test_add_func ("/core/general/test_connection_normalize_may_fail", test_connection_normalize_may_fail); + g_test_add_func ("/core/general/test_connection_normalize_shared_addresses", test_connection_normalize_shared_addresses); g_test_add_func ("/core/general/test_setting_connection_permissions_helpers", test_setting_connection_permissions_helpers); g_test_add_func ("/core/general/test_setting_connection_permissions_property", test_setting_connection_permissions_property); @@ -5427,6 +5566,7 @@ int main (int argc, char **argv) g_test_add_func ("/core/general/_nm_utils_validate_json", test_nm_utils_check_valid_json); g_test_add_func ("/core/general/_nm_utils_team_config_equal", test_nm_utils_team_config_equal); g_test_add_func ("/core/general/test_nm_utils_enum", test_nm_utils_enum); + g_test_add_func ("/core/general/nm-set-out", test_nm_set_out); return g_test_run (); } diff --git a/libnm-core/tests/test-keyfile.c b/libnm-core/tests/test-keyfile.c index b9b211b6..9944eb5e 100644 --- a/libnm-core/tests/test-keyfile.c +++ b/libnm-core/tests/test-keyfile.c @@ -28,6 +28,7 @@ #include "nm-setting-wired.h" #include "nm-setting-8021x.h" #include "nm-setting-team.h" +#include "nm-setting-proxy.h" #include "nm-utils/nm-test-utils.h" @@ -36,7 +37,7 @@ #define TEST_WIRED_TLS_PRIVKEY TEST_CERT_DIR"/test-key-and-cert.pem" -/******************************************************************************/ +/*****************************************************************************/ #define CLEAR(con, keyfile) \ G_STMT_START { \ @@ -115,8 +116,21 @@ _nm_keyfile_read (GKeyFile *keyfile, if (needs_normalization) { nmtst_assert_connection_verifies_after_normalization (con, 0, 0); nmtst_connection_normalize (con); - } else + } else { + { + NMSettingConnection *s_con; + + /* a non-slave connection must have a proxy setting, but + * keyfile reader does not add that (unless a [proxy] section + * is present. */ + s_con = nm_connection_get_setting_connection (con); + if ( s_con + && !nm_setting_connection_get_master (s_con) + && !nm_connection_get_setting_proxy (con)) + nm_connection_add_setting (con, nm_setting_proxy_new ()); + } nmtst_assert_connection_verifies_without_normalization (con); + } return con; } @@ -219,7 +233,7 @@ _keyfile_convert (NMConnection **con, } } -/******************************************************************************/ +/*****************************************************************************/ static void _test_8021x_cert_check (NMConnection *con, @@ -359,7 +373,7 @@ test_8021x_cert (void) } -/******************************************************************************/ +/*****************************************************************************/ static void test_8021x_cert_read (void) @@ -567,7 +581,7 @@ test_team_conf_read_invalid (void) #endif } -/******************************************************************************/ +/*****************************************************************************/ NMTST_DEFINE (); |