diff options
author | Michael Biebl <biebl@debian.org> | 2013-02-09 03:16:54 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2013-02-09 03:16:54 +0100 |
commit | e17c5736fc3722ce51cb33f3edb203960125a4c1 (patch) | |
tree | 2b41ee92b307915e9d97f0ef2c012fc793653599 | |
parent | 9c202e3e860b3be9e1f8882630b69affbb130102 (diff) |
Imported Upstream version 0.9.7.997upstream/0.9.7.997
220 files changed, 7910 insertions, 5310 deletions
diff --git a/Makefile.in b/Makefile.in index 28cc92054..6a80b83c5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -76,12 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -291,12 +290,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ @@ -32,6 +32,12 @@ This is a new stable release of NetworkManager. Notable changes include: * Fix canceling secrets requests in GUI agents * Always enable Proactive Key Caching (PKC, also called OKC) for WPA Enterprise WiFi configurations +* libnl 3.2.7 or later is required +* The internal crashdump handling has been removed +* A DHCPv6 DUID is now generated from /etc/machine-id and sent to the DHCPv6 server +* Bond interfaces now wait for a ready slave before starting automatic IP configuration +* The kernel WiFi rfkill state is now synced to the user-requested WirelessEnabled + state at startup ============================================== diff --git a/NetworkManager.pc.in b/NetworkManager.pc.in index 01bcdf36f..877c34486 100644 --- a/NetworkManager.pc.in +++ b/NetworkManager.pc.in @@ -3,6 +3,8 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ libgnome_serverdir=@libexecdir@ +plugindir=@libdir@/NetworkManager +configdir=@sysconfdir@/NetworkManager Name: NetworkManager Description: System for maintaining active network connection @@ -34,25 +34,6 @@ NM_STATE_CONNECTED_LOCAL, NM_STATE_CONNECTED_SITE, or NM_STATE_CONNECTED_GLOBAL based on it and the device's state. -* Real Access Point mode support - -Now that NetworkManager requires wpa_supplicant 0.7.x or later, we can add -full Access Point (AP) mode support. NetworkManager currently implements -connection sharing via AdHoc mode support, which has some limitations. Instead, -we should check whether the wifi device supports AP mode, and if so, use -that mode instead. wpa_supplicant has support for a "lightweight AP" mode which -we should use. Witold Sowa started this support a while ago and wrote the new -D-Bus API for wpa_supplicant that makes all this possible, but some NM pieces -are still missing. If the wifi driver supports AP mode, then in -src/supplicant-manager/ NM should send an AP-mode config instead of sending -the adhoc config. - -Note that some devices (airo, ipw2100, ipw2200, iwl3945, iwl4965, atmel, zd1201) -will never support AP mode due to firmware limitations, so we clearly must still -provide Ad-Hoc connection sharing support for those devices and switch between -Ad-Hoc and AP mode depending on device capabilities. - - * Implement NM_DEVICE_STATE_DISCONNECTING To allow for "pre-down" scenarios, this state should be implemented before a @@ -135,23 +116,6 @@ the VPN because WiFi choked for 10 seconds, but reconnect the VPN if it was connected before the drop. -* VPN autoconnect (bgo #560471) - -We should add a property to the NMSettingConnection object in -libnm-util/nm-setting-connection.c called "vpns" that is a string list, -containing a list of Connection UUIDs that should be activated when the base -connection itself is activated. This will allow a VPN connection to be -started every time another connection is started, so that if you choose you're -always on the VPN in your favorite coffee shop. - -The NM_DEVICE_STATE_SECONDARIES state was added specifically for cases like -this. Thus, after the base device has IP connectivity, but before it has -signaled that it's fully activated, the device should enter the SECONDARIES -state and kick off activation of the given VPN connection. Only after this -VPN connection has successfully connected should the base device to the -NM_DEVICE_STATE_ACTIVATED state. - - * VPN and IPv6 The internal VPN capability should support IPv6. Essentially, the D-Bus diff --git a/aclocal.m4 b/aclocal.m4 index 2310ccfe3..6fbff7005 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1289,7 +1289,6 @@ m4_include([m4/introspection.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) -m4_include([m4/libnl-check.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) diff --git a/callouts/Makefile.in b/callouts/Makefile.in index c4ff5aa87..9678642de 100644 --- a/callouts/Makefile.in +++ b/callouts/Makefile.in @@ -65,12 +65,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -316,12 +315,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/callouts/tests/Makefile.in b/callouts/tests/Makefile.in index ca39f716b..c35ffaf29 100644 --- a/callouts/tests/Makefile.in +++ b/callouts/tests/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -220,12 +219,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/cli/Makefile.in b/cli/Makefile.in index ef08ebcad..1eada990b 100644 --- a/cli/Makefile.in +++ b/cli/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -224,12 +223,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/cli/src/Makefile.in b/cli/src/Makefile.in index 27f3b23af..cb37b8db4 100644 --- a/cli/src/Makefile.in +++ b/cli/src/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -222,12 +221,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/cli/src/connections.c b/cli/src/connections.c index e7926f1ac..d509ce047 100644 --- a/cli/src/connections.c +++ b/cli/src/connections.c @@ -269,6 +269,7 @@ nmc_connection_detail (NMConnection *connection, NmCli *nmc) /* Loop through the required settings and print them. */ for (i = 0; i < print_settings_array->len; i++) { + NMSetting *setting; int section_idx = g_array_index (print_settings_array, int, i); if (nmc->print_output != NMC_PRINT_TERSE && !nmc->multiline_output && was_output) @@ -276,204 +277,11 @@ nmc_connection_detail (NMConnection *connection, NmCli *nmc) was_output = FALSE; - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[0].name)) { - NMSettingConnection *s_con = nm_connection_get_setting_connection (connection); - if (s_con) { - setting_connection_details (s_con, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[1].name)) { - NMSettingWired *s_wired = nm_connection_get_setting_wired (connection); - if (s_wired) { - setting_wired_details (s_wired, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[2].name)) { - NMSetting8021x *s_8021X = nm_connection_get_setting_802_1x (connection); - if (s_8021X) { - setting_802_1X_details (s_8021X, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[3].name)) { - NMSettingWireless *s_wireless = nm_connection_get_setting_wireless (connection); - if (s_wireless) { - setting_wireless_details (s_wireless, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[4].name)) { - NMSettingWirelessSecurity *s_wsec = nm_connection_get_setting_wireless_security (connection); - if (s_wsec) { - setting_wireless_security_details (s_wsec, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[5].name)) { - NMSettingIP4Config *s_ip4 = nm_connection_get_setting_ip4_config (connection); - if (s_ip4) { - setting_ip4_config_details (s_ip4, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[6].name)) { - NMSettingIP6Config *s_ip6 = nm_connection_get_setting_ip6_config (connection); - if (s_ip6) { - setting_ip6_config_details (s_ip6, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[7].name)) { - NMSettingSerial *s_serial = nm_connection_get_setting_serial (connection); - if (s_serial) { - setting_serial_details (s_serial, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[8].name)) { - NMSettingPPP *s_ppp = nm_connection_get_setting_ppp (connection); - if (s_ppp) { - setting_ppp_details (s_ppp, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[9].name)) { - NMSettingPPPOE *s_pppoe = nm_connection_get_setting_pppoe (connection); - if (s_pppoe) { - setting_pppoe_details (s_pppoe, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[10].name)) { - NMSettingGsm *s_gsm = nm_connection_get_setting_gsm (connection); - if (s_gsm) { - setting_gsm_details (s_gsm, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[11].name)) { - NMSettingCdma *s_cdma = nm_connection_get_setting_cdma (connection); - if (s_cdma) { - setting_cdma_details (s_cdma, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[12].name)) { - NMSettingBluetooth *s_bluetooth = nm_connection_get_setting_bluetooth (connection); - if (s_bluetooth) { - setting_bluetooth_details (s_bluetooth, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[13].name)) { - NMSettingOlpcMesh *s_olpc_mesh = nm_connection_get_setting_olpc_mesh (connection); - if (s_olpc_mesh) { - setting_olpc_mesh_details (s_olpc_mesh, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[14].name)) { - NMSettingVPN *s_vpn = nm_connection_get_setting_vpn (connection); - if (s_vpn) { - setting_vpn_details (s_vpn, nmc); - was_output = TRUE; - continue; - } - } - -#if WITH_WIMAX - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[15].name)) { - NMSettingWimax *s_wimax = nm_connection_get_setting_wimax (connection); - if (s_wimax) { - setting_wimax_details (s_wimax, nmc); - was_output = TRUE; - continue; - } - } -#endif - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[16].name)) { - NMSettingInfiniband *s_infiniband = nm_connection_get_setting_infiniband (connection); - if (s_infiniband) { - setting_infiniband_details (s_infiniband, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[17].name)) { - NMSettingBond *s_bond = nm_connection_get_setting_bond (connection); - if (s_bond) { - setting_bond_details (s_bond, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[18].name)) { - NMSettingVlan *s_vlan = nm_connection_get_setting_vlan (connection); - if (s_vlan) { - setting_vlan_details (s_vlan, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[19].name)) { - NMSettingAdsl *s_adsl = nm_connection_get_setting_adsl (connection); - if (s_adsl) { - setting_adsl_details (s_adsl, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[20].name)) { - NMSettingBridge *s_bridge = nm_connection_get_setting_bridge (connection); - if (s_bridge) { - setting_bridge_details (s_bridge, nmc); - was_output = TRUE; - continue; - } - } - - if (!strcasecmp (nmc_fields_settings_names[section_idx].name, nmc_fields_settings_names[21].name)) { - NMSettingBridgePort *s_bridge_port = nm_connection_get_setting_bridge_port (connection); - if (s_bridge_port) { - setting_bridge_port_details (s_bridge_port, nmc); - was_output = TRUE; - continue; - } + setting = nm_connection_get_setting_by_name (connection, nmc_fields_settings_names[section_idx].name); + if (setting) { + setting_details (setting, nmc); + was_output = TRUE; + continue; } } @@ -723,9 +531,12 @@ fill_in_fields_con_status (NMActiveConnection *active, GSList *con_list) devices = nm_active_connection_get_devices (active); for (i = 0; devices && (i < devices->len); i++) { NMDevice *device = g_ptr_array_index (devices, i); + const char *dev_iface = nm_device_get_iface (device); - g_string_append (dev_str, nm_device_get_iface (device)); - g_string_append_c (dev_str, ','); + if (dev_iface) { + g_string_append (dev_str, dev_iface); + g_string_append_c (dev_str, ','); + } } if (dev_str->len > 0) g_string_truncate (dev_str, dev_str->len - 1); /* Cut off last ',' */ @@ -1279,7 +1090,7 @@ find_device_for_connection (NmCli *nmc, if (iface) { const char *dev_iface = nm_device_get_iface (dev); - if ( !strcmp (dev_iface, iface) + if ( !g_strcmp0 (dev_iface, iface) && nm_device_connection_compatible (dev, connection, NULL)) { found_device = dev; } diff --git a/cli/src/devices.c b/cli/src/devices.c index caaf7102c..52c8c8557 100644 --- a/cli/src/devices.c +++ b/cli/src/devices.c @@ -833,8 +833,10 @@ show_device_info (gpointer data, gpointer user_data) NMDevice *slave = g_ptr_array_index (slaves, idx); const char *iface = nm_device_get_iface (slave); - g_string_append (bond_slaves_str, iface); - g_string_append_c (bond_slaves_str, ' '); + if (iface) { + g_string_append (bond_slaves_str, iface); + g_string_append_c (bond_slaves_str, ' '); + } } if (bond_slaves_str->len > 0) g_string_truncate (bond_slaves_str, bond_slaves_str->len-1); /* Chop off last space */ @@ -1018,7 +1020,7 @@ do_devices_list (NmCli *nmc, int argc, char **argv) NMDevice *candidate = g_ptr_array_index (devices, i); const char *dev_iface = nm_device_get_iface (candidate); - if (!strcmp (dev_iface, iface)) + if (!g_strcmp0 (dev_iface, iface)) device = candidate; } if (!device) { @@ -1182,7 +1184,7 @@ do_device_disconnect (NmCli *nmc, int argc, char **argv) NMDevice *candidate = g_ptr_array_index (devices, i); const char *dev_iface = nm_device_get_iface (candidate); - if (!strcmp (dev_iface, iface)) + if (!g_strcmp0 (dev_iface, iface)) device = candidate; } @@ -1321,7 +1323,7 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) NMDevice *candidate = g_ptr_array_index (devices, i); const char *dev_iface = nm_device_get_iface (candidate); - if (!strcmp (dev_iface, iface)) { + if (!g_strcmp0 (dev_iface, iface)) { device = candidate; break; } @@ -1517,7 +1519,7 @@ find_wifi_device_by_iface (const GPtrArray *devices, const char *iface, int *idx if (iface) { /* If a iface was specified then use it. */ - if (strcmp (dev_iface, iface) == 0) { + if (g_strcmp0 (dev_iface, iface) == 0) { device = candidate; break; } @@ -1968,7 +1970,7 @@ do_device_wimax_list (NmCli *nmc, int argc, char **argv) NMDevice *candidate = g_ptr_array_index (devices, i); const char *dev_iface = nm_device_get_iface (candidate); - if (!strcmp (dev_iface, iface)) { + if (!g_strcmp0 (dev_iface, iface)) { device = candidate; break; } diff --git a/cli/src/settings.c b/cli/src/settings.c index 407ca8ad1..1b3d0fd00 100644 --- a/cli/src/settings.c +++ b/cli/src/settings.c @@ -94,33 +94,39 @@ static NmcOutputField nmc_fields_setting_wired[] = { /* Available fields for NM_SETTING_802_1X_SETTING_NAME */ static NmcOutputField nmc_fields_setting_8021X[] = { - SETTING_FIELD ("name", 10), /* 0 */ - SETTING_FIELD (NM_SETTING_802_1X_EAP, 10), /* 1 */ - SETTING_FIELD (NM_SETTING_802_1X_IDENTITY, 15), /* 2 */ - SETTING_FIELD (NM_SETTING_802_1X_ANONYMOUS_IDENTITY, 15), /* 3 */ - SETTING_FIELD (NM_SETTING_802_1X_PAC_FILE, 15), /* 4 */ - SETTING_FIELD (NM_SETTING_802_1X_CA_CERT, 10), /* 5 */ - SETTING_FIELD (NM_SETTING_802_1X_CA_PATH, 10), /* 6 */ - SETTING_FIELD (NM_SETTING_802_1X_SUBJECT_MATCH, 10), /* 7 */ - SETTING_FIELD (NM_SETTING_802_1X_ALTSUBJECT_MATCHES, 10), /* 8 */ - SETTING_FIELD (NM_SETTING_802_1X_CLIENT_CERT, 10), /* 9 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPVER, 10), /* 10 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPLABEL, 10), /* 11 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING, 10), /* 12 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTH, 10), /* 13 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTHEAP, 10), /* 14 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_CERT, 20), /* 15 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_PATH, 20), /* 16 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_SUBJECT_MATCH, 10), /* 17 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_ALTSUBJECT_MATCHES, 10), /* 18 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CLIENT_CERT, 20), /* 19 */ - SETTING_FIELD (NM_SETTING_802_1X_PASSWORD, 10), /* 20 */ - SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY, 15), /* 21 */ - SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, 20), /* 22 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, 20), /* 23 */ - SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, 20), /* 24 */ - SETTING_FIELD (NM_SETTING_802_1X_PIN, 8), /* 25 */ - SETTING_FIELD (NM_SETTING_802_1X_SYSTEM_CA_CERTS, 17), /* 26 */ + SETTING_FIELD ("name", 10), /* 0 */ + SETTING_FIELD (NM_SETTING_802_1X_EAP, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_802_1X_IDENTITY, 15), /* 2 */ + SETTING_FIELD (NM_SETTING_802_1X_ANONYMOUS_IDENTITY, 15), /* 3 */ + SETTING_FIELD (NM_SETTING_802_1X_PAC_FILE, 15), /* 4 */ + SETTING_FIELD (NM_SETTING_802_1X_CA_CERT, 10), /* 5 */ + SETTING_FIELD (NM_SETTING_802_1X_CA_PATH, 10), /* 6 */ + SETTING_FIELD (NM_SETTING_802_1X_SUBJECT_MATCH, 10), /* 7 */ + SETTING_FIELD (NM_SETTING_802_1X_ALTSUBJECT_MATCHES, 10), /* 8 */ + SETTING_FIELD (NM_SETTING_802_1X_CLIENT_CERT, 10), /* 9 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPVER, 10), /* 10 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE1_PEAPLABEL, 10), /* 11 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING, 10), /* 12 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTH, 10), /* 13 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_AUTHEAP, 10), /* 14 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_CERT, 20), /* 15 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CA_PATH, 20), /* 16 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_SUBJECT_MATCH, 10), /* 17 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_ALTSUBJECT_MATCHES, 10), /* 18 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_CLIENT_CERT, 20), /* 19 */ + SETTING_FIELD (NM_SETTING_802_1X_PASSWORD, 10), /* 20 */ + SETTING_FIELD (NM_SETTING_802_1X_PASSWORD_FLAGS, 20), /* 21 */ + SETTING_FIELD (NM_SETTING_802_1X_PASSWORD_RAW, 20), /* 22 */ + SETTING_FIELD (NM_SETTING_802_1X_PASSWORD_RAW_FLAGS, 20), /* 23 */ + SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY, 15), /* 24 */ + SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD, 20), /* 25 */ + SETTING_FIELD (NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD_FLAGS, 20), /* 26 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY, 20), /* 27 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD, 20), /* 28 */ + SETTING_FIELD (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD_FLAGS, 20), /* 29 */ + SETTING_FIELD (NM_SETTING_802_1X_PIN, 8), /* 30 */ + SETTING_FIELD (NM_SETTING_802_1X_PIN_FLAGS, 20), /* 31 */ + SETTING_FIELD (NM_SETTING_802_1X_SYSTEM_CA_CERTS, 17), /* 32 */ {NULL, NULL, 0, NULL, 0} }; #define NMC_FIELDS_SETTING_802_1X_ALL "name"","\ @@ -144,11 +150,17 @@ static NmcOutputField nmc_fields_setting_8021X[] = { NM_SETTING_802_1X_PHASE2_ALTSUBJECT_MATCHES","\ NM_SETTING_802_1X_PHASE2_CLIENT_CERT","\ NM_SETTING_802_1X_PASSWORD","\ + NM_SETTING_802_1X_PASSWORD_FLAGS","\ + NM_SETTING_802_1X_PASSWORD_RAW","\ + NM_SETTING_802_1X_PASSWORD_RAW_FLAGS","\ NM_SETTING_802_1X_PRIVATE_KEY","\ NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD","\ + NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD_FLAGS","\ NM_SETTING_802_1X_PHASE2_PRIVATE_KEY","\ NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD","\ + NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD_FLAGS","\ NM_SETTING_802_1X_PIN","\ + NM_SETTING_802_1X_PIN_FLAGS","\ NM_SETTING_802_1X_SYSTEM_CA_CERTS #define NMC_FIELDS_SETTING_802_1X_COMMON NMC_FIELDS_SETTING_802_1X_ALL @@ -167,7 +179,8 @@ static NmcOutputField nmc_fields_setting_wireless[] = { SETTING_FIELD (NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST, 39), /* 10 */ SETTING_FIELD (NM_SETTING_WIRELESS_MTU, 6), /* 11 */ SETTING_FIELD (NM_SETTING_WIRELESS_SEEN_BSSIDS, 35), /* 12 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SEC, 10), /* 13 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SEC, 25), /* 13 */ + SETTING_FIELD (NM_SETTING_WIRELESS_HIDDEN, 10), /* 14 */ {NULL, NULL, 0, NULL, 0} }; #define NMC_FIELDS_SETTING_WIRELESS_ALL "name"","\ @@ -183,26 +196,30 @@ static NmcOutputField nmc_fields_setting_wireless[] = { NM_SETTING_WIRELESS_MAC_ADDRESS_BLACKLIST","\ NM_SETTING_WIRELESS_MTU","\ NM_SETTING_WIRELESS_SEEN_BSSIDS","\ - NM_SETTING_WIRELESS_SEC + NM_SETTING_WIRELESS_SEC","\ + NM_SETTING_WIRELESS_HIDDEN #define NMC_FIELDS_SETTING_WIRELESS_COMMON NMC_FIELDS_SETTING_WIRELESS_ALL /* Available fields for NM_SETTING_WIRELESS_SECURITY_SETTING_NAME */ static NmcOutputField nmc_fields_setting_wireless_security[] = { - SETTING_FIELD ("name", 25), /* 0 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, 10), /* 1 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, 15), /* 2 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, 10), /* 3 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PROTO, 10), /* 4 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PAIRWISE, 10), /* 5 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_GROUP, 10), /* 6 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME, 15), /* 7 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY0, 10), /* 8 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY1, 10), /* 9 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY2, 10), /* 10 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY3, 10), /* 11 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PSK, 6), /* 12 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD, 15), /* 13 */ - SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, 15), /* 14 */ + SETTING_FIELD ("name", 25), /* 0 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, 10), /* 1 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, 15), /* 2 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, 10), /* 3 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PROTO, 10), /* 4 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PAIRWISE, 10), /* 5 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_GROUP, 10), /* 6 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME, 15), /* 7 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY0, 10), /* 8 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY1, 10), /* 9 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY2, 10), /* 10 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY3, 10), /* 11 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY_FLAGS, 20), /* 12 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, 15), /* 13 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PSK, 6), /* 14 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS, 20), /* 15 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD, 15), /* 16 */ + SETTING_FIELD (NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD_FLAGS, 20), /* 17 */ {NULL, NULL, 0, NULL, 0} }; #define NMC_FIELDS_SETTING_WIRELESS_SECURITY_ALL "name"","\ @@ -217,9 +234,12 @@ static NmcOutputField nmc_fields_setting_wireless_security[] = { NM_SETTING_WIRELESS_SECURITY_WEP_KEY1","\ NM_SETTING_WIRELESS_SECURITY_WEP_KEY2","\ NM_SETTING_WIRELESS_SECURITY_WEP_KEY3","\ + NM_SETTING_WIRELESS_SECURITY_WEP_KEY_FLAGS","\ + NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE","\ NM_SETTING_WIRELESS_SECURITY_PSK","\ + NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS","\ NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD","\ - NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE + NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD_FLAGS #define NMC_FIELDS_SETTING_WIRELESS_SECURITY_COMMON NMC_FIELDS_SETTING_WIRELESS_SECURITY_ALL /* Available fields for NM_SETTING_IP4_CONFIG_SETTING_NAME */ @@ -267,6 +287,7 @@ static NmcOutputField nmc_fields_setting_ip6_config[] = { SETTING_FIELD (NM_SETTING_IP6_CONFIG_NEVER_DEFAULT, 15), /* 8 */ SETTING_FIELD (NM_SETTING_IP6_CONFIG_MAY_FAIL, 12), /* 9 */ SETTING_FIELD (NM_SETTING_IP6_CONFIG_IP6_PRIVACY, 15), /* 10 */ + SETTING_FIELD (NM_SETTING_IP6_CONFIG_DHCP_HOSTNAME, 14), /* 11 */ {NULL, NULL, 0, NULL, 0} }; #define NMC_FIELDS_SETTING_IP6_CONFIG_ALL "name"","\ @@ -279,7 +300,8 @@ static NmcOutputField nmc_fields_setting_ip6_config[] = { NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS","\ NM_SETTING_IP6_CONFIG_NEVER_DEFAULT","\ NM_SETTING_IP6_CONFIG_MAY_FAIL","\ - NM_SETTING_IP6_CONFIG_IP6_PRIVACY + NM_SETTING_IP6_CONFIG_IP6_PRIVACY","\ + NM_SETTING_IP6_CONFIG_DHCP_HOSTNAME #define NMC_FIELDS_SETTING_IP6_CONFIG_COMMON NMC_FIELDS_SETTING_IP4_CONFIG_ALL /* Available fields for NM_SETTING_SERIAL_SETTING_NAME */ @@ -350,32 +372,36 @@ static NmcOutputField nmc_fields_setting_pppoe[] = { SETTING_FIELD (NM_SETTING_PPPOE_SERVICE, 12), /* 1 */ SETTING_FIELD (NM_SETTING_PPPOE_USERNAME, 15), /* 2 */ SETTING_FIELD (NM_SETTING_PPPOE_PASSWORD, 15), /* 3 */ + SETTING_FIELD (NM_SETTING_PPPOE_PASSWORD_FLAGS, 20), /* 4 */ {NULL, NULL, 0, NULL, 0} }; #define NMC_FIELDS_SETTING_PPPOE_ALL "name"","\ NM_SETTING_PPPOE_SERVICE","\ NM_SETTING_PPPOE_USERNAME","\ - NM_SETTING_PPPOE_PASSWORD -#define NMC_FIELDS_SETTING_PPPOE_COMMON NMC_FIELDS_SETTING_PPP_ALL + NM_SETTING_PPPOE_PASSWORD","\ + NM_SETTING_PPPOE_PASSWORD_FLAGS +#define NMC_FIELDS_SETTING_PPPOE_COMMON NMC_FIELDS_SETTING_PPPOE_ALL /* Available fields for NM_SETTING_ADSL_SETTING_NAME */ static NmcOutputField nmc_fields_setting_adsl[] = { SETTING_FIELD ("name", 10), /* 0 */ SETTING_FIELD (NM_SETTING_ADSL_USERNAME, 15), /* 1 */ SETTING_FIELD (NM_SETTING_ADSL_PASSWORD, 15), /* 2 */ - SETTING_FIELD (NM_SETTING_ADSL_VPI, 10), /* 3 */ - SETTING_FIELD (NM_SETTING_ADSL_VCI, 10), /* 4 */ + SETTING_FIELD (NM_SETTING_ADSL_PASSWORD_FLAGS, 20), /* 3 */ + SETTING_FIELD (NM_SETTING_ADSL_PROTOCOL, 10), /* 4 */ SETTING_FIELD (NM_SETTING_ADSL_ENCAPSULATION, 10), /* 5 */ - SETTING_FIELD (NM_SETTING_ADSL_PROTOCOL, 10), /* 6 */ + SETTING_FIELD (NM_SETTING_ADSL_VPI, 10), /* 6 */ + SETTING_FIELD (NM_SETTING_ADSL_VCI, 10), /* 7 */ {NULL, NULL, 0, NULL, 0} }; #define NMC_FIELDS_SETTING_ADSL_ALL "name"","\ NM_SETTING_ADSL_USERNAME","\ NM_SETTING_ADSL_PASSWORD","\ - NM_SETTING_ADSL_VPI","\ - NM_SETTING_ADSL_VCI","\ + NM_SETTING_ADSL_PASSWORD_FLAGS","\ + NM_SETTING_ADSL_PROTOCOL","\ NM_SETTING_ADSL_ENCAPSULATION","\ - NM_SETTING_ADSL_PROTOCOL + NM_SETTING_ADSL_VPI","\ + NM_SETTING_ADSL_VCI #define NMC_FIELDS_SETTING_ADSL_COMMON NMC_FIELDS_SETTING_ADSL_ALL /* Available fields for NM_SETTING_GSM_SETTING_NAME */ @@ -384,23 +410,27 @@ static NmcOutputField nmc_fields_setting_gsm[] = { SETTING_FIELD (NM_SETTING_GSM_NUMBER, 10), /* 1 */ SETTING_FIELD (NM_SETTING_GSM_USERNAME, 15), /* 2 */ SETTING_FIELD (NM_SETTING_GSM_PASSWORD, 15), /* 3 */ - SETTING_FIELD (NM_SETTING_GSM_APN, 25), /* 4 */ - SETTING_FIELD (NM_SETTING_GSM_NETWORK_ID, 12), /* 5 */ - SETTING_FIELD (NM_SETTING_GSM_NETWORK_TYPE, 15), /* 6 */ - SETTING_FIELD (NM_SETTING_GSM_ALLOWED_BANDS, 15), /* 7 */ - SETTING_FIELD (NM_SETTING_GSM_PIN, 10), /* 8 */ - SETTING_FIELD (NM_SETTING_GSM_HOME_ONLY, 10), /* 9 */ + SETTING_FIELD (NM_SETTING_GSM_PASSWORD_FLAGS, 20), /* 4 */ + SETTING_FIELD (NM_SETTING_GSM_APN, 25), /* 5 */ + SETTING_FIELD (NM_SETTING_GSM_NETWORK_ID, 12), /* 6 */ + SETTING_FIELD (NM_SETTING_GSM_NETWORK_TYPE, 15), /* 7 */ + SETTING_FIELD (NM_SETTING_GSM_ALLOWED_BANDS, 15), /* 8 */ + SETTING_FIELD (NM_SETTING_GSM_PIN, 10), /* 9 */ + SETTING_FIELD (NM_SETTING_GSM_PIN_FLAGS, 20), /* 10 */ + SETTING_FIELD (NM_SETTING_GSM_HOME_ONLY, 10), /* 11 */ {NULL, NULL, 0, NULL, 0} }; #define NMC_FIELDS_SETTING_GSM_ALL "name"","\ NM_SETTING_GSM_NUMBER","\ NM_SETTING_GSM_USERNAME","\ NM_SETTING_GSM_PASSWORD","\ + NM_SETTING_GSM_PASSWORD_FLAGS","\ NM_SETTING_GSM_APN","\ NM_SETTING_GSM_NETWORK_ID","\ NM_SETTING_GSM_NETWORK_TYPE","\ NM_SETTING_GSM_ALLOWED_BANDS","\ NM_SETTING_GSM_PIN","\ + NM_SETTING_GSM_PIN_FLAGS","\ NM_SETTING_GSM_HOME_ONLY #define NMC_FIELDS_SETTING_GSM_COMMON NMC_FIELDS_SETTING_GSM_ALL @@ -410,12 +440,14 @@ static NmcOutputField nmc_fields_setting_cdma[] = { SETTING_FIELD (NM_SETTING_CDMA_NUMBER, 15), /* 1 */ SETTING_FIELD (NM_SETTING_CDMA_USERNAME, 15), /* 2 */ SETTING_FIELD (NM_SETTING_CDMA_PASSWORD, 15), /* 3 */ + SETTING_FIELD (NM_SETTING_CDMA_PASSWORD_FLAGS, 20), /* 4 */ {NULL, NULL, 0, NULL, 0} }; #define NMC_FIELDS_SETTING_CDMA_ALL "name"","\ NM_SETTING_CDMA_NUMBER","\ NM_SETTING_CDMA_USERNAME","\ - NM_SETTING_CDMA_PASSWORD + NM_SETTING_CDMA_PASSWORD","\ + NM_SETTING_CDMA_PASSWORD_FLAGS #define NMC_FIELDS_SETTING_CDMA_COMMON NMC_FIELDS_SETTING_CDMA_ALL /* Available fields for NM_SETTING_BLUETOOTH_SETTING_NAME */ @@ -570,15 +602,15 @@ wep_key_type_to_string (NMWepKeyType type) } static char * -blob_cert_to_string (const GByteArray *array) +byte_array_to_string (const GByteArray *array) { GString *cert = NULL; int i; - if (array->len > 0) + if (array && array->len > 0) cert = g_string_new (NULL); - for (i = 0; i < array->len; i++) { + for (i = 0; array && i < array->len; i++) { g_string_append_printf (cert, "%02X", array->data[i]); } @@ -697,9 +729,95 @@ ip6_privacy_to_string (NMSettingIP6ConfigPrivacy ip6_privacy) } } +static char * +secret_flags_to_string (guint32 flags) +{ + GString *flag_str; + + if (flags == 0) + return g_strdup (_("0 (none)")); + + flag_str = g_string_new (NULL); + g_string_printf (flag_str, "%d (", flags); + + if (flags & NM_SETTING_SECRET_FLAG_AGENT_OWNED) + g_string_append (flag_str, _("agent-owned, ")); + if (flags & NM_SETTING_SECRET_FLAG_NOT_SAVED) + g_string_append (flag_str, _("not saved, ")); + if (flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED) + g_string_append (flag_str, _("not required, ")); + + if (flag_str->str[flag_str->len-1] == '(') + g_string_assign (flag_str, _("unknown")); + else + g_string_truncate (flag_str, flag_str->len-2); /* chop off trailing ', ' */ + + g_string_append_c (flag_str, ')'); + + return g_string_free (flag_str, FALSE); +} + /*----------------------------------------------------------------------------*/ gboolean +setting_details (NMSetting *setting, NmCli *nmc) +{ + GType setting_type; + + g_return_val_if_fail (NM_IS_SETTING (setting), FALSE); + + setting_type = G_OBJECT_TYPE (setting); + + if (setting_type == NM_TYPE_SETTING_CONNECTION) + return setting_connection_details (NM_SETTING_CONNECTION (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_WIRED) + return setting_wired_details (NM_SETTING_WIRED (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_802_1X) + return setting_802_1X_details (NM_SETTING_802_1X (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_WIRELESS) + return setting_wireless_details (NM_SETTING_WIRELESS (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_WIRELESS_SECURITY) + return setting_wireless_security_details (NM_SETTING_WIRELESS_SECURITY (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_IP4_CONFIG) + return setting_ip4_config_details (NM_SETTING_IP4_CONFIG (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_IP6_CONFIG) + return setting_ip6_config_details (NM_SETTING_IP6_CONFIG (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_SERIAL) + return setting_serial_details (NM_SETTING_SERIAL (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_PPP) + return setting_ppp_details (NM_SETTING_PPP (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_PPPOE) + return setting_pppoe_details (NM_SETTING_PPPOE (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_GSM) + return setting_gsm_details (NM_SETTING_GSM (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_CDMA) + return setting_cdma_details (NM_SETTING_CDMA (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_BLUETOOTH) + return setting_bluetooth_details (NM_SETTING_BLUETOOTH (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_OLPC_MESH) + return setting_olpc_mesh_details (NM_SETTING_OLPC_MESH (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_VPN) + return setting_vpn_details (NM_SETTING_VPN (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_WIMAX) + return setting_wimax_details (NM_SETTING_WIMAX (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_INFINIBAND) + return setting_infiniband_details (NM_SETTING_INFINIBAND (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_BOND) + return setting_bond_details (NM_SETTING_BOND (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_VLAN) + return setting_vlan_details (NM_SETTING_VLAN (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_ADSL) + return setting_adsl_details (NM_SETTING_ADSL (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_BRIDGE) + return setting_bridge_details (NM_SETTING_BRIDGE (setting), nmc); + else if (setting_type == NM_TYPE_SETTING_BRIDGE_PORT) + return setting_bridge_port_details (NM_SETTING_BRIDGE_PORT (setting), nmc); + else + /* should not be reached */ + return FALSE; +} + +gboolean setting_connection_details (NMSettingConnection *s_con, NmCli *nmc) { guint64 timestamp; @@ -849,7 +967,8 @@ setting_802_1X_details (NMSetting8021x *s_8021X, NmCli *nmc) NMSetting8021xCKScheme scheme; GString *eap_str, *alt_sub_match, *phase2_alt_sub_match; char *ca_cert_str = NULL, *client_cert_str = NULL, *phase2_ca_cert_str = NULL; - char *phase2_client_cert_str = NULL, *private_key_str = NULL, *phase2_private_key_str = NULL; + char *phase2_client_cert_str = NULL, *private_key_str = NULL, *phase2_private_key_str = NULL, *pswd_raw_str = NULL; + char *pswd_flags, *pswd_raw_flags, *priv_key_pswd_flags, *phase2_priv_key_pswd_flags, *pin_flags; int i; guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; @@ -870,37 +989,37 @@ setting_802_1X_details (NMSetting8021x *s_8021X, NmCli *nmc) } scheme = nm_setting_802_1x_get_ca_cert_scheme (s_8021X); if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - ca_cert_str = blob_cert_to_string (nm_setting_802_1x_get_ca_cert_blob (s_8021X)); + ca_cert_str = byte_array_to_string (nm_setting_802_1x_get_ca_cert_blob (s_8021X)); if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) ca_cert_str = g_strdup (nm_setting_802_1x_get_ca_cert_path (s_8021X)); scheme = nm_setting_802_1x_get_client_cert_scheme (s_8021X); if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - client_cert_str = blob_cert_to_string (nm_setting_802_1x_get_client_cert_blob (s_8021X)); + client_cert_str = byte_array_to_string (nm_setting_802_1x_get_client_cert_blob (s_8021X)); if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) client_cert_str = g_strdup (nm_setting_802_1x_get_client_cert_path (s_8021X)); scheme = nm_setting_802_1x_get_phase2_ca_cert_scheme (s_8021X); if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - phase2_ca_cert_str = blob_cert_to_string (nm_setting_802_1x_get_phase2_ca_cert_blob (s_8021X)); + phase2_ca_cert_str = byte_array_to_string (nm_setting_802_1x_get_phase2_ca_cert_blob (s_8021X)); if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) phase2_ca_cert_str = g_strdup (nm_setting_802_1x_get_phase2_ca_cert_path (s_8021X)); scheme = nm_setting_802_1x_get_phase2_client_cert_scheme (s_8021X); if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - phase2_client_cert_str = blob_cert_to_string (nm_setting_802_1x_get_phase2_client_cert_blob (s_8021X)); + phase2_client_cert_str = byte_array_to_string (nm_setting_802_1x_get_phase2_client_cert_blob (s_8021X)); if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) phase2_client_cert_str = g_strdup (nm_setting_802_1x_get_phase2_client_cert_path (s_8021X)); scheme = nm_setting_802_1x_get_private_key_scheme (s_8021X); if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - private_key_str = blob_cert_to_string (nm_setting_802_1x_get_private_key_blob (s_8021X)); + private_key_str = byte_array_to_string (nm_setting_802_1x_get_private_key_blob (s_8021X)); if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) private_key_str = g_strdup (nm_setting_802_1x_get_private_key_path (s_8021X)); scheme = nm_setting_802_1x_get_phase2_private_key_scheme (s_8021X); if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) - phase2_private_key_str = blob_cert_to_string (nm_setting_802_1x_get_phase2_private_key_blob (s_8021X)); + phase2_private_key_str = byte_array_to_string (nm_setting_802_1x_get_phase2_private_key_blob (s_8021X)); if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) phase2_private_key_str = g_strdup (nm_setting_802_1x_get_phase2_private_key_path (s_8021X)); @@ -914,6 +1033,14 @@ setting_802_1X_details (NMSetting8021x *s_8021X, NmCli *nmc) g_string_append_printf (phase2_alt_sub_match, "%s,", nm_setting_802_1x_get_phase2_altsubject_match (s_8021X, i)); g_string_truncate (phase2_alt_sub_match, phase2_alt_sub_match->len-1); /* chop off trailing ',' */ + pswd_raw_str = byte_array_to_string (nm_setting_802_1x_get_password_raw (s_8021X)); + + pswd_flags = secret_flags_to_string (nm_setting_802_1x_get_password_flags (s_8021X)); + pswd_raw_flags = secret_flags_to_string (nm_setting_802_1x_get_password_raw_flags (s_8021X)); + priv_key_pswd_flags = secret_flags_to_string (nm_setting_802_1x_get_private_key_password_flags (s_8021X)); + phase2_priv_key_pswd_flags = secret_flags_to_string (nm_setting_802_1x_get_phase2_private_key_password_flags (s_8021X)); + pin_flags = secret_flags_to_string (nm_setting_802_1x_get_pin_flags (s_8021X)); + nmc->allowed_fields[0].value = NM_SETTING_802_1X_SETTING_NAME; nmc->allowed_fields[1].value = eap_str->str; nmc->allowed_fields[2].value = nm_setting_802_1x_get_identity (s_8021X); @@ -935,12 +1062,18 @@ setting_802_1X_details (NMSetting8021x *s_8021X, NmCli *nmc) nmc->allowed_fields[18].value = phase2_alt_sub_match->str; nmc->allowed_fields[19].value = phase2_client_cert_str; nmc->allowed_fields[20].value = nm_setting_802_1x_get_password (s_8021X); - nmc->allowed_fields[21].value = private_key_str; - nmc->allowed_fields[22].value = nm_setting_802_1x_get_private_key_password (s_8021X); - nmc->allowed_fields[23].value = phase2_private_key_str; - nmc->allowed_fields[24].value = nm_setting_802_1x_get_phase2_private_key_password (s_8021X); - nmc->allowed_fields[25].value = nm_setting_802_1x_get_pin (s_8021X); - nmc->allowed_fields[26].value = nm_setting_802_1x_get_system_ca_certs (s_8021X) ? _("yes") : _("no"); + nmc->allowed_fields[21].value = pswd_flags; + nmc->allowed_fields[22].value = pswd_raw_str; + nmc->allowed_fields[23].value = pswd_raw_flags; + nmc->allowed_fields[24].value = private_key_str; + nmc->allowed_fields[25].value = nm_setting_802_1x_get_private_key_password (s_8021X); + nmc->allowed_fields[26].value = priv_key_pswd_flags; + nmc->allowed_fields[27].value = phase2_private_key_str; + nmc->allowed_fields[28].value = nm_setting_802_1x_get_phase2_private_key_password (s_8021X); + nmc->allowed_fields[29].value = phase2_priv_key_pswd_flags; + nmc->allowed_fields[30].value = nm_setting_802_1x_get_pin (s_8021X); + nmc->allowed_fields[31].value = pin_flags; + nmc->allowed_fields[32].value = nm_setting_802_1x_get_system_ca_certs (s_8021X) ? _("yes") : _("no"); nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ @@ -951,6 +1084,12 @@ setting_802_1X_details (NMSetting8021x *s_8021X, NmCli *nmc) g_free (phase2_client_cert_str); g_free (private_key_str); g_free (phase2_private_key_str); + g_free (pswd_flags); + g_free (pswd_raw_str); + g_free (pswd_raw_flags); + g_free (priv_key_pswd_flags); + g_free (phase2_priv_key_pswd_flags); + g_free (pin_flags); g_string_free (eap_str, TRUE); g_string_free (alt_sub_match, TRUE); g_string_free (phase2_alt_sub_match, TRUE); @@ -963,8 +1102,8 @@ setting_wireless_details (NMSettingWireless *s_wireless, NmCli *nmc) { int i; const GByteArray *ssid, *bssid, *mac; - char *ssid_str, *channel_str, *rate_str, *tx_power_str, *mtu_str; - char *device_mac_str = NULL, *cloned_mac_str = NULL, *bssid_str = NULL; + char *channel_str, *rate_str, *tx_power_str, *mtu_str; + char *device_mac_str = NULL, *cloned_mac_str = NULL, *ssid_str = NULL, *bssid_str = NULL; GString *mac_blacklist, *seen_bssids; const GSList *iter; guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; @@ -979,7 +1118,8 @@ setting_wireless_details (NMSettingWireless *s_wireless, NmCli *nmc) print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ ssid = nm_setting_wireless_get_ssid (s_wireless); - ssid_str = ssid_to_printable ((const char *) ssid->data, ssid->len); + if (ssid) + ssid_str = ssid_to_printable ((const char *) ssid->data, ssid->len); channel_str = g_strdup_printf ("%d", nm_setting_wireless_get_channel (s_wireless)); rate_str = g_strdup_printf ("%d", nm_setting_wireless_get_rate (s_wireless)); bssid = nm_setting_wireless_get_bssid (s_wireless); @@ -1023,6 +1163,7 @@ setting_wireless_details (NMSettingWireless *s_wireless, NmCli *nmc) nmc->allowed_fields[11].value = strcmp (mtu_str, "0") ? mtu_str : _("auto"); nmc->allowed_fields[12].value = seen_bssids->str; nmc->allowed_fields[13].value = nm_setting_wireless_get_security (s_wireless); + nmc->allowed_fields[14].value = nm_setting_wireless_get_hidden (s_wireless) ? _("yes") : _("no"); nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ @@ -1045,7 +1186,7 @@ gboolean setting_wireless_security_details (NMSettingWirelessSecurity *s_wireless_sec, NmCli *nmc) { int i; - char *wep_tx_keyidx_str, *wep_key_type_str; + char *wep_tx_keyidx_str, *wep_key_type_str, *wep_flags, *psk_flags, *leap_flags; GString *protos, *pairwises, *groups; guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; @@ -1079,6 +1220,10 @@ setting_wireless_security_details (NMSettingWirelessSecurity *s_wireless_sec, Nm } wep_key_type_str = wep_key_type_to_string (nm_setting_wireless_security_get_wep_key_type (s_wireless_sec)); + wep_flags = secret_flags_to_string (nm_setting_wireless_security_get_wep_key_flags (s_wireless_sec)); + psk_flags = secret_flags_to_string (nm_setting_wireless_security_get_psk_flags (s_wireless_sec)); + leap_flags = secret_flags_to_string (nm_setting_wireless_security_get_leap_password_flags (s_wireless_sec)); + nmc->allowed_fields[0].value = NM_SETTING_WIRELESS_SECURITY_SETTING_NAME; nmc->allowed_fields[1].value = nm_setting_wireless_security_get_key_mgmt (s_wireless_sec); nmc->allowed_fields[2].value = wep_tx_keyidx_str; @@ -1091,15 +1236,21 @@ setting_wireless_security_details (NMSettingWirelessSecurity *s_wireless_sec, Nm nmc->allowed_fields[9].value = nm_setting_wireless_security_get_wep_key (s_wireless_sec, 1); nmc->allowed_fields[10].value = nm_setting_wireless_security_get_wep_key (s_wireless_sec, 2); nmc->allowed_fields[11].value = nm_setting_wireless_security_get_wep_key (s_wireless_sec, 3); - nmc->allowed_fields[12].value = nm_setting_wireless_security_get_psk (s_wireless_sec); - nmc->allowed_fields[13].value = nm_setting_wireless_security_get_leap_password (s_wireless_sec); - nmc->allowed_fields[14].value = wep_key_type_str; + nmc->allowed_fields[12].value = wep_flags; + nmc->allowed_fields[13].value = wep_key_type_str; + nmc->allowed_fields[14].value = nm_setting_wireless_security_get_psk (s_wireless_sec); + nmc->allowed_fields[15].value = psk_flags; + nmc->allowed_fields[16].value = nm_setting_wireless_security_get_leap_password (s_wireless_sec); + nmc->allowed_fields[17].value = leap_flags; nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ g_free (wep_tx_keyidx_str); g_free (wep_key_type_str); + g_free (wep_flags); + g_free (psk_flags); + g_free (leap_flags); g_string_free (protos, TRUE); g_string_free (pairwises, TRUE); g_string_free (groups, TRUE); @@ -1364,6 +1515,7 @@ setting_ip6_config_details (NMSettingIP6Config *s_ip6, NmCli *nmc) nmc->allowed_fields[8].value = nm_setting_ip6_config_get_never_default (s_ip6) ? _("yes") : _("no"); nmc->allowed_fields[9].value = nm_setting_ip6_config_get_may_fail (s_ip6) ? _("yes") : _("no"); nmc->allowed_fields[10].value = ip6_privacy_str; + nmc->allowed_fields[11].value = nm_setting_ip6_config_get_dhcp_hostname (s_ip6); nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ @@ -1473,6 +1625,7 @@ setting_ppp_details (NMSettingPPP *s_ppp, NmCli *nmc) gboolean setting_pppoe_details (NMSettingPPPOE *s_pppoe, NmCli *nmc) { + char *pswd_flags; guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; @@ -1484,21 +1637,26 @@ setting_pppoe_details (NMSettingPPPOE *s_pppoe, NmCli *nmc) nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + pswd_flags = secret_flags_to_string (nm_setting_pppoe_get_password_flags (s_pppoe)); + nmc->allowed_fields[0].value = NM_SETTING_PPPOE_SETTING_NAME; nmc->allowed_fields[1].value = nm_setting_pppoe_get_service (s_pppoe); nmc->allowed_fields[2].value = nm_setting_pppoe_get_username (s_pppoe); nmc->allowed_fields[3].value = nm_setting_pppoe_get_password (s_pppoe); + nmc->allowed_fields[4].value = pswd_flags; nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + g_free (pswd_flags); + return TRUE; } gboolean setting_gsm_details (NMSettingGsm *s_gsm, NmCli *nmc) { - char *network_type_str, *allowed_bands_str; + char *network_type_str, *allowed_bands_str, *pswd_flags, *pin_flags; guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; @@ -1513,22 +1671,29 @@ setting_gsm_details (NMSettingGsm *s_gsm, NmCli *nmc) network_type_str = g_strdup_printf ("%d", nm_setting_gsm_get_network_type (s_gsm)); allowed_bands_str = allowed_bands_to_string (nm_setting_gsm_get_allowed_bands (s_gsm)); + pswd_flags = secret_flags_to_string (nm_setting_gsm_get_password_flags (s_gsm)); + pin_flags = secret_flags_to_string (nm_setting_gsm_get_pin_flags (s_gsm)); + nmc->allowed_fields[0].value = NM_SETTING_GSM_SETTING_NAME; nmc->allowed_fields[1].value = nm_setting_gsm_get_number (s_gsm); nmc->allowed_fields[2].value = nm_setting_gsm_get_username (s_gsm); nmc->allowed_fields[3].value = nm_setting_gsm_get_password (s_gsm); - nmc->allowed_fields[4].value = nm_setting_gsm_get_apn (s_gsm); - nmc->allowed_fields[5].value = nm_setting_gsm_get_network_id (s_gsm); - nmc->allowed_fields[6].value = network_type_str; - nmc->allowed_fields[7].value = allowed_bands_str; - nmc->allowed_fields[8].value = nm_setting_gsm_get_pin (s_gsm); - nmc->allowed_fields[9].value = nm_setting_gsm_get_home_only (s_gsm) ? _("yes") : _("no"); + nmc->allowed_fields[4].value = pswd_flags; + nmc->allowed_fields[5].value = nm_setting_gsm_get_apn (s_gsm); + nmc->allowed_fields[6].value = nm_setting_gsm_get_network_id (s_gsm); + nmc->allowed_fields[7].value = network_type_str; + nmc->allowed_fields[8].value = allowed_bands_str; + nmc->allowed_fields[9].value = nm_setting_gsm_get_pin (s_gsm); + nmc->allowed_fields[10].value = pin_flags; + nmc->allowed_fields[11].value = nm_setting_gsm_get_home_only (s_gsm) ? _("yes") : _("no"); nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ g_free (network_type_str); g_free (allowed_bands_str); + g_free (pswd_flags); + g_free (pin_flags); return TRUE; } @@ -1536,6 +1701,7 @@ setting_gsm_details (NMSettingGsm *s_gsm, NmCli *nmc) gboolean setting_cdma_details (NMSettingCdma *s_cdma, NmCli *nmc) { + char *pswd_flags; guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; @@ -1547,14 +1713,19 @@ setting_cdma_details (NMSettingCdma *s_cdma, NmCli *nmc) nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + pswd_flags = secret_flags_to_string (nm_setting_cdma_get_password_flags (s_cdma)); + nmc->allowed_fields[0].value = NM_SETTING_CDMA_SETTING_NAME; nmc->allowed_fields[1].value = nm_setting_cdma_get_number (s_cdma); nmc->allowed_fields[2].value = nm_setting_cdma_get_username (s_cdma); nmc->allowed_fields[3].value = nm_setting_cdma_get_password (s_cdma); + nmc->allowed_fields[4].value = pswd_flags; nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ + g_free (pswd_flags); + return TRUE; } @@ -1594,7 +1765,7 @@ gboolean setting_olpc_mesh_details (NMSettingOlpcMesh *s_olpc_mesh, NmCli *nmc) { const GByteArray *ssid, *dhcp_anycast; - char *ssid_str, *channel_str, *dhcp_anycast_str = NULL; + char *channel_str, *ssid_str = NULL, *dhcp_anycast_str = NULL; guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; @@ -1607,7 +1778,8 @@ setting_olpc_mesh_details (NMSettingOlpcMesh *s_olpc_mesh, NmCli *nmc) print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ ssid = nm_setting_olpc_mesh_get_ssid (s_olpc_mesh); - ssid_str = ssid_to_printable ((const char *) ssid->data, ssid->len); + if (ssid) + ssid_str = ssid_to_printable ((const char *) ssid->data, ssid->len); channel_str = g_strdup_printf ("%d", nm_setting_olpc_mesh_get_channel (s_olpc_mesh)); dhcp_anycast = nm_setting_olpc_mesh_get_dhcp_anycast_address (s_olpc_mesh); if (dhcp_anycast) @@ -1820,6 +1992,7 @@ setting_vlan_details (NMSettingVlan *s_vlan, NmCli *nmc) gboolean setting_adsl_details (NMSettingAdsl *s_adsl, NmCli *nmc) { + char *pswd_flags; guint32 mode_flag = (nmc->print_output == NMC_PRINT_PRETTY) ? NMC_PF_FLAG_PRETTY : (nmc->print_output == NMC_PRINT_TERSE) ? NMC_PF_FLAG_TERSE : 0; guint32 multiline_flag = nmc->multiline_output ? NMC_PF_FLAG_MULTILINE : 0; guint32 escape_flag = nmc->escape_values ? NMC_PF_FLAG_ESCAPE : 0; @@ -1831,19 +2004,23 @@ setting_adsl_details (NMSettingAdsl *s_adsl, NmCli *nmc) nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_FIELD_NAMES; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print field names */ + pswd_flags = secret_flags_to_string (nm_setting_adsl_get_password_flags (s_adsl)); + nmc->allowed_fields[0].value = NM_SETTING_ADSL_SETTING_NAME; nmc->allowed_fields[1].value = nm_setting_adsl_get_username (s_adsl); nmc->allowed_fields[2].value = nm_setting_adsl_get_password (s_adsl); - nmc->allowed_fields[3].value = g_strdup_printf ("%d", nm_setting_adsl_get_vpi (s_adsl)); - nmc->allowed_fields[4].value = g_strdup_printf ("%d", nm_setting_adsl_get_vci (s_adsl)); + nmc->allowed_fields[3].value = pswd_flags; + nmc->allowed_fields[4].value = nm_setting_adsl_get_protocol (s_adsl); nmc->allowed_fields[5].value = nm_setting_adsl_get_encapsulation (s_adsl); - nmc->allowed_fields[6].value = nm_setting_adsl_get_protocol (s_adsl); + nmc->allowed_fields[6].value = g_strdup_printf ("%d", nm_setting_adsl_get_vpi (s_adsl)); + nmc->allowed_fields[7].value = g_strdup_printf ("%d", nm_setting_adsl_get_vci (s_adsl)); nmc->print_fields.flags = multiline_flag | mode_flag | escape_flag | NMC_PF_FLAG_SECTION_PREFIX; print_fields (nmc->print_fields, nmc->allowed_fields); /* Print values */ - g_free ((char*) nmc->allowed_fields[3].value); - g_free ((char*) nmc->allowed_fields[4].value); + g_free (pswd_flags); + g_free ((char*) nmc->allowed_fields[6].value); + g_free ((char*) nmc->allowed_fields[7].value); return TRUE; } diff --git a/cli/src/settings.h b/cli/src/settings.h index 2a64052a3..15e5577f4 100644 --- a/cli/src/settings.h +++ b/cli/src/settings.h @@ -47,6 +47,7 @@ #include "utils.h" +gboolean setting_details (NMSetting *ssetting, NmCli *nmc); gboolean setting_connection_details (NMSettingConnection *s_con, NmCli *nmc); gboolean setting_wired_details (NMSettingWired *s_wired, NmCli *nmc); gboolean setting_802_1X_details (NMSetting8021x *s_8021X, NmCli *nmc); diff --git a/config.h.in b/config.h.in index 9837c9872..2c2902dad 100644 --- a/config.h.in +++ b/config.h.in @@ -3,9 +3,6 @@ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD -/* Define if you have GNU backtrace extensions */ -#undef ENABLE_CRASHTRACE - /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS @@ -21,10 +18,6 @@ the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE -/* Define if you have a dbus-glib with - dbus_glib_global_set_disable_legacy_property_access() */ -#undef HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS - /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT @@ -47,9 +40,6 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* libnl version */ -#undef HAVE_LIBNL - /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -113,9 +103,6 @@ /* Define to path of the kernel firmware directory */ #undef KERNEL_FIRMWARE_DIR -/* Define this to hack around buggy libnl rtnl_addr caching */ -#undef LIBNL_NEEDS_ADDR_CACHING_WORKAROUND - /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for NetworkManager 0.9.7.995. +# Generated by GNU Autoconf 2.68 for NetworkManager 0.9.7.997. # # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager>. # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='NetworkManager' PACKAGE_TARNAME='NetworkManager' -PACKAGE_VERSION='0.9.7.995' -PACKAGE_STRING='NetworkManager 0.9.7.995' +PACKAGE_VERSION='0.9.7.997' +PACKAGE_STRING='NetworkManager 0.9.7.997' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager' PACKAGE_URL='' @@ -692,12 +692,6 @@ UUID_LIBS UUID_CFLAGS LIBNL_LIBS LIBNL_CFLAGS -LIBNL1_LIBS -LIBNL1_CFLAGS -LIBNL2_LIBS -LIBNL2_CFLAGS -LIBNL3_LIBS -LIBNL3_CFLAGS SUSPEND_RESUME_SYSTEMD_FALSE SUSPEND_RESUME_SYSTEMD_TRUE SUSPEND_RESUME_UPOWER_FALSE @@ -970,7 +964,6 @@ with_udev_dir with_systemdsystemunitdir with_session_tracking with_suspend_resume -with_libnl enable_wimax enable_polkit enable_modify_system @@ -986,7 +979,6 @@ with_netconfig with_iptables with_system_ca_path with_kernel_firmware_dir -enable_crashtrace enable_concheck enable_more_warnings enable_vala @@ -1027,12 +1019,8 @@ SYSTEMD_LOGIN_CFLAGS SYSTEMD_LOGIN_LIBS SYSTEMD_INHIBIT_CFLAGS SYSTEMD_INHIBIT_LIBS -LIBNL3_CFLAGS -LIBNL3_LIBS -LIBNL2_CFLAGS -LIBNL2_LIBS -LIBNL1_CFLAGS -LIBNL1_LIBS +LIBNL_CFLAGS +LIBNL_LIBS UUID_CFLAGS UUID_LIBS IWMX_SDK_CFLAGS @@ -1591,7 +1579,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures NetworkManager 0.9.7.995 to adapt to many kinds of systems. +\`configure' configures NetworkManager 0.9.7.997 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1661,7 +1649,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of NetworkManager 0.9.7.995:";; + short | recursive ) echo "Configuration of NetworkManager 0.9.7.997:";; esac cat <<\_ACEOF @@ -1694,7 +1682,6 @@ Optional Features: --enable-polkit enable PolicyKit support --enable-modify-system Allow users to modify system connections --enable-ppp enable PPP/PPPoE support - --disable-crashtrace Disable GNU backtrace extensions --enable-concheck enable connectivity checking support --enable-more-warnings Possible values: no/yes/error --enable-vala=[no/auto/yes] @@ -1731,7 +1718,6 @@ Optional Packages: --with-suspend-resume=upower|systemd Build NetworkManager with specific suspend/resume support - --with-libnl=1|2|3 Select libnl version (default: latest available) --with-crypto=nss|gnutls Cryptography library to use for certificate and key operations @@ -1791,15 +1777,9 @@ Some influential environment variables: C compiler flags for SYSTEMD_INHIBIT, overriding pkg-config SYSTEMD_INHIBIT_LIBS linker flags for SYSTEMD_INHIBIT, overriding pkg-config - LIBNL3_CFLAGS - C compiler flags for LIBNL3, overriding pkg-config - LIBNL3_LIBS linker flags for LIBNL3, overriding pkg-config - LIBNL2_CFLAGS - C compiler flags for LIBNL2, overriding pkg-config - LIBNL2_LIBS linker flags for LIBNL2, overriding pkg-config - LIBNL1_CFLAGS - C compiler flags for LIBNL1, overriding pkg-config - LIBNL1_LIBS linker flags for LIBNL1, overriding pkg-config + LIBNL_CFLAGS + C compiler flags for LIBNL, overriding pkg-config + LIBNL_LIBS linker flags for LIBNL, overriding pkg-config UUID_CFLAGS C compiler flags for UUID, overriding pkg-config UUID_LIBS linker flags for UUID, overriding pkg-config IWMX_SDK_CFLAGS @@ -1893,7 +1873,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -NetworkManager configure 0.9.7.995 +NetworkManager configure 0.9.7.997 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2437,7 +2417,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by NetworkManager $as_me 0.9.7.995, which was +It was created by NetworkManager $as_me 0.9.7.997, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3258,7 +3238,7 @@ fi # Define the identity of the package. PACKAGE='NetworkManager' - VERSION='0.9.7.995' + VERSION='0.9.7.997' cat >>confdefs.h <<_ACEOF @@ -16461,7 +16441,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu NM_MAJOR_VERSION=0 NM_MINOR_VERSION=9 NM_MICRO_VERSION=7 -NM_VERSION=0.9.7.995 +NM_VERSION=0.9.7.997 @@ -20232,54 +20212,6 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus_glib_global_set_disable_legacy_property_access in -ldbus-glib-1" >&5 -$as_echo_n "checking for dbus_glib_global_set_disable_legacy_property_access in -ldbus-glib-1... " >&6; } -if ${ac_cv_lib_dbus_glib_1_dbus_glib_global_set_disable_legacy_property_access+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldbus-glib-1 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dbus_glib_global_set_disable_legacy_property_access (); -int -main () -{ -return dbus_glib_global_set_disable_legacy_property_access (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dbus_glib_1_dbus_glib_global_set_disable_legacy_property_access=yes -else - ac_cv_lib_dbus_glib_1_dbus_glib_global_set_disable_legacy_property_access=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dbus_glib_1_dbus_glib_global_set_disable_legacy_property_access" >&5 -$as_echo "$ac_cv_lib_dbus_glib_1_dbus_glib_global_set_disable_legacy_property_access" >&6; } -if test "x$ac_cv_lib_dbus_glib_1_dbus_glib_global_set_disable_legacy_property_access" = xyes; then : - ac_have_dg_prop="1" -else - ac_have_dg_prop="0" -fi - - -cat >>confdefs.h <<_ACEOF -#define HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS $ac_have_dg_prop -_ACEOF - - @@ -21251,48 +21183,36 @@ fi # libnl support for the linux platform -# Check whether --with-libnl was given. -if test "${with_libnl+set}" = set; then : - withval=$with_libnl; -fi - -# default to "yes" -if test -z "$with_libnl"; then : - with_libnl=yes -fi -# test for various libnl versions -if test "$with_libnl" = "yes" -o "$with_libnl" = "3"; then - pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL3" >&5 -$as_echo_n "checking for LIBNL3... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL" >&5 +$as_echo_n "checking for LIBNL... " >&6; } -if test -n "$LIBNL3_CFLAGS"; then - pkg_cv_LIBNL3_CFLAGS="$LIBNL3_CFLAGS" +if test -n "$LIBNL_CFLAGS"; then + pkg_cv_LIBNL_CFLAGS="$LIBNL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0 libnl-route-3.0 libnl-genl-3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libnl-3.0 libnl-route-3.0 libnl-genl-3.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBNL3_CFLAGS=`$PKG_CONFIG --cflags "libnl-3.0 libnl-route-3.0 libnl-genl-3.0" 2>/dev/null` + pkg_cv_LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi -if test -n "$LIBNL3_LIBS"; then - pkg_cv_LIBNL3_LIBS="$LIBNL3_LIBS" +if test -n "$LIBNL_LIBS"; then + pkg_cv_LIBNL_LIBS="$LIBNL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0 libnl-route-3.0 libnl-genl-3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libnl-3.0 libnl-route-3.0 libnl-genl-3.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBNL3_LIBS=`$PKG_CONFIG --libs "libnl-3.0 libnl-route-3.0 libnl-genl-3.0" 2>/dev/null` + pkg_cv_LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0" 2>/dev/null` else pkg_failed=yes fi @@ -21312,291 +21232,51 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBNL3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libnl-3.0 libnl-route-3.0 libnl-genl-3.0" 2>&1` + LIBNL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0" 2>&1` else - LIBNL3_PKG_ERRORS=`$PKG_CONFIG --print-errors "libnl-3.0 libnl-route-3.0 libnl-genl-3.0" 2>&1` + LIBNL_PKG_ERRORS=`$PKG_CONFIG --print-errors "libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$LIBNL3_PKG_ERRORS" >&5 + echo "$LIBNL_PKG_ERRORS" >&5 - test "$with_libnl" = "3" && with_libnl=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - test "$with_libnl" = "3" && with_libnl=no -else - LIBNL3_CFLAGS=$pkg_cv_LIBNL3_CFLAGS - LIBNL3_LIBS=$pkg_cv_LIBNL3_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - with_libnl=3 -fi - if test "$with_libnl" = "no"; then : - as_fn_error $? "libnl 3.x could not be found" "$LINENO" 5 -fi -fi -if test "$with_libnl" = "yes" -o "$with_libnl" = "2"; then + as_fn_error $? "Package requirements (libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0) were not met: -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL2" >&5 -$as_echo_n "checking for LIBNL2... " >&6; } +$LIBNL_PKG_ERRORS -if test -n "$LIBNL2_CFLAGS"; then - pkg_cv_LIBNL2_CFLAGS="$LIBNL2_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libnl-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBNL2_CFLAGS=`$PKG_CONFIG --cflags "libnl-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$LIBNL2_LIBS"; then - pkg_cv_LIBNL2_LIBS="$LIBNL2_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libnl-2.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBNL2_LIBS=`$PKG_CONFIG --libs "libnl-2.0" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBNL2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libnl-2.0" 2>&1` - else - LIBNL2_PKG_ERRORS=`$PKG_CONFIG --print-errors "libnl-2.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBNL2_PKG_ERRORS" >&5 +Alternatively, you may set the environment variables LIBNL_CFLAGS +and LIBNL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 - test "$with_libnl" = "2" && with_libnl=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - test "$with_libnl" = "2" && with_libnl=no -else - LIBNL2_CFLAGS=$pkg_cv_LIBNL2_CFLAGS - LIBNL2_LIBS=$pkg_cv_LIBNL2_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - with_libnl=2 -fi - if test "$with_libnl" = "no"; then : - as_fn_error $? "libnl 2.x could not be found" "$LINENO" 5 -fi -fi -if test "$with_libnl" = "yes" -o "$with_libnl" = "1"; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL1" >&5 -$as_echo_n "checking for LIBNL1... " >&6; } - -if test -n "$LIBNL1_CFLAGS"; then - pkg_cv_LIBNL1_CFLAGS="$LIBNL1_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-1 >= 1.0-pre8\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libnl-1 >= 1.0-pre8") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBNL1_CFLAGS=`$PKG_CONFIG --cflags "libnl-1 >= 1.0-pre8" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$LIBNL1_LIBS"; then - pkg_cv_LIBNL1_LIBS="$LIBNL1_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-1 >= 1.0-pre8\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libnl-1 >= 1.0-pre8") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBNL1_LIBS=`$PKG_CONFIG --libs "libnl-1 >= 1.0-pre8" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +Alternatively, you may set the environment variables LIBNL_CFLAGS +and LIBNL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBNL1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libnl-1 >= 1.0-pre8" 2>&1` - else - LIBNL1_PKG_ERRORS=`$PKG_CONFIG --print-errors "libnl-1 >= 1.0-pre8" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$LIBNL1_PKG_ERRORS" >&5 +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } - test "$with_libnl" = "1" && with_libnl=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - test "$with_libnl" = "1" && with_libnl=no else - LIBNL1_CFLAGS=$pkg_cv_LIBNL1_CFLAGS - LIBNL1_LIBS=$pkg_cv_LIBNL1_LIBS + LIBNL_CFLAGS=$pkg_cv_LIBNL_CFLAGS + LIBNL_LIBS=$pkg_cv_LIBNL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - with_libnl=1 -fi - if test "$with_libnl" = "no"; then : - as_fn_error $? "libnl 1.x could not be found" "$LINENO" 5 -fi -fi -if test "$with_libnl" = "yes"; then - as_fn_error $? "libnl library could not be found" "$LINENO" 5 - with_libnl=no -fi -if ! echo "$with_libnl" | grep -q "^[1-3]$"; then - as_fn_error $? "unsupported libnl version: $with_libnl" "$LINENO" 5 -fi -# add variables, conditionals and defines -if test "$with_libnl" != "no"; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNL $with_libnl -_ACEOF - - LIBNL_CFLAGS="$LIBNL3_CFLAGS$LIBNL2_CFLAGS$LIBNL1_CFLAGS" - - LIBNL_LIBS="$LIBNL3_LIBS$LIBNL2_LIBS$LIBNL1_LIBS" - -fi -# additional tests -if test "with_libnl" = "1"; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl address caching bug" >&5 -$as_echo_n "checking for libnl address caching bug... " >&6; } - save_CFLAGS="$CFLAGS" - save_LDFLAGS="$LDFLAGS" - CFLAGS="$CFLAGS $LIBNL_CFLAGS" - LDFLAGS="$LDFLAGS $LIBNL_LIBS" - if test "$cross_compiling" = yes; then : - libnl_bug=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <stdio.h> -#include <netlink/route/addr.h> -#include <netlink/object-api.h> - -int -main () -{ - - struct nl_handle *nlh; - struct nl_cache *cache; - struct nl_object *obj; - nlh = nl_handle_alloc (); - if (nl_connect (nlh, NETLINK_ROUTE) < 0) { - fprintf (stderr, "couldn't connect to netlink: %s", nl_geterror ()); - return 3; - } - - cache = rtnl_addr_alloc_cache (nlh); - if (!cache || nl_cache_nitems (cache) == 0) { - fprintf (stderr, "couldn't fill address cache: %s", nl_geterror ()); - return 3; - } - - obj = nl_cache_get_first (cache); - if (nl_object_identical (obj, obj)) - return 0; - - nl_cache_get_ops (cache)->co_obj_ops->oo_id_attrs &= ~0x80; - if (nl_object_identical (obj, obj)) - return 1; - else - return 2; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - libnl_bug=$? -else - libnl_bug=$? fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - CFLAGS="$save_CFLAGS" - LDFLAGS="$save_LDFLAGS" - - case $libnl_bug in - 0) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - - 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using workaround" >&5 -$as_echo "yes, using workaround" >&6; } - -$as_echo "#define LIBNL_NEEDS_ADDR_CACHING_WORKAROUND 1" >>confdefs.h - - ;; - 2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, and workaround doesn't work" >&5 -$as_echo "yes, and workaround doesn't work" >&6; } - as_fn_error $? "Installed libnl has broken address caching; please patch or upgrade" "$LINENO" 5 - ;; - cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling... assuming it works!" >&5 -$as_echo "cross-compiling... assuming it works!" >&6; } - ;; - - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ?" >&5 -$as_echo "?" >&6; } - as_fn_error $? "libnl test program failed" "$LINENO" 5 - ;; -esac - -fi +# uuid library pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5 @@ -22827,19 +22507,6 @@ _ACEOF -# Check whether --enable-crashtrace was given. -if test "${enable_crashtrace+set}" = set; then : - enableval=$enable_crashtrace; enable_crashtrace=${enableval} -else - enable_crashtrace=yes -fi - -if test x"$enable_crashtrace" = xyes; then - -$as_echo "#define ENABLE_CRASHTRACE 1" >>confdefs.h - -fi - pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSOUP" >&5 @@ -24301,7 +23968,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by NetworkManager $as_me 0.9.7.995, which was +This file was extended by NetworkManager $as_me 0.9.7.997, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24367,7 +24034,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -NetworkManager config.status 0.9.7.995 +NetworkManager config.status 0.9.7.997 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -26645,11 +26312,10 @@ echo " nmrundir: $nmrundir" echo echo "Platform:" -echo " libnl: $with_libnl" echo " session tracking: $with_session_tracking" echo " suspend/resume: $with_suspend_resume" if test "${enable_polkit}" = "yes"; then - if test "${enable_modify_system}"; then + if test "${enable_modify_system}" = "yes"; then echo " policykit: yes (permissive modify.system)" else echo " policykit: yes (restrictive modify.system)" diff --git a/configure.ac b/configure.ac index dbbc1fdc0..d90da2f71 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ dnl The NM version number m4_define([nm_major_version], [0]) m4_define([nm_minor_version], [9]) m4_define([nm_micro_version], [7]) -m4_define([nm_nano_version], [995]) +m4_define([nm_nano_version], [997]) m4_define([nm_version], [nm_major_version.nm_minor_version.nm_micro_version.nm_nano_version]) @@ -206,11 +206,8 @@ AC_CHECK_LIB([dl], [dladdr], LIBDL="-ldl", LIBDL="") AC_SUBST(LIBDL) dnl -dnl Checks for new dbus-glib property access function +dnl Checks for dbus-glib dnl -AC_CHECK_LIB([dbus-glib-1], [dbus_glib_global_set_disable_legacy_property_access], ac_have_dg_prop="1", ac_have_dg_prop="0") -AC_DEFINE_UNQUOTED(HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS, $ac_have_dg_prop, [Define if you have a dbus-glib with dbus_glib_global_set_disable_legacy_property_access()]) - PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.94) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) @@ -320,46 +317,11 @@ AM_CONDITIONAL(SUSPEND_RESUME_UPOWER, test "x$with_suspend_resume" = "xupower") AM_CONDITIONAL(SUSPEND_RESUME_SYSTEMD, test "x$with_suspend_resume" = "xsystemd") # libnl support for the linux platform -AC_ARG_WITH(libnl, AS_HELP_STRING([--with-libnl=1|2|3], [Select libnl version (default: latest available)])) -# default to "yes" -AS_IF([test -z "$with_libnl"], with_libnl=yes) -# test for various libnl versions -if test "$with_libnl" = "yes" -o "$with_libnl" = "3"; then - PKG_CHECK_MODULES(LIBNL3, libnl-3.0 libnl-route-3.0 libnl-genl-3.0, - [with_libnl=3], [test "$with_libnl" = "3" && with_libnl=no]) - AS_IF([test "$with_libnl" = "no"], - AC_MSG_ERROR([libnl 3.x could not be found])) -fi -if test "$with_libnl" = "yes" -o "$with_libnl" = "2"; then - PKG_CHECK_MODULES(LIBNL2, libnl-2.0, - [with_libnl=2], [test "$with_libnl" = "2" && with_libnl=no]) - AS_IF([test "$with_libnl" = "no"], - AC_MSG_ERROR([libnl 2.x could not be found])) -fi -if test "$with_libnl" = "yes" -o "$with_libnl" = "1"; then - PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, - [with_libnl=1], [test "$with_libnl" = "1" && with_libnl=no]) - AS_IF([test "$with_libnl" = "no"], - AC_MSG_ERROR([libnl 1.x could not be found])) -fi -if test "$with_libnl" = "yes"; then - AC_MSG_ERROR([libnl library could not be found]) - with_libnl=no -fi -if ! echo "$with_libnl" | grep -q "^[[1-3]]$"; then - AC_MSG_ERROR([unsupported libnl version: $with_libnl]) -fi -# add variables, conditionals and defines -if test "$with_libnl" != "no"; then - AC_DEFINE_UNQUOTED(HAVE_LIBNL, $with_libnl, [libnl version]) - AC_SUBST(LIBNL_CFLAGS, "$LIBNL3_CFLAGS$LIBNL2_CFLAGS$LIBNL1_CFLAGS") - AC_SUBST(LIBNL_LIBS, "$LIBNL3_LIBS$LIBNL2_LIBS$LIBNL1_LIBS") -fi -# additional tests -if test "with_libnl" = "1"; then - NM_LIBNL_CHECK -fi +PKG_CHECK_MODULES(LIBNL, libnl-3.0 >= 3.2.7 libnl-route-3.0 libnl-genl-3.0) +AC_SUBST(LIBNL_CFLAGS) +AC_SUBST(LIBNL_LIBS) +# uuid library PKG_CHECK_MODULES(UUID, uuid) AC_SUBST(UUID_CFLAGS) AC_SUBST(UUID_LIBS) @@ -611,13 +573,6 @@ fi AC_DEFINE_UNQUOTED(KERNEL_FIRMWARE_DIR, "$KERNEL_FIRMWARE_DIR", [Define to path of the kernel firmware directory]) AC_SUBST(KERNEL_FIRMWARE_DIR) -AC_ARG_ENABLE(crashtrace, - AS_HELP_STRING([--disable-crashtrace], [Disable GNU backtrace extensions]), - [enable_crashtrace=${enableval}], [enable_crashtrace=yes]) -if test x"$enable_crashtrace" = xyes; then - AC_DEFINE(ENABLE_CRASHTRACE, 1, [Define if you have GNU backtrace extensions]) -fi - PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26], [have_libsoup=yes],[have_libsoup=no]) AC_ARG_ENABLE(concheck, AS_HELP_STRING([--enable-concheck], [enable connectivity checking support]), [enable_concheck=${enableval}], [enable_concheck=${have_libsoup}]) @@ -770,11 +725,10 @@ echo " nmrundir: $nmrundir" echo echo "Platform:" -echo " libnl: $with_libnl" echo " session tracking: $with_session_tracking" echo " suspend/resume: $with_suspend_resume" if test "${enable_polkit}" = "yes"; then - if test "${enable_modify_system}"; then + if test "${enable_modify_system}" = "yes"; then echo " policykit: yes (permissive modify.system)" else echo " policykit: yes (restrictive modify.system)" diff --git a/data/Makefile.in b/data/Makefile.in index 9cfda94da..f4d85b41c 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -215,12 +214,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/docs/Makefile.in b/docs/Makefile.in index 1f11c8ed8..6eb2b23c7 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -224,12 +223,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am index ba98f1684..d98dc786a 100644 --- a/docs/api/Makefile.am +++ b/docs/api/Makefile.am @@ -1,30 +1,7 @@ -GENERATE_SETTINGS_SPEC_SOURCE = generate-settings-spec.c - AUTOMAKE_OPTIONS = 1.7 if ENABLE_DOC -INCLUDES = \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/libnm-util \ - -I$(top_builddir)/libnm-util - -noinst_PROGRAMS = \ - generate-settings-spec - -generate_settings_spec_SOURCES = \ - $(GENERATE_SETTINGS_SPEC_SOURCE) - -generate_settings_spec_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) - -generate_settings_spec_LDADD = \ - $(top_builddir)/libnm-util/libnm-util.la \ - $(GLIB_LIBS) \ - $(DBUS_LIBS) - XSLTPROC = xsltproc --xinclude --nonet XMLS = $(wildcard $(top_srcdir)/introspection/nm-*.xml) @@ -43,9 +20,10 @@ spec.html: $(XMLS) $(OTHER_FILES) html-build.stamp mkdir -p $(builddir)/html/ cp $@ $(builddir)/html/ -settings-spec.xml: generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la - rm -f $(builddir)/$@ - $(builddir)/generate-settings-spec $(builddir)/$@ +# settings-spec.xml should *not* be DISTed because it must be regenerated +# whenever the libnm-util source changes +settings-spec.xml: $(top_builddir)/tools/generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la + $(top_builddir)/tools/generate-settings-spec book $@ all: $(GENERATED_FILES) @@ -68,7 +46,6 @@ MKTMPL_OPTIONS= # Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE) content_files = \ version.xml \ - settings-spec.xml \ migrating-to-09.xml \ $(NULL) @@ -76,12 +53,12 @@ include $(top_srcdir)/gtk-doc.make #################################### -EXTRA_DIST += $(GENERATED_FILES) +EXTRA_DIST += spec.html CLEANFILES += $(GENERATED_FILES) else -EXTRA_DIST = $(GENERATE_SETTINGS_SPEC_SOURCE) +EXTRA_DIST = CLEANFILES = endif diff --git a/docs/api/Makefile.in b/docs/api/Makefile.in index 8266f3a52..d2123e446 100644 --- a/docs/api/Makefile.in +++ b/docs/api/Makefile.in @@ -20,7 +20,6 @@ #################################### # Everything below here is generic # #################################### - VPATH = @srcdir@ am__make_dryrun = \ { \ @@ -57,7 +56,6 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@ENABLE_DOC_TRUE@noinst_PROGRAMS = generate-settings-spec$(EXEEXT) DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.make subdir = docs/api @@ -69,66 +67,30 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = version.xml CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am__generate_settings_spec_SOURCES_DIST = generate-settings-spec.c -am__objects_1 = \ - generate_settings_spec-generate-settings-spec.$(OBJEXT) -@ENABLE_DOC_TRUE@am_generate_settings_spec_OBJECTS = $(am__objects_1) -generate_settings_spec_OBJECTS = $(am_generate_settings_spec_OBJECTS) -am__DEPENDENCIES_1 = -@ENABLE_DOC_TRUE@generate_settings_spec_DEPENDENCIES = \ -@ENABLE_DOC_TRUE@ $(top_builddir)/libnm-util/libnm-util.la \ -@ENABLE_DOC_TRUE@ $(am__DEPENDENCIES_1) $(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 -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_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -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_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(generate_settings_spec_SOURCES) -DIST_SOURCES = $(am__generate_settings_spec_SOURCES_DIST) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -ETAGS = etags -CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -228,12 +190,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ @@ -373,26 +329,7 @@ with_dhclient = @with_dhclient@ with_dhcpcd = @with_dhcpcd@ with_netconfig = @with_netconfig@ with_resolvconf = @with_resolvconf@ -GENERATE_SETTINGS_SPEC_SOURCE = generate-settings-spec.c AUTOMAKE_OPTIONS = 1.7 -@ENABLE_DOC_TRUE@INCLUDES = \ -@ENABLE_DOC_TRUE@ -I$(top_srcdir)/include \ -@ENABLE_DOC_TRUE@ -I$(top_builddir)/include \ -@ENABLE_DOC_TRUE@ -I$(top_srcdir)/libnm-util \ -@ENABLE_DOC_TRUE@ -I$(top_builddir)/libnm-util - -@ENABLE_DOC_TRUE@generate_settings_spec_SOURCES = \ -@ENABLE_DOC_TRUE@ $(GENERATE_SETTINGS_SPEC_SOURCE) - -@ENABLE_DOC_TRUE@generate_settings_spec_CPPFLAGS = \ -@ENABLE_DOC_TRUE@ $(GLIB_CFLAGS) \ -@ENABLE_DOC_TRUE@ $(DBUS_CFLAGS) - -@ENABLE_DOC_TRUE@generate_settings_spec_LDADD = \ -@ENABLE_DOC_TRUE@ $(top_builddir)/libnm-util/libnm-util.la \ -@ENABLE_DOC_TRUE@ $(GLIB_LIBS) \ -@ENABLE_DOC_TRUE@ $(DBUS_LIBS) - @ENABLE_DOC_TRUE@XSLTPROC = xsltproc --xinclude --nonet @ENABLE_DOC_TRUE@XMLS = $(wildcard $(top_srcdir)/introspection/nm-*.xml) @ENABLE_DOC_TRUE@OTHER_FILES = \ @@ -423,7 +360,6 @@ AUTOMAKE_OPTIONS = 1.7 # Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE) @ENABLE_DOC_TRUE@content_files = \ @ENABLE_DOC_TRUE@ version.xml \ -@ENABLE_DOC_TRUE@ settings-spec.xml \ @ENABLE_DOC_TRUE@ migrating-to-09.xml \ @ENABLE_DOC_TRUE@ $(NULL) @@ -447,12 +383,11 @@ AUTOMAKE_OPTIONS = 1.7 @ENABLE_DOC_TRUE@ $(DOC_MODULE)-sections.txt \ @ENABLE_DOC_TRUE@ $(DOC_MODULE)-overrides.txt -@ENABLE_DOC_FALSE@EXTRA_DIST = $(GENERATE_SETTINGS_SPEC_SOURCE) \ -@ENABLE_DOC_FALSE@ version.xml.in +@ENABLE_DOC_FALSE@EXTRA_DIST = version.xml.in #################################### -@ENABLE_DOC_TRUE@EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) \ -@ENABLE_DOC_TRUE@ $(GENERATED_FILES) version.xml.in +@ENABLE_DOC_TRUE@EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) spec.html \ +@ENABLE_DOC_TRUE@ version.xml.in @ENABLE_DOC_TRUE@DOC_STAMPS = setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ @ENABLE_DOC_TRUE@ html-build.stamp pdf-build.stamp \ @ENABLE_DOC_TRUE@ tmpl.stamp sgml.stamp html.stamp pdf.stamp @@ -483,7 +418,6 @@ AUTOMAKE_OPTIONS = 1.7 all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -518,118 +452,17 @@ $(am__aclocal_m4_deps): version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -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 -generate-settings-spec$(EXEEXT): $(generate_settings_spec_OBJECTS) $(generate_settings_spec_DEPENDENCIES) $(EXTRA_generate_settings_spec_DEPENDENCIES) - @rm -f generate-settings-spec$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(generate_settings_spec_OBJECTS) $(generate_settings_spec_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_settings_spec-generate-settings-spec.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 $< - -.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 `$(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 $@ $< - -generate_settings_spec-generate-settings-spec.o: generate-settings-spec.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(generate_settings_spec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT generate_settings_spec-generate-settings-spec.o -MD -MP -MF $(DEPDIR)/generate_settings_spec-generate-settings-spec.Tpo -c -o generate_settings_spec-generate-settings-spec.o `test -f 'generate-settings-spec.c' || echo '$(srcdir)/'`generate-settings-spec.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/generate_settings_spec-generate-settings-spec.Tpo $(DEPDIR)/generate_settings_spec-generate-settings-spec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='generate-settings-spec.c' object='generate_settings_spec-generate-settings-spec.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(generate_settings_spec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o generate_settings_spec-generate-settings-spec.o `test -f 'generate-settings-spec.c' || echo '$(srcdir)/'`generate-settings-spec.c - -generate_settings_spec-generate-settings-spec.obj: generate-settings-spec.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(generate_settings_spec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT generate_settings_spec-generate-settings-spec.obj -MD -MP -MF $(DEPDIR)/generate_settings_spec-generate-settings-spec.Tpo -c -o generate_settings_spec-generate-settings-spec.obj `if test -f 'generate-settings-spec.c'; then $(CYGPATH_W) 'generate-settings-spec.c'; else $(CYGPATH_W) '$(srcdir)/generate-settings-spec.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/generate_settings_spec-generate-settings-spec.Tpo $(DEPDIR)/generate_settings_spec-generate-settings-spec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='generate-settings-spec.c' object='generate_settings_spec-generate-settings-spec.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(generate_settings_spec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o generate_settings_spec-generate-settings-spec.obj `if test -f 'generate-settings-spec.c'; then $(CYGPATH_W) 'generate-settings-spec.c'; else $(CYGPATH_W) '$(srcdir)/generate-settings-spec.c'; fi` - mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique tags: TAGS +TAGS: -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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 -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - 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" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +CTAGS: + @ENABLE_DOC_FALSE@dist-hook: distdir: $(DISTFILES) @@ -668,7 +501,7 @@ distdir: $(DISTFILES) check-am: all-am check: check-am @ENABLE_DOC_FALSE@all-local: -all-am: Makefile $(PROGRAMS) all-local +all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am @@ -708,14 +541,11 @@ maintainer-clean-generic: @ENABLE_DOC_FALSE@clean-local: clean: clean-am -clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ - mostlyclean-am +clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-local distclean-tags +distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am @@ -758,15 +588,13 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool +mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am @@ -780,20 +608,19 @@ uninstall-am: uninstall-local .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ - ctags dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-local distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-libtool clean-local dist-hook distclean \ + distclean-generic distclean-libtool distclean-local distdir \ + dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local 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 \ - maintainer-clean-local mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-local + maintainer-clean-local mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-local @ENABLE_DOC_TRUE@spec.html: $(XMLS) $(OTHER_FILES) html-build.stamp @@ -801,9 +628,10 @@ uninstall-am: uninstall-local @ENABLE_DOC_TRUE@ mkdir -p $(builddir)/html/ @ENABLE_DOC_TRUE@ cp $@ $(builddir)/html/ -@ENABLE_DOC_TRUE@settings-spec.xml: generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la -@ENABLE_DOC_TRUE@ rm -f $(builddir)/$@ -@ENABLE_DOC_TRUE@ $(builddir)/generate-settings-spec $(builddir)/$@ +# settings-spec.xml should *not* be DISTed because it must be regenerated +# whenever the libnm-util source changes +@ENABLE_DOC_TRUE@settings-spec.xml: $(top_builddir)/tools/generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la +@ENABLE_DOC_TRUE@ $(top_builddir)/tools/generate-settings-spec book $@ @ENABLE_DOC_TRUE@all: $(GENERATED_FILES) diff --git a/docs/api/generate-settings-spec.c b/docs/api/generate-settings-spec.c deleted file mode 100644 index b07bd345d..000000000 --- a/docs/api/generate-settings-spec.c +++ /dev/null @@ -1,240 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * Dan Williams <dcbw@redhat.com> - * - * 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 2009 - 2012 Red Hat, Inc. - */ - -#include <stdio.h> -#include <errno.h> -#include <unistd.h> -#include <string.h> - -#include <glib.h> -#include <dbus/dbus-glib.h> -#include "config.h" - -#include <nm-setting-8021x.h> -#include <nm-setting-adsl.h> -#include <nm-setting-bluetooth.h> -#include <nm-setting-cdma.h> -#include <nm-setting-connection.h> -#include <nm-setting-gsm.h> -#include <nm-setting.h> -#include <nm-setting-ip4-config.h> -#include <nm-setting-ip6-config.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-vpn.h> -#include <nm-setting-wimax.h> -#include <nm-setting-wired.h> -#include <nm-setting-wireless.h> -#include <nm-setting-wireless-security.h> -#include <nm-setting-infiniband.h> -#include <nm-setting-bond.h> -#include <nm-setting-bridge.h> -#include <nm-setting-bridge-port.h> -#include <nm-setting-vlan.h> - -#include <nm-utils.h> - -typedef NMSetting* (*SettingNewFunc) (void); - -static SettingNewFunc funcs[] = { - nm_setting_802_1x_new, - nm_setting_adsl_new, - nm_setting_bluetooth_new, - nm_setting_bond_new, - nm_setting_bridge_new, - nm_setting_bridge_port_new, - nm_setting_cdma_new, - nm_setting_connection_new, - nm_setting_gsm_new, - nm_setting_infiniband_new, - nm_setting_ip4_config_new, - nm_setting_ip6_config_new, - nm_setting_olpc_mesh_new, - nm_setting_ppp_new, - nm_setting_pppoe_new, - nm_setting_serial_new, - nm_setting_vlan_new, - nm_setting_vpn_new, - nm_setting_wimax_new, - nm_setting_wired_new, - nm_setting_wireless_new, - nm_setting_wireless_security_new, - NULL -}; - -typedef struct { - const char *gvalue_name; - const char *new_name; -} TypeNameElement; - -static TypeNameElement name_map[] = { - { "gchararray", "string" }, - { "GSList_gchararray_", "array of string" }, - { "GArray_guchar_", "byte array" }, - { "gboolean", "boolean" }, - { "guint64", "uint64" }, - { "gint", "int32" }, - { "guint", "uint32" }, - { "GArray_guint_", "array of uint32" }, - { "GPtrArray_GArray_guint__", "array of array of uint32" }, - { "GPtrArray_GArray_guchar__", "array of byte array" }, - { "GPtrArray_gchararray_", "array of string" }, - { "GHashTable_gchararray+gchararray_", "dict of (string::string)" }, - { "GPtrArray_GValueArray_GArray_guchar_+guint+GArray_guchar___", "array of (byte array, uint32, byte array)" }, - { "GPtrArray_GValueArray_GArray_guchar_+guint+GArray_guchar_+guint__", "array of (byte array, uint32, byte array, uint32)" }, - { NULL, NULL } -}; - -static void -write_one_setting (FILE *f, SettingNewFunc func) -{ - NMSetting *s; - GParamSpec **props, **iter; - guint num; - - s = func (); - - /* write out section header */ - (void) fprintf (f, - "<table>\n" - " <title>%s setting</title>\n" - " <tgroup cols=\"4\">\n" - " <thead>\n" - " <row>\n" - " <entry>Key Name</entry>\n" - " <entry>Value Type</entry>\n" - " <entry>Default Value</entry>\n" - " <entry>Value Description</entry>\n" - " </row>\n" - " </thead>\n" - " <tbody>\n", - nm_setting_get_name (s)); - - props = g_object_class_list_properties (G_OBJECT_GET_CLASS (G_OBJECT (s)), &num); - for (iter = props; iter && *iter; iter++) { - const char *key_name, *value_type, *value_desc; - char *default_value; - TypeNameElement *name_iter; - GValue value = { 0, }; - char *flags_str = NULL; - - value_type = g_type_name (G_PARAM_SPEC_VALUE_TYPE (*iter)); - for (name_iter = &name_map[0]; name_iter && name_iter->gvalue_name; name_iter++) { - if (!strcmp (value_type, name_iter->gvalue_name)) { - value_type = name_iter->new_name; - break; - } - } - - key_name = g_param_spec_get_name (*iter); - value_desc = g_param_spec_get_blurb (*iter); - - g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (*iter)); - g_param_value_set_default (*iter, &value); - default_value = g_strdup_value_contents (&value); - if (default_value && !strcmp (default_value, "NULL")) { - g_free (default_value); - default_value = NULL; - } - - if (!strcmp (key_name, NM_SETTING_NAME)) { - g_free (default_value); - default_value = NULL; - g_object_get (G_OBJECT (s), NM_SETTING_NAME, &default_value, NULL); - } - - if (g_str_has_suffix (key_name, "-flags")) - flags_str = g_strdup_printf (" (see <xref linkend=\"secrets-flags\"/> for flag values)"); - - (void) fprintf (f, - " <row>\n" - " <entry><screen>%s</screen></entry>\n" - " <entry><screen>%s</screen></entry>\n" - " <entry><screen>%s</screen></entry>\n" - " <entry>%s%s</entry>\n" - " </row>\n", - key_name, - value_type, - default_value ? default_value : "", - value_desc, - flags_str ? flags_str : ""); - - g_free (flags_str); - g_free (default_value); - } - - (void) fprintf (f, - " </tbody>\n" - " </tgroup>\n" - "</table>\n"); - - g_object_unref (s); -} - -int -main (int argc, char *argv[]) -{ - GError *error = NULL; - FILE *f; - SettingNewFunc *fptr; - - if (argc != 2) { - fprintf (stderr, "Usage: %s <output file>\n", argv[0]); - _exit (1); - } - - g_type_init (); - - if (!nm_utils_init (&error)) { - fprintf (stderr, "ERR: failed to initialize libnm-util: %s", error->message); - _exit (2); - } - - f = fopen (argv[1], "w"); - if (!f) { - fprintf (stderr, "ERR: could not create %s: %d\n", argv[1], errno); - _exit (3); - } - - (void) fprintf (f, - "<?xml version=\"1.0\"?>\n" - "<!DOCTYPE chapter PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"\n" - " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\" [\n" - "<!ENTITY %% local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" - "]>" - "<section>\n" - " <title>Configuration Settings</title>\n" - " <para>\n"); - - for (fptr = funcs; fptr && *fptr; fptr++) - write_one_setting (f, *fptr); - - (void) fprintf (f, - " </para>\n" - "</section>\n"); - - fclose (f); - _exit (0); -} - diff --git a/docs/api/html/NetworkManager.devhelp2 b/docs/api/html/NetworkManager.devhelp2 index 22bace819..fd669a49c 100644 --- a/docs/api/html/NetworkManager.devhelp2 +++ b/docs/api/html/NetworkManager.devhelp2 @@ -4,23 +4,23 @@ <chapters> <sub name="D-Bus API Reference" link="ref-dbus.html"/> <sub name="Network Configuration Setting Specification" link="ref-settings.html"> - <sub name="Configuration Settings" link="ref-settings.html#idp7117680"/> + <sub name="Configuration Settings" link="ref-settings.html#idp8828144"/> <sub name="Secret flag types" link="secrets-flags.html"/> </sub> <sub name="Migrating from NetworkManager 0.8 to NetworkManager 0.9" link="ref-migrating.html"> - <sub name="Architecture and D-Bus API Changes in 0.9" link="ref-migrating.html#idp9666048"> - <sub name="Elimination of the User Settings Service" link="ref-migrating.html#idp9841232"/> - <sub name="User Secret Agents" link="ref-migrating.html#idp10473664"/> - <sub name="Settings Service Interface Changes" link="ref-migrating.html#idp4817488"/> - <sub name="Connection Object Interface Changes" link="ref-migrating.html#idp6496288"/> - <sub name="Permissions Methods Consolidation" link="ref-migrating.html#idp5738512"/> - <sub name="AddConnection Returns Object Path of New Connection" link="ref-migrating.html#idp10731168"/> - <sub name="Support for WiMAX Devices" link="ref-migrating.html#idp9702992"/> - <sub name="New Device States" link="ref-migrating.html#idp4780896"/> - <sub name="New Active Connection State" link="ref-migrating.html#idp8383824"/> - <sub name="Consolidated Modem Devices" link="ref-migrating.html#idp6851392"/> - <sub name="Secret Property Flags" link="ref-migrating.html#idp5982704"/> - <sub name="Deprecated Methods Removed" link="ref-migrating.html#idp10222192"/> + <sub name="Architecture and D-Bus API Changes in 0.9" link="ref-migrating.html#idp7369136"> + <sub name="Elimination of the User Settings Service" link="ref-migrating.html#idp7191632"/> + <sub name="User Secret Agents" link="ref-migrating.html#idp5401424"/> + <sub name="Settings Service Interface Changes" link="ref-migrating.html#idp8019904"/> + <sub name="Connection Object Interface Changes" link="ref-migrating.html#idp5711808"/> + <sub name="Permissions Methods Consolidation" link="ref-migrating.html#idp9568320"/> + <sub name="AddConnection Returns Object Path of New Connection" link="ref-migrating.html#idp10489904"/> + <sub name="Support for WiMAX Devices" link="ref-migrating.html#idp8180400"/> + <sub name="New Device States" link="ref-migrating.html#idp6127200"/> + <sub name="New Active Connection State" link="ref-migrating.html#idp7405264"/> + <sub name="Consolidated Modem Devices" link="ref-migrating.html#idp7426304"/> + <sub name="Secret Property Flags" link="ref-migrating.html#idp8047760"/> + <sub name="Deprecated Methods Removed" link="ref-migrating.html#idp10077264"/> </sub> </sub> <sub name="Index" link="ix01.html"/> diff --git a/docs/api/html/index.html b/docs/api/html/index.html index 4ad092743..6557dbc8e 100644 --- a/docs/api/html/index.html +++ b/docs/api/html/index.html @@ -14,11 +14,11 @@ <div class="titlepage"> <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">NetworkManager D-Bus Reference Manual</p></th></tr></table></div> -<div><p class="releaseinfo">Version 0.9.7.995 +<div><p class="releaseinfo">Version 0.9.7.997 </p></div> <div><p class="copyright">Copyright © 2012 The NetworkManager Authors</p></div> <div><div class="legalnotice"> -<a name="idp475760"></a><p> +<a name="idp201728"></a><p> Permission is granted to copy, distribute and/or modify this document under the terms of the <em class="citetitle">GNU Free Documentation License</em>, Version 1.1 or any later @@ -46,25 +46,25 @@ <dt><span class="chapter"><a href="ref-dbus.html">D-Bus API Reference</a></span></dt> <dt><span class="chapter"><a href="ref-settings.html">Network Configuration Setting Specification</a></span></dt> <dd><dl> -<dt><span class="section"><a href="ref-settings.html#idp7117680">Configuration Settings</a></span></dt> +<dt><span class="section"><a href="ref-settings.html#idp8828144">Configuration Settings</a></span></dt> <dt><span class="section"><a href="secrets-flags.html">Secret flag types</a></span></dt> </dl></dd> <dt><span class="chapter"><a href="ref-migrating.html">Migrating from NetworkManager 0.8 to NetworkManager 0.9</a></span></dt> <dd><dl> -<dt><span class="section"><a href="ref-migrating.html#idp9666048">Architecture and D-Bus API Changes in 0.9</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp7369136">Architecture and D-Bus API Changes in 0.9</a></span></dt> <dd><dl> -<dt><span class="section"><a href="ref-migrating.html#idp9841232">Elimination of the User Settings Service</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp10473664">User Secret Agents</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp4817488">Settings Service Interface Changes</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp6496288">Connection Object Interface Changes</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp5738512">Permissions Methods Consolidation</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp10731168">AddConnection Returns Object Path of New Connection</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp9702992">Support for WiMAX Devices</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp4780896">New Device States</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp8383824">New Active Connection State</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp6851392">Consolidated Modem Devices</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp5982704">Secret Property Flags</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp10222192">Deprecated Methods Removed</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp7191632">Elimination of the User Settings Service</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp5401424">User Secret Agents</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp8019904">Settings Service Interface Changes</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp5711808">Connection Object Interface Changes</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp9568320">Permissions Methods Consolidation</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp10489904">AddConnection Returns Object Path of New Connection</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp8180400">Support for WiMAX Devices</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp6127200">New Device States</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp7405264">New Active Connection State</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp7426304">Consolidated Modem Devices</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp8047760">Secret Property Flags</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp10077264">Deprecated Methods Removed</a></span></dt> </dl></dd> </dl></dd> <dt><span class="index"><a href="ix01.html">Index</a></span></dt> diff --git a/docs/api/html/ix01.html b/docs/api/html/ix01.html index ce62fb55d..72dc9c03f 100644 --- a/docs/api/html/ix01.html +++ b/docs/api/html/ix01.html @@ -21,7 +21,7 @@ </tr></table> <div class="index"> <div class="titlepage"><div><div><h2 class="title"> -<a name="idp74000"></a>Index</h2></div></div></div> +<a name="idp73872"></a>Index</h2></div></div></div> <div class="index"></div> </div> <div class="footer"> diff --git a/docs/api/html/ref-migrating.html b/docs/api/html/ref-migrating.html index 665f9bfb0..bfc66efb8 100644 --- a/docs/api/html/ref-migrating.html +++ b/docs/api/html/ref-migrating.html @@ -23,20 +23,20 @@ <div class="titlepage"><div><div><h2 class="title"> <a name="ref-migrating"></a>Migrating from NetworkManager 0.8 to NetworkManager 0.9</h2></div></div></div> <div class="toc"><dl> -<dt><span class="section"><a href="ref-migrating.html#idp9666048">Architecture and D-Bus API Changes in 0.9</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp7369136">Architecture and D-Bus API Changes in 0.9</a></span></dt> <dd><dl> -<dt><span class="section"><a href="ref-migrating.html#idp9841232">Elimination of the User Settings Service</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp10473664">User Secret Agents</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp4817488">Settings Service Interface Changes</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp6496288">Connection Object Interface Changes</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp5738512">Permissions Methods Consolidation</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp10731168">AddConnection Returns Object Path of New Connection</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp9702992">Support for WiMAX Devices</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp4780896">New Device States</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp8383824">New Active Connection State</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp6851392">Consolidated Modem Devices</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp5982704">Secret Property Flags</a></span></dt> -<dt><span class="section"><a href="ref-migrating.html#idp10222192">Deprecated Methods Removed</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp7191632">Elimination of the User Settings Service</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp5401424">User Secret Agents</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp8019904">Settings Service Interface Changes</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp5711808">Connection Object Interface Changes</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp9568320">Permissions Methods Consolidation</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp10489904">AddConnection Returns Object Path of New Connection</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp8180400">Support for WiMAX Devices</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp6127200">New Device States</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp7405264">New Active Connection State</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp7426304">Consolidated Modem Devices</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp8047760">Secret Property Flags</a></span></dt> +<dt><span class="section"><a href="ref-migrating.html#idp10077264">Deprecated Methods Removed</a></span></dt> </dl></dd> </dl></div> <p> @@ -50,14 +50,14 @@ </p> <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="idp9666048"></a>Architecture and D-Bus API Changes in 0.9</h2></div></div></div> +<a name="idp7369136"></a>Architecture and D-Bus API Changes in 0.9</h2></div></div></div> <p> This section details the architectural and D-Bus API changes in NetworkManager 0.9. </p> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp9841232"></a>Elimination of the User Settings Service</h3></div></div></div> +<a name="idp7191632"></a>Elimination of the User Settings Service</h3></div></div></div> <p> Previously there were two "settings services", or D-Bus services that provided and saved network configuration information. NetworkManager @@ -103,7 +103,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp10473664"></a>User Secret Agents</h3></div></div></div> +<a name="idp5401424"></a>User Secret Agents</h3></div></div></div> <p> Even with the elimination of the user settings service, in some cases it is still desirable to store secrets in the user's session and not in @@ -152,7 +152,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp4817488"></a>Settings Service Interface Changes</h3></div></div></div> +<a name="idp8019904"></a>Settings Service Interface Changes</h3></div></div></div> <p> With the elimination of the user settings service, the old <code class="literal">org.freedesktop.NetworkManagerUserSettings</code> and @@ -190,7 +190,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp6496288"></a>Connection Object Interface Changes</h3></div></div></div> +<a name="idp5711808"></a>Connection Object Interface Changes</h3></div></div></div> <p> Consistent with the interface changes to the Settings object, the Connection object's D-Bus interface has changed to @@ -224,7 +224,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp5738512"></a>Permissions Methods Consolidation</h3></div></div></div> +<a name="idp9568320"></a>Permissions Methods Consolidation</h3></div></div></div> <p> Previously there were two D-Bus method calls to retrieve the list of operations that a user client could perform, and two signals notifying @@ -256,7 +256,7 @@ are now string-based permissions. The mapping is as follows: </p> <div class="table"> -<a name="idp8355952"></a><p class="title"><b>Table 23. </b></p> +<a name="idp5069392"></a><p class="title"><b>Table 23. </b></p> <div class="table-contents"><table border="1"> <colgroup> <col> @@ -307,7 +307,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp10731168"></a>AddConnection Returns Object Path of New Connection</h3></div></div></div> +<a name="idp10489904"></a>AddConnection Returns Object Path of New Connection</h3></div></div></div> <p> The <a class="ulink" href="spec.html#org.freedesktop.NetworkManager.Settings" target="_top"> <code class="literal">org.freedesktop.NetworkManager.Settings.AddConnection</code> @@ -325,7 +325,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp9702992"></a>Support for WiMAX Devices</h3></div></div></div> +<a name="idp8180400"></a>Support for WiMAX Devices</h3></div></div></div> <p> NetworkManager now supports Intel WiMAX mobile broadband devices. A corresponding device type (<code class="literal">NM_DEVICE_TYPE_WIMAX</code>) and @@ -348,7 +348,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp4780896"></a>New Device States</h3></div></div></div> +<a name="idp6127200"></a>New Device States</h3></div></div></div> <p> A few <a class="ulink" href="spec.html#type-NM_DEVICE_STATE" target="_top">new device states</a> have been added, and all device states have been renumbered for flexibility. @@ -363,7 +363,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp8383824"></a>New Active Connection State</h3></div></div></div> +<a name="idp7405264"></a>New Active Connection State</h3></div></div></div> <p> Along with the new device states, an <a class="ulink" href="spec.html#type-NM_ACTIVE_CONNECTION_STATE" target="_top">additional @@ -379,7 +379,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp6851392"></a>Consolidated Modem Devices</h3></div></div></div> +<a name="idp7426304"></a>Consolidated Modem Devices</h3></div></div></div> <p> Many new mobile broadband devices support multiple access families, like Qualcomm Gobi cards (CDMA/EVDO and GSM/UMTS), or multi-mode EVDO/LTE @@ -415,7 +415,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp5982704"></a>Secret Property Flags</h3></div></div></div> +<a name="idp8047760"></a>Secret Property Flags</h3></div></div></div> <p> In the Connection object's configuration properties, each setting's secret properties (like WiFi passphrases, or public key passwords, etc) now has @@ -424,7 +424,7 @@ following values: </p> <div class="table"> -<a name="idp10576448"></a><p class="title"><b>Table 24. </b></p> +<a name="idp8048752"></a><p class="title"><b>Table 24. </b></p> <div class="table-contents"><table border="1"> <colgroup> <col> @@ -486,7 +486,7 @@ </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> -<a name="idp10222192"></a>Deprecated Methods Removed</h3></div></div></div> +<a name="idp10077264"></a>Deprecated Methods Removed</h3></div></div></div> <p> A few methods and signals of the <code class="literal">org.freedesktop.NetworkManager</code> interface deprecated in version 0.7 have been removed. All the @@ -496,7 +496,7 @@ their replacements: </p> <div class="table"> -<a name="idp9315120"></a><p class="title"><b>Table 25. </b></p> +<a name="idp10079056"></a><p class="title"><b>Table 25. </b></p> <div class="table-contents"><table border="1"> <colgroup> <col> diff --git a/docs/api/html/ref-settings.html b/docs/api/html/ref-settings.html index 8373c83b2..bbf0f4391 100644 --- a/docs/api/html/ref-settings.html +++ b/docs/api/html/ref-settings.html @@ -23,7 +23,7 @@ <div class="titlepage"><div><div><h2 class="title"> <a name="ref-settings"></a>Network Configuration Setting Specification</h2></div></div></div> <div class="toc"><dl> -<dt><span class="section"><a href="ref-settings.html#idp7117680">Configuration Settings</a></span></dt> +<dt><span class="section"><a href="ref-settings.html#idp8828144">Configuration Settings</a></span></dt> <dt><span class="section"><a href="secrets-flags.html">Secret flag types</a></span></dt> </dl></div> <p> @@ -35,11 +35,11 @@ </p> <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> -<a name="idp7117680"></a>Configuration Settings</h2></div></div></div> +<a name="idp8828144"></a>Configuration Settings</h2></div></div></div> <p> </p> <div class="table"> -<a name="idp6405792"></a><p class="title"><b>Table 1. 802-1x setting</b></p> +<a name="idp8562544"></a><p class="title"><b>Table 1. 802-1x setting</b></p> <div class="table-contents"><table summary="802-1x setting" border="1"> <colgroup> <col> @@ -246,7 +246,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp6771136"></a><p class="title"><b>Table 2. adsl setting</b></p> +<a name="idp7038016"></a><p class="title"><b>Table 2. adsl setting</b></p> <div class="table-contents"><table summary="adsl setting" border="1"> <colgroup> <col> @@ -315,7 +315,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp6805376"></a><p class="title"><b>Table 3. bluetooth setting</b></p> +<a name="idp7072256"></a><p class="title"><b>Table 3. bluetooth setting</b></p> <div class="table-contents"><table summary="bluetooth setting" border="1"> <colgroup> <col> @@ -354,7 +354,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10739632"></a><p class="title"><b>Table 4. bond setting</b></p> +<a name="idp7088176"></a><p class="title"><b>Table 4. bond setting</b></p> <div class="table-contents"><table summary="bond setting" border="1"> <colgroup> <col> @@ -393,7 +393,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10753056"></a><p class="title"><b>Table 5. bridge setting</b></p> +<a name="idp7104128"></a><p class="title"><b>Table 5. bridge setting</b></p> <div class="table-contents"><table summary="bridge setting" border="1"> <colgroup> <col> @@ -462,7 +462,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10781584"></a><p class="title"><b>Table 6. bridge-port setting</b></p> +<a name="idp7138288"></a><p class="title"><b>Table 6. bridge-port setting</b></p> <div class="table-contents"><table summary="bridge-port setting" border="1"> <colgroup> <col> @@ -507,7 +507,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10798128"></a><p class="title"><b>Table 7. cdma setting</b></p> +<a name="idp7158096"></a><p class="title"><b>Table 7. cdma setting</b></p> <div class="table-contents"><table summary="cdma setting" border="1"> <colgroup> <col> @@ -558,7 +558,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10818160"></a><p class="title"><b>Table 8. connection setting</b></p> +<a name="idp10788432"></a><p class="title"><b>Table 8. connection setting</b></p> <div class="table-contents"><table summary="connection setting" border="1"> <colgroup> <col> @@ -651,7 +651,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10860896"></a><p class="title"><b>Table 9. gsm setting</b></p> +<a name="idp10831168"></a><p class="title"><b>Table 9. gsm setting</b></p> <div class="table-contents"><table summary="gsm setting" border="1"> <colgroup> <col> @@ -744,7 +744,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10903840"></a><p class="title"><b>Table 10. infiniband setting</b></p> +<a name="idp10877472"></a><p class="title"><b>Table 10. infiniband setting</b></p> <div class="table-contents"><table summary="infiniband setting" border="1"> <colgroup> <col> @@ -789,7 +789,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10920448"></a><p class="title"><b>Table 11. ipv4 setting</b></p> +<a name="idp10898064"></a><p class="title"><b>Table 11. ipv4 setting</b></p> <div class="table-contents"><table summary="ipv4 setting" border="1"> <colgroup> <col> @@ -888,7 +888,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp10968000"></a><p class="title"><b>Table 12. ipv6 setting</b></p> +<a name="idp10956832"></a><p class="title"><b>Table 12. ipv6 setting</b></p> <div class="table-contents"><table summary="ipv6 setting" border="1"> <colgroup> <col> @@ -981,7 +981,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11018480"></a><p class="title"><b>Table 13. 802-11-olpc-mesh setting</b></p> +<a name="idp11011936"></a><p class="title"><b>Table 13. 802-11-olpc-mesh setting</b></p> <div class="table-contents"><table summary="802-11-olpc-mesh setting" border="1"> <colgroup> <col> @@ -1026,7 +1026,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11039120"></a><p class="title"><b>Table 14. ppp setting</b></p> +<a name="idp11032576"></a><p class="title"><b>Table 14. ppp setting</b></p> <div class="table-contents"><table summary="ppp setting" border="1"> <colgroup> <col> @@ -1161,7 +1161,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11119600"></a><p class="title"><b>Table 15. pppoe setting</b></p> +<a name="idp11113056"></a><p class="title"><b>Table 15. pppoe setting</b></p> <div class="table-contents"><table summary="pppoe setting" border="1"> <colgroup> <col> @@ -1212,7 +1212,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11144352"></a><p class="title"><b>Table 16. serial setting</b></p> +<a name="idp11137808"></a><p class="title"><b>Table 16. serial setting</b></p> <div class="table-contents"><table summary="serial setting" border="1"> <colgroup> <col> @@ -1269,7 +1269,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11172992"></a><p class="title"><b>Table 17. vlan setting</b></p> +<a name="idp11166448"></a><p class="title"><b>Table 17. vlan setting</b></p> <div class="table-contents"><table summary="vlan setting" border="1"> <colgroup> <col> @@ -1332,7 +1332,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11205968"></a><p class="title"><b>Table 18. vpn setting</b></p> +<a name="idp11199424"></a><p class="title"><b>Table 18. vpn setting</b></p> <div class="table-contents"><table summary="vpn setting" border="1"> <colgroup> <col> @@ -1383,7 +1383,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11230656"></a><p class="title"><b>Table 19. wimax setting</b></p> +<a name="idp11224112"></a><p class="title"><b>Table 19. wimax setting</b></p> <div class="table-contents"><table summary="wimax setting" border="1"> <colgroup> <col> @@ -1422,7 +1422,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11247280"></a><p class="title"><b>Table 20. 802-3-ethernet setting</b></p> +<a name="idp11240736"></a><p class="title"><b>Table 20. 802-3-ethernet setting</b></p> <div class="table-contents"><table summary="802-3-ethernet setting" border="1"> <colgroup> <col> @@ -1515,7 +1515,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11300128"></a><p class="title"><b>Table 21. 802-11-wireless setting</b></p> +<a name="idp11293584"></a><p class="title"><b>Table 21. 802-11-wireless setting</b></p> <div class="table-contents"><table summary="802-11-wireless setting" border="1"> <colgroup> <col> @@ -1626,7 +1626,7 @@ <p><br class="table-break"> </p> <div class="table"> -<a name="idp11365504"></a><p class="title"><b>Table 22. 802-11-wireless-security setting</b></p> +<a name="idp11358960"></a><p class="title"><b>Table 22. 802-11-wireless-security setting</b></p> <div class="table-contents"><table summary="802-11-wireless-security setting" border="1"> <colgroup> <col> diff --git a/docs/api/html/spec.html b/docs/api/html/spec.html index 1ff031f6c..c31bfc0bc 100644 --- a/docs/api/html/spec.html +++ b/docs/api/html/spec.html @@ -1,5 +1,5 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ascii" /><title>NetworkManager D-Bus Interface Specification version 0.9.7.995</title><style type="text/css"> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ascii" /><title>NetworkManager D-Bus Interface Specification version 0.9.7.997</title><style type="text/css"> body { font-family: sans-serif; @@ -98,7 +98,7 @@ margin-right: 4em; } - </style></head><body><h1 class="topbox">NetworkManager D-Bus Interface Specification</h1><h2>Version 0.9.7.995</h2><div>Copyright (C) 2008 - 2011 Red Hat, Inc.</div><div>Copyright (C) 2008 - 2009 Novell, Inc.</div><div class="license"> + </style></head><body><h1 class="topbox">NetworkManager D-Bus Interface Specification</h1><h2>Version 0.9.7.997</h2><div>Copyright (C) 2008 - 2011 Red Hat, Inc.</div><div>Copyright (C) 2008 - 2009 Novell, Inc.</div><div class="license"> <p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -827,7 +827,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ The capabilities of the wireless device. </dd></dl><h2>Sets of flags:</h2><h3 xmlns=""><a name="type-NM_802_11_DEVICE_CAP" id="type-NM_802_11_DEVICE_CAP">NM_802_11_DEVICE_CAP</a></h3> Flags describing the capabilities of a wireless device. - <dl><dt><code>NM_802_11_DEVICE_CAP_NONE = 0x0</code></dt><dd>Null capability - syntactic sugar for no capabilities supported. Do not AND this with other capabilities!</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_WEP40 = 0x1</code></dt><dd>The device supports the 40-bit WEP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_WEP104 = 0x2</code></dt><dd>The device supports the 104-bit WEP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_TKIP = 0x4</code></dt><dd>The device supports the TKIP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_CCMP = 0x8</code></dt><dd>The device supports the CCMP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_WPA = 0x10</code></dt><dd>The device supports the WPA encryption/authentication protocol.</dd><dt><code>NM_802_11_DEVICE_CAP_RSN = 0x20</code></dt><dd>The device supports the RSN encryption/authentication protocol.</dd></dl> + <dl><dt><code>NM_802_11_DEVICE_CAP_NONE = 0x0</code></dt><dd>Null capability - syntactic sugar for no capabilities supported. Do not AND this with other capabilities!</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_WEP40 = 0x1</code></dt><dd>The device supports the 40-bit WEP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_WEP104 = 0x2</code></dt><dd>The device supports the 104-bit WEP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_TKIP = 0x4</code></dt><dd>The device supports the TKIP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_CCMP = 0x8</code></dt><dd>The device supports the CCMP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_WPA = 0x10</code></dt><dd>The device supports the WPA encryption/authentication protocol.</dd><dt><code>NM_802_11_DEVICE_CAP_RSN = 0x20</code></dt><dd>The device supports the RSN encryption/authentication protocol.</dd><dt><code>NM_802_11_DEVICE_CAP_AP = 0x40</code></dt><dd>The device supports Access Point mode.</dd></dl> <h1><a name="org.freedesktop.NetworkManager.Device.Modem" id="org.freedesktop.NetworkManager.Device.Modem"></a>org.freedesktop.NetworkManager.Device.Modem</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Modem.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Modem.PropertiesChanged">PropertiesChanged</a> ( a{sv}: properties diff --git a/docs/api/spec.html b/docs/api/spec.html index 1ff031f6c..c31bfc0bc 100644 --- a/docs/api/spec.html +++ b/docs/api/spec.html @@ -1,5 +1,5 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ascii" /><title>NetworkManager D-Bus Interface Specification version 0.9.7.995</title><style type="text/css"> +<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ascii" /><title>NetworkManager D-Bus Interface Specification version 0.9.7.997</title><style type="text/css"> body { font-family: sans-serif; @@ -98,7 +98,7 @@ margin-right: 4em; } - </style></head><body><h1 class="topbox">NetworkManager D-Bus Interface Specification</h1><h2>Version 0.9.7.995</h2><div>Copyright (C) 2008 - 2011 Red Hat, Inc.</div><div>Copyright (C) 2008 - 2009 Novell, Inc.</div><div class="license"> + </style></head><body><h1 class="topbox">NetworkManager D-Bus Interface Specification</h1><h2>Version 0.9.7.997</h2><div>Copyright (C) 2008 - 2011 Red Hat, Inc.</div><div>Copyright (C) 2008 - 2009 Novell, Inc.</div><div class="license"> <p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -827,7 +827,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</ The capabilities of the wireless device. </dd></dl><h2>Sets of flags:</h2><h3 xmlns=""><a name="type-NM_802_11_DEVICE_CAP" id="type-NM_802_11_DEVICE_CAP">NM_802_11_DEVICE_CAP</a></h3> Flags describing the capabilities of a wireless device. - <dl><dt><code>NM_802_11_DEVICE_CAP_NONE = 0x0</code></dt><dd>Null capability - syntactic sugar for no capabilities supported. Do not AND this with other capabilities!</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_WEP40 = 0x1</code></dt><dd>The device supports the 40-bit WEP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_WEP104 = 0x2</code></dt><dd>The device supports the 104-bit WEP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_TKIP = 0x4</code></dt><dd>The device supports the TKIP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_CCMP = 0x8</code></dt><dd>The device supports the CCMP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_WPA = 0x10</code></dt><dd>The device supports the WPA encryption/authentication protocol.</dd><dt><code>NM_802_11_DEVICE_CAP_RSN = 0x20</code></dt><dd>The device supports the RSN encryption/authentication protocol.</dd></dl> + <dl><dt><code>NM_802_11_DEVICE_CAP_NONE = 0x0</code></dt><dd>Null capability - syntactic sugar for no capabilities supported. Do not AND this with other capabilities!</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_WEP40 = 0x1</code></dt><dd>The device supports the 40-bit WEP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_WEP104 = 0x2</code></dt><dd>The device supports the 104-bit WEP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_TKIP = 0x4</code></dt><dd>The device supports the TKIP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_CIPHER_CCMP = 0x8</code></dt><dd>The device supports the CCMP cipher.</dd><dt><code>NM_802_11_DEVICE_CAP_WPA = 0x10</code></dt><dd>The device supports the WPA encryption/authentication protocol.</dd><dt><code>NM_802_11_DEVICE_CAP_RSN = 0x20</code></dt><dd>The device supports the RSN encryption/authentication protocol.</dd><dt><code>NM_802_11_DEVICE_CAP_AP = 0x40</code></dt><dd>The device supports Access Point mode.</dd></dl> <h1><a name="org.freedesktop.NetworkManager.Device.Modem" id="org.freedesktop.NetworkManager.Device.Modem"></a>org.freedesktop.NetworkManager.Device.Modem</h1><p>Interface has no methods.</p><h2>Signals:</h2><div class="signal"><h3><a name="org.freedesktop.NetworkManager.Device.Modem.PropertiesChanged" id="org.freedesktop.NetworkManager.Device.Modem.PropertiesChanged">PropertiesChanged</a> ( a{sv}: properties diff --git a/docs/api/version.xml b/docs/api/version.xml index fa572dcfa..1517c7856 100644 --- a/docs/api/version.xml +++ b/docs/api/version.xml @@ -1 +1 @@ -0.9.7.995 +0.9.7.997 diff --git a/docs/libnm-glib/Makefile.in b/docs/libnm-glib/Makefile.in index d41fbdc93..af78a7d17 100644 --- a/docs/libnm-glib/Makefile.in +++ b/docs/libnm-glib/Makefile.in @@ -67,12 +67,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -191,12 +190,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/docs/libnm-glib/html/NMClient.html b/docs/libnm-glib/html/NMClient.html index cb771ba88..1cc0d3d71 100644 --- a/docs/libnm-glib/html/NMClient.html +++ b/docs/libnm-glib/html/NMClient.html @@ -90,6 +90,10 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays. <a class="link" href="NMDevice.html" title="NMDevice"><span class="returnvalue">NMDevice</span></a> * <a class="link" href="NMClient.html#nm-client-get-device-by-path" title="nm_client_get_device_by_path ()">nm_client_get_device_by_path</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>, <em class="parameter"><code>const <span class="type">char</span> *object_path</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="NMClient.html#nm-client-get-devices" title="nm_client_get_devices ()">nm_client_get_devices</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>); +<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMClient.html#nm-client-get-logging" title="nm_client_get_logging ()">nm_client_get_logging</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>, + <em class="parameter"><code><span class="type">char</span> **level</code></em>, + <em class="parameter"><code><span class="type">char</span> **domains</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMClient.html#nm-client-get-manager-running" title="nm_client_get_manager_running ()">nm_client_get_manager_running</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>); <a class="link" href="NMClient.html#NMClientPermissionResult" title="enum NMClientPermissionResult"><span class="returnvalue">NMClientPermissionResult</span></a> <a class="link" href="NMClient.html#nm-client-get-permission-result" title="nm_client_get_permission_result ()">nm_client_get_permission_result</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>, @@ -105,6 +109,10 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMCli <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); <a class="link" href="NMClient.html" title="NMClient"><span class="returnvalue">NMClient</span></a> * <a class="link" href="NMClient.html#nm-client-new-finish" title="nm_client_new_finish ()">nm_client_new_finish</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GAsyncResult.html"><span class="type">GAsyncResult</span></a> *result</code></em>, <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); +<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMClient.html#nm-client-set-logging" title="nm_client_set_logging ()">nm_client_set_logging</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *level</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *domains</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); <span class="returnvalue">void</span> <a class="link" href="NMClient.html#nm-client-sleep" title="nm_client_sleep ()">nm_client_sleep</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>, <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sleep_</code></em>); <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NMClient.html#nm-client-wimax-get-enabled" title="nm_client_wimax_get_enabled ()">nm_client_wimax_get_enabled</a> (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>); @@ -710,6 +718,48 @@ containing all the <a class="link" href="NMDevice.html" title="NMDevice"><span c </div> <hr> <div class="refsect2"> +<a name="nm-client-get-logging"></a><h3>nm_client_get_logging ()</h3> +<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_client_get_logging (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>, + <em class="parameter"><code><span class="type">char</span> **level</code></em>, + <em class="parameter"><code><span class="type">char</span> **domains</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> +<p> +Gets NetworkManager current logging level and domains. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td> +<td>a <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td> +<td>return location for logging level string. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>domains</code></em> :</span></p></td> +<td>return location for log domains string. The string is +a list of domains separated by ",". <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> +<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +</td> +</tr> +<tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td> +<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2"> <a name="nm-client-get-manager-running"></a><h3>nm_client_get_manager_running ()</h3> <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_client_get_manager_running (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>);</pre> <p> @@ -948,6 +998,48 @@ Gets the result of an <a class="link" href="NMClient.html#nm-client-new-async" t </div> <hr> <div class="refsect2"> +<a name="nm-client-set-logging"></a><h3>nm_client_set_logging ()</h3> +<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_client_set_logging (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *level</code></em>, + <em class="parameter"><code>const <span class="type">char</span> *domains</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> +<p> +Sets NetworkManager logging level and/or domains. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td> +<td>a <a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td> +<td>logging level to set (<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> or an empty string for no change). <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>domains</code></em> :</span></p></td> +<td>logging domains to set. The string should be a list of log +domains separated by ",". (<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> or an empty string for no change). <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> +<td>return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +</td> +</tr> +<tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td> +<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2"> <a name="nm-client-sleep"></a><h3>nm_client_sleep ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> nm_client_sleep (<em class="parameter"><code><a class="link" href="NMClient.html" title="NMClient"><span class="type">NMClient</span></a> *client</code></em>, <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sleep_</code></em>);</pre> diff --git a/docs/libnm-glib/html/NMDeviceWifi.html b/docs/libnm-glib/html/NMDeviceWifi.html index d4976febc..75e35bc67 100644 --- a/docs/libnm-glib/html/NMDeviceWifi.html +++ b/docs/libnm-glib/html/NMDeviceWifi.html @@ -48,6 +48,9 @@ <pre class="synopsis"> <a class="link" href="NMDeviceWifi.html#NMDeviceWifi-struct" title="NMDeviceWifi">NMDeviceWifi</a>; <a class="link" href="NMDeviceWifi.html#NMDeviceWifiClass" title="NMDeviceWifiClass">NMDeviceWifiClass</a>; enum <a class="link" href="NMDeviceWifi.html#NMDeviceWifiError" title="enum NMDeviceWifiError">NMDeviceWifiError</a>; +<span class="returnvalue">void</span> (<a class="link" href="NMDeviceWifi.html#NMDeviceWifiRequestScanFn" title="NMDeviceWifiRequestScanFn ()">*NMDeviceWifiRequestScanFn</a>) (<em class="parameter"><code><a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi"><span class="type">NMDeviceWifi</span></a> *device</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); #define <a class="link" href="NMDeviceWifi.html#NM-DEVICE-WIFI-ACTIVE-ACCESS-POINT:CAPS" title="NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT">NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT</a> #define <a class="link" href="NMDeviceWifi.html#NM-DEVICE-WIFI-BITRATE:CAPS" title="NM_DEVICE_WIFI_BITRATE">NM_DEVICE_WIFI_BITRATE</a> #define <a class="link" href="NMDeviceWifi.html#NM-DEVICE-WIFI-CAPABILITIES:CAPS" title="NM_DEVICE_WIFI_CAPABILITIES">NM_DEVICE_WIFI_CAPABILITIES</a> @@ -71,6 +74,9 @@ const <span class="returnvalue">char</span> * <a class="link" href="NMDev (<em class="parameter"><code><a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi"><span class="type">NMDeviceWifi</span></a> *device</code></em>); <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> * <a class="link" href="NMDeviceWifi.html#nm-device-wifi-new" title="nm_device_wifi_new ()">nm_device_wifi_new</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGConnection.html#DBusGConnection"><span class="type">DBusGConnection</span></a> *connection</code></em>, <em class="parameter"><code>const <span class="type">char</span> *path</code></em>); +<span class="returnvalue">void</span> <a class="link" href="NMDeviceWifi.html#nm-device-wifi-request-scan-simple" title="nm_device_wifi_request_scan_simple ()">nm_device_wifi_request_scan_simple</a> (<em class="parameter"><code><a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi"><span class="type">NMDeviceWifi</span></a> *device</code></em>, + <em class="parameter"><code><a class="link" href="NMDeviceWifi.html#NMDeviceWifiRequestScanFn" title="NMDeviceWifiRequestScanFn ()"><span class="type">NMDeviceWifiRequestScanFn</span></a> callback</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); </pre> </div> <div class="refsect1"> @@ -199,6 +205,15 @@ required by the connection </div> <hr> <div class="refsect2"> +<a name="NMDeviceWifiRequestScanFn"></a><h3>NMDeviceWifiRequestScanFn ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> (*NMDeviceWifiRequestScanFn) (<em class="parameter"><code><a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi"><span class="type">NMDeviceWifi</span></a> *device</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre> +<p> +</p> +</div> +<hr> +<div class="refsect2"> <a name="NM-DEVICE-WIFI-ACTIVE-ACCESS-POINT:CAPS"></a><h3>NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT</h3> <pre class="programlisting">#define NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT "active-access-point" </pre> @@ -488,6 +503,38 @@ Creates a new <a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi"><spa </tbody> </table></div> </div> +<hr> +<div class="refsect2"> +<a name="nm-device-wifi-request-scan-simple"></a><h3>nm_device_wifi_request_scan_simple ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> nm_device_wifi_request_scan_simple (<em class="parameter"><code><a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi"><span class="type">NMDeviceWifi</span></a> *device</code></em>, + <em class="parameter"><code><a class="link" href="NMDeviceWifi.html#NMDeviceWifiRequestScanFn" title="NMDeviceWifiRequestScanFn ()"><span class="type">NMDeviceWifiRequestScanFn</span></a> callback</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre> +<p> +Request NM to scan for access points on the <a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi"><span class="type">NMDeviceWifi</span></a>. This function only +instructs NM to perform scanning. Use <a class="link" href="NMDeviceWifi.html#nm-device-wifi-get-access-points" title="nm_device_wifi_get_access_points ()"><code class="function">nm_device_wifi_get_access_points()</code></a> +to get available access points. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>device</code></em> :</span></p></td> +<td>a <a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi"><span class="type">NMDeviceWifi</span></a> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> +<td>the function to call when the call is done. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> +</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> +<td>user data to pass to the callback function. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span> +</td> +</tr> +</tbody> +</table></div> +</div> </div> <div class="refsect1"> <a name="NMDeviceWifi.property-details"></a><h2>Property Details</h2> diff --git a/docs/libnm-glib/html/NMSecretAgent.html b/docs/libnm-glib/html/NMSecretAgent.html index e18588c47..1e08bf501 100644 --- a/docs/libnm-glib/html/NMSecretAgent.html +++ b/docs/libnm-glib/html/NMSecretAgent.html @@ -356,7 +356,7 @@ To easily create the hash table to return the WiFi PSK, you could do something like this: </p> <div class="example"> -<a name="idp15748848"></a><p class="title"><b>Example 1. Creating a secrets hash</b></p> +<a name="idp15030224"></a><p class="title"><b>Example 1. Creating a secrets hash</b></p> <div class="example-contents"> <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> <tbody> diff --git a/docs/libnm-glib/html/api-index-full.html b/docs/libnm-glib/html/api-index-full.html index d344affc2..812b76654 100644 --- a/docs/libnm-glib/html/api-index-full.html +++ b/docs/libnm-glib/html/api-index-full.html @@ -406,6 +406,10 @@ </dt> <dd></dd> <dt> +<a class="link" href="NMClient.html#nm-client-get-logging" title="nm_client_get_logging ()">nm_client_get_logging</a>, function in <a class="link" href="NMClient.html" title="NMClient">NMClient</a> +</dt> +<dd></dd> +<dt> <a class="link" href="NMClient.html#nm-client-get-manager-running" title="nm_client_get_manager_running ()">nm_client_get_manager_running</a>, function in <a class="link" href="NMClient.html" title="NMClient">NMClient</a> </dt> <dd></dd> @@ -450,6 +454,10 @@ </dt> <dd></dd> <dt> +<a class="link" href="NMClient.html#nm-client-set-logging" title="nm_client_set_logging ()">nm_client_set_logging</a>, function in <a class="link" href="NMClient.html" title="NMClient">NMClient</a> +</dt> +<dd></dd> +<dt> <a class="link" href="NMClient.html#nm-client-sleep" title="nm_client_sleep ()">nm_client_sleep</a>, function in <a class="link" href="NMClient.html" title="NMClient">NMClient</a> </dt> <dd></dd> @@ -867,6 +875,10 @@ </dt> <dd></dd> <dt> +<a class="link" href="NMDeviceWifi.html#NMDeviceWifiRequestScanFn" title="NMDeviceWifiRequestScanFn ()">NMDeviceWifiRequestScanFn</a>, user_function in <a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi">NMDeviceWifi</a> +</dt> +<dd></dd> +<dt> <a class="link" href="NMDeviceWimax.html#NMDeviceWimax-struct" title="NMDeviceWimax">NMDeviceWimax</a>, struct in <a class="link" href="NMDeviceWimax.html" title="NMDeviceWimax">NMDeviceWimax</a> </dt> <dd></dd> @@ -1463,6 +1475,10 @@ </dt> <dd></dd> <dt> +<a class="link" href="NMDeviceWifi.html#nm-device-wifi-request-scan-simple" title="nm_device_wifi_request_scan_simple ()">nm_device_wifi_request_scan_simple</a>, function in <a class="link" href="NMDeviceWifi.html" title="NMDeviceWifi">NMDeviceWifi</a> +</dt> +<dd></dd> +<dt> <a class="link" href="NMDeviceWimax.html#NM-DEVICE-WIMAX-ACTIVE-NSP:CAPS" title="NM_DEVICE_WIMAX_ACTIVE_NSP">NM_DEVICE_WIMAX_ACTIVE_NSP</a>, macro in <a class="link" href="NMDeviceWimax.html" title="NMDeviceWimax">NMDeviceWimax</a> </dt> <dd></dd> diff --git a/docs/libnm-glib/html/ch02.html b/docs/libnm-glib/html/ch02.html index 2a334ea98..7a81d599b 100644 --- a/docs/libnm-glib/html/ch02.html +++ b/docs/libnm-glib/html/ch02.html @@ -21,7 +21,7 @@ </tr></table> <div class="chapter"> <div class="titlepage"><div><div><h2 class="title"> -<a name="idp66208"></a>libnm-glib API Reference</h2></div></div></div> +<a name="idp189152"></a>libnm-glib API Reference</h2></div></div></div> <div class="toc"><dl> <dt> <span class="refentrytitle"><a href="NMClient.html">NMClient</a></span><span class="refpurpose"></span> diff --git a/docs/libnm-glib/html/index.html b/docs/libnm-glib/html/index.html index 339a581c2..baaf92bf4 100644 --- a/docs/libnm-glib/html/index.html +++ b/docs/libnm-glib/html/index.html @@ -15,14 +15,14 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libnm-glib Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for libnm-glib 0.9.7.995 + for libnm-glib 0.9.7.997 The latest version of this documentation can be found on-line at <a class="ulink" href="http://projects.gnome.org/NetworkManager/developers/libnm-glib/09/" target="_top">http://projects.gnome.org/NetworkManager/developers/libnm-glib/09/</a>. </p></div> <div><p class="copyright">Copyright © 2012 The NetworkManager Authors</p></div> <div><div class="legalnotice"> -<a name="idp202848"></a><p> +<a name="idp2576576"></a><p> Permission is granted to copy, distribute and/or modify this document under the terms of the <em class="citetitle">GNU Free Documentation License</em>, Version 1.1 or any later diff --git a/docs/libnm-glib/html/index.sgml b/docs/libnm-glib/html/index.sgml index 92276d7d5..b7aee356e 100644 --- a/docs/libnm-glib/html/index.sgml +++ b/docs/libnm-glib/html/index.sgml @@ -48,6 +48,7 @@ <ANCHOR id="nm-client-get-device-by-iface" href="libnm-glib/NMClient.html#nm-client-get-device-by-iface"> <ANCHOR id="nm-client-get-device-by-path" href="libnm-glib/NMClient.html#nm-client-get-device-by-path"> <ANCHOR id="nm-client-get-devices" href="libnm-glib/NMClient.html#nm-client-get-devices"> +<ANCHOR id="nm-client-get-logging" href="libnm-glib/NMClient.html#nm-client-get-logging"> <ANCHOR id="nm-client-get-manager-running" href="libnm-glib/NMClient.html#nm-client-get-manager-running"> <ANCHOR id="nm-client-get-permission-result" href="libnm-glib/NMClient.html#nm-client-get-permission-result"> <ANCHOR id="nm-client-get-state" href="libnm-glib/NMClient.html#nm-client-get-state"> @@ -57,6 +58,7 @@ <ANCHOR id="nm-client-new" href="libnm-glib/NMClient.html#nm-client-new"> <ANCHOR id="nm-client-new-async" href="libnm-glib/NMClient.html#nm-client-new-async"> <ANCHOR id="nm-client-new-finish" href="libnm-glib/NMClient.html#nm-client-new-finish"> +<ANCHOR id="nm-client-set-logging" href="libnm-glib/NMClient.html#nm-client-set-logging"> <ANCHOR id="nm-client-sleep" href="libnm-glib/NMClient.html#nm-client-sleep"> <ANCHOR id="nm-client-wimax-get-enabled" href="libnm-glib/NMClient.html#nm-client-wimax-get-enabled"> <ANCHOR id="nm-client-wimax-hardware-get-enabled" href="libnm-glib/NMClient.html#nm-client-wimax-hardware-get-enabled"> @@ -247,6 +249,7 @@ <ANCHOR id="NM-DEVICE-WIFI-ERROR-MAC-MISMATCH:CAPS" href="libnm-glib/NMDeviceWifi.html#NM-DEVICE-WIFI-ERROR-MAC-MISMATCH:CAPS"> <ANCHOR id="NM-DEVICE-WIFI-ERROR-MISSING-DEVICE-WPA-CAPS" href="libnm-glib/NMDeviceWifi.html#NM-DEVICE-WIFI-ERROR-MISSING-DEVICE-WPA-CAPS"> <ANCHOR id="NM-DEVICE-WIFI-ERROR-MISSING-DEVICE-RSN-CAPS" href="libnm-glib/NMDeviceWifi.html#NM-DEVICE-WIFI-ERROR-MISSING-DEVICE-RSN-CAPS"> +<ANCHOR id="NMDeviceWifiRequestScanFn" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifiRequestScanFn"> <ANCHOR id="NM-DEVICE-WIFI-ACTIVE-ACCESS-POINT:CAPS" href="libnm-glib/NMDeviceWifi.html#NM-DEVICE-WIFI-ACTIVE-ACCESS-POINT:CAPS"> <ANCHOR id="NM-DEVICE-WIFI-BITRATE:CAPS" href="libnm-glib/NMDeviceWifi.html#NM-DEVICE-WIFI-BITRATE:CAPS"> <ANCHOR id="NM-DEVICE-WIFI-CAPABILITIES:CAPS" href="libnm-glib/NMDeviceWifi.html#NM-DEVICE-WIFI-CAPABILITIES:CAPS"> @@ -264,6 +267,7 @@ <ANCHOR id="nm-device-wifi-get-mode" href="libnm-glib/NMDeviceWifi.html#nm-device-wifi-get-mode"> <ANCHOR id="nm-device-wifi-get-permanent-hw-address" href="libnm-glib/NMDeviceWifi.html#nm-device-wifi-get-permanent-hw-address"> <ANCHOR id="nm-device-wifi-new" href="libnm-glib/NMDeviceWifi.html#nm-device-wifi-new"> +<ANCHOR id="nm-device-wifi-request-scan-simple" href="libnm-glib/NMDeviceWifi.html#nm-device-wifi-request-scan-simple"> <ANCHOR id="NMDeviceWifi.property-details" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi.property-details"> <ANCHOR id="NMDeviceWifi--active-access-point" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi--active-access-point"> <ANCHOR id="NMDeviceWifi--bitrate" href="libnm-glib/NMDeviceWifi.html#NMDeviceWifi--bitrate"> diff --git a/docs/libnm-glib/html/libnm-glib.devhelp2 b/docs/libnm-glib/html/libnm-glib.devhelp2 index 3cf096211..2358599b1 100644 --- a/docs/libnm-glib/html/libnm-glib.devhelp2 +++ b/docs/libnm-glib/html/libnm-glib.devhelp2 @@ -63,6 +63,7 @@ <keyword type="function" name="nm_client_get_device_by_iface ()" link="NMClient.html#nm-client-get-device-by-iface"/> <keyword type="function" name="nm_client_get_device_by_path ()" link="NMClient.html#nm-client-get-device-by-path"/> <keyword type="function" name="nm_client_get_devices ()" link="NMClient.html#nm-client-get-devices"/> + <keyword type="function" name="nm_client_get_logging ()" link="NMClient.html#nm-client-get-logging"/> <keyword type="function" name="nm_client_get_manager_running ()" link="NMClient.html#nm-client-get-manager-running"/> <keyword type="function" name="nm_client_get_permission_result ()" link="NMClient.html#nm-client-get-permission-result"/> <keyword type="function" name="nm_client_get_state ()" link="NMClient.html#nm-client-get-state"/> @@ -72,6 +73,7 @@ <keyword type="function" name="nm_client_new ()" link="NMClient.html#nm-client-new"/> <keyword type="function" name="nm_client_new_async ()" link="NMClient.html#nm-client-new-async"/> <keyword type="function" name="nm_client_new_finish ()" link="NMClient.html#nm-client-new-finish"/> + <keyword type="function" name="nm_client_set_logging ()" link="NMClient.html#nm-client-set-logging"/> <keyword type="function" name="nm_client_sleep ()" link="NMClient.html#nm-client-sleep"/> <keyword type="function" name="nm_client_wimax_get_enabled ()" link="NMClient.html#nm-client-wimax-get-enabled"/> <keyword type="function" name="nm_client_wimax_hardware_get_enabled ()" link="NMClient.html#nm-client-wimax-hardware-get-enabled"/> @@ -214,6 +216,7 @@ <keyword type="struct" name="NMDeviceWifi" link="NMDeviceWifi.html#NMDeviceWifi-struct"/> <keyword type="struct" name="NMDeviceWifiClass" link="NMDeviceWifi.html#NMDeviceWifiClass"/> <keyword type="enum" name="enum NMDeviceWifiError" link="NMDeviceWifi.html#NMDeviceWifiError"/> + <keyword type="function" name="NMDeviceWifiRequestScanFn ()" link="NMDeviceWifi.html#NMDeviceWifiRequestScanFn"/> <keyword type="macro" name="NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT" link="NMDeviceWifi.html#NM-DEVICE-WIFI-ACTIVE-ACCESS-POINT:CAPS"/> <keyword type="macro" name="NM_DEVICE_WIFI_BITRATE" link="NMDeviceWifi.html#NM-DEVICE-WIFI-BITRATE:CAPS"/> <keyword type="macro" name="NM_DEVICE_WIFI_CAPABILITIES" link="NMDeviceWifi.html#NM-DEVICE-WIFI-CAPABILITIES:CAPS"/> @@ -231,6 +234,7 @@ <keyword type="function" name="nm_device_wifi_get_mode ()" link="NMDeviceWifi.html#nm-device-wifi-get-mode"/> <keyword type="function" name="nm_device_wifi_get_permanent_hw_address ()" link="NMDeviceWifi.html#nm-device-wifi-get-permanent-hw-address"/> <keyword type="function" name="nm_device_wifi_new ()" link="NMDeviceWifi.html#nm-device-wifi-new"/> + <keyword type="function" name="nm_device_wifi_request_scan_simple ()" link="NMDeviceWifi.html#nm-device-wifi-request-scan-simple"/> <keyword type="property" name="The "active-access-point" property" link="NMDeviceWifi.html#NMDeviceWifi--active-access-point"/> <keyword type="property" name="The "bitrate" property" link="NMDeviceWifi.html#NMDeviceWifi--bitrate"/> <keyword type="property" name="The "hw-address" property" link="NMDeviceWifi.html#NMDeviceWifi--hw-address"/> diff --git a/docs/libnm-glib/libnm-glib-sections.txt b/docs/libnm-glib/libnm-glib-sections.txt index 84f897c49..edd05f0e3 100644 --- a/docs/libnm-glib/libnm-glib-sections.txt +++ b/docs/libnm-glib/libnm-glib-sections.txt @@ -100,6 +100,7 @@ nm_client_get_active_connections nm_client_get_device_by_iface nm_client_get_device_by_path nm_client_get_devices +nm_client_get_logging nm_client_get_manager_running nm_client_get_permission_result nm_client_get_state @@ -109,6 +110,7 @@ nm_client_networking_set_enabled nm_client_new nm_client_new_async nm_client_new_finish +nm_client_set_logging nm_client_sleep nm_client_wimax_get_enabled nm_client_wimax_hardware_get_enabled @@ -415,6 +417,7 @@ nm_device_vlan_get_type NMDeviceWifi NMDeviceWifiClass NMDeviceWifiError +NMDeviceWifiRequestScanFn NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT NM_DEVICE_WIFI_BITRATE NM_DEVICE_WIFI_CAPABILITIES @@ -432,6 +435,7 @@ nm_device_wifi_get_hw_address nm_device_wifi_get_mode nm_device_wifi_get_permanent_hw_address nm_device_wifi_new +nm_device_wifi_request_scan_simple <SUBSECTION Standard> NM_DEVICE_WIFI NM_DEVICE_WIFI_CLASS diff --git a/docs/libnm-glib/tmpl/libnm_glib.sgml b/docs/libnm-glib/tmpl/libnm_glib.sgml index 325e10cb5..ed0710b9e 100644 --- a/docs/libnm-glib/tmpl/libnm_glib.sgml +++ b/docs/libnm-glib/tmpl/libnm_glib.sgml @@ -9,11 +9,13 @@ libnm_glib </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-access-point.sgml b/docs/libnm-glib/tmpl/nm-access-point.sgml index f869ab7c2..41cade524 100644 --- a/docs/libnm-glib/tmpl/nm-access-point.sgml +++ b/docs/libnm-glib/tmpl/nm-access-point.sgml @@ -9,11 +9,13 @@ NMAccessPoint </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-active-connection.sgml b/docs/libnm-glib/tmpl/nm-active-connection.sgml index 5bbb6b3bc..40528ae9f 100644 --- a/docs/libnm-glib/tmpl/nm-active-connection.sgml +++ b/docs/libnm-glib/tmpl/nm-active-connection.sgml @@ -9,11 +9,13 @@ NMActiveConnection </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-client.sgml b/docs/libnm-glib/tmpl/nm-client.sgml index 773592de6..c3443c406 100644 --- a/docs/libnm-glib/tmpl/nm-client.sgml +++ b/docs/libnm-glib/tmpl/nm-client.sgml @@ -9,11 +9,13 @@ NMClient </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> @@ -324,6 +326,18 @@ NMClient @Returns: +<!-- ##### FUNCTION nm_client_get_logging ##### --> +<para> + +</para> + +@client: +@level: +@domains: +@error: +@Returns: + + <!-- ##### FUNCTION nm_client_get_manager_running ##### --> <para> @@ -408,6 +422,18 @@ NMClient @Returns: +<!-- ##### FUNCTION nm_client_set_logging ##### --> +<para> + +</para> + +@client: +@level: +@domains: +@error: +@Returns: + + <!-- ##### FUNCTION nm_client_sleep ##### --> <para> diff --git a/docs/libnm-glib/tmpl/nm-device-adsl.sgml b/docs/libnm-glib/tmpl/nm-device-adsl.sgml index 286483f0a..286f2f41e 100644 --- a/docs/libnm-glib/tmpl/nm-device-adsl.sgml +++ b/docs/libnm-glib/tmpl/nm-device-adsl.sgml @@ -9,11 +9,13 @@ NMDeviceAdsl </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-bond.sgml b/docs/libnm-glib/tmpl/nm-device-bond.sgml index 16da4778e..29c46c9ad 100644 --- a/docs/libnm-glib/tmpl/nm-device-bond.sgml +++ b/docs/libnm-glib/tmpl/nm-device-bond.sgml @@ -9,11 +9,13 @@ NMDeviceBond </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-bridge.sgml b/docs/libnm-glib/tmpl/nm-device-bridge.sgml index e82e2bcb7..9d20554e6 100644 --- a/docs/libnm-glib/tmpl/nm-device-bridge.sgml +++ b/docs/libnm-glib/tmpl/nm-device-bridge.sgml @@ -9,11 +9,13 @@ NMDeviceBridge </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-bt.sgml b/docs/libnm-glib/tmpl/nm-device-bt.sgml index 265820650..e0b174258 100644 --- a/docs/libnm-glib/tmpl/nm-device-bt.sgml +++ b/docs/libnm-glib/tmpl/nm-device-bt.sgml @@ -9,11 +9,13 @@ NMDeviceBt </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-ethernet.sgml b/docs/libnm-glib/tmpl/nm-device-ethernet.sgml index ea04914ee..3f5735b58 100644 --- a/docs/libnm-glib/tmpl/nm-device-ethernet.sgml +++ b/docs/libnm-glib/tmpl/nm-device-ethernet.sgml @@ -9,11 +9,13 @@ NMDeviceEthernet </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-infiniband.sgml b/docs/libnm-glib/tmpl/nm-device-infiniband.sgml index e94c6bae6..94ad7b90f 100644 --- a/docs/libnm-glib/tmpl/nm-device-infiniband.sgml +++ b/docs/libnm-glib/tmpl/nm-device-infiniband.sgml @@ -9,11 +9,13 @@ NMDeviceInfiniband </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-modem.sgml b/docs/libnm-glib/tmpl/nm-device-modem.sgml index 259db9398..e41c07ec3 100644 --- a/docs/libnm-glib/tmpl/nm-device-modem.sgml +++ b/docs/libnm-glib/tmpl/nm-device-modem.sgml @@ -9,11 +9,13 @@ NMDeviceModem </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-olpc-mesh.sgml b/docs/libnm-glib/tmpl/nm-device-olpc-mesh.sgml index a604a43ac..20c63328b 100644 --- a/docs/libnm-glib/tmpl/nm-device-olpc-mesh.sgml +++ b/docs/libnm-glib/tmpl/nm-device-olpc-mesh.sgml @@ -9,11 +9,13 @@ NMDeviceOlpcMesh </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-vlan.sgml b/docs/libnm-glib/tmpl/nm-device-vlan.sgml index 5a58b7b26..30d839e05 100644 --- a/docs/libnm-glib/tmpl/nm-device-vlan.sgml +++ b/docs/libnm-glib/tmpl/nm-device-vlan.sgml @@ -9,11 +9,13 @@ NMDeviceVlan </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device-wifi.sgml b/docs/libnm-glib/tmpl/nm-device-wifi.sgml index 89ead82a1..3b5def393 100644 --- a/docs/libnm-glib/tmpl/nm-device-wifi.sgml +++ b/docs/libnm-glib/tmpl/nm-device-wifi.sgml @@ -9,11 +9,13 @@ NMDeviceWifi </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> @@ -100,6 +102,16 @@ NMDeviceWifi @NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_WPA_CAPS: @NM_DEVICE_WIFI_ERROR_MISSING_DEVICE_RSN_CAPS: +<!-- ##### USER_FUNCTION NMDeviceWifiRequestScanFn ##### --> +<para> + +</para> + +@device: +@error: +@user_data: + + <!-- ##### MACRO NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT ##### --> <para> @@ -241,3 +253,13 @@ NMDeviceWifi @Returns: +<!-- ##### FUNCTION nm_device_wifi_request_scan_simple ##### --> +<para> + +</para> + +@device: +@callback: +@user_data: + + diff --git a/docs/libnm-glib/tmpl/nm-device-wimax.sgml b/docs/libnm-glib/tmpl/nm-device-wimax.sgml index 8d23e4dae..d23d0231a 100644 --- a/docs/libnm-glib/tmpl/nm-device-wimax.sgml +++ b/docs/libnm-glib/tmpl/nm-device-wimax.sgml @@ -9,11 +9,13 @@ NMDeviceWimax </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-device.sgml b/docs/libnm-glib/tmpl/nm-device.sgml index 68df46f96..90be4054f 100644 --- a/docs/libnm-glib/tmpl/nm-device.sgml +++ b/docs/libnm-glib/tmpl/nm-device.sgml @@ -9,11 +9,13 @@ NMDevice </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml b/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml index 752a8b2ce..cef5854d3 100644 --- a/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml +++ b/docs/libnm-glib/tmpl/nm-dhcp4-config.sgml @@ -9,11 +9,13 @@ NMDHCP4Config </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml b/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml index d01ac192e..2c1132613 100644 --- a/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml +++ b/docs/libnm-glib/tmpl/nm-dhcp6-config.sgml @@ -9,11 +9,13 @@ NMDHCP6Config </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-glib-enum-types.sgml b/docs/libnm-glib/tmpl/nm-glib-enum-types.sgml index a60db68ef..b81a00af4 100644 --- a/docs/libnm-glib/tmpl/nm-glib-enum-types.sgml +++ b/docs/libnm-glib/tmpl/nm-glib-enum-types.sgml @@ -9,11 +9,13 @@ nm-glib-enum-types </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-glib-marshal.sgml b/docs/libnm-glib/tmpl/nm-glib-marshal.sgml index dbe724348..2f3b02806 100644 --- a/docs/libnm-glib/tmpl/nm-glib-marshal.sgml +++ b/docs/libnm-glib/tmpl/nm-glib-marshal.sgml @@ -9,11 +9,13 @@ nm-glib-marshal </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-ip4-config.sgml b/docs/libnm-glib/tmpl/nm-ip4-config.sgml index 0e33ca0b6..e015c2af7 100644 --- a/docs/libnm-glib/tmpl/nm-ip4-config.sgml +++ b/docs/libnm-glib/tmpl/nm-ip4-config.sgml @@ -9,11 +9,13 @@ NMIP4Config </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-ip6-config.sgml b/docs/libnm-glib/tmpl/nm-ip6-config.sgml index f2e66b715..f098e022f 100644 --- a/docs/libnm-glib/tmpl/nm-ip6-config.sgml +++ b/docs/libnm-glib/tmpl/nm-ip6-config.sgml @@ -9,11 +9,13 @@ NMIP6Config </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-object.sgml b/docs/libnm-glib/tmpl/nm-object.sgml index aaf91b499..93b2441ea 100644 --- a/docs/libnm-glib/tmpl/nm-object.sgml +++ b/docs/libnm-glib/tmpl/nm-object.sgml @@ -9,11 +9,13 @@ NMObject </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-remote-connection.sgml b/docs/libnm-glib/tmpl/nm-remote-connection.sgml index 594371fdc..628000c88 100644 --- a/docs/libnm-glib/tmpl/nm-remote-connection.sgml +++ b/docs/libnm-glib/tmpl/nm-remote-connection.sgml @@ -9,11 +9,13 @@ NMRemoteConnection </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-remote-settings.sgml b/docs/libnm-glib/tmpl/nm-remote-settings.sgml index 3f24a06c9..44b4d4fbc 100644 --- a/docs/libnm-glib/tmpl/nm-remote-settings.sgml +++ b/docs/libnm-glib/tmpl/nm-remote-settings.sgml @@ -9,11 +9,13 @@ NMRemoteSettings </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-secret-agent.sgml b/docs/libnm-glib/tmpl/nm-secret-agent.sgml index 428b7afde..9d23cbc56 100644 --- a/docs/libnm-glib/tmpl/nm-secret-agent.sgml +++ b/docs/libnm-glib/tmpl/nm-secret-agent.sgml @@ -9,11 +9,13 @@ NMSecretAgent </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-types.sgml b/docs/libnm-glib/tmpl/nm-types.sgml index 1469192ec..18babb0f0 100644 --- a/docs/libnm-glib/tmpl/nm-types.sgml +++ b/docs/libnm-glib/tmpl/nm-types.sgml @@ -9,11 +9,13 @@ nm-types </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-vpn-connection.sgml b/docs/libnm-glib/tmpl/nm-vpn-connection.sgml index fe3dcbe00..3086909ad 100644 --- a/docs/libnm-glib/tmpl/nm-vpn-connection.sgml +++ b/docs/libnm-glib/tmpl/nm-vpn-connection.sgml @@ -9,11 +9,13 @@ NMVPNConnection </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-vpn-enum-types.sgml b/docs/libnm-glib/tmpl/nm-vpn-enum-types.sgml index 83b976cd4..0f800cacc 100644 --- a/docs/libnm-glib/tmpl/nm-vpn-enum-types.sgml +++ b/docs/libnm-glib/tmpl/nm-vpn-enum-types.sgml @@ -9,11 +9,13 @@ nm-vpn-enum-types </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml b/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml index faa7a8cba..f4c724a87 100644 --- a/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml +++ b/docs/libnm-glib/tmpl/nm-vpn-plugin-ui-interface.sgml @@ -9,11 +9,13 @@ NMVpnPluginUiWidget </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml b/docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml index a35e6a9ab..ed0ab40b7 100644 --- a/docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml +++ b/docs/libnm-glib/tmpl/nm-vpn-plugin-utils.sgml @@ -9,11 +9,13 @@ nm-vpn-plugin-utils </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml b/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml index c04eb296f..7ece0f798 100644 --- a/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml +++ b/docs/libnm-glib/tmpl/nm-vpn-plugin.sgml @@ -9,11 +9,13 @@ NMVPNPlugin </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/tmpl/nm-wimax-nsp.sgml b/docs/libnm-glib/tmpl/nm-wimax-nsp.sgml index 4dd298b75..f5dca7a3b 100644 --- a/docs/libnm-glib/tmpl/nm-wimax-nsp.sgml +++ b/docs/libnm-glib/tmpl/nm-wimax-nsp.sgml @@ -9,11 +9,13 @@ NMWimaxNsp </para> + <!-- ##### SECTION See_Also ##### --> <para> </para> + <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libnm-glib/version.xml b/docs/libnm-glib/version.xml index fa572dcfa..1517c7856 100644 --- a/docs/libnm-glib/version.xml +++ b/docs/libnm-glib/version.xml @@ -1 +1 @@ -0.9.7.995 +0.9.7.997 diff --git a/docs/libnm-util/Makefile.in b/docs/libnm-util/Makefile.in index 59d4179ba..adddb7186 100644 --- a/docs/libnm-util/Makefile.in +++ b/docs/libnm-util/Makefile.in @@ -67,12 +67,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -191,12 +190,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/docs/libnm-util/html/api-index-full.html b/docs/libnm-util/html/api-index-full.html index 807aea99c..b3f8aa635 100644 --- a/docs/libnm-util/html/api-index-full.html +++ b/docs/libnm-util/html/api-index-full.html @@ -4198,6 +4198,10 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private </dt> <dd></dd> <dt> +<a class="link" href="libnm-util-nm-utils.html#nm-utils-wep-key-valid" title="nm_utils_wep_key_valid ()">nm_utils_wep_key_valid</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a> +</dt> +<dd></dd> +<dt> <a class="link" href="libnm-util-nm-utils.html#nm-utils-wifi-channel-to-freq" title="nm_utils_wifi_channel_to_freq ()">nm_utils_wifi_channel_to_freq</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a> </dt> <dd></dd> @@ -4213,6 +4217,10 @@ NM_SETTING_SECRET_FLAGS_ALL, macro in nm-setting-private <a class="link" href="libnm-util-nm-utils.html#nm-utils-wifi-is-channel-valid" title="nm_utils_wifi_is_channel_valid ()">nm_utils_wifi_is_channel_valid</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a> </dt> <dd></dd> +<dt> +<a class="link" href="libnm-util-nm-utils.html#nm-utils-wpa-psk-valid" title="nm_utils_wpa_psk_valid ()">nm_utils_wpa_psk_valid</a>, function in <a class="link" href="libnm-util-nm-utils.html" title="nm-utils">nm-utils</a> +</dt> +<dd></dd> <a name="idxV"></a><h3 class="title">V</h3> <dt> <a class="link" href="NMSettingVlan.html#NMVlanFlags-enum" title="enum NMVlanFlags">NMVlanFlags</a>, enum in <a class="link" href="NMSettingVlan.html" title="NMSettingVlan">NMSettingVlan</a> diff --git a/docs/libnm-util/html/ch01.html b/docs/libnm-util/html/ch01.html index cba034e17..5d0f3520c 100644 --- a/docs/libnm-util/html/ch01.html +++ b/docs/libnm-util/html/ch01.html @@ -21,7 +21,7 @@ </tr></table> <div class="chapter"> <div class="titlepage"><div><div><h2 class="title"> -<a name="idp3785600"></a>libnm-util API Reference</h2></div></div></div> +<a name="idp4128192"></a>libnm-util API Reference</h2></div></div></div> <div class="toc"><dl> <dt> <span class="refentrytitle"><a href="NMConnection.html">NMConnection</a></span><span class="refpurpose"> — Describes a connection to specific network or provider</span> diff --git a/docs/libnm-util/html/index.html b/docs/libnm-util/html/index.html index 1da1ad014..9c0b5194a 100644 --- a/docs/libnm-util/html/index.html +++ b/docs/libnm-util/html/index.html @@ -15,14 +15,14 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libnm-util Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for libnm-util 0.9.7.995 + for libnm-util 0.9.7.997 The latest version of this documentation can be found on-line at <a class="ulink" href="http://projects.gnome.org/NetworkManager/developers/libnm-util/09/" target="_top">http://projects.gnome.org/NetworkManager/developers/libnm-util/09/</a>. </p></div> <div><p class="copyright">Copyright © 2012 The NetworkManager Authors</p></div> <div><div class="legalnotice"> -<a name="idp3543120"></a><p> +<a name="idp3523760"></a><p> Permission is granted to copy, distribute and/or modify this document under the terms of the <em class="citetitle">GNU Free Documentation License</em>, Version 1.1 or any later diff --git a/docs/libnm-util/html/index.sgml b/docs/libnm-util/html/index.sgml index 330e08a9b..604f2d9b1 100644 --- a/docs/libnm-util/html/index.sgml +++ b/docs/libnm-util/html/index.sgml @@ -1416,10 +1416,12 @@ <ANCHOR id="nm-utils-ssid-to-utf8" href="libnm-util/libnm-util-nm-utils.html#nm-utils-ssid-to-utf8"> <ANCHOR id="nm-utils-uuid-generate" href="libnm-util/libnm-util-nm-utils.html#nm-utils-uuid-generate"> <ANCHOR id="nm-utils-uuid-generate-from-string" href="libnm-util/libnm-util-nm-utils.html#nm-utils-uuid-generate-from-string"> +<ANCHOR id="nm-utils-wep-key-valid" href="libnm-util/libnm-util-nm-utils.html#nm-utils-wep-key-valid"> <ANCHOR id="nm-utils-wifi-channel-to-freq" href="libnm-util/libnm-util-nm-utils.html#nm-utils-wifi-channel-to-freq"> <ANCHOR id="nm-utils-wifi-find-next-channel" href="libnm-util/libnm-util-nm-utils.html#nm-utils-wifi-find-next-channel"> <ANCHOR id="nm-utils-wifi-freq-to-channel" href="libnm-util/libnm-util-nm-utils.html#nm-utils-wifi-freq-to-channel"> <ANCHOR id="nm-utils-wifi-is-channel-valid" href="libnm-util/libnm-util-nm-utils.html#nm-utils-wifi-is-channel-valid"> +<ANCHOR id="nm-utils-wpa-psk-valid" href="libnm-util/libnm-util-nm-utils.html#nm-utils-wpa-psk-valid"> <ANCHOR id="annotation-glossterm-out" href="libnm-util/annotation-glossary.html#annotation-glossterm-out"> <ANCHOR id="annotation-glossterm-allow-none" href="libnm-util/annotation-glossary.html#annotation-glossterm-allow-none"> <ANCHOR id="annotation-glossterm-inout" href="libnm-util/annotation-glossary.html#annotation-glossterm-inout"> diff --git a/docs/libnm-util/html/libnm-util-nm-utils.html b/docs/libnm-util/html/libnm-util-nm-utils.html index eaa3def12..a70bc7446 100644 --- a/docs/libnm-util/html/libnm-util-nm-utils.html +++ b/docs/libnm-util/html/libnm-util-nm-utils.html @@ -102,6 +102,8 @@ const <span class="returnvalue">char</span> * <a class="link" href="libnm <span class="returnvalue">char</span> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-ssid-to-utf8" title="nm_utils_ssid_to_utf8 ()">nm_utils_ssid_to_utf8</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Byte-Arrays.html#GByteArray"><span class="type">GByteArray</span></a> *ssid</code></em>); <span class="returnvalue">char</span> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-uuid-generate" title="nm_utils_uuid_generate ()">nm_utils_uuid_generate</a> (<em class="parameter"><code><span class="type">void</span></code></em>); <span class="returnvalue">char</span> * <a class="link" href="libnm-util-nm-utils.html#nm-utils-uuid-generate-from-string" title="nm_utils_uuid_generate_from_string ()">nm_utils_uuid_generate_from_string</a> (<em class="parameter"><code>const <span class="type">char</span> *s</code></em>); +<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-wep-key-valid" title="nm_utils_wep_key_valid ()">nm_utils_wep_key_valid</a> (<em class="parameter"><code>const <span class="type">char</span> *key</code></em>, + <em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="type">NMWepKeyType</span></a> wep_type</code></em>); <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-wifi-channel-to-freq" title="nm_utils_wifi_channel_to_freq ()">nm_utils_wifi_channel_to_freq</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, <em class="parameter"><code>const <span class="type">char</span> *band</code></em>); <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-wifi-find-next-channel" title="nm_utils_wifi_find_next_channel ()">nm_utils_wifi_find_next_channel</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, @@ -110,6 +112,7 @@ const <span class="returnvalue">char</span> * <a class="link" href="libnm <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-wifi-freq-to-channel" title="nm_utils_wifi_freq_to_channel ()">nm_utils_wifi_freq_to_channel</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> freq</code></em>); <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-wifi-is-channel-valid" title="nm_utils_wifi_is_channel_valid ()">nm_utils_wifi_is_channel_valid</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, <em class="parameter"><code>const <span class="type">char</span> *band</code></em>); +<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnm-util-nm-utils.html#nm-utils-wpa-psk-valid" title="nm_utils_wpa_psk_valid ()">nm_utils_wpa_psk_valid</a> (<em class="parameter"><code>const <span class="type">char</span> *psk</code></em>); </pre> </div> <div class="refsect1"> @@ -1154,6 +1157,33 @@ object's <a class="link" href="NMSettingConnection.html#NMSettingConnection--id" </div> <hr> <div class="refsect2"> +<a name="nm-utils-wep-key-valid"></a><h3>nm_utils_wep_key_valid ()</h3> +<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_wep_key_valid (<em class="parameter"><code>const <span class="type">char</span> *key</code></em>, + <em class="parameter"><code><a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="type">NMWepKeyType</span></a> wep_type</code></em>);</pre> +<p> +Checks if <em class="parameter"><code>key</code></em> is a valid WEP key +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td> +<td>a string that might be a WEP key</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>wep_type</code></em> :</span></p></td> +<td>the <a class="link" href="NMSettingWirelessSecurity.html#NMWepKeyType"><span class="type">NMWepKeyType</span></a> type of the WEP key</td> +</tr> +<tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td> +<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>key</code></em> is a WEP key, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2"> <a name="nm-utils-wifi-channel-to-freq"></a><h3>nm_utils_wifi_channel_to_freq ()</h3> <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> nm_utils_wifi_channel_to_freq (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> channel</code></em>, <em class="parameter"><code>const <span class="type">char</span> *band</code></em>);</pre> @@ -1258,6 +1288,28 @@ Utility function to verify WiFi channel validity. </tbody> </table></div> </div> +<hr> +<div class="refsect2"> +<a name="nm-utils-wpa-psk-valid"></a><h3>nm_utils_wpa_psk_valid ()</h3> +<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nm_utils_wpa_psk_valid (<em class="parameter"><code>const <span class="type">char</span> *psk</code></em>);</pre> +<p> +Checks if <em class="parameter"><code>psk</code></em> is a valid WPA PSK +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>psk</code></em> :</span></p></td> +<td>a string that might be a WPA PSK</td> +</tr> +<tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td> +<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>psk</code></em> is a WPA PSK, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</td> +</tr> +</tbody> +</table></div> +</div> </div> </div> <div class="footer"> diff --git a/docs/libnm-util/html/libnm-util.devhelp2 b/docs/libnm-util/html/libnm-util.devhelp2 index 468cd5ea7..ead35c076 100644 --- a/docs/libnm-util/html/libnm-util.devhelp2 +++ b/docs/libnm-util/html/libnm-util.devhelp2 @@ -1075,10 +1075,12 @@ <keyword type="function" name="nm_utils_ssid_to_utf8 ()" link="libnm-util-nm-utils.html#nm-utils-ssid-to-utf8"/> <keyword type="function" name="nm_utils_uuid_generate ()" link="libnm-util-nm-utils.html#nm-utils-uuid-generate"/> <keyword type="function" name="nm_utils_uuid_generate_from_string ()" link="libnm-util-nm-utils.html#nm-utils-uuid-generate-from-string"/> + <keyword type="function" name="nm_utils_wep_key_valid ()" link="libnm-util-nm-utils.html#nm-utils-wep-key-valid"/> <keyword type="function" name="nm_utils_wifi_channel_to_freq ()" link="libnm-util-nm-utils.html#nm-utils-wifi-channel-to-freq"/> <keyword type="function" name="nm_utils_wifi_find_next_channel ()" link="libnm-util-nm-utils.html#nm-utils-wifi-find-next-channel"/> <keyword type="function" name="nm_utils_wifi_freq_to_channel ()" link="libnm-util-nm-utils.html#nm-utils-wifi-freq-to-channel"/> <keyword type="function" name="nm_utils_wifi_is_channel_valid ()" link="libnm-util-nm-utils.html#nm-utils-wifi-is-channel-valid"/> + <keyword type="function" name="nm_utils_wpa_psk_valid ()" link="libnm-util-nm-utils.html#nm-utils-wpa-psk-valid"/> <keyword type="constant" name="NM_CONNECTION_ERROR_UNKNOWN" link="NMConnection.html#NM-CONNECTION-ERROR-UNKNOWN:CAPS"/> <keyword type="constant" name="NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND" link="NMConnection.html#NM-CONNECTION-ERROR-CONNECTION-SETTING-NOT-FOUND:CAPS"/> <keyword type="constant" name="NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID" link="NMConnection.html#NM-CONNECTION-ERROR-CONNECTION-TYPE-INVALID:CAPS"/> diff --git a/docs/libnm-util/libnm-util-sections.txt b/docs/libnm-util/libnm-util-sections.txt index 7515e23aa..ad93832e3 100644 --- a/docs/libnm-util/libnm-util-sections.txt +++ b/docs/libnm-util/libnm-util-sections.txt @@ -1172,10 +1172,12 @@ nm_utils_slist_free nm_utils_ssid_to_utf8 nm_utils_uuid_generate nm_utils_uuid_generate_from_string +nm_utils_wep_key_valid nm_utils_wifi_channel_to_freq nm_utils_wifi_find_next_channel nm_utils_wifi_freq_to_channel nm_utils_wifi_is_channel_valid +nm_utils_wpa_psk_valid </SECTION> <SECTION> diff --git a/docs/libnm-util/tmpl/nm-utils.sgml b/docs/libnm-util/tmpl/nm-utils.sgml index d148c4446..c2bf6f995 100644 --- a/docs/libnm-util/tmpl/nm-utils.sgml +++ b/docs/libnm-util/tmpl/nm-utils.sgml @@ -365,6 +365,16 @@ nm-utils @Returns: +<!-- ##### FUNCTION nm_utils_wep_key_valid ##### --> +<para> + +</para> + +@key: +@wep_type: +@Returns: + + <!-- ##### FUNCTION nm_utils_wifi_channel_to_freq ##### --> <para> @@ -405,3 +415,12 @@ nm-utils @Returns: +<!-- ##### FUNCTION nm_utils_wpa_psk_valid ##### --> +<para> + +</para> + +@psk: +@Returns: + + diff --git a/docs/libnm-util/version.xml b/docs/libnm-util/version.xml index fa572dcfa..1517c7856 100644 --- a/docs/libnm-util/version.xml +++ b/docs/libnm-util/version.xml @@ -1 +1 @@ -0.9.7.995 +0.9.7.997 diff --git a/examples/C/Makefile.in b/examples/C/Makefile.in index fac2ace6a..cb73369bf 100644 --- a/examples/C/Makefile.in +++ b/examples/C/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -225,12 +224,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/examples/C/glib/Makefile.in b/examples/C/glib/Makefile.in index c5d4b6bbe..c043e776b 100644 --- a/examples/C/glib/Makefile.in +++ b/examples/C/glib/Makefile.in @@ -70,12 +70,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -294,12 +293,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/examples/C/qt/Makefile.in b/examples/C/qt/Makefile.in index 6de43309f..603dbdf1c 100644 --- a/examples/C/qt/Makefile.in +++ b/examples/C/qt/Makefile.in @@ -64,12 +64,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -235,12 +234,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/examples/Makefile.in b/examples/Makefile.in index ceb615615..35044e242 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -224,12 +223,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/examples/dispatcher/Makefile.in b/examples/dispatcher/Makefile.in index 362410e96..b3c40d22b 100644 --- a/examples/dispatcher/Makefile.in +++ b/examples/dispatcher/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -184,12 +183,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/examples/python/Makefile.in b/examples/python/Makefile.in index 0df7878f8..c2bed95ef 100644 --- a/examples/python/Makefile.in +++ b/examples/python/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -184,12 +183,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/examples/ruby/Makefile.in b/examples/ruby/Makefile.in index 87fe2b3a3..6093b2bb7 100644 --- a/examples/ruby/Makefile.in +++ b/examples/ruby/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -184,12 +183,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/examples/shell/Makefile.in b/examples/shell/Makefile.in index 2f5669490..54fd2c492 100644 --- a/examples/shell/Makefile.in +++ b/examples/shell/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -184,12 +183,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/include/Makefile.in b/include/Makefile.in index d0315f4cd..950999f86 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -217,12 +216,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/introspection/Makefile.in b/introspection/Makefile.in index 268ffd4e1..70707b3ca 100644 --- a/introspection/Makefile.in +++ b/introspection/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -185,12 +184,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/introspection/nm-device-wifi.xml b/introspection/nm-device-wifi.xml index 531fc8930..f8eddd703 100644 --- a/introspection/nm-device-wifi.xml +++ b/introspection/nm-device-wifi.xml @@ -119,6 +119,9 @@ <tp:flag suffix="RSN" value="0x20"> <tp:docstring>The device supports the RSN encryption/authentication protocol.</tp:docstring> </tp:flag> + <tp:flag suffix="AP" value="0x40"> + <tp:docstring>The device supports Access Point mode.</tp:docstring> + </tp:flag> </tp:flags> </interface> </node> diff --git a/libnm-glib/Makefile.in b/libnm-glib/Makefile.in index c506402bc..12e33dda4 100644 --- a/libnm-glib/Makefile.in +++ b/libnm-glib/Makefile.in @@ -70,12 +70,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -398,12 +397,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/libnm-glib/tests/Makefile.in b/libnm-glib/tests/Makefile.in index 6884817c6..636e81f24 100644 --- a/libnm-glib/tests/Makefile.in +++ b/libnm-glib/tests/Makefile.in @@ -63,12 +63,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -223,12 +222,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/libnm-util/Makefile.in b/libnm-util/Makefile.in index 0e8d88917..d74cba158 100644 --- a/libnm-util/Makefile.in +++ b/libnm-util/Makefile.in @@ -78,12 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -362,12 +361,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/libnm-util/libnm-util.ver b/libnm-util/libnm-util.ver index e40531ea3..04f2a9119 100644 --- a/libnm-util/libnm-util.ver +++ b/libnm-util/libnm-util.ver @@ -551,10 +551,12 @@ global: nm_utils_ssid_to_utf8; nm_utils_uuid_generate; nm_utils_uuid_generate_from_string; + nm_utils_wep_key_valid; nm_utils_wifi_channel_to_freq; nm_utils_wifi_find_next_channel; nm_utils_wifi_freq_to_channel; nm_utils_wifi_is_channel_valid; + nm_utils_wpa_psk_valid; nm_vlan_flags_get_type; nm_vlan_priority_map_get_type; nm_wep_key_type_get_type; diff --git a/libnm-util/nm-setting-wireless-security.c b/libnm-util/nm-setting-wireless-security.c index 404a38ad9..5dec266f3 100644 --- a/libnm-util/nm-setting-wireless-security.c +++ b/libnm-util/nm-setting-wireless-security.c @@ -695,63 +695,6 @@ nm_setting_wireless_security_get_wep_key_type (NMSettingWirelessSecurity *settin return NM_SETTING_WIRELESS_SECURITY_GET_PRIVATE (setting)->wep_key_type; } -static gboolean -verify_wep_key (const char *key, NMWepKeyType wep_type) -{ - int keylen, i; - - if (!key) - return FALSE; - - keylen = strlen (key); - if (wep_type == NM_WEP_KEY_TYPE_KEY || NM_WEP_KEY_TYPE_UNKNOWN) { - if (keylen == 10 || keylen == 26) { - /* Hex key */ - for (i = 0; i < keylen; i++) { - if (!g_ascii_isxdigit (key[i])) - return FALSE; - } - } else if (keylen == 5 || keylen == 13) { - /* ASCII key */ - for (i = 0; i < keylen; i++) { - if (!g_ascii_isprint (key[i])) - return FALSE; - } - } else - return FALSE; - - } else if (wep_type == NM_WEP_KEY_TYPE_PASSPHRASE) { - if (!keylen || keylen > 64) - return FALSE; - } - - return TRUE; -} - -static gboolean -verify_wpa_psk (const char *psk) -{ - int psklen, i; - - if (!psk) - return FALSE; - - psklen = strlen (psk); - if (psklen < 8 || psklen > 64) - return FALSE; - - if (psklen == 64) { - /* Hex PSK */ - for (i = 0; i < psklen; i++) { - if (!g_ascii_isxdigit (psk[i])) - return FALSE; - } - } - - return TRUE; -} - - static GPtrArray * need_secrets (NMSetting *setting) { @@ -769,19 +712,19 @@ need_secrets (NMSetting *setting) /* Static WEP */ if (strcmp (priv->key_mgmt, "none") == 0) { - if ((priv->wep_tx_keyidx == 0) && !verify_wep_key (priv->wep_key0, priv->wep_key_type)) { + if ((priv->wep_tx_keyidx == 0) && !nm_utils_wep_key_valid (priv->wep_key0, priv->wep_key_type)) { g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY0); return secrets; } - if ((priv->wep_tx_keyidx == 1) && !verify_wep_key (priv->wep_key1, priv->wep_key_type)) { + if ((priv->wep_tx_keyidx == 1) && !nm_utils_wep_key_valid (priv->wep_key1, priv->wep_key_type)) { g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY1); return secrets; } - if ((priv->wep_tx_keyidx == 2) && !verify_wep_key (priv->wep_key2, priv->wep_key_type)) { + if ((priv->wep_tx_keyidx == 2) && !nm_utils_wep_key_valid (priv->wep_key2, priv->wep_key_type)) { g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY2); return secrets; } - if ((priv->wep_tx_keyidx == 3) && !verify_wep_key (priv->wep_key3, priv->wep_key_type)) { + if ((priv->wep_tx_keyidx == 3) && !nm_utils_wep_key_valid (priv->wep_key3, priv->wep_key_type)) { g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_WEP_KEY3); return secrets; } @@ -791,7 +734,7 @@ need_secrets (NMSetting *setting) /* WPA-PSK infrastructure and adhoc */ if ( (strcmp (priv->key_mgmt, "wpa-none") == 0) || (strcmp (priv->key_mgmt, "wpa-psk") == 0)) { - if (!verify_wpa_psk (priv->psk)) { + if (!nm_utils_wpa_psk_valid (priv->psk)) { g_ptr_array_add (secrets, NM_SETTING_WIRELESS_SECURITY_PSK); return secrets; } @@ -921,28 +864,28 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) return FALSE; } - if (priv->wep_key0 && !verify_wep_key (priv->wep_key0, priv->wep_key_type)) { + if (priv->wep_key0 && !nm_utils_wep_key_valid (priv->wep_key0, priv->wep_key_type)) { g_set_error (error, NM_SETTING_WIRELESS_SECURITY_ERROR, NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, NM_SETTING_WIRELESS_SECURITY_WEP_KEY0); return FALSE; } - if (priv->wep_key1 && !verify_wep_key (priv->wep_key1, priv->wep_key_type)) { + if (priv->wep_key1 && !nm_utils_wep_key_valid (priv->wep_key1, priv->wep_key_type)) { g_set_error (error, NM_SETTING_WIRELESS_SECURITY_ERROR, NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, NM_SETTING_WIRELESS_SECURITY_WEP_KEY1); return FALSE; } - if (priv->wep_key2 && !verify_wep_key (priv->wep_key2, priv->wep_key_type)) { + if (priv->wep_key2 && !nm_utils_wep_key_valid (priv->wep_key2, priv->wep_key_type)) { g_set_error (error, NM_SETTING_WIRELESS_SECURITY_ERROR, NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, NM_SETTING_WIRELESS_SECURITY_WEP_KEY2); return FALSE; } - if (priv->wep_key3 && !verify_wep_key (priv->wep_key3, priv->wep_key_type)) { + if (priv->wep_key3 && !nm_utils_wep_key_valid (priv->wep_key3, priv->wep_key_type)) { g_set_error (error, NM_SETTING_WIRELESS_SECURITY_ERROR, NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, @@ -958,7 +901,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) return FALSE; } - if (priv->psk && !verify_wpa_psk (priv->psk)) { + if (priv->psk && !nm_utils_wpa_psk_valid (priv->psk)) { g_set_error (error, NM_SETTING_WIRELESS_SECURITY_ERROR, NM_SETTING_WIRELESS_SECURITY_ERROR_INVALID_PROPERTY, diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index 51ddfeb89..9d85ec9f4 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -1411,6 +1411,79 @@ nm_utils_security_valid (NMUtilsSecurityType type, } /** + * nm_utils_wep_key_valid: + * @key: a string that might be a WEP key + * @wep_type: the #NMWepKeyType type of the WEP key + * + * Checks if @key is a valid WEP key + * + * Returns: %TRUE if @key is a WEP key, %FALSE if not + */ +gboolean +nm_utils_wep_key_valid (const char *key, NMWepKeyType wep_type) +{ + int keylen, i; + + if (!key) + return FALSE; + + keylen = strlen (key); + if (wep_type == NM_WEP_KEY_TYPE_KEY || NM_WEP_KEY_TYPE_UNKNOWN) { + if (keylen == 10 || keylen == 26) { + /* Hex key */ + for (i = 0; i < keylen; i++) { + if (!g_ascii_isxdigit (key[i])) + return FALSE; + } + } else if (keylen == 5 || keylen == 13) { + /* ASCII key */ + for (i = 0; i < keylen; i++) { + if (!g_ascii_isprint (key[i])) + return FALSE; + } + } else + return FALSE; + + } else if (wep_type == NM_WEP_KEY_TYPE_PASSPHRASE) { + if (!keylen || keylen > 64) + return FALSE; + } + + return TRUE; +} + +/** + * nm_utils_wpa_psk_valid: + * @psk: a string that might be a WPA PSK + * + * Checks if @psk is a valid WPA PSK + * + * Returns: %TRUE if @psk is a WPA PSK, %FALSE if not + */ +gboolean +nm_utils_wpa_psk_valid (const char *psk) +{ + int psklen, i; + + if (!psk) + return FALSE; + + psklen = strlen (psk); + if (psklen < 8 || psklen > 64) + return FALSE; + + if (psklen == 64) { + /* Hex PSK */ + for (i = 0; i < psklen; i++) { + if (!g_ascii_isxdigit (psk[i])) + return FALSE; + } + } + + return TRUE; +} + +/** * nm_utils_ip4_addresses_from_gvalue: * @value: gvalue containing a GPtrArray of GArrays of guint32s * diff --git a/libnm-util/nm-utils.h b/libnm-util/nm-utils.h index 203d83b5c..60010f459 100644 --- a/libnm-util/nm-utils.h +++ b/libnm-util/nm-utils.h @@ -90,6 +90,9 @@ gboolean nm_utils_security_valid (NMUtilsSecurityType type, gboolean nm_utils_ap_mode_security_valid (NMUtilsSecurityType type, NMDeviceWifiCapabilities wifi_caps); +gboolean nm_utils_wep_key_valid (const char *key, NMWepKeyType wep_type); +gboolean nm_utils_wpa_psk_valid (const char *psk); + GSList *nm_utils_ip4_addresses_from_gvalue (const GValue *value); void nm_utils_ip4_addresses_to_gvalue (GSList *list, GValue *value); diff --git a/libnm-util/tests/Makefile.in b/libnm-util/tests/Makefile.in index 4a1731f9a..ee830f75f 100644 --- a/libnm-util/tests/Makefile.in +++ b/libnm-util/tests/Makefile.in @@ -65,12 +65,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -293,12 +292,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/libnm-util/tests/certs/Makefile.in b/libnm-util/tests/certs/Makefile.in index 0e60e300b..9b8f9d3db 100644 --- a/libnm-util/tests/certs/Makefile.in +++ b/libnm-util/tests/certs/Makefile.in @@ -69,12 +69,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -193,12 +192,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/m4/libnl-check.m4 b/m4/libnl-check.m4 deleted file mode 100644 index 8eef576f0..000000000 --- a/m4/libnl-check.m4 +++ /dev/null @@ -1,62 +0,0 @@ -AC_DEFUN([NM_LIBNL_CHECK], [ - AC_MSG_CHECKING([for libnl address caching bug]) - save_CFLAGS="$CFLAGS" - save_LDFLAGS="$LDFLAGS" - CFLAGS="$CFLAGS $LIBNL_CFLAGS" - LDFLAGS="$LDFLAGS $LIBNL_LIBS" - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include <stdio.h> -#include <netlink/route/addr.h> -#include <netlink/object-api.h> -]], -[[ - struct nl_handle *nlh; - struct nl_cache *cache; - struct nl_object *obj; - - nlh = nl_handle_alloc (); - if (nl_connect (nlh, NETLINK_ROUTE) < 0) { - fprintf (stderr, "couldn't connect to netlink: %s", nl_geterror ()); - return 3; - } - - cache = rtnl_addr_alloc_cache (nlh); - if (!cache || nl_cache_nitems (cache) == 0) { - fprintf (stderr, "couldn't fill address cache: %s", nl_geterror ()); - return 3; - } - - obj = nl_cache_get_first (cache); - if (nl_object_identical (obj, obj)) - return 0; - - nl_cache_get_ops (cache)->co_obj_ops->oo_id_attrs &= ~0x80; - if (nl_object_identical (obj, obj)) - return 1; - else - return 2; -]])], libnl_bug=$?, libnl_bug=$?, libnl_bug=cross) - - CFLAGS="$save_CFLAGS" - LDFLAGS="$save_LDFLAGS" - - case $libnl_bug in - 0) AC_MSG_RESULT([no]) - ;; - - 1) AC_MSG_RESULT([yes, using workaround]) - AC_DEFINE(LIBNL_NEEDS_ADDR_CACHING_WORKAROUND, 1, [Define this to hack around buggy libnl rtnl_addr caching]) - ;; - - 2) AC_MSG_RESULT([yes, and workaround doesn't work]) - AC_MSG_ERROR([Installed libnl has broken address caching; please patch or upgrade]) - ;; - - cross) AC_MSG_RESULT([cross-compiling... assuming it works!]) - ;; - - *) AC_MSG_RESULT([?]) - AC_MSG_ERROR([libnl test program failed]) - ;; -esac -]) diff --git a/man/Makefile.am b/man/Makefile.am index 973ef2c25..a2d11ee00 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,10 +1,31 @@ + +if ENABLE_DOC + +XSLTPROC = xsltproc --xinclude --nonet + +GENERATED_FILES = nm-settings.xml nm-settings.5 + +nm-settings.5: nm-settings.xml + $(XSLTPROC) $(top_srcdir)/tools/manpages-docbook.xsl $(builddir)/nm-settings.xml + +nm-settings.xml: $(top_builddir)/tools/generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la + rm -f $(builddir)/$@ + $(top_builddir)/tools/generate-settings-spec refentry $(builddir)/$@ + +else + +GENERATED_FILES = + +endif + man_MANS = \ NetworkManager.8 \ NetworkManager.conf.5 \ nm-system-settings.conf.5 \ nm-tool.1 \ nm-online.1 \ - nmcli.1 + nmcli.1 \ + $(GENERATED_FILES) EXTRA_DIST = \ $(man_MANS) \ @@ -15,5 +36,5 @@ EXTRA_DIST = \ nm-online.1.in \ nmcli.1.in -CLEANFILES = $(man_MANS) +CLEANFILES = $(man_MANS) $(GENERATED_FILES) diff --git a/man/Makefile.in b/man/Makefile.in index 03bd709e1..982763f8b 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -64,12 +64,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -119,9 +118,10 @@ am__uninstall_files_from_dir = { \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \ - "$(DESTDIR)$(man8dir)" + "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(manxdir)" man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 +manxdir = $(mandir)/manx NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -223,12 +223,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ @@ -368,13 +362,17 @@ with_dhclient = @with_dhclient@ with_dhcpcd = @with_dhcpcd@ with_netconfig = @with_netconfig@ with_resolvconf = @with_resolvconf@ +@ENABLE_DOC_TRUE@XSLTPROC = xsltproc --xinclude --nonet +@ENABLE_DOC_FALSE@GENERATED_FILES = +@ENABLE_DOC_TRUE@GENERATED_FILES = nm-settings.xml nm-settings.5 man_MANS = \ NetworkManager.8 \ NetworkManager.conf.5 \ nm-system-settings.conf.5 \ nm-tool.1 \ nm-online.1 \ - nmcli.1 + nmcli.1 \ + $(GENERATED_FILES) EXTRA_DIST = \ $(man_MANS) \ @@ -385,7 +383,7 @@ EXTRA_DIST = \ nm-online.1.in \ nmcli.1.in -CLEANFILES = $(man_MANS) +CLEANFILES = $(man_MANS) $(GENERATED_FILES) all: all-am .SUFFIXES: @@ -566,6 +564,49 @@ uninstall-man8: } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) +install-manx: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(manxdir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(manxdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(manxdir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.x[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^x][0-9a-z]*$$,x,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(manxdir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(manxdir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(manxdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(manxdir)" || exit $$?; }; \ + done; } + +uninstall-manx: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(manxdir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.x[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^x][0-9a-z]*$$,x,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(manxdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -620,7 +661,7 @@ check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: - for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \ + for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(manxdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -690,7 +731,7 @@ install-info: install-info-am install-info-am: -install-man: install-man1 install-man5 install-man8 +install-man: install-man1 install-man5 install-man8 install-manx install-pdf: install-pdf-am @@ -720,7 +761,8 @@ ps-am: uninstall-am: uninstall-man -uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 +uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 \ + uninstall-manx .MAKE: install-am install-strip @@ -730,13 +772,21 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 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-man1 \ - install-man5 install-man8 install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + install-man5 install-man8 install-manx install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-man uninstall-man1 uninstall-man5 uninstall-man8 + uninstall-man uninstall-man1 uninstall-man5 uninstall-man8 \ + uninstall-manx + + +@ENABLE_DOC_TRUE@nm-settings.5: nm-settings.xml +@ENABLE_DOC_TRUE@ $(XSLTPROC) $(top_srcdir)/tools/manpages-docbook.xsl $(builddir)/nm-settings.xml +@ENABLE_DOC_TRUE@nm-settings.xml: $(top_builddir)/tools/generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la +@ENABLE_DOC_TRUE@ rm -f $(builddir)/$@ +@ENABLE_DOC_TRUE@ $(top_builddir)/tools/generate-settings-spec refentry $(builddir)/$@ # 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. diff --git a/man/NetworkManager.8 b/man/NetworkManager.8 index 0c84af776..87b5d69f9 100644 --- a/man/NetworkManager.8 +++ b/man/NetworkManager.8 @@ -1,10 +1,10 @@ .\" NetworkManager(8) manual page .\" -.\" Copyright (C) 2005 - 2012 Red Hat, Inc. +.\" Copyright (C) 2005 - 2013 Red Hat, Inc. .\" Copyright (C) 2005 - 2009 Novell, Inc. .\" Copyright (C) 2005 Robert Love .\" -.TH NETWORKMANAGER "8" "26 July 2012" +.TH NETWORKMANAGER "8" "17 January 2012" .SH NAME NetworkManager \- network management daemon .SH SYNOPSIS @@ -150,5 +150,6 @@ which logs all PPP and PPTP frames and client/server exchanges. .BR nm\-tool (1), .BR nm\-online (1), .BR nmcli (1), -.BR NetworkManager.conf (5). +.BR NetworkManager.conf (5), +.BR nm\-settings (5). diff --git a/man/NetworkManager.8.in b/man/NetworkManager.8.in index 0c84af776..87b5d69f9 100644 --- a/man/NetworkManager.8.in +++ b/man/NetworkManager.8.in @@ -1,10 +1,10 @@ .\" NetworkManager(8) manual page .\" -.\" Copyright (C) 2005 - 2012 Red Hat, Inc. +.\" Copyright (C) 2005 - 2013 Red Hat, Inc. .\" Copyright (C) 2005 - 2009 Novell, Inc. .\" Copyright (C) 2005 Robert Love .\" -.TH NETWORKMANAGER "8" "26 July 2012" +.TH NETWORKMANAGER "8" "17 January 2012" .SH NAME NetworkManager \- network management daemon .SH SYNOPSIS @@ -150,5 +150,6 @@ which logs all PPP and PPTP frames and client/server exchanges. .BR nm\-tool (1), .BR nm\-online (1), .BR nmcli (1), -.BR NetworkManager.conf (5). +.BR NetworkManager.conf (5), +.BR nm\-settings (5). diff --git a/man/NetworkManager.conf.5 b/man/NetworkManager.conf.5 index f9588080b..e595076a2 100644 --- a/man/NetworkManager.conf.5 +++ b/man/NetworkManager.conf.5 @@ -1,8 +1,8 @@ .\" NetworkManager.conf(5) manual page .\" -.\" Copyright (C) 2010 - 2012 Red Hat, Inc. +.\" Copyright (C) 2010 - 2013 Red Hat, Inc. .\" -.TH "NetworkManager.conf" "5" "18 December 2012" "" +.TH "NetworkManager.conf" "5" "17 January 2013" "" .SH NAME NetworkManager.conf \- NetworkManager configuration file .SH SYNOPSIS @@ -160,7 +160,7 @@ warning messages. The following log domains are available: [HW, RFKILL, ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, AGENTS, SETTINGS, SUSPEND, CORE, DEVICE, OLPC, WIMAX, INFINIBAND, FIREWALL, ADSL, BOND, -VLAN]. +VLAN, BRIDGE]. .br In addition to them, these special domains can be used: [NONE, ALL, DEFAULT, DHCP, IP]. .PP @@ -234,6 +234,8 @@ BOND = Bonding device operations .br VLAN = VLAN device operations .br +BRIDGE = Bridging device operations +.br .SS [connectivity] This section controls NetworkManager's optional connectivity checking functionality. This allows NetworkManager to detect whether or not the system @@ -260,4 +262,5 @@ URI for connectivity checking. If missing, defaults to "NetworkManager is onlin .BR NetworkManager (8), .BR nmcli (1), .BR nm\-tool (1), -.BR nm\-online (1). +.BR nm\-online (1), +.BR nm\-settings (5). diff --git a/man/NetworkManager.conf.5.in b/man/NetworkManager.conf.5.in index f9588080b..e595076a2 100644 --- a/man/NetworkManager.conf.5.in +++ b/man/NetworkManager.conf.5.in @@ -1,8 +1,8 @@ .\" NetworkManager.conf(5) manual page .\" -.\" Copyright (C) 2010 - 2012 Red Hat, Inc. +.\" Copyright (C) 2010 - 2013 Red Hat, Inc. .\" -.TH "NetworkManager.conf" "5" "18 December 2012" "" +.TH "NetworkManager.conf" "5" "17 January 2013" "" .SH NAME NetworkManager.conf \- NetworkManager configuration file .SH SYNOPSIS @@ -160,7 +160,7 @@ warning messages. The following log domains are available: [HW, RFKILL, ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, AGENTS, SETTINGS, SUSPEND, CORE, DEVICE, OLPC, WIMAX, INFINIBAND, FIREWALL, ADSL, BOND, -VLAN]. +VLAN, BRIDGE]. .br In addition to them, these special domains can be used: [NONE, ALL, DEFAULT, DHCP, IP]. .PP @@ -234,6 +234,8 @@ BOND = Bonding device operations .br VLAN = VLAN device operations .br +BRIDGE = Bridging device operations +.br .SS [connectivity] This section controls NetworkManager's optional connectivity checking functionality. This allows NetworkManager to detect whether or not the system @@ -260,4 +262,5 @@ URI for connectivity checking. If missing, defaults to "NetworkManager is onlin .BR NetworkManager (8), .BR nmcli (1), .BR nm\-tool (1), -.BR nm\-online (1). +.BR nm\-online (1), +.BR nm\-settings (5). diff --git a/man/nm-settings.5 b/man/nm-settings.5 new file mode 100644 index 000000000..86e8cd522 --- /dev/null +++ b/man/nm-settings.5 @@ -0,0 +1,2669 @@ +'\" t +.\" Title: nm-settings +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 08 February 2013 +.\" Manual: Configuration +.\" Source: NetworkManager 0.9.7.997 +.\" Language: English +.\" +.TH "NM\-SETTINGS" "5" "08 February 2013" "NetworkManager 0\&.9\&.7\&.997" "Configuration" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +nm-settings \- Description of settings and parameters of NetworkManager connections\&. +.SH "DESCRIPTION" +.PP +NetworkManager is based on a concept of connections\&. These connections are then applied to a device to make an active network connection\&. Users can create as many connections as they see fit\&. The connections are handled by NetworkManager via +\fIsettings service\fR +and are exported on D\-Bus (\fI/org/freedesktop/NetworkManager/Settings/<num>\fR +objects)\&. The conceptual objects can be described as follows: +.PP +Connection +.RS 4 +A specific, encapsulated, independent group of settings describing all the configuration required to connect to a specific network\&. It is referred to by a unique identifier called the UUID\&. A connection is tied to a one specific device type, but not necessarily a specific hardware device\&. It is composed of one or more +\fISettings\fR +objects\&. +.RE +.PP +Setting +.RS 4 +A group of related key/value pairs describing a specific piece of a +\fIConnection\fR\&. Settings keys and allowed values are described in the tables below\&. Developers can find the settings objects in the libnm\-util sources\&. Look for the +\fBclass_init\fR +functions near the bottoms of each setting source file\&. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&1.\ \&802-1x setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +802\-1x +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +eap +T}:T{ +array of string +T}:T{ +[] +T}:T{ +The allowed EAP method to be used when authenticating to the network with 802\&.1x\&. Valid methods are: \*(Aqleap\*(Aq, \*(Aqmd5\*(Aq, \*(Aqtls\*(Aq, \*(Aqpeap\*(Aq, \*(Aqttls\*(Aq, and \*(Aqfast\*(Aq\&. Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations\&. +T} +T{ +identity +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Identity string for EAP authentication methods\&. Often the user\*(Aqs user or login name\&. +T} +T{ +anonymous\-identity +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Anonymous identity string for EAP authentication methods\&. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP\-TTLS\&. +T} +T{ +pac\-file +T}:T{ +string +T}:T{ +\ \& +T}:T{ +UTF\-8 encoded file path containing PAC for EAP\-FAST\&. +T} +T{ +ca\-cert +T}:T{ +byte array +T}:T{ +[] +T}:T{ +Contains the CA certificate if used by the EAP method specified in the \*(Aqeap\*(Aq property\&. Certificate data is specified using a \*(Aqscheme\*(Aq; two are currently supported: blob and path\&. When using the blob scheme (which is backwards compatible with NM 0\&.7\&.x) this property should be set to the certificate\*(Aqs DER encoded data\&. When using the path scheme, this property should be set to the full UTF\-8 encoded path of the certificate, prefixed with the string \*(Aqfile://\*(Aq and ending with a terminating NULL byte\&. This property can be unset even if the EAP method supports CA certificates, but this allows man\-in\-the\-middle attacks and is NOT recommended\&. +T} +T{ +ca\-path +T}:T{ +string +T}:T{ +\ \& +T}:T{ +UTF\-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the \*(Aqca\-cert\*(Aq property\&. +T} +T{ +subject\-match +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Substring to be matched against the subject of the certificate presented by the authentication server\&. When unset, no verification of the authentication server certificate\*(Aqs subject is performed\&. +T} +T{ +altsubject\-matches +T}:T{ +array of string +T}:T{ +[] +T}:T{ +List of strings to be matched against the altSubjectName of the certificate presented by the authentication server\&. If the list is empty, no verification of the server certificate\*(Aqs altSubjectName is performed\&. +T} +T{ +client\-cert +T}:T{ +byte array +T}:T{ +[] +T}:T{ +Contains the client certificate if used by the EAP method specified in the \*(Aqeap\*(Aq property\&. Certificate data is specified using a \*(Aqscheme\*(Aq; two are currently supported: blob and path\&. When using the blob scheme (which is backwards compatible with NM 0\&.7\&.x) this property should be set to the certificate\*(Aqs DER encoded data\&. When using the path scheme, this property should be set to the full UTF\-8 encoded path of the certificate, prefixed with the string \*(Aqfile://\*(Aq and ending with a terminating NULL byte\&. +T} +T{ +phase1\-peapver +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Forces which PEAP version is used when PEAP is set as the EAP method in \*(Aqeap\*(Aq property\&. When unset, the version reported by the server will be used\&. Sometimes when using older RADIUS servers, it is necessary to force the client to use a particular PEAP version\&. To do so, this property may be set to \*(Aq0\*(Aq or \*(Aq1\*(Aq to force that specific PEAP version\&. +T} +T{ +phase1\-peaplabel +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Forces use of the new PEAP label during key derivation\&. Some RADIUS servers may require forcing the new PEAP label to interoperate with PEAPv1\&. Set to \*(Aq1\*(Aq to force use of the new PEAP label\&. See the wpa_supplicant documentation for more details\&. +T} +T{ +phase1\-fast\-provisioning +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Enables or disables in\-line provisioning of EAP\-FAST credentials when FAST is specified as the EAP method in the #NMSetting8021x:eap property\&. Allowed values are \*(Aq0\*(Aq (disabled), \*(Aq1\*(Aq (allow unauthenticated provisioning), \*(Aq2\*(Aq (allow authenticated provisioning), and \*(Aq3\*(Aq (allow both authenticated and unauthenticated provisioning)\&. See the wpa_supplicant documentation for more details\&. +T} +T{ +phase2\-auth +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Specifies the allowed \*(Aqphase 2\*(Aq inner non\-EAP authentication methods when an EAP method that uses an inner TLS tunnel is specified in the \*(Aqeap\*(Aq property\&. Recognized non\-EAP phase2 methods are \*(Aqpap\*(Aq, \*(Aqchap\*(Aq, \*(Aqmschap\*(Aq, \*(Aqmschapv2\*(Aq, \*(Aqgtc\*(Aq, \*(Aqotp\*(Aq, \*(Aqmd5\*(Aq, and \*(Aqtls\*(Aq\&. Each \*(Aqphase 2\*(Aq inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details\&. +T} +T{ +phase2\-autheap +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Specifies the allowed \*(Aqphase 2\*(Aq inner EAP\-based authentication methods when an EAP method that uses an inner TLS tunnel is specified in the \*(Aqeap\*(Aq property\&. Recognized EAP\-based \*(Aqphase 2\*(Aq methods are \*(Aqmd5\*(Aq, \*(Aqmschapv2\*(Aq, \*(Aqotp\*(Aq, \*(Aqgtc\*(Aq, and \*(Aqtls\*(Aq\&. Each \*(Aqphase 2\*(Aq inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details\&. +T} +T{ +phase2\-ca\-cert +T}:T{ +byte array +T}:T{ +[] +T}:T{ +Contains the \*(Aqphase 2\*(Aq CA certificate if used by the EAP method specified in the \*(Aqphase2\-auth\*(Aq or \*(Aqphase2\-autheap\*(Aq properties\&. Certificate data is specified using a \*(Aqscheme\*(Aq; two are currentlysupported: blob and path\&. When using the blob scheme (which is backwards compatible with NM 0\&.7\&.x) this property should be set to the certificate\*(Aqs DER encoded data\&. When using the path scheme, this property should be set to the full UTF\-8 encoded path of the certificate, prefixed with the string \*(Aqfile://\*(Aq and ending with a terminating NULL byte\&. This property can be unset even if the EAP method supports CA certificates, but this allows man\-in\-the\-middle attacks and is NOT recommended\&. +T} +T{ +phase2\-ca\-path +T}:T{ +string +T}:T{ +\ \& +T}:T{ +UTF\-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the \*(Aqphase2\-ca\-cert\*(Aq property\&. +T} +T{ +phase2\-subject\-match +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Substring to be matched against the subject of the certificate presented by the authentication server during the inner \*(Aqphase2\*(Aq authentication\&. When unset, no verification of the authentication server certificate\*(Aqs subject is performed\&. +T} +T{ +phase2\-altsubject\-matches +T}:T{ +array of string +T}:T{ +[] +T}:T{ +List of strings to be matched against List of strings to be matched against the altSubjectName of the certificate presented by the authentication server during the inner \*(Aqphase 2\*(Aq authentication\&. If the list is empty, no verification of the server certificate\*(Aqs altSubjectName is performed\&. +T} +T{ +phase2\-client\-cert +T}:T{ +byte array +T}:T{ +[] +T}:T{ +Contains the \*(Aqphase 2\*(Aq client certificate if used by the EAP method specified in the \*(Aqphase2\-auth\*(Aq or \*(Aqphase2\-autheap\*(Aq properties\&. Certificate data is specified using a \*(Aqscheme\*(Aq; two are currently supported: blob and path\&. When using the blob scheme (which is backwards compatible with NM 0\&.7\&.x) this property should be set to the certificate\*(Aqs DER encoded data\&. When using the path scheme, this property should be set to the full UTF\-8 encoded path of the certificate, prefixed with the string \*(Aqfile://\*(Aq and ending with a terminating NULL byte\&. +T} +T{ +password +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Password used for EAP authentication methods\&. +T} +T{ +password\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the 802\&.1x password\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +password\-raw +T}:T{ +byte array +T}:T{ +[] +T}:T{ +Password used for EAP authentication methods as a byte array +T} +T{ +password\-raw\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the 802\&.1x password byte array\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +private\-key +T}:T{ +byte array +T}:T{ +[] +T}:T{ +Contains the private key when the \*(Aqeap\*(Aq property is set to \*(Aqtls\*(Aq\&. Key data is specified using a \*(Aqscheme\*(Aq; two are currently supported: blob and path\&. When using the blob scheme and private keys, this property should be set to the key\*(Aqs encrypted PEM encoded data\&. When using private keys with the path scheme, this property should be set to the full UTF\-8 encoded path of the key, prefixed with the string \*(Aqfile://\*(Aq and ending with a terminating NULL byte\&. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the \*(Aqprivate\-key\-password\*(Aq property must be set to password used to decrypt the PKCS#12 certificate and key\&. When using PKCS#12 files and the path scheme, this property should be set to the full UTF\-8 encoded path of the key, prefixed with the string \*(Aqfile://\*(Aq and and ending with a terminating NULL byte, and as with the blob scheme the \*(Aqprivate\-key\-password\*(Aq property must be set to the password used to decode the PKCS#12 private key and certificate\&. +T} +T{ +private\-key\-password +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The password used to decrypt the private key specified in the \*(Aqprivate\-key\*(Aq property when the private key either uses the path scheme, or if the private key is a PKCS#12 format key\&. +T} +T{ +private\-key\-password\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the 802\&.1x private key password\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +phase2\-private\-key +T}:T{ +byte array +T}:T{ +[] +T}:T{ +Contains the \*(Aqphase 2\*(Aq inner private key when the \*(Aqphase2\-auth\*(Aq or \*(Aqphase2\-autheap\*(Aq property is set to \*(Aqtls\*(Aq\&. Key data is specified using a \*(Aqscheme\*(Aq; two are currently supported: blob and path\&. When using the blob scheme and private keys, this property should be set to the key\*(Aqs encrypted PEM encoded data\&. When using private keys with the path scheme, this property should be set to the full UTF\-8 encoded path of the key, prefixed with the string \*(Aqfile://\*(Aq and ending with a terminating NULL byte\&. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the \*(Aqphase2\-private\-key\-password\*(Aq property must be set to password used to decrypt the PKCS#12 certificate and key\&. When using PKCS#12 files and the path scheme, this property should be set to the full UTF\-8 encoded path of the key, prefixed with the string \*(Aqfile://\*(Aq and and ending with a terminating NULL byte, and as with the blob scheme the \*(Aqphase2\-private\-key\-password\*(Aq property must be set to the password used to decode the PKCS#12 private key and certificate\&. +T} +T{ +phase2\-private\-key\-password +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The password used to decrypt the \*(Aqphase 2\*(Aq private key specified in the \*(Aqprivate\-key\*(Aq property when the phase2 private key either uses the path scheme, or if the phase2 private key is a PKCS#12 format key\&. +T} +T{ +phase2\-private\-key\-password\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the 802\&.1x phase2 private key password\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +system\-ca\-certs +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +When TRUE, overrides \*(Aqca\-path\*(Aq and \*(Aqphase2\-ca\-path\*(Aq properties using the system CA directory specified at configure time with the \-\-system\-ca\-path switch\&. The certificates in this directory are added to the verification chain in addition to any certificates specified by the \*(Aqca\-cert\*(Aq and \*(Aqphase2\-ca\-cert\*(Aq properties\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&2.\ \&adsl setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +adsl +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +username +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Username used to authenticate with the pppoa service\&. +T} +T{ +password +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Password used to authenticate with the pppoa service\&. +T} +T{ +password\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the ADSL password\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +protocol +T}:T{ +string +T}:T{ +\ \& +T}:T{ +ADSL connection protocol\&. +T} +T{ +encapsulation +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Encapsulation of ADSL connection +T} +T{ +vpi +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +VPI of ADSL connection +T} +T{ +vci +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +VCI of ADSL connection +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&3.\ \&bluetooth setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +bluetooth +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +bdaddr +T}:T{ +byte array +T}:T{ +[] +T}:T{ +The Bluetooth address of the device +T} +T{ +type +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Either \*(Aqdun\*(Aq for Dial\-Up Networking connections or \*(Aqpanu\*(Aq for Personal Area Networking connections\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&4.\ \&bond setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +bond +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +interface\-name +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The name of the virtual in\-kernel bonding network interface +T} +T{ +options +T}:T{ +dict of (string::string) +T}:T{ +[ ] +T}:T{ +Dictionary of key/value pairs of bonding options\&. Both keys and values must be strings\&. Option names must contain only alphanumeric characters (ie, [a\-zA\-Z0\-9])\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&5.\ \&bridge setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +bridge +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +interface\-name +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The name of the virtual in\-kernel bridging network interface +T} +T{ +stp +T}:T{ +boolean +T}:T{ +TRUE +T}:T{ +Controls whether Spanning Tree Protocol (STP) is enabled for this bridge\&. +T} +T{ +priority +T}:T{ +uint32 +T}:T{ +128 +T}:T{ +Sets the Spanning Tree Protocol (STP) priority for this bridge\&. Lower values are \*(Aqbetter\*(Aq; the lowest priority bridge will be elected the root bridge\&. +T} +T{ +forward\-delay +T}:T{ +uint32 +T}:T{ +15 +T}:T{ +The Spanning Tree Protocol (STP) forwarding delay, in seconds\&. +T} +T{ +hello\-time +T}:T{ +uint32 +T}:T{ +2 +T}:T{ +The Spanning Tree Protocol (STP) hello time, in seconds\&. +T} +T{ +max\-age +T}:T{ +uint32 +T}:T{ +20 +T}:T{ +The Spanning Tree Protocol (STP) maximum message age, in seconds\&. +T} +T{ +ageing\-time +T}:T{ +uint32 +T}:T{ +300 +T}:T{ +The ethernet MAC address aging time, in seconds\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&6.\ \&bridge-port setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +bridge\-port +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +priority +T}:T{ +uint32 +T}:T{ +32 +T}:T{ +The Spanning Tree Protocol (STP) priority of this bridge port +T} +T{ +path\-cost +T}:T{ +uint32 +T}:T{ +100 +T}:T{ +The Spanning Tree Protocol (STP) port cost for destinations via this port\&. +T} +T{ +hairpin\-mode +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +Enables or disabled \*(Aqhairpin mode\*(Aq for the port, which allows frames to be sent back out through the port the frame was received on\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&7.\ \&cdma setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +cdma +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +number +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Number to dial when establishing a PPP data session with the CDMA\-based mobile broadband network\&. If not specified, the default number (#777) is used when required\&. +T} +T{ +username +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Username used to authenticate with the network, if required\&. Note that many providers do not require a username or accept any username\&. +T} +T{ +password +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Password used to authenticate with the network, if required\&. Note that many providers do not require a password or accept any password\&. +T} +T{ +password\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the CDMA password\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&8.\ \&connection setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +connection +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +id +T}:T{ +string +T}:T{ +\ \& +T}:T{ +User\-readable connection identifier/name\&. Must be one or more characters and may change over the lifetime of the connection if the user decides to rename it\&. +T} +T{ +uuid +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Universally unique connection identifier\&. Must be in the format \*(Aq2815492f\-7e56\-435e\-b2e9\-246bd7cdc664\*(Aq (ie, contains only hexadecimal characters and \*(Aq\-\*(Aq)\&. The UUID should be assigned when the connection is created and never changed as long as the connection still applies to the same network\&. For example, it should not be changed when the user changes the connection\*(Aqs \*(Aqid\*(Aq, but should be recreated when the WiFi SSID, mobile broadband network provider, or the connection type changes\&. +T} +T{ +type +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Base type of the connection\&. For hardware\-dependent connections, should contain the setting name of the hardware\-type specific setting (ie, \*(Aq802\-3\-ethernet\*(Aq or \*(Aq802\-11\-wireless\*(Aq or \*(Aqbluetooth\*(Aq, etc), and for non\-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type (ie, \*(Aqvpn\*(Aq or \*(Aqbridge\*(Aq, etc)\&. +T} +T{ +permissions +T}:T{ +array of string +T}:T{ +[] +T}:T{ +An array of strings defining what access a given user has to this connection\&. If this is NULL or empty, all users are allowed to access this connection\&. Otherwise a user is allowed to access this connection if and only if they are in this array\&. Each entry is of the form "[type]:[id]:[reserved]", for example: "user:dcbw:blah" At this time only the \*(Aquser\*(Aq [type] is allowed\&. Any other values are ignored and reserved for future use\&. [id] is the username that this permission refers to, which may not contain the \*(Aq:\*(Aq character\&. Any [reserved] information (if present) must be ignored and is reserved for future use\&. All of [type], [id], and [reserved] must be valid UTF\-8\&. +T} +T{ +autoconnect +T}:T{ +boolean +T}:T{ +TRUE +T}:T{ +If TRUE, NetworkManager will activate this connection when its network resources are available\&. If FALSE, the connection must be manually activated by the user or some other mechanism\&. +T} +T{ +timestamp +T}:T{ +uint64 +T}:T{ +0 +T}:T{ +Timestamp (in seconds since the Unix Epoch) that the connection was last successfully activated\&. Settings services should update the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp\&. +T} +T{ +read\-only +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, the connection is read\-only and cannot be changed by the user or any other mechanism\&. This is normally set for system connections whose plugin cannot yet write updated connections back out\&. +T} +T{ +zone +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The trust level of a the connection\&.Free form case\-insensitive string (for example "Home", "Work", "Public")\&. NULL or unspecified zone means the connection will be placed in the default zone as defined by the firewall\&. +T} +T{ +master +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Interface name of the master device or UUID of the master connection +T} +T{ +slave\-type +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Setting name describing the type of slave this connection is (ie, \*(Aqbond\*(Aq) or NULL if this connection is not a slave\&. +T} +T{ +secondaries +T}:T{ +array of string +T}:T{ +[] +T}:T{ +List of connection UUIDs that should be activated when the base connection itself is activated\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&9.\ \&gsm setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +gsm +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +number +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Number to dial when establishing a PPP data session with the GSM\-based mobile broadband network\&. Many modems do not require PPP for connections to the mobile network and thus this property should be left blank, which allows NetworkManager to select the appropriate settings automatically\&. +T} +T{ +username +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Username used to authenticate with the network, if required\&. Note that many providers do not require a username or accept any username\&. +T} +T{ +password +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Password used to authenticate with the network, if required\&. Note that many providers do not require a password or accept any password\&. +T} +T{ +password\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the GSM password\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +apn +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The GPRS Access Point Name specifying the APN used when establishing a data session with the GSM\-based network\&. The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or just a provider\-specific walled\-garden, so it is important to use the correct APN for the user\*(Aqs mobile broadband plan\&. The APN may only be composed of the characters a\-z, 0\-9, \&., and \- per GSM 03\&.60 Section 14\&.9\&. +T} +T{ +network\-id +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The Network ID (GSM LAI format, ie MCC\-MNC) to force specific network registration\&. If the Network ID is specified, NetworkManager will attempt to force the device to register only on the specified network\&. This can be used to ensure that the device does not roam when direct roaming control of the device is not otherwise possible\&. +T} +T{ +network\-type +T}:T{ +int32 +T}:T{ +\-1 +T}:T{ +Network preference to force the device to only use specific network technologies\&. The permitted values are: \-1: any, 0: 3G only, 1: GPRS/EDGE only, 2: prefer 3G, 3: prefer 2G, 4: prefer 4G/LTE, 5: 4G/LTE only\&. Note that not all devices allow network preference control\&. +T} +T{ +pin +T}:T{ +string +T}:T{ +\ \& +T}:T{ +If the SIM is locked with a PIN it must be unlocked before any other operations are requested\&. Specify the PIN here to allow operation of the device\&. +T} +T{ +pin\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the GSM SIM PIN\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +allowed\-bands +T}:T{ +uint32 +T}:T{ +1 +T}:T{ +Bitfield of allowed frequency bands\&. Note that not all devices allow frequency band control\&. +T} +T{ +home\-only +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +When TRUE, only connections to the home network will be allowed\&. Connections to roaming networks will not be made\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&10.\ \&infiniband setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +infiniband +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +mac\-address +T}:T{ +byte array +T}:T{ +[] +T}:T{ +If specified, this connection will only apply to the IPoIB device whose permanent MAC address matches\&. This property does not change the MAC address of the device (i\&.e\&. MAC spoofing)\&. +T} +T{ +mtu +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames\&. +T} +T{ +transport\-mode +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The IPoIB transport mode\&. Either \*(Aqdatagram\*(Aq or \*(Aqconnected\*(Aq\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&11.\ \&ipv4 setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +ipv4 +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +method +T}:T{ +string +T}:T{ +\ \& +T}:T{ +IPv4 configuration method\&. If \*(Aqauto\*(Aq is specified then the appropriate automatic method (DHCP, PPP, etc) is used for the interface and most other properties can be left unset\&. If \*(Aqlink\-local\*(Aq is specified, then a link\-local address in the 169\&.254/16 range will be assigned to the interface\&. If \*(Aqmanual\*(Aq is specified, static IP addressing is used and at least one IP address must be given in the \*(Aqaddresses\*(Aq property\&. If \*(Aqshared\*(Aq is specified (indicating that this connection will provide network access to other computers) then the interface is assigned an address in the 10\&.42\&.x\&.1/24 range and a DHCP and forwarding DNS server are started, and the interface is NAT\-ed to the current default network connection\&. \*(Aqdisabled\*(Aq means IPv4 will not be used on this connection\&. This property must be set\&. +T} +T{ +dns +T}:T{ +array of uint32 +T}:T{ +[] +T}:T{ +List of DNS servers (network byte order)\&. For the \*(Aqauto\*(Aq method, these DNS servers are appended to those (if any) returned by automatic configuration\&. DNS servers cannot be used with the \*(Aqshared\*(Aq, \*(Aqlink\-local\*(Aq, or \*(Aqdisabled\*(Aq methods as there is no upstream network\&. In all other methods, these DNS servers are used as the only DNS servers for this connection\&. +T} +T{ +dns\-search +T}:T{ +array of string +T}:T{ +[] +T}:T{ +List of DNS search domains\&. For the \*(Aqauto\*(Aq method, these search domains are appended to those returned by automatic configuration\&. Search domains cannot be used with the \*(Aqshared\*(Aq, \*(Aqlink\-local\*(Aq, or \*(Aqdisabled\*(Aq methods as there is no upstream network\&. In all other methods, these search domains are used as the only search domains for this connection\&. +T} +T{ +addresses +T}:T{ +array of array of uint32 +T}:T{ +[] +T}:T{ +Array of IPv4 address structures\&. Each IPv4 address structure is composed of 3 32\-bit values; the first being the IPv4 address (network byte order), the second the prefix (1 \- 32), and last the IPv4 gateway (network byte order)\&. The gateway may be left as 0 if no gateway exists for that subnet\&. For the \*(Aqauto\*(Aq method, given IP addresses are appended to those returned by automatic configuration\&. Addresses cannot be used with the \*(Aqshared\*(Aq, \*(Aqlink\-local\*(Aq, or \*(Aqdisabled\*(Aq methods as addressing is either automatic or disabled with these methods\&. +T} +T{ +routes +T}:T{ +array of array of uint32 +T}:T{ +[] +T}:T{ +Array of IPv4 route structures\&. Each IPv4 route structure is composed of 4 32\-bit values; the first being the destination IPv4 network or address (network byte order), the second the destination network or address prefix (1 \- 32), the third being the next\-hop (network byte order) if any, and the fourth being the route metric\&. For the \*(Aqauto\*(Aq method, given IP routes are appended to those returned by automatic configuration\&. Routes cannot be used with the \*(Aqshared\*(Aq, \*(Aqlink\-local\*(Aq, or \*(Aqdisabled\*(Aq, methods as there is no upstream network\&. +T} +T{ +ignore\-auto\-routes +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +When the method is set to \*(Aqauto\*(Aq and this property to TRUE, automatically configured routes are ignored and only routes specified in the \*(Aqroutes\*(Aq property, if any, are used\&. +T} +T{ +ignore\-auto\-dns +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +When the method is set to \*(Aqauto\*(Aq and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the \*(Aqdns\*(Aq and \*(Aqdns\-search\*(Aq properties, if any, are used\&. +T} +T{ +dhcp\-client\-id +T}:T{ +string +T}:T{ +\ \& +T}:T{ +A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options\&. +T} +T{ +dhcp\-send\-hostname +T}:T{ +boolean +T}:T{ +TRUE +T}:T{ +If TRUE, a hostname is sent to the DHCP server when acquiring a lease\&. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer\&. If the \*(Aqdhcp\-hostname\*(Aq property is empty and this property is TRUE, the current persistent hostname of the computer is sent\&. +T} +T{ +dhcp\-hostname +T}:T{ +string +T}:T{ +\ \& +T}:T{ +If the \*(Aqdhcp\-send\-hostname\*(Aq property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease\&. +T} +T{ +never\-default +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, this connection will never be the default IPv4 connection, meaning it will never be assigned the default route by NetworkManager\&. +T} +T{ +may\-fail +T}:T{ +boolean +T}:T{ +TRUE +T}:T{ +If TRUE, allow overall network configuration to proceed even if IPv4 configuration times out\&. Note that at least one IP configuration must succeed or overall network configuration will still fail\&. For example, in IPv6\-only networks, setting this property to TRUE allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&12.\ \&ipv6 setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +ipv6 +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +method +T}:T{ +string +T}:T{ +\ \& +T}:T{ +IPv6 configuration method\&. If \*(Aqauto\*(Aq is specified then the appropriate automatic method (PPP, router advertisement, etc) is used for the device and most other properties can be left unset\&. To force the use of DHCP only, specify \*(Aqdhcp\*(Aq; this method is only valid for ethernet\-based hardware\&. If \*(Aqlink\-local\*(Aq is specified, then an IPv6 link\-local address will be assigned to the interface\&. If \*(Aqmanual\*(Aq is specified, static IP addressing is used and at least one IP address must be given in the \*(Aqaddresses\*(Aq property\&. If \*(Aqignored\*(Aq is specified, IPv6 configuration is not done\&. This property must be set\&. NOTE: the \*(Aqshared\*(Aq methodis not yet supported\&. +T} +T{ +dhcp\-hostname +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The specified name will be sent to the DHCP server when acquiring a lease\&. +T} +T{ +dns +T}:T{ +array of byte array +T}:T{ +[] +T}:T{ +Array of DNS servers, where each member of the array is a byte array containing the IPv6 address of the DNS server (in network byte order)\&. For the \*(Aqauto\*(Aq method, these DNS servers are appended to those (if any) returned by automatic configuration\&. DNS servers cannot be used with the \*(Aqshared\*(Aq or \*(Aqlink\-local\*(Aq methods as there is no usptream network\&. In all other methods, these DNS servers are used as the only DNS servers for this connection\&. +T} +T{ +dns\-search +T}:T{ +array of string +T}:T{ +[] +T}:T{ +List of DNS search domains\&. For the \*(Aqauto\*(Aq method, these search domains are appended to those returned by automatic configuration\&. Search domains cannot be used with the \*(Aqshared\*(Aq or \*(Aqlink\-local\*(Aq methods as there is no upstream network\&. In all other methods, these search domains are used as the only search domains for this connection\&. +T} +T{ +addresses +T}:T{ +array of (byte array, uint32, byte array) +T}:T{ +[] +T}:T{ +Array of IPv6 address structures\&. Each IPv6 address structure is composed of 3 members, the first being a byte array containing the IPv6 address (network byte order), the second a 32\-bit integer containing the IPv6 address prefix, and the third a byte array containing the IPv6 address (network byte order) of the gateway associated with this address, if any\&. If no gateway is given, the third element should be given as all zeros\&. For the \*(Aqauto\*(Aq method, given IP addresses are appended to those returned by automatic configuration\&. Addresses cannot be used with the \*(Aqshared\*(Aq or \*(Aqlink\-local\*(Aq methods as the interface is automatically assigned an address with these methods\&. +T} +T{ +routes +T}:T{ +array of (byte array, uint32, byte array, uint32) +T}:T{ +[] +T}:T{ +Array of IPv6 route structures\&. Each IPv6 route structure is composed of 4 members; the first being the destination IPv6 network or address (network byte order) as a byte array, the second the destination network or address IPv6 prefix, the third being the next\-hop IPv6 address (network byte order) if any, and the fourth being the route metric\&. For the \*(Aqauto\*(Aq method, given IP routes are appended to those returned by automatic configuration\&. Routes cannot be used with the \*(Aqshared\*(Aq or \*(Aqlink\-local\*(Aq methods because there is no upstream network\&. +T} +T{ +ignore\-auto\-routes +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +When the method is set to \*(Aqauto\*(Aq or \*(Aqdhcp\*(Aq and this property is set to TRUE, automatically configured routes are ignored and only routes specified in the \*(Aqroutes\*(Aq property, if any, are used\&. +T} +T{ +ignore\-auto\-dns +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +When the method is set to \*(Aqauto\*(Aq or \*(Aqdhcp\*(Aq and this property is set to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the \*(Aqdns\*(Aq and \*(Aqdns\-search\*(Aq properties, if any, are used\&. +T} +T{ +never\-default +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, this connection will never be the default IPv6 connection, meaning it will never be assigned the default IPv6 route by NetworkManager\&. +T} +T{ +may\-fail +T}:T{ +boolean +T}:T{ +TRUE +T}:T{ +If TRUE, allow overall network configuration to proceed even if IPv6 configuration times out\&. Note that at least one IP configuration must succeed or overall network configuration will still fail\&. For example, in IPv4\-only networks, setting this property to TRUE allows the overall network configuration to succeed if IPv6 configuration fails but IPv4 configuration completes successfully\&. +T} +T{ +ip6\-privacy +T}:T{ +int32 +T}:T{ +\-1 +T}:T{ +Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941\&. If enabled, it makes the kernel generate a temporary IPv6 address in addition to the public one generated from MAC address via modified EUI\-64\&. This enhances privacy, but could cause problems in some applications, on the other hand\&. The permitted values are: 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses)\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&13.\ \&802-11-olpc-mesh setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +802\-11\-olpc\-mesh +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +ssid +T}:T{ +byte array +T}:T{ +[] +T}:T{ +SSID of the mesh network to join\&. +T} +T{ +channel +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Channel on which the mesh network to join is located\&. +T} +T{ +dhcp\-anycast\-address +T}:T{ +byte array +T}:T{ +[] +T}:T{ +Anycast DHCP MAC address used when requesting an IP address via DHCP\&. The specific anycast address used determines which DHCP server class answers the the request\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&14.\ \&ppp setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +ppp +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +noauth +T}:T{ +boolean +T}:T{ +TRUE +T}:T{ +If TRUE, do not require the other side (usually the PPP server) to authenticate itself to the client\&. If FALSE, require authentication from the remote side\&. In almost all cases, this should be TRUE\&. +T} +T{ +refuse\-eap +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, the EAP authentication method will not be used\&. +T} +T{ +refuse\-pap +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, the PAP authentication method will not be used\&. +T} +T{ +refuse\-chap +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, the CHAP authentication method will not be used\&. +T} +T{ +refuse\-mschap +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, the MSCHAP authentication method will not be used\&. +T} +T{ +refuse\-mschapv2 +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, the MSCHAPv2 authentication method will not be used\&. +T} +T{ +nobsdcomp +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, BSD compression will not be requested\&. +T} +T{ +nodeflate +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, \*(Aqdeflate\*(Aq compression will not be requested\&. +T} +T{ +no\-vj\-comp +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, Van Jacobsen TCP header compression will not be requested\&. +T} +T{ +require\-mppe +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, MPPE (Microsoft Point\-to\-Point Encrpytion) will be required for the PPP session\&. If either 64\-bit or 128\-bit MPPE is not available the session will fail\&. Note that MPPE is not used on mobile broadband connections\&. +T} +T{ +require\-mppe\-128 +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, 128\-bit MPPE (Microsoft Point\-to\-Point Encrpytion) will be required for the PPP session, and the \*(Aqrequire\-mppe\*(Aq property must also be set to TRUE\&. If 128\-bit MPPE is not available the session will fail\&. +T} +T{ +mppe\-stateful +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, stateful MPPE is used\&. See pppd documentation for more information on stateful MPPE\&. +T} +T{ +crtscts +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, specify that pppd should set the serial port to use hardware flow control with RTS and CTS signals\&. This value should normally be set to FALSE\&. +T} +T{ +baud +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, instruct pppd to set the serial port to the specified baudrate\&. This value should normally be left as 0 to automatically choose the speed\&. +T} +T{ +mru +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, instruct pppd to request that the peer send packets no larger than the specified size\&. If non\-zero, the MRU should be between 128 and 16384\&. +T} +T{ +mtu +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, instruct pppd to send packets no larger than the specified size\&. +T} +T{ +lcp\-echo\-failure +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, instruct pppd to presume the connection to the peer has failed if the specified number of LCP echo\-requests go unanswered by the peer\&. The \*(Aqlcp\-echo\-interval\*(Aq property must also be set to a non\-zero value if this property is used\&. +T} +T{ +lcp\-echo\-interval +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, instruct pppd to send an LCP echo\-request frame to the peer every n seconds (where n is the specified value)\&. Note that some PPP peers will respond to echo requests and some will not, and it is not possible to autodetect this\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&15.\ \&pppoe setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +pppoe +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +service +T}:T{ +string +T}:T{ +\ \& +T}:T{ +If specified, instruct PPPoE to only initiate sessions with access concentrators that provide the specified serivce\&. For most providers, this should be left blank\&. It is only required if there are multiple access concentrators or a specific service is known to be required\&. +T} +T{ +username +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Username used to authenticate with the PPPoE service\&. +T} +T{ +password +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Password used to authenticate with the PPPoE service\&. +T} +T{ +password\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the PPPoE password\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&16.\ \&serial setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +serial +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +baud +T}:T{ +uint32 +T}:T{ +57600 +T}:T{ +Speed to use for communication over the serial port\&. Note that this value usually has no effect for mobile broadband modems as they generally ignore speed settings and use the highest available speed\&. +T} +T{ +bits +T}:T{ +uint32 +T}:T{ +8 +T}:T{ +Byte\-width of the serial communication\&. The 8 in \*(Aq8n1\*(Aq for example\&. +T} +T{ +parity +T}:T{ +gchar +T}:T{ +110 +T}:T{ +Parity setting of the serial port\&. Either \*(AqE\*(Aq for even parity, \*(Aqo\*(Aq for odd parity, or \*(Aqn\*(Aq for no parity\&. +T} +T{ +stopbits +T}:T{ +uint32 +T}:T{ +1 +T}:T{ +Number of stop bits for communication on the serial port\&. Either 1 or 2\&. The 1 in \*(Aq8n1\*(Aq for example\&. +T} +T{ +send\-delay +T}:T{ +uint64 +T}:T{ +0 +T}:T{ +Time to delay between each byte sent to the modem, in microseconds\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&17.\ \&vlan setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +vlan +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +interface\-name +T}:T{ +string +T}:T{ +\ \& +T}:T{ +If given, specifies the kernel name of the VLAN interface\&. If not given, a default name will be constructed from the interface described by the parent interface and the \*(Aqid\*(Aq property, ex \*(Aqeth2\&.1\*(Aq\&. The parent interface may be given by the \*(Aqparent\*(Aq property or by a hardware address property, eg the \*(Aqwired\*(Aq settings\*(Aq \*(Aqmac\-address\*(Aq property\&. +T} +T{ +parent +T}:T{ +string +T}:T{ +\ \& +T}:T{ +If given, specifies the parent interface name or parent connection UUID from which this VLAN interface should be created\&. If this property is not specified, the connection must contain a hardware address in a hardware\-specific setting, like the \*(Aqwired\*(Aq settings\*(Aq \*(Aqmac\-address\*(Aq property\&. +T} +T{ +id +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +The VLAN indentifier the interface created by this connection should be assigned\&. +T} +T{ +flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +One or more flags which control the behavior and features of the VLAN interface\&. Flags include reordering of output packet headers (0x01), use of the GVRP protocol (0x02), and loose binding of the interface to its master device\*(Aqs operating state (0x04)\&. +T} +T{ +ingress\-priority\-map +T}:T{ +array of string +T}:T{ +[] +T}:T{ +For incoming packets, a list of mappings from 802\&.1p priorities to Linux SKB priorities\&. The mapping is given in the format \*(Aqfrom:to\*(Aq where both \*(Aqfrom\*(Aq and \*(Aqto\*(Aq are unsigned integers, ie \*(Aq7:3\*(Aq\&. +T} +T{ +egress\-priority\-map +T}:T{ +array of string +T}:T{ +[] +T}:T{ +For outgoing packets, a list of mappings from Linux SKB priorities to 802\&.1p priorities\&. The mapping is given in the format \*(Aqfrom:to\*(Aq where both \*(Aqfrom\*(Aq and \*(Aqto\*(Aq are unsigned integers, ie \*(Aq7:3\*(Aq\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.\ \&vpn setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +vpn +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +service\-type +T}:T{ +string +T}:T{ +\ \& +T}:T{ +D\-Bus service name of the VPN plugin that this setting uses to connect to its network\&. i\&.e\&. org\&.freedesktop\&.NetworkManager\&.vpnc for the vpnc plugin\&. +T} +T{ +user\-name +T}:T{ +string +T}:T{ +\ \& +T}:T{ +If the VPN connection requires a user name for authentication, that name should be provided here\&. If the connection is available to more than one user, and the VPN requires each user to supply a different name, then leave this property empty\&. If this property is empty, NetworkManager will automatically supply the username of the user which requested the VPN connection\&. +T} +T{ +data +T}:T{ +dict of (string::string) +T}:T{ +[ ] +T}:T{ +Dictionary of key/value pairs of VPN plugin specific data\&. Both keys and values must be strings\&. +T} +T{ +secrets +T}:T{ +dict of (string::string) +T}:T{ +[ ] +T}:T{ +Dictionary of key/value pairs of VPN plugin specific secrets like passwords or private keys\&. Both keys and values must be strings\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&19.\ \&wimax setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +wimax +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +network\-name +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Network Service Provider (NSP) name of the WiMAX network this connection should use\&. +T} +T{ +mac\-address +T}:T{ +byte array +T}:T{ +[] +T}:T{ +If specified, this connection will only apply to the WiMAX device whose MAC address matches\&. This property does not change the MAC address of the device (known as MAC spoofing)\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&20.\ \&802-3-ethernet setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +802\-3\-ethernet +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +port +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Specific port type to use if multiple the device supports multiple attachment methods\&. One of \*(Aqtp\*(Aq (Twisted Pair), \*(Aqaui\*(Aq (Attachment Unit Interface), \*(Aqbnc\*(Aq (Thin Ethernet) or \*(Aqmii\*(Aq (Media Independent Interface\&. If the device supports only one port type, this setting is ignored\&. +T} +T{ +speed +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, request that the device use only the specified speed\&. In Mbit/s, ie 100 == 100Mbit/s\&. +T} +T{ +duplex +T}:T{ +string +T}:T{ +\ \& +T}:T{ +If specified, request that the device only use the specified duplex mode\&. Either \*(Aqhalf\*(Aq or \*(Aqfull\*(Aq\&. +T} +T{ +auto\-negotiate +T}:T{ +boolean +T}:T{ +TRUE +T}:T{ +If TRUE, allow auto\-negotiation of port speed and duplex mode\&. If FALSE, do not allow auto\-negotiation,in which case the \*(Aqspeed\*(Aq and \*(Aqduplex\*(Aq properties should be set\&. +T} +T{ +mac\-address +T}:T{ +byte array +T}:T{ +[] +T}:T{ +If specified, this connection will only apply to the ethernet device whose permanent MAC address matches\&. This property does not change the MAC address of the device (i\&.e\&. MAC spoofing)\&. +T} +T{ +cloned\-mac\-address +T}:T{ +byte array +T}:T{ +[] +T}:T{ +If specified, request that the device use this MAC address instead of its permanent MAC address\&. This is known as MAC cloning or spoofing\&. +T} +T{ +mac\-address\-blacklist +T}:T{ +array of string +T}:T{ +[] +T}:T{ +If specified, this connection will never apply to the ethernet device whose permanent MAC address matches an address in the list\&. Each MAC address is in the standard hex\-digits\-and\-colons notation (00:11:22:33:44:55)\&. +T} +T{ +mtu +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames\&. +T} +T{ +s390\-subchannels +T}:T{ +array of string +T}:T{ +[] +T}:T{ +Identifies specific subchannels that this network device uses for communcation with z/VM or s390 host\&. Like the \*(Aqmac\-address\*(Aq property for non\-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels\&. The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (\&.) character\&. +T} +T{ +s390\-nettype +T}:T{ +string +T}:T{ +\ \& +T}:T{ +s390 network device type; one of \*(Aqqeth\*(Aq, \*(Aqlcs\*(Aq, or \*(Aqctc\*(Aq, representing the different types of virtual network devices available on s390 systems\&. +T} +T{ +s390\-options +T}:T{ +dict of (string::string) +T}:T{ +[ ] +T}:T{ +Dictionary of key/value pairs of s390\-specific device options\&. Both keys and values must be strings\&. Allowed keys include \*(Aqportno\*(Aq, \*(Aqlayer2\*(Aq, \*(Aqportname\*(Aq, \*(Aqprotocol\*(Aq, among others\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.\ \&802-11-wireless setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +802\-11\-wireless +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +ssid +T}:T{ +byte array +T}:T{ +[] +T}:T{ +SSID of the WiFi network\&. Must be specified\&. +T} +T{ +mode +T}:T{ +string +T}:T{ +\ \& +T}:T{ +WiFi network mode; one of \*(Aqinfrastructure\*(Aq, \*(Aqadhoc\*(Aq or \*(Aqap\*(Aq\&. If blank, infrastructure is assumed\&. +T} +T{ +band +T}:T{ +string +T}:T{ +\ \& +T}:T{ +802\&.11 frequency band of the network\&. One of \*(Aqa\*(Aq for 5GHz 802\&.11a or \*(Aqbg\*(Aq for 2\&.4GHz 802\&.11\&. This will lock associations to the WiFi network to the specific band, i\&.e\&. if \*(Aqa\*(Aq is specified, the device will not associate with the same network in the 2\&.4GHz band even if the network\*(Aqs settings are compatible\&. This setting depends on specific driver capability and may not work with all drivers\&. +T} +T{ +channel +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Wireless channel to use for the WiFi connection\&. The device will only join (or create for Ad\-Hoc networks) a WiFi network on the specified channel\&. Because channel numbers overlap between bands, this property also requires the \*(Aqband\*(Aq property to be set\&. +T} +T{ +bssid +T}:T{ +byte array +T}:T{ +[] +T}:T{ +If specified, directs the device to only associate with the given access point\&. This capability is highly driver dependent and not supported by all devices\&. Note: this property does not control the BSSID used when creating an Ad\-Hoc network and is unlikely to in the future\&. +T} +T{ +rate +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, directs the device to only use the specified bitrate for communication with the access point\&. Units are in Kb/s, ie 5500 = 5\&.5 Mbit/s\&. This property is highly driver dependent and not all devices support setting a static bitrate\&. +T} +T{ +tx\-power +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, directs the device to use the specified transmit power\&. Units are dBm\&. This property is highly driver dependent and not all devices support setting a static transmit power\&. +T} +T{ +mac\-address +T}:T{ +byte array +T}:T{ +[] +T}:T{ +If specified, this connection will only apply to the WiFi device whose permanent MAC address matches\&. This property does not change the MAC address of the device (i\&.e\&. MAC spoofing)\&. +T} +T{ +cloned\-mac\-address +T}:T{ +byte array +T}:T{ +[] +T}:T{ +If specified, request that the WiFi device use this MAC address instead of its permanent MAC address\&. This is known as MAC cloning or spoofing\&. +T} +T{ +mac\-address\-blacklist +T}:T{ +array of string +T}:T{ +[] +T}:T{ +If specified, this connection will never apply to the WiFi device whose permanent MAC address matches an address in the list\&. Each MAC address is in the standard hex\-digits\-and\-colons notation (00:11:22:33:44:55)\&. +T} +T{ +mtu +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +If non\-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames\&. +T} +T{ +seen\-bssids +T}:T{ +array of string +T}:T{ +[] +T}:T{ +A list of BSSIDs (each BSSID formatted as a MAC address like 00:11:22:33:44:55\*(Aq) that have been detected as part of the WiFI network\&. NetworkManager internally tracks previously seen BSSIDs\&. The property is only meant for reading and reflects the BBSID list of NetworkManager\&. The changes you make to this property will not be preserved\&. +T} +T{ +security +T}:T{ +string +T}:T{ +\ \& +T}:T{ +If the wireless connection has any security restrictions, like 802\&.1x, WEP, or WPA, set this property to \*(Aq802\-11\-wireless\-security\*(Aq and ensure the connection contains a valid 802\-11\-wireless\-security setting\&. +T} +T{ +hidden +T}:T{ +boolean +T}:T{ +FALSE +T}:T{ +If TRUE, indicates this network is a non\-broadcasting network that hides its SSID\&. In this case various workarounds may take place, such as probe\-scanning the SSID for more reliable network discovery\&. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution\&. +T} +.TE +.sp 1 +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&22.\ \&802-11-wireless-security setting +.TS +allbox tab(:); +lB lB lB lB. +T{ +Key Name +T}:T{ +Value Type +T}:T{ +Default Value +T}:T{ +Value Description +T} +.T& +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l +l l l l. +T{ +name +T}:T{ +string +T}:T{ +802\-11\-wireless\-security +T}:T{ +The setting\*(Aqs name; these names are defined by the specification and cannot be changed after the object has been created\&. Each setting class has a name, and all objects of that class share the same name\&. +T} +T{ +key\-mgmt +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Key management used for the connection\&. One of \*(Aqnone\*(Aq (WEP), \*(Aqieee8021x\*(Aq (Dynamic WEP), \*(Aqwpa\-none\*(Aq (WPA\-PSK Ad\-Hoc), \*(Aqwpa\-psk\*(Aq (infrastructure WPA\-PSK), or \*(Aqwpa\-eap\*(Aq (WPA\-Enterprise)\&. This property must be set for any WiFi connection that uses security\&. +T} +T{ +wep\-tx\-keyidx +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +When static WEP is used (ie, key\-mgmt = \*(Aqnone\*(Aq) and a non\-default WEP key index is used by the AP, put that WEP key index here\&. Valid values are 0 (default key) through 3\&. Note that some consumer access points (like the Linksys WRT54G) number the keys 1 \- 4\&. +T} +T{ +auth\-alg +T}:T{ +string +T}:T{ +\ \& +T}:T{ +When WEP is used (ie, key\-mgmt = \*(Aqnone\*(Aq or \*(Aqieee8021x\*(Aq) indicate the 802\&.11 authentication algorithm required by the AP here\&. One of \*(Aqopen\*(Aq for Open System, \*(Aqshared\*(Aq for Shared Key, or \*(Aqleap\*(Aq for Cisco LEAP\&. When using Cisco LEAP (ie, key\-mgmt = \*(Aqieee8021x\*(Aq and auth\-alg = \*(Aqleap\*(Aq) the \*(Aqleap\-username\*(Aq and \*(Aqleap\-password\*(Aq properties must be specified\&. +T} +T{ +proto +T}:T{ +array of string +T}:T{ +[] +T}:T{ +List of strings specifying the allowed WPA protocol versions to use\&. Each element may be one \*(Aqwpa\*(Aq (allow WPA) or \*(Aqrsn\*(Aq (allow WPA2/RSN)\&. If not specified, both WPA and RSN connections are allowed\&. +T} +T{ +pairwise +T}:T{ +array of string +T}:T{ +[] +T}:T{ +If specified, will only connect to WPA networks that provide the specified pairwise encryption capabilities\&. Each element may be one of \*(Aqwep40\*(Aq, \*(Aqwep104\*(Aq, \*(Aqtkip\*(Aq, or \*(Aqccmp\*(Aq\&. +T} +T{ +group +T}:T{ +array of string +T}:T{ +[] +T}:T{ +If specified, will only connect to WPA networks that provide the specified group/multicast encryption capabilities\&. Each element may be one of \*(Aqwep40\*(Aq, \*(Aqwep104\*(Aq, \*(Aqtkip\*(Aq, or \*(Aqccmp\*(Aq\&. +T} +T{ +leap\-username +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The login username for legacy LEAP connections (ie, key\-mgmt = \*(Aqieee8021x\*(Aq and auth\-alg = \*(Aqleap\*(Aq)\&. +T} +T{ +wep\-key0 +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Index 0 WEP key\&. This is the WEP key used in most networks\&. See the \*(Aqwep\-key\-type\*(Aq property for a description of how this key is interpreted\&. +T} +T{ +wep\-key1 +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Index 1 WEP key\&. This WEP index is not used by most networks\&. See the \*(Aqwep\-key\-type\*(Aq property for a description of how this key is interpreted\&. +T} +T{ +wep\-key2 +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Index 2 WEP key\&. This WEP index is not used by most networks\&. See the \*(Aqwep\-key\-type\*(Aq property for a description of how this key is interpreted\&. +T} +T{ +wep\-key3 +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Index 3 WEP key\&. This WEP index is not used by most networks\&. See the \*(Aqwep\-key\-type\*(Aq property for a description of how this key is interpreted\&. +T} +T{ +wep\-key\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the WEP keys\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +wep\-key\-type +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Controls the interpretation of WEP keys\&. Allowed values are 1 (interpret WEP keys as hexadecimal or ASCII keys) or 2 (interpret WEP keys as WEP Passphrases)\&. If set to 1 and the keys are hexadecimal, they must be either 10 or 26 characters in length\&. If set to 1 and the keys are ASCII keys, they must be either 5 or 13 characters in length\&. If set to 2, the passphrase is hashed using the de\-facto MD5 method to derive the actual WEP key\&. +T} +T{ +psk +T}:T{ +string +T}:T{ +\ \& +T}:T{ +Pre\-Shared\-Key for WPA networks\&. If the key is 64\-characters long, it must contain only hexadecimal characters and is interpreted as a hexadecimal WPA key\&. Otherwise, the key must be between 8 and 63 ASCII characters (as specified in the 802\&.11i standard) and is interpreted as a WPA passphrase, and is hashed to derive the actual WPA\-PSK used when connecting to the WiFi network\&. +T} +T{ +psk\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the WPA PSK key\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +T{ +leap\-password +T}:T{ +string +T}:T{ +\ \& +T}:T{ +The login password for legacy LEAP connections (ie, key\-mgmt = \*(Aqieee8021x\*(Aq and auth\-alg = \*(Aqleap\*(Aq)\&. +T} +T{ +leap\-password\-flags +T}:T{ +uint32 +T}:T{ +0 +T}:T{ +Flags indicating how to handle the LEAP password\&. (see the section called \(lqSecret flag types:\(rq for flag values) +T} +.TE +.sp 1 +.SS "Secret flag types:" +.PP +Each secret property in a setting has an associated +\fIflags\fR +property that describes how to handle that secret\&. The +\fIflags\fR +property is a bitfield that contains zero or more of the following values logically OR\-ed together\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +0x0 (none) \- the system is responsible for providing and storing this secret\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +0x1 (agent\-owned) \- a user\-session secret agent is responsible for providing and storing this secret; when it is required, agents will be asked to provide it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +0x2 (not\-saved) \- this secret should not be saved but should be requested from the user each time it is required\&. This flag should be used for One\-Time\-Pad secrets, PIN codes from hardware tokens, or if the user simply does not want to save the secret\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +0x4 (not\-required) \- in some situations it cannot be automatically determined that a secret is required or not\&. This flag hints that the secret is not required and should not be requested from the user\&. +.RE +.SH "AUTHOR" +.PP + +NetworkManager developers +.SH "FILES" +.PP +/etc/NetworkManager/system\-connections +.PP +or distro plugin\-specific location +.SH "SEE ALSO" +.PP +https://live\&.gnome\&.org/NetworkManagerConfiguration +.PP +NetworkManager(8), nmcli(1), NetworkManager\&.conf(5) diff --git a/docs/api/settings-spec.xml b/man/nm-settings.xml index b0bf597b2..14f7a0f7d 100644 --- a/docs/api/settings-spec.xml +++ b/man/nm-settings.xml @@ -1,9 +1,59 @@ <?xml version="1.0"?> -<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ -<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">]><section> - <title>Configuration Settings</title> - <para> +<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">]><refentry id="nm-settings"> + <refentryinfo> + <date>08 February 2013</date> + </refentryinfo> + <refmeta> + <refentrytitle>nm-settings</refentrytitle> + <manvolnum>5</manvolnum> + <refmiscinfo class="source">NetworkManager</refmiscinfo> + <refmiscinfo class="manual">Configuration</refmiscinfo> + <refmiscinfo class="version">0.9.7.997</refmiscinfo> + </refmeta> + <refnamediv> + <refname>nm-settings</refname> + <refpurpose>Description of settings and parameters of NetworkManager connections.</refpurpose> + </refnamediv> + <refsect1> + <title>DESCRIPTION</title> + <para> + NetworkManager is based on a concept of connections. These connections are + then applied to a device to make an active network connection. Users can create + as many connections as they see fit. The connections are handled by NetworkManager + via <emphasis>settings service</emphasis> and are exported on D-Bus + (<emphasis>/org/freedesktop/NetworkManager/Settings/<num></emphasis> objects). + The conceptual objects can be described as follows: + <variablelist> + <varlistentry> + <term>Connection</term> + <listitem> + <para> + A specific, encapsulated, independent group of settings describing + all the configuration required to connect to a specific network. + It is referred to by a unique identifier called the UUID. A connection + is tied to a one specific device type, but not necessarily a specific + hardware device. It is composed of one or more <emphasis>Settings</emphasis> + objects. + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term>Setting</term> + <listitem> + <para> + A group of related key/value pairs describing a specific piece of a + <emphasis>Connection</emphasis>. Settings keys and allowed values are + described in the tables below. Developers can find the settings + objects in the libnm-util sources. Look for the <function>class_init</function> + functions near the bottoms of each setting source file. + </para> + </listitem> + </varlistentry> + </variablelist> <table> <title>802-1x setting</title> <tgroup cols="4"> @@ -17,189 +67,189 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>802-1x</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">802-1x</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>eap</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">eap</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>The allowed EAP method to be used when authenticating to the network with 802.1x. Valid methods are: 'leap', 'md5', 'tls', 'peap', 'ttls', and 'fast'. Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations.</entry> </row> <row> - <entry><screen>identity</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">identity</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Identity string for EAP authentication methods. Often the user's user or login name.</entry> </row> <row> - <entry><screen>anonymous-identity</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">anonymous-identity</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Anonymous identity string for EAP authentication methods. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP-TTLS.</entry> </row> <row> - <entry><screen>pac-file</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">pac-file</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>UTF-8 encoded file path containing PAC for EAP-FAST.</entry> </row> <row> - <entry><screen>ca-cert</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">ca-cert</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>Contains the CA certificate if used by the EAP method specified in the 'eap' property. Certificate data is specified using a 'scheme'; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string 'file://' and ending with a terminating NULL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended.</entry> </row> <row> - <entry><screen>ca-path</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">ca-path</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>UTF-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the 'ca-cert' property.</entry> </row> <row> - <entry><screen>subject-match</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">subject-match</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Substring to be matched against the subject of the certificate presented by the authentication server. When unset, no verification of the authentication server certificate's subject is performed.</entry> </row> <row> - <entry><screen>altsubject-matches</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">altsubject-matches</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>List of strings to be matched against the altSubjectName of the certificate presented by the authentication server. If the list is empty, no verification of the server certificate's altSubjectName is performed.</entry> </row> <row> - <entry><screen>client-cert</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">client-cert</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>Contains the client certificate if used by the EAP method specified in the 'eap' property. Certificate data is specified using a 'scheme'; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string 'file://' and ending with a terminating NULL byte.</entry> </row> <row> - <entry><screen>phase1-peapver</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">phase1-peapver</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Forces which PEAP version is used when PEAP is set as the EAP method in 'eap' property. When unset, the version reported by the server will be used. Sometimes when using older RADIUS servers, it is necessary to force the client to use a particular PEAP version. To do so, this property may be set to '0' or '1' to force that specific PEAP version.</entry> </row> <row> - <entry><screen>phase1-peaplabel</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">phase1-peaplabel</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Forces use of the new PEAP label during key derivation. Some RADIUS servers may require forcing the new PEAP label to interoperate with PEAPv1. Set to '1' to force use of the new PEAP label. See the wpa_supplicant documentation for more details.</entry> </row> <row> - <entry><screen>phase1-fast-provisioning</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">phase1-fast-provisioning</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Enables or disables in-line provisioning of EAP-FAST credentials when FAST is specified as the EAP method in the #NMSetting8021x:eap property. Allowed values are '0' (disabled), '1' (allow unauthenticated provisioning), '2' (allow authenticated provisioning), and '3' (allow both authenticated and unauthenticated provisioning). See the wpa_supplicant documentation for more details.</entry> </row> <row> - <entry><screen>phase2-auth</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">phase2-auth</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Specifies the allowed 'phase 2' inner non-EAP authentication methods when an EAP method that uses an inner TLS tunnel is specified in the 'eap' property. Recognized non-EAP phase2 methods are 'pap', 'chap', 'mschap', 'mschapv2', 'gtc', 'otp', 'md5', and 'tls'. Each 'phase 2' inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details.</entry> </row> <row> - <entry><screen>phase2-autheap</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">phase2-autheap</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Specifies the allowed 'phase 2' inner EAP-based authentication methods when an EAP method that uses an inner TLS tunnel is specified in the 'eap' property. Recognized EAP-based 'phase 2' methods are 'md5', 'mschapv2', 'otp', 'gtc', and 'tls'. Each 'phase 2' inner method requires specific parameters for successful authentication; see the wpa_supplicant documentation for more details.</entry> </row> <row> - <entry><screen>phase2-ca-cert</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">phase2-ca-cert</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>Contains the 'phase 2' CA certificate if used by the EAP method specified in the 'phase2-auth' or 'phase2-autheap' properties. Certificate data is specified using a 'scheme'; two are currentlysupported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string 'file://' and ending with a terminating NULL byte. This property can be unset even if the EAP method supports CA certificates, but this allows man-in-the-middle attacks and is NOT recommended.</entry> </row> <row> - <entry><screen>phase2-ca-path</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">phase2-ca-path</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>UTF-8 encoded path to a directory containing PEM or DER formatted certificates to be added to the verification chain in addition to the certificate specified in the 'phase2-ca-cert' property.</entry> </row> <row> - <entry><screen>phase2-subject-match</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">phase2-subject-match</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Substring to be matched against the subject of the certificate presented by the authentication server during the inner 'phase2' authentication. When unset, no verification of the authentication server certificate's subject is performed.</entry> </row> <row> - <entry><screen>phase2-altsubject-matches</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">phase2-altsubject-matches</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>List of strings to be matched against List of strings to be matched against the altSubjectName of the certificate presented by the authentication server during the inner 'phase 2' authentication. If the list is empty, no verification of the server certificate's altSubjectName is performed.</entry> </row> <row> - <entry><screen>phase2-client-cert</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">phase2-client-cert</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>Contains the 'phase 2' client certificate if used by the EAP method specified in the 'phase2-auth' or 'phase2-autheap' properties. Certificate data is specified using a 'scheme'; two are currently supported: blob and path. When using the blob scheme (which is backwards compatible with NM 0.7.x) this property should be set to the certificate's DER encoded data. When using the path scheme, this property should be set to the full UTF-8 encoded path of the certificate, prefixed with the string 'file://' and ending with a terminating NULL byte.</entry> </row> <row> - <entry><screen>password</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">password</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Password used for EAP authentication methods.</entry> </row> <row> - <entry><screen>password-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">password-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the 802.1x password. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>password-raw</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">password-raw</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>Password used for EAP authentication methods as a byte array</entry> </row> <row> - <entry><screen>password-raw-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">password-raw-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the 802.1x password byte array. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>private-key</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">private-key</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>Contains the private key when the 'eap' property is set to 'tls'. Key data is specified using a 'scheme'; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string 'file://' and ending with a terminating NULL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the 'private-key-password' property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string 'file://' and and ending with a terminating NULL byte, and as with the blob scheme the 'private-key-password' property must be set to the password used to decode the PKCS#12 private key and certificate.</entry> </row> <row> - <entry><screen>private-key-password</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">private-key-password</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The password used to decrypt the private key specified in the 'private-key' property when the private key either uses the path scheme, or if the private key is a PKCS#12 format key.</entry> </row> <row> - <entry><screen>private-key-password-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">private-key-password-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the 802.1x private key password. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>phase2-private-key</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">phase2-private-key</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>Contains the 'phase 2' inner private key when the 'phase2-auth' or 'phase2-autheap' property is set to 'tls'. Key data is specified using a 'scheme'; two are currently supported: blob and path. When using the blob scheme and private keys, this property should be set to the key's encrypted PEM encoded data. When using private keys with the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string 'file://' and ending with a terminating NULL byte. When using PKCS#12 format private keys and the blob scheme, this property should be set to the PKCS#12 data and the 'phase2-private-key-password' property must be set to password used to decrypt the PKCS#12 certificate and key. When using PKCS#12 files and the path scheme, this property should be set to the full UTF-8 encoded path of the key, prefixed with the string 'file://' and and ending with a terminating NULL byte, and as with the blob scheme the 'phase2-private-key-password' property must be set to the password used to decode the PKCS#12 private key and certificate.</entry> </row> <row> - <entry><screen>phase2-private-key-password</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">phase2-private-key-password</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The password used to decrypt the 'phase 2' private key specified in the 'private-key' property when the phase2 private key either uses the path scheme, or if the phase2 private key is a PKCS#12 format key.</entry> </row> <row> - <entry><screen>phase2-private-key-password-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">phase2-private-key-password-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the 802.1x phase2 private key password. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>system-ca-certs</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">system-ca-certs</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>When TRUE, overrides 'ca-path' and 'phase2-ca-path' properties using the system CA directory specified at configure time with the --system-ca-path switch. The certificates in this directory are added to the verification chain in addition to any certificates specified by the 'ca-cert' and 'phase2-ca-cert' properties.</entry> </row> </tbody> @@ -218,51 +268,51 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>adsl</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">adsl</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>username</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">username</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Username used to authenticate with the pppoa service.</entry> </row> <row> - <entry><screen>password</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">password</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Password used to authenticate with the pppoa service.</entry> </row> <row> - <entry><screen>password-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">password-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the ADSL password. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>protocol</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">protocol</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>ADSL connection protocol.</entry> </row> <row> - <entry><screen>encapsulation</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">encapsulation</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Encapsulation of ADSL connection</entry> </row> <row> - <entry><screen>vpi</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">vpi</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>VPI of ADSL connection</entry> </row> <row> - <entry><screen>vci</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">vci</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>VCI of ADSL connection</entry> </row> </tbody> @@ -281,21 +331,21 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>bluetooth</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">bluetooth</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>bdaddr</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">bdaddr</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>The Bluetooth address of the device</entry> </row> <row> - <entry><screen>type</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">type</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Either 'dun' for Dial-Up Networking connections or 'panu' for Personal Area Networking connections.</entry> </row> </tbody> @@ -314,21 +364,21 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>bond</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">bond</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>interface-name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">interface-name</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The name of the virtual in-kernel bonding network interface</entry> </row> <row> - <entry><screen>options</screen></entry> - <entry><screen>dict of (string::string)</screen></entry> - <entry><screen>[ ]</screen></entry> + <entry align="left">options</entry> + <entry align="left">dict of (string::string)</entry> + <entry align="left">[ ]</entry> <entry>Dictionary of key/value pairs of bonding options. Both keys and values must be strings. Option names must contain only alphanumeric characters (ie, [a-zA-Z0-9]).</entry> </row> </tbody> @@ -347,51 +397,51 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>bridge</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">bridge</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>interface-name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">interface-name</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The name of the virtual in-kernel bridging network interface</entry> </row> <row> - <entry><screen>stp</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>TRUE</screen></entry> + <entry align="left">stp</entry> + <entry align="left">boolean</entry> + <entry align="left">TRUE</entry> <entry>Controls whether Spanning Tree Protocol (STP) is enabled for this bridge.</entry> </row> <row> - <entry><screen>priority</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>128</screen></entry> + <entry align="left">priority</entry> + <entry align="left">uint32</entry> + <entry align="left">128</entry> <entry>Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower values are 'better'; the lowest priority bridge will be elected the root bridge.</entry> </row> <row> - <entry><screen>forward-delay</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>15</screen></entry> + <entry align="left">forward-delay</entry> + <entry align="left">uint32</entry> + <entry align="left">15</entry> <entry>The Spanning Tree Protocol (STP) forwarding delay, in seconds.</entry> </row> <row> - <entry><screen>hello-time</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>2</screen></entry> + <entry align="left">hello-time</entry> + <entry align="left">uint32</entry> + <entry align="left">2</entry> <entry>The Spanning Tree Protocol (STP) hello time, in seconds.</entry> </row> <row> - <entry><screen>max-age</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>20</screen></entry> + <entry align="left">max-age</entry> + <entry align="left">uint32</entry> + <entry align="left">20</entry> <entry>The Spanning Tree Protocol (STP) maximum message age, in seconds.</entry> </row> <row> - <entry><screen>ageing-time</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>300</screen></entry> + <entry align="left">ageing-time</entry> + <entry align="left">uint32</entry> + <entry align="left">300</entry> <entry>The ethernet MAC address aging time, in seconds.</entry> </row> </tbody> @@ -410,27 +460,27 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>bridge-port</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">bridge-port</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>priority</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>32</screen></entry> + <entry align="left">priority</entry> + <entry align="left">uint32</entry> + <entry align="left">32</entry> <entry>The Spanning Tree Protocol (STP) priority of this bridge port</entry> </row> <row> - <entry><screen>path-cost</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>100</screen></entry> + <entry align="left">path-cost</entry> + <entry align="left">uint32</entry> + <entry align="left">100</entry> <entry>The Spanning Tree Protocol (STP) port cost for destinations via this port.</entry> </row> <row> - <entry><screen>hairpin-mode</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">hairpin-mode</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>Enables or disabled 'hairpin mode' for the port, which allows frames to be sent back out through the port the frame was received on.</entry> </row> </tbody> @@ -449,33 +499,33 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>cdma</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">cdma</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>number</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">number</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Number to dial when establishing a PPP data session with the CDMA-based mobile broadband network. If not specified, the default number (#777) is used when required.</entry> </row> <row> - <entry><screen>username</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">username</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Username used to authenticate with the network, if required. Note that many providers do not require a username or accept any username.</entry> </row> <row> - <entry><screen>password</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">password</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Password used to authenticate with the network, if required. Note that many providers do not require a password or accept any password.</entry> </row> <row> - <entry><screen>password-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">password-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the CDMA password. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> </tbody> @@ -494,75 +544,75 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>connection</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">connection</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>id</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">id</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>User-readable connection identifier/name. Must be one or more characters and may change over the lifetime of the connection if the user decides to rename it.</entry> </row> <row> - <entry><screen>uuid</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">uuid</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Universally unique connection identifier. Must be in the format '2815492f-7e56-435e-b2e9-246bd7cdc664' (ie, contains only hexadecimal characters and '-'). The UUID should be assigned when the connection is created and never changed as long as the connection still applies to the same network. For example, it should not be changed when the user changes the connection's 'id', but should be recreated when the WiFi SSID, mobile broadband network provider, or the connection type changes.</entry> </row> <row> - <entry><screen>type</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">type</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Base type of the connection. For hardware-dependent connections, should contain the setting name of the hardware-type specific setting (ie, '802-3-ethernet' or '802-11-wireless' or 'bluetooth', etc), and for non-hardware dependent connections like VPN or otherwise, should contain the setting name of that setting type (ie, 'vpn' or 'bridge', etc).</entry> </row> <row> - <entry><screen>permissions</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">permissions</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>An array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection. Otherwise a user is allowed to access this connection if and only if they are in this array. Each entry is of the form "[type]:[id]:[reserved]", for example: "user:dcbw:blah" At this time only the 'user' [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the ':' character. Any [reserved] information (if present) must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8.</entry> </row> <row> - <entry><screen>autoconnect</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>TRUE</screen></entry> + <entry align="left">autoconnect</entry> + <entry align="left">boolean</entry> + <entry align="left">TRUE</entry> <entry>If TRUE, NetworkManager will activate this connection when its network resources are available. If FALSE, the connection must be manually activated by the user or some other mechanism.</entry> </row> <row> - <entry><screen>timestamp</screen></entry> - <entry><screen>uint64</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">timestamp</entry> + <entry align="left">uint64</entry> + <entry align="left">0</entry> <entry>Timestamp (in seconds since the Unix Epoch) that the connection was last successfully activated. Settings services should update the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp.</entry> </row> <row> - <entry><screen>read-only</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">read-only</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, the connection is read-only and cannot be changed by the user or any other mechanism. This is normally set for system connections whose plugin cannot yet write updated connections back out.</entry> </row> <row> - <entry><screen>zone</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">zone</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The trust level of a the connection.Free form case-insensitive string (for example "Home", "Work", "Public"). NULL or unspecified zone means the connection will be placed in the default zone as defined by the firewall.</entry> </row> <row> - <entry><screen>master</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">master</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Interface name of the master device or UUID of the master connection</entry> </row> <row> - <entry><screen>slave-type</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">slave-type</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Setting name describing the type of slave this connection is (ie, 'bond') or NULL if this connection is not a slave.</entry> </row> <row> - <entry><screen>secondaries</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">secondaries</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>List of connection UUIDs that should be activated when the base connection itself is activated.</entry> </row> </tbody> @@ -581,75 +631,75 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>gsm</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">gsm</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>number</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">number</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Number to dial when establishing a PPP data session with the GSM-based mobile broadband network. Many modems do not require PPP for connections to the mobile network and thus this property should be left blank, which allows NetworkManager to select the appropriate settings automatically.</entry> </row> <row> - <entry><screen>username</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">username</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Username used to authenticate with the network, if required. Note that many providers do not require a username or accept any username.</entry> </row> <row> - <entry><screen>password</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">password</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Password used to authenticate with the network, if required. Note that many providers do not require a password or accept any password.</entry> </row> <row> - <entry><screen>password-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">password-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the GSM password. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>apn</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">apn</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The GPRS Access Point Name specifying the APN used when establishing a data session with the GSM-based network. The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or just a provider-specific walled-garden, so it is important to use the correct APN for the user's mobile broadband plan. The APN may only be composed of the characters a-z, 0-9, ., and - per GSM 03.60 Section 14.9.</entry> </row> <row> - <entry><screen>network-id</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">network-id</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The Network ID (GSM LAI format, ie MCC-MNC) to force specific network registration. If the Network ID is specified, NetworkManager will attempt to force the device to register only on the specified network. This can be used to ensure that the device does not roam when direct roaming control of the device is not otherwise possible.</entry> </row> <row> - <entry><screen>network-type</screen></entry> - <entry><screen>int32</screen></entry> - <entry><screen>-1</screen></entry> + <entry align="left">network-type</entry> + <entry align="left">int32</entry> + <entry align="left">-1</entry> <entry>Network preference to force the device to only use specific network technologies. The permitted values are: -1: any, 0: 3G only, 1: GPRS/EDGE only, 2: prefer 3G, 3: prefer 2G, 4: prefer 4G/LTE, 5: 4G/LTE only. Note that not all devices allow network preference control.</entry> </row> <row> - <entry><screen>pin</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">pin</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>If the SIM is locked with a PIN it must be unlocked before any other operations are requested. Specify the PIN here to allow operation of the device.</entry> </row> <row> - <entry><screen>pin-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">pin-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the GSM SIM PIN. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>allowed-bands</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>1</screen></entry> + <entry align="left">allowed-bands</entry> + <entry align="left">uint32</entry> + <entry align="left">1</entry> <entry>Bitfield of allowed frequency bands. Note that not all devices allow frequency band control.</entry> </row> <row> - <entry><screen>home-only</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">home-only</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>When TRUE, only connections to the home network will be allowed. Connections to roaming networks will not be made.</entry> </row> </tbody> @@ -668,27 +718,27 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>infiniband</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">infiniband</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>mac-address</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">mac-address</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>If specified, this connection will only apply to the IPoIB device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).</entry> </row> <row> - <entry><screen>mtu</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">mtu</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.</entry> </row> <row> - <entry><screen>transport-mode</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">transport-mode</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The IPoIB transport mode. Either 'datagram' or 'connected'.</entry> </row> </tbody> @@ -707,81 +757,81 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>ipv4</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">ipv4</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>method</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">method</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>IPv4 configuration method. If 'auto' is specified then the appropriate automatic method (DHCP, PPP, etc) is used for the interface and most other properties can be left unset. If 'link-local' is specified, then a link-local address in the 169.254/16 range will be assigned to the interface. If 'manual' is specified, static IP addressing is used and at least one IP address must be given in the 'addresses' property. If 'shared' is specified (indicating that this connection will provide network access to other computers) then the interface is assigned an address in the 10.42.x.1/24 range and a DHCP and forwarding DNS server are started, and the interface is NAT-ed to the current default network connection. 'disabled' means IPv4 will not be used on this connection. This property must be set.</entry> </row> <row> - <entry><screen>dns</screen></entry> - <entry><screen>array of uint32</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">dns</entry> + <entry align="left">array of uint32</entry> + <entry align="left">[]</entry> <entry>List of DNS servers (network byte order). For the 'auto' method, these DNS servers are appended to those (if any) returned by automatic configuration. DNS servers cannot be used with the 'shared', 'link-local', or 'disabled' methods as there is no upstream network. In all other methods, these DNS servers are used as the only DNS servers for this connection.</entry> </row> <row> - <entry><screen>dns-search</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">dns-search</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>List of DNS search domains. For the 'auto' method, these search domains are appended to those returned by automatic configuration. Search domains cannot be used with the 'shared', 'link-local', or 'disabled' methods as there is no upstream network. In all other methods, these search domains are used as the only search domains for this connection.</entry> </row> <row> - <entry><screen>addresses</screen></entry> - <entry><screen>array of array of uint32</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">addresses</entry> + <entry align="left">array of array of uint32</entry> + <entry align="left">[]</entry> <entry>Array of IPv4 address structures. Each IPv4 address structure is composed of 3 32-bit values; the first being the IPv4 address (network byte order), the second the prefix (1 - 32), and last the IPv4 gateway (network byte order). The gateway may be left as 0 if no gateway exists for that subnet. For the 'auto' method, given IP addresses are appended to those returned by automatic configuration. Addresses cannot be used with the 'shared', 'link-local', or 'disabled' methods as addressing is either automatic or disabled with these methods.</entry> </row> <row> - <entry><screen>routes</screen></entry> - <entry><screen>array of array of uint32</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">routes</entry> + <entry align="left">array of array of uint32</entry> + <entry align="left">[]</entry> <entry>Array of IPv4 route structures. Each IPv4 route structure is composed of 4 32-bit values; the first being the destination IPv4 network or address (network byte order), the second the destination network or address prefix (1 - 32), the third being the next-hop (network byte order) if any, and the fourth being the route metric. For the 'auto' method, given IP routes are appended to those returned by automatic configuration. Routes cannot be used with the 'shared', 'link-local', or 'disabled', methods as there is no upstream network.</entry> </row> <row> - <entry><screen>ignore-auto-routes</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">ignore-auto-routes</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>When the method is set to 'auto' and this property to TRUE, automatically configured routes are ignored and only routes specified in the 'routes' property, if any, are used.</entry> </row> <row> - <entry><screen>ignore-auto-dns</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">ignore-auto-dns</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>When the method is set to 'auto' and this property to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the 'dns' and 'dns-search' properties, if any, are used.</entry> </row> <row> - <entry><screen>dhcp-client-id</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">dhcp-client-id</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options.</entry> </row> <row> - <entry><screen>dhcp-send-hostname</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>TRUE</screen></entry> + <entry align="left">dhcp-send-hostname</entry> + <entry align="left">boolean</entry> + <entry align="left">TRUE</entry> <entry>If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the 'dhcp-hostname' property is empty and this property is TRUE, the current persistent hostname of the computer is sent.</entry> </row> <row> - <entry><screen>dhcp-hostname</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">dhcp-hostname</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>If the 'dhcp-send-hostname' property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease.</entry> </row> <row> - <entry><screen>never-default</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">never-default</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, this connection will never be the default IPv4 connection, meaning it will never be assigned the default route by NetworkManager.</entry> </row> <row> - <entry><screen>may-fail</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>TRUE</screen></entry> + <entry align="left">may-fail</entry> + <entry align="left">boolean</entry> + <entry align="left">TRUE</entry> <entry>If TRUE, allow overall network configuration to proceed even if IPv4 configuration times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.</entry> </row> </tbody> @@ -800,75 +850,75 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>ipv6</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">ipv6</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>method</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">method</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>IPv6 configuration method. If 'auto' is specified then the appropriate automatic method (PPP, router advertisement, etc) is used for the device and most other properties can be left unset. To force the use of DHCP only, specify 'dhcp'; this method is only valid for ethernet-based hardware. If 'link-local' is specified, then an IPv6 link-local address will be assigned to the interface. If 'manual' is specified, static IP addressing is used and at least one IP address must be given in the 'addresses' property. If 'ignored' is specified, IPv6 configuration is not done. This property must be set. NOTE: the 'shared' methodis not yet supported.</entry> </row> <row> - <entry><screen>dhcp-hostname</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">dhcp-hostname</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The specified name will be sent to the DHCP server when acquiring a lease.</entry> </row> <row> - <entry><screen>dns</screen></entry> - <entry><screen>array of byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">dns</entry> + <entry align="left">array of byte array</entry> + <entry align="left">[]</entry> <entry>Array of DNS servers, where each member of the array is a byte array containing the IPv6 address of the DNS server (in network byte order). For the 'auto' method, these DNS servers are appended to those (if any) returned by automatic configuration. DNS servers cannot be used with the 'shared' or 'link-local' methods as there is no usptream network. In all other methods, these DNS servers are used as the only DNS servers for this connection.</entry> </row> <row> - <entry><screen>dns-search</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">dns-search</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>List of DNS search domains. For the 'auto' method, these search domains are appended to those returned by automatic configuration. Search domains cannot be used with the 'shared' or 'link-local' methods as there is no upstream network. In all other methods, these search domains are used as the only search domains for this connection.</entry> </row> <row> - <entry><screen>addresses</screen></entry> - <entry><screen>array of (byte array, uint32, byte array)</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">addresses</entry> + <entry align="left">array of (byte array, uint32, byte array)</entry> + <entry align="left">[]</entry> <entry>Array of IPv6 address structures. Each IPv6 address structure is composed of 3 members, the first being a byte array containing the IPv6 address (network byte order), the second a 32-bit integer containing the IPv6 address prefix, and the third a byte array containing the IPv6 address (network byte order) of the gateway associated with this address, if any. If no gateway is given, the third element should be given as all zeros. For the 'auto' method, given IP addresses are appended to those returned by automatic configuration. Addresses cannot be used with the 'shared' or 'link-local' methods as the interface is automatically assigned an address with these methods.</entry> </row> <row> - <entry><screen>routes</screen></entry> - <entry><screen>array of (byte array, uint32, byte array, uint32)</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">routes</entry> + <entry align="left">array of (byte array, uint32, byte array, uint32)</entry> + <entry align="left">[]</entry> <entry>Array of IPv6 route structures. Each IPv6 route structure is composed of 4 members; the first being the destination IPv6 network or address (network byte order) as a byte array, the second the destination network or address IPv6 prefix, the third being the next-hop IPv6 address (network byte order) if any, and the fourth being the route metric. For the 'auto' method, given IP routes are appended to those returned by automatic configuration. Routes cannot be used with the 'shared' or 'link-local' methods because there is no upstream network.</entry> </row> <row> - <entry><screen>ignore-auto-routes</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">ignore-auto-routes</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>When the method is set to 'auto' or 'dhcp' and this property is set to TRUE, automatically configured routes are ignored and only routes specified in the 'routes' property, if any, are used.</entry> </row> <row> - <entry><screen>ignore-auto-dns</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">ignore-auto-dns</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>When the method is set to 'auto' or 'dhcp' and this property is set to TRUE, automatically configured nameservers and search domains are ignored and only nameservers and search domains specified in the 'dns' and 'dns-search' properties, if any, are used.</entry> </row> <row> - <entry><screen>never-default</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">never-default</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, this connection will never be the default IPv6 connection, meaning it will never be assigned the default IPv6 route by NetworkManager.</entry> </row> <row> - <entry><screen>may-fail</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>TRUE</screen></entry> + <entry align="left">may-fail</entry> + <entry align="left">boolean</entry> + <entry align="left">TRUE</entry> <entry>If TRUE, allow overall network configuration to proceed even if IPv6 configuration times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv4-only networks, setting this property to TRUE allows the overall network configuration to succeed if IPv6 configuration fails but IPv4 configuration completes successfully.</entry> </row> <row> - <entry><screen>ip6-privacy</screen></entry> - <entry><screen>int32</screen></entry> - <entry><screen>-1</screen></entry> + <entry align="left">ip6-privacy</entry> + <entry align="left">int32</entry> + <entry align="left">-1</entry> <entry>Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If enabled, it makes the kernel generate a temporary IPv6 address in addition to the public one generated from MAC address via modified EUI-64. This enhances privacy, but could cause problems in some applications, on the other hand. The permitted values are: 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses).</entry> </row> </tbody> @@ -887,27 +937,27 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>802-11-olpc-mesh</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">802-11-olpc-mesh</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>ssid</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">ssid</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>SSID of the mesh network to join.</entry> </row> <row> - <entry><screen>channel</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">channel</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Channel on which the mesh network to join is located.</entry> </row> <row> - <entry><screen>dhcp-anycast-address</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">dhcp-anycast-address</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>Anycast DHCP MAC address used when requesting an IP address via DHCP. The specific anycast address used determines which DHCP server class answers the the request.</entry> </row> </tbody> @@ -926,117 +976,117 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>ppp</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">ppp</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>noauth</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>TRUE</screen></entry> + <entry align="left">noauth</entry> + <entry align="left">boolean</entry> + <entry align="left">TRUE</entry> <entry>If TRUE, do not require the other side (usually the PPP server) to authenticate itself to the client. If FALSE, require authentication from the remote side. In almost all cases, this should be TRUE.</entry> </row> <row> - <entry><screen>refuse-eap</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">refuse-eap</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, the EAP authentication method will not be used.</entry> </row> <row> - <entry><screen>refuse-pap</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">refuse-pap</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, the PAP authentication method will not be used.</entry> </row> <row> - <entry><screen>refuse-chap</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">refuse-chap</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, the CHAP authentication method will not be used.</entry> </row> <row> - <entry><screen>refuse-mschap</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">refuse-mschap</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, the MSCHAP authentication method will not be used.</entry> </row> <row> - <entry><screen>refuse-mschapv2</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">refuse-mschapv2</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, the MSCHAPv2 authentication method will not be used.</entry> </row> <row> - <entry><screen>nobsdcomp</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">nobsdcomp</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, BSD compression will not be requested.</entry> </row> <row> - <entry><screen>nodeflate</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">nodeflate</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, 'deflate' compression will not be requested.</entry> </row> <row> - <entry><screen>no-vj-comp</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">no-vj-comp</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, Van Jacobsen TCP header compression will not be requested.</entry> </row> <row> - <entry><screen>require-mppe</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">require-mppe</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, MPPE (Microsoft Point-to-Point Encrpytion) will be required for the PPP session. If either 64-bit or 128-bit MPPE is not available the session will fail. Note that MPPE is not used on mobile broadband connections.</entry> </row> <row> - <entry><screen>require-mppe-128</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">require-mppe-128</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, 128-bit MPPE (Microsoft Point-to-Point Encrpytion) will be required for the PPP session, and the 'require-mppe' property must also be set to TRUE. If 128-bit MPPE is not available the session will fail.</entry> </row> <row> - <entry><screen>mppe-stateful</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">mppe-stateful</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, stateful MPPE is used. See pppd documentation for more information on stateful MPPE.</entry> </row> <row> - <entry><screen>crtscts</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">crtscts</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, specify that pppd should set the serial port to use hardware flow control with RTS and CTS signals. This value should normally be set to FALSE.</entry> </row> <row> - <entry><screen>baud</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">baud</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, instruct pppd to set the serial port to the specified baudrate. This value should normally be left as 0 to automatically choose the speed.</entry> </row> <row> - <entry><screen>mru</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">mru</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, instruct pppd to request that the peer send packets no larger than the specified size. If non-zero, the MRU should be between 128 and 16384.</entry> </row> <row> - <entry><screen>mtu</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">mtu</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, instruct pppd to send packets no larger than the specified size.</entry> </row> <row> - <entry><screen>lcp-echo-failure</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">lcp-echo-failure</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, instruct pppd to presume the connection to the peer has failed if the specified number of LCP echo-requests go unanswered by the peer. The 'lcp-echo-interval' property must also be set to a non-zero value if this property is used.</entry> </row> <row> - <entry><screen>lcp-echo-interval</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">lcp-echo-interval</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, instruct pppd to send an LCP echo-request frame to the peer every n seconds (where n is the specified value). Note that some PPP peers will respond to echo requests and some will not, and it is not possible to autodetect this.</entry> </row> </tbody> @@ -1055,33 +1105,33 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>pppoe</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">pppoe</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>service</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">service</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>If specified, instruct PPPoE to only initiate sessions with access concentrators that provide the specified serivce. For most providers, this should be left blank. It is only required if there are multiple access concentrators or a specific service is known to be required.</entry> </row> <row> - <entry><screen>username</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">username</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Username used to authenticate with the PPPoE service.</entry> </row> <row> - <entry><screen>password</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">password</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Password used to authenticate with the PPPoE service.</entry> </row> <row> - <entry><screen>password-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">password-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the PPPoE password. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> </tbody> @@ -1100,39 +1150,39 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>serial</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">serial</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>baud</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>57600</screen></entry> + <entry align="left">baud</entry> + <entry align="left">uint32</entry> + <entry align="left">57600</entry> <entry>Speed to use for communication over the serial port. Note that this value usually has no effect for mobile broadband modems as they generally ignore speed settings and use the highest available speed.</entry> </row> <row> - <entry><screen>bits</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>8</screen></entry> + <entry align="left">bits</entry> + <entry align="left">uint32</entry> + <entry align="left">8</entry> <entry>Byte-width of the serial communication. The 8 in '8n1' for example.</entry> </row> <row> - <entry><screen>parity</screen></entry> - <entry><screen>gchar</screen></entry> - <entry><screen>110</screen></entry> + <entry align="left">parity</entry> + <entry align="left">gchar</entry> + <entry align="left">110</entry> <entry>Parity setting of the serial port. Either 'E' for even parity, 'o' for odd parity, or 'n' for no parity.</entry> </row> <row> - <entry><screen>stopbits</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>1</screen></entry> + <entry align="left">stopbits</entry> + <entry align="left">uint32</entry> + <entry align="left">1</entry> <entry>Number of stop bits for communication on the serial port. Either 1 or 2. The 1 in '8n1' for example.</entry> </row> <row> - <entry><screen>send-delay</screen></entry> - <entry><screen>uint64</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">send-delay</entry> + <entry align="left">uint64</entry> + <entry align="left">0</entry> <entry>Time to delay between each byte sent to the modem, in microseconds.</entry> </row> </tbody> @@ -1151,45 +1201,45 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>vlan</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">vlan</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>interface-name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">interface-name</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>If given, specifies the kernel name of the VLAN interface. If not given, a default name will be constructed from the interface described by the parent interface and the 'id' property, ex 'eth2.1'. The parent interface may be given by the 'parent' property or by a hardware address property, eg the 'wired' settings' 'mac-address' property.</entry> </row> <row> - <entry><screen>parent</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">parent</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>If given, specifies the parent interface name or parent connection UUID from which this VLAN interface should be created. If this property is not specified, the connection must contain a hardware address in a hardware-specific setting, like the 'wired' settings' 'mac-address' property.</entry> </row> <row> - <entry><screen>id</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">id</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>The VLAN indentifier the interface created by this connection should be assigned.</entry> </row> <row> - <entry><screen>flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>One or more flags which control the behavior and features of the VLAN interface. Flags include reordering of output packet headers (0x01), use of the GVRP protocol (0x02), and loose binding of the interface to its master device's operating state (0x04).</entry> </row> <row> - <entry><screen>ingress-priority-map</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">ingress-priority-map</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>For incoming packets, a list of mappings from 802.1p priorities to Linux SKB priorities. The mapping is given in the format 'from:to' where both 'from' and 'to' are unsigned integers, ie '7:3'.</entry> </row> <row> - <entry><screen>egress-priority-map</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">egress-priority-map</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>For outgoing packets, a list of mappings from Linux SKB priorities to 802.1p priorities. The mapping is given in the format 'from:to' where both 'from' and 'to' are unsigned integers, ie '7:3'.</entry> </row> </tbody> @@ -1208,33 +1258,33 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>vpn</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">vpn</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>service-type</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">service-type</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>D-Bus service name of the VPN plugin that this setting uses to connect to its network. i.e. org.freedesktop.NetworkManager.vpnc for the vpnc plugin.</entry> </row> <row> - <entry><screen>user-name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">user-name</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>If the VPN connection requires a user name for authentication, that name should be provided here. If the connection is available to more than one user, and the VPN requires each user to supply a different name, then leave this property empty. If this property is empty, NetworkManager will automatically supply the username of the user which requested the VPN connection.</entry> </row> <row> - <entry><screen>data</screen></entry> - <entry><screen>dict of (string::string)</screen></entry> - <entry><screen>[ ]</screen></entry> + <entry align="left">data</entry> + <entry align="left">dict of (string::string)</entry> + <entry align="left">[ ]</entry> <entry>Dictionary of key/value pairs of VPN plugin specific data. Both keys and values must be strings.</entry> </row> <row> - <entry><screen>secrets</screen></entry> - <entry><screen>dict of (string::string)</screen></entry> - <entry><screen>[ ]</screen></entry> + <entry align="left">secrets</entry> + <entry align="left">dict of (string::string)</entry> + <entry align="left">[ ]</entry> <entry>Dictionary of key/value pairs of VPN plugin specific secrets like passwords or private keys. Both keys and values must be strings.</entry> </row> </tbody> @@ -1253,21 +1303,21 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>wimax</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">wimax</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>network-name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">network-name</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Network Service Provider (NSP) name of the WiMAX network this connection should use.</entry> </row> <row> - <entry><screen>mac-address</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">mac-address</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>If specified, this connection will only apply to the WiMAX device whose MAC address matches. This property does not change the MAC address of the device (known as MAC spoofing).</entry> </row> </tbody> @@ -1286,75 +1336,75 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>802-3-ethernet</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">802-3-ethernet</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>port</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">port</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Specific port type to use if multiple the device supports multiple attachment methods. One of 'tp' (Twisted Pair), 'aui' (Attachment Unit Interface), 'bnc' (Thin Ethernet) or 'mii' (Media Independent Interface. If the device supports only one port type, this setting is ignored.</entry> </row> <row> - <entry><screen>speed</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">speed</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, request that the device use only the specified speed. In Mbit/s, ie 100 == 100Mbit/s.</entry> </row> <row> - <entry><screen>duplex</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">duplex</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>If specified, request that the device only use the specified duplex mode. Either 'half' or 'full'.</entry> </row> <row> - <entry><screen>auto-negotiate</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>TRUE</screen></entry> + <entry align="left">auto-negotiate</entry> + <entry align="left">boolean</entry> + <entry align="left">TRUE</entry> <entry>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.</entry> </row> <row> - <entry><screen>mac-address</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">mac-address</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>If specified, this connection will only apply to the ethernet device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).</entry> </row> <row> - <entry><screen>cloned-mac-address</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">cloned-mac-address</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>If specified, request that the device use this MAC address instead of its permanent MAC address. This is known as MAC cloning or spoofing.</entry> </row> <row> - <entry><screen>mac-address-blacklist</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">mac-address-blacklist</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>If specified, this connection will never apply to the ethernet device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55).</entry> </row> <row> - <entry><screen>mtu</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">mtu</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.</entry> </row> <row> - <entry><screen>s390-subchannels</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">s390-subchannels</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>Identifies specific subchannels that this network device uses for communcation with z/VM or s390 host. Like the 'mac-address' property for non-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels. The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (.) character.</entry> </row> <row> - <entry><screen>s390-nettype</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">s390-nettype</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>s390 network device type; one of 'qeth', 'lcs', or 'ctc', representing the different types of virtual network devices available on s390 systems.</entry> </row> <row> - <entry><screen>s390-options</screen></entry> - <entry><screen>dict of (string::string)</screen></entry> - <entry><screen>[ ]</screen></entry> + <entry align="left">s390-options</entry> + <entry align="left">dict of (string::string)</entry> + <entry align="left">[ ]</entry> <entry>Dictionary of key/value pairs of s390-specific device options. Both keys and values must be strings. Allowed keys include 'portno', 'layer2', 'portname', 'protocol', among others.</entry> </row> </tbody> @@ -1373,93 +1423,93 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>802-11-wireless</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">802-11-wireless</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>ssid</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">ssid</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>SSID of the WiFi network. Must be specified.</entry> </row> <row> - <entry><screen>mode</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">mode</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>WiFi network mode; one of 'infrastructure', 'adhoc' or 'ap'. If blank, infrastructure is assumed.</entry> </row> <row> - <entry><screen>band</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">band</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>802.11 frequency band of the network. One of 'a' for 5GHz 802.11a or 'bg' for 2.4GHz 802.11. This will lock associations to the WiFi network to the specific band, i.e. if 'a' is specified, the device will not associate with the same network in the 2.4GHz band even if the network's settings are compatible. This setting depends on specific driver capability and may not work with all drivers.</entry> </row> <row> - <entry><screen>channel</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">channel</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Wireless channel to use for the WiFi connection. The device will only join (or create for Ad-Hoc networks) a WiFi network on the specified channel. Because channel numbers overlap between bands, this property also requires the 'band' property to be set.</entry> </row> <row> - <entry><screen>bssid</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">bssid</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>If specified, directs the device to only associate with the given access point. This capability is highly driver dependent and not supported by all devices. Note: this property does not control the BSSID used when creating an Ad-Hoc network and is unlikely to in the future.</entry> </row> <row> - <entry><screen>rate</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">rate</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, directs the device to only use the specified bitrate for communication with the access point. Units are in Kb/s, ie 5500 = 5.5 Mbit/s. This property is highly driver dependent and not all devices support setting a static bitrate.</entry> </row> <row> - <entry><screen>tx-power</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">tx-power</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, directs the device to use the specified transmit power. Units are dBm. This property is highly driver dependent and not all devices support setting a static transmit power.</entry> </row> <row> - <entry><screen>mac-address</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">mac-address</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>If specified, this connection will only apply to the WiFi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).</entry> </row> <row> - <entry><screen>cloned-mac-address</screen></entry> - <entry><screen>byte array</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">cloned-mac-address</entry> + <entry align="left">byte array</entry> + <entry align="left">[]</entry> <entry>If specified, request that the WiFi device use this MAC address instead of its permanent MAC address. This is known as MAC cloning or spoofing.</entry> </row> <row> - <entry><screen>mac-address-blacklist</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">mac-address-blacklist</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>If specified, this connection will never apply to the WiFi device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55).</entry> </row> <row> - <entry><screen>mtu</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">mtu</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.</entry> </row> <row> - <entry><screen>seen-bssids</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">seen-bssids</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>A list of BSSIDs (each BSSID formatted as a MAC address like 00:11:22:33:44:55') that have been detected as part of the WiFI network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BBSID list of NetworkManager. The changes you make to this property will not be preserved.</entry> </row> <row> - <entry><screen>security</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">security</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>If the wireless connection has any security restrictions, like 802.1x, WEP, or WPA, set this property to '802-11-wireless-security' and ensure the connection contains a valid 802-11-wireless-security setting.</entry> </row> <row> - <entry><screen>hidden</screen></entry> - <entry><screen>boolean</screen></entry> - <entry><screen>FALSE</screen></entry> + <entry align="left">hidden</entry> + <entry align="left">boolean</entry> + <entry align="left">FALSE</entry> <entry>If TRUE, indicates this network is a non-broadcasting network that hides its SSID. In this case various workarounds may take place, such as probe-scanning the SSID for more reliable network discovery. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution.</entry> </row> </tbody> @@ -1478,115 +1528,160 @@ </thead> <tbody> <row> - <entry><screen>name</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen>802-11-wireless-security</screen></entry> + <entry align="left">name</entry> + <entry align="left">string</entry> + <entry align="left">802-11-wireless-security</entry> <entry>The setting's name; these names are defined by the specification and cannot be changed after the object has been created. Each setting class has a name, and all objects of that class share the same name.</entry> </row> <row> - <entry><screen>key-mgmt</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">key-mgmt</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Key management used for the connection. One of 'none' (WEP), 'ieee8021x' (Dynamic WEP), 'wpa-none' (WPA-PSK Ad-Hoc), 'wpa-psk' (infrastructure WPA-PSK), or 'wpa-eap' (WPA-Enterprise). This property must be set for any WiFi connection that uses security.</entry> </row> <row> - <entry><screen>wep-tx-keyidx</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">wep-tx-keyidx</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>When static WEP is used (ie, key-mgmt = 'none') and a non-default WEP key index is used by the AP, put that WEP key index here. Valid values are 0 (default key) through 3. Note that some consumer access points (like the Linksys WRT54G) number the keys 1 - 4.</entry> </row> <row> - <entry><screen>auth-alg</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">auth-alg</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>When WEP is used (ie, key-mgmt = 'none' or 'ieee8021x') indicate the 802.11 authentication algorithm required by the AP here. One of 'open' for Open System, 'shared' for Shared Key, or 'leap' for Cisco LEAP. When using Cisco LEAP (ie, key-mgmt = 'ieee8021x' and auth-alg = 'leap') the 'leap-username' and 'leap-password' properties must be specified.</entry> </row> <row> - <entry><screen>proto</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">proto</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>List of strings specifying the allowed WPA protocol versions to use. Each element may be one 'wpa' (allow WPA) or 'rsn' (allow WPA2/RSN). If not specified, both WPA and RSN connections are allowed.</entry> </row> <row> - <entry><screen>pairwise</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">pairwise</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>If specified, will only connect to WPA networks that provide the specified pairwise encryption capabilities. Each element may be one of 'wep40', 'wep104', 'tkip', or 'ccmp'.</entry> </row> <row> - <entry><screen>group</screen></entry> - <entry><screen>array of string</screen></entry> - <entry><screen>[]</screen></entry> + <entry align="left">group</entry> + <entry align="left">array of string</entry> + <entry align="left">[]</entry> <entry>If specified, will only connect to WPA networks that provide the specified group/multicast encryption capabilities. Each element may be one of 'wep40', 'wep104', 'tkip', or 'ccmp'.</entry> </row> <row> - <entry><screen>leap-username</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">leap-username</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The login username for legacy LEAP connections (ie, key-mgmt = 'ieee8021x' and auth-alg = 'leap').</entry> </row> <row> - <entry><screen>wep-key0</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">wep-key0</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Index 0 WEP key. This is the WEP key used in most networks. See the 'wep-key-type' property for a description of how this key is interpreted.</entry> </row> <row> - <entry><screen>wep-key1</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">wep-key1</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Index 1 WEP key. This WEP index is not used by most networks. See the 'wep-key-type' property for a description of how this key is interpreted.</entry> </row> <row> - <entry><screen>wep-key2</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">wep-key2</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Index 2 WEP key. This WEP index is not used by most networks. See the 'wep-key-type' property for a description of how this key is interpreted.</entry> </row> <row> - <entry><screen>wep-key3</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">wep-key3</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Index 3 WEP key. This WEP index is not used by most networks. See the 'wep-key-type' property for a description of how this key is interpreted.</entry> </row> <row> - <entry><screen>wep-key-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">wep-key-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the WEP keys. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>wep-key-type</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">wep-key-type</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Controls the interpretation of WEP keys. Allowed values are 1 (interpret WEP keys as hexadecimal or ASCII keys) or 2 (interpret WEP keys as WEP Passphrases). If set to 1 and the keys are hexadecimal, they must be either 10 or 26 characters in length. If set to 1 and the keys are ASCII keys, they must be either 5 or 13 characters in length. If set to 2, the passphrase is hashed using the de-facto MD5 method to derive the actual WEP key.</entry> </row> <row> - <entry><screen>psk</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">psk</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>Pre-Shared-Key for WPA networks. If the key is 64-characters long, it must contain only hexadecimal characters and is interpreted as a hexadecimal WPA key. Otherwise, the key must be between 8 and 63 ASCII characters (as specified in the 802.11i standard) and is interpreted as a WPA passphrase, and is hashed to derive the actual WPA-PSK used when connecting to the WiFi network.</entry> </row> <row> - <entry><screen>psk-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">psk-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the WPA PSK key. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> <row> - <entry><screen>leap-password</screen></entry> - <entry><screen>string</screen></entry> - <entry><screen></screen></entry> + <entry align="left">leap-password</entry> + <entry align="left">string</entry> + <entry align="left"></entry> <entry>The login password for legacy LEAP connections (ie, key-mgmt = 'ieee8021x' and auth-alg = 'leap').</entry> </row> <row> - <entry><screen>leap-password-flags</screen></entry> - <entry><screen>uint32</screen></entry> - <entry><screen>0</screen></entry> + <entry align="left">leap-password-flags</entry> + <entry align="left">uint32</entry> + <entry align="left">0</entry> <entry>Flags indicating how to handle the LEAP password. (see <xref linkend="secrets-flags"/> for flag values)</entry> </row> </tbody> </tgroup> </table> - </para> -</section> + </para> + <refsect2 id="secrets-flags"> + <title>Secret flag types:</title> + <para> + Each secret property in a setting has an associated <emphasis>flags</emphasis> property + that describes how to handle that secret. The <emphasis>flags</emphasis> property is a bitfield + that contains zero or more of the following values logically OR-ed together. + </para> + <itemizedlist> + <listitem> + <para>0x0 (none) - the system is responsible for providing and storing this secret.</para> + </listitem> + <listitem> + <para>0x1 (agent-owned) - a user-session secret agent is responsible for providing and storing + this secret; when it is required, agents will be asked to provide it.</para> + </listitem> + <listitem> + <para>0x2 (not-saved) - this secret should not be saved but should be requested from the user + each time it is required. This flag should be used for One-Time-Pad secrets, PIN codes from hardware tokens, + or if the user simply does not want to save the secret.</para> + </listitem> + <listitem> + <para>0x4 (not-required) - in some situations it cannot be automatically determined that a secret + is required or not. This flag hints that the secret is not required and should not be requested from the user.</para> + </listitem> + </itemizedlist> + </refsect2> + </refsect1> + <refsect1> + <title>AUTHOR</title> + <para> + <author> + <firstname>NetworkManager developers</firstname> + </author> + </para> + </refsect1> + <refsect1> + <title>FILES</title> + <para>/etc/NetworkManager/system-connections</para> + <para>or distro plugin-specific location</para> + </refsect1> + <refsect1> + <title>SEE ALSO</title> + <para>https://live.gnome.org/NetworkManagerConfiguration</para> + <para>NetworkManager(8), nmcli(1), NetworkManager.conf(5)</para> + </refsect1> +</refentry> diff --git a/man/nmcli.1 b/man/nmcli.1 index 184ce40cc..d1f3a0caa 100644 --- a/man/nmcli.1 +++ b/man/nmcli.1 @@ -19,9 +19,9 @@ .\" with this manual; if not, write to the Free Software Foundation, Inc., .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. .\" -.\" Copyright (C) 2010 - 2012 Red Hat, Inc. +.\" Copyright (C) 2010 - 2013 Red Hat, Inc. .\" -.TH NMCLI "1" "26 July 2012" +.TH NMCLI "1" "17 January 2013" .SH NAME nmcli \(en command\(hyline tool for controlling NetworkManager @@ -529,4 +529,5 @@ https://bugzilla.gnome.org/ \(em product \fINetworkManager\fP. .SH SEE ALSO .BR nm\-tool (1), .BR nm\-online (1), -.BR NetworkManager(8). +.BR NetworkManager (8), +.BR nm\-settings (5). diff --git a/man/nmcli.1.in b/man/nmcli.1.in index 184ce40cc..d1f3a0caa 100644 --- a/man/nmcli.1.in +++ b/man/nmcli.1.in @@ -19,9 +19,9 @@ .\" with this manual; if not, write to the Free Software Foundation, Inc., .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. .\" -.\" Copyright (C) 2010 - 2012 Red Hat, Inc. +.\" Copyright (C) 2010 - 2013 Red Hat, Inc. .\" -.TH NMCLI "1" "26 July 2012" +.TH NMCLI "1" "17 January 2013" .SH NAME nmcli \(en command\(hyline tool for controlling NetworkManager @@ -529,4 +529,5 @@ https://bugzilla.gnome.org/ \(em product \fINetworkManager\fP. .SH SEE ALSO .BR nm\-tool (1), .BR nm\-online (1), -.BR NetworkManager(8). +.BR NetworkManager (8), +.BR nm\-settings (5). @@ -1,16 +1,16 @@ # Italian translation for NetworkManager -# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 the NetworkManager CopyRight Holder +# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 the NetworkManager CopyRight Holder # This file is distributed under the same license as the NetworkManager package. # Francesco Marletta <francesco.marletta@tiscali.it>, 2004, 2005, 2006, 2007, 2008, 2009, 2010. # Vincenzo Reale <smart2128@baslug.org>, 2011. -# Milo Casagrande <milo@ubuntu.com>, 2011, 2012. +# Milo Casagrande <milo@ubuntu.com>, 2011, 2012, 2013. # msgid "" msgstr "" "Project-Id-Version: network-manager\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-09-02 11:55+0200\n" -"PO-Revision-Date: 2012-09-02 12:11+0200\n" +"POT-Creation-Date: 2013-01-28 22:52+0100\n" +"PO-Revision-Date: 2013-01-07 15:42+0100\n" "Last-Translator: Milo Casagrande <milo@ubuntu.com>\n" "Language-Team: Italian <tp@lists.linux.it>\n" "Language: Italian\n" @@ -22,8 +22,8 @@ msgstr "" "X-Generator: Launchpad (build 14170)\n" #: ../cli/src/common.c:32 ../cli/src/common.c:44 ../cli/src/common.c:52 -#: ../cli/src/common.c:63 ../cli/src/connections.c:128 -#: ../cli/src/connections.c:162 +#: ../cli/src/common.c:63 ../cli/src/connections.c:133 +#: ../cli/src/connections.c:167 msgid "GROUP" msgstr "GRUPPO" @@ -97,7 +97,7 @@ msgstr "connessione in corso (avvio connessioni secondarie)" msgid "connected" msgstr "collegato" -#: ../cli/src/common.c:386 ../cli/src/connections.c:633 +#: ../cli/src/common.c:386 ../cli/src/connections.c:658 msgid "deactivating" msgstr "disattivazione" @@ -105,16 +105,16 @@ msgstr "disattivazione" msgid "connection failed" msgstr "connessione non riuscita" -#: ../cli/src/common.c:390 ../cli/src/connections.c:636 -#: ../cli/src/connections.c:659 ../cli/src/connections.c:1351 -#: ../cli/src/devices.c:622 ../cli/src/network-manager.c:123 +#: ../cli/src/common.c:390 ../cli/src/connections.c:661 +#: ../cli/src/connections.c:684 ../cli/src/connections.c:1376 +#: ../cli/src/devices.c:650 ../cli/src/network-manager.c:123 #: ../cli/src/network-manager.c:185 ../cli/src/network-manager.c:188 #: ../cli/src/network-manager.c:197 ../cli/src/network-manager.c:257 #: ../cli/src/network-manager.c:273 ../cli/src/network-manager.c:431 #: ../cli/src/network-manager.c:486 ../cli/src/network-manager.c:524 -#: ../cli/src/network-manager.c:563 ../cli/src/settings.c:585 -#: ../cli/src/settings.c:613 ../cli/src/utils.c:531 ../src/main.c:462 -#: ../src/main.c:481 +#: ../cli/src/network-manager.c:563 ../cli/src/settings.c:629 +#: ../cli/src/settings.c:657 ../cli/src/utils.c:533 ../src/main.c:434 +#: ../src/main.c:453 msgid "unknown" msgstr "sconosciuto" @@ -140,7 +140,7 @@ msgstr "Impossibile preparare il dispositivo per la configurazione" #: ../cli/src/common.c:414 msgid "" -"IP configuration could not be reserved (no available address, timeout, etc)" +"IP configuration could not be reserved (no available address, timeout, etc.)" msgstr "" "La configurazione IP non può essere riservata (nessun indirizzo disponibile, " "timeout...)" @@ -333,23 +333,32 @@ msgstr "Un problema col bridge RFC 2684 Ethernet su ADSL" msgid "ModemManager is unavailable" msgstr "ModemManager non è disponibile" -#: ../cli/src/common.c:558 ../cli/src/devices.c:274 ../cli/src/devices.c:290 -#: ../cli/src/devices.c:410 ../cli/src/devices.c:454 +#: ../cli/src/common.c:558 +msgid "The Wi-Fi network could not be found" +msgstr "Impossibile trovare la rete Wi-Fi" + +#: ../cli/src/common.c:561 +msgid "A secondary connection of the base connection failed" +msgstr "" +"Si è verificato un errore in una connessione secondaria di quella di base" + +#: ../cli/src/common.c:564 ../cli/src/devices.c:296 ../cli/src/devices.c:314 +#: ../cli/src/devices.c:436 ../cli/src/devices.c:480 msgid "Unknown" msgstr "Sconosciuto" #. 0 #. used only for 'GENERAL' group listing -#: ../cli/src/connections.c:59 ../cli/src/connections.c:129 -#: ../cli/src/devices.c:105 ../cli/src/devices.c:129 ../cli/src/devices.c:139 -#: ../cli/src/devices.c:149 ../cli/src/devices.c:163 ../cli/src/devices.c:177 -#: ../cli/src/devices.c:199 +#: ../cli/src/connections.c:60 ../cli/src/connections.c:134 +#: ../cli/src/devices.c:108 ../cli/src/devices.c:132 ../cli/src/devices.c:142 +#: ../cli/src/devices.c:152 ../cli/src/devices.c:166 ../cli/src/devices.c:180 +#: ../cli/src/devices.c:202 ../cli/src/devices.c:218 ../cli/src/devices.c:227 msgid "NAME" msgstr "NOME" #. 0 #. 1 -#: ../cli/src/connections.c:60 ../cli/src/connections.c:130 +#: ../cli/src/connections.c:61 ../cli/src/connections.c:135 msgid "UUID" msgstr "UUID" @@ -357,29 +366,29 @@ msgstr "UUID" #. 0 #. 1 #. 2 -#: ../cli/src/connections.c:61 ../cli/src/connections.c:163 -#: ../cli/src/devices.c:71 ../cli/src/devices.c:107 ../cli/src/devices.c:202 +#: ../cli/src/connections.c:62 ../cli/src/connections.c:168 +#: ../cli/src/devices.c:72 ../cli/src/devices.c:110 ../cli/src/devices.c:205 msgid "TYPE" msgstr "TIPO" #. 2 -#: ../cli/src/connections.c:62 +#: ../cli/src/connections.c:63 msgid "TIMESTAMP" msgstr "TIMESTAMP" #. 3 -#: ../cli/src/connections.c:63 +#: ../cli/src/connections.c:64 msgid "TIMESTAMP-REAL" msgstr "TIMESTAMP-REALE" #. 4 #. 13 -#: ../cli/src/connections.c:64 ../cli/src/devices.c:119 +#: ../cli/src/connections.c:65 ../cli/src/devices.c:122 msgid "AUTOCONNECT" msgstr "CONN-AUTOMATICA" #. 5 -#: ../cli/src/connections.c:65 +#: ../cli/src/connections.c:66 msgid "READONLY" msgstr "SOLO LETTURA" @@ -388,13 +397,13 @@ msgstr "SOLO LETTURA" #. 2 #. 11 #. 5 -#: ../cli/src/connections.c:66 ../cli/src/connections.c:137 -#: ../cli/src/devices.c:73 ../cli/src/devices.c:189 ../cli/src/devices.c:205 +#: ../cli/src/connections.c:67 ../cli/src/connections.c:142 +#: ../cli/src/devices.c:74 ../cli/src/devices.c:192 ../cli/src/devices.c:208 msgid "DBUS-PATH" msgstr "PERCORSO-DBUS" #. 2 -#: ../cli/src/connections.c:131 +#: ../cli/src/connections.c:136 msgid "DEVICES" msgstr "DISPOSITIVI" @@ -402,85 +411,85 @@ msgstr "DISPOSITIVI" #. 1 #. 8 #. 1 -#: ../cli/src/connections.c:132 ../cli/src/devices.c:72 -#: ../cli/src/devices.c:114 ../cli/src/network-manager.c:39 +#: ../cli/src/connections.c:137 ../cli/src/devices.c:73 +#: ../cli/src/devices.c:117 ../cli/src/network-manager.c:39 msgid "STATE" msgstr "STATO" #. 4 -#: ../cli/src/connections.c:133 +#: ../cli/src/connections.c:138 msgid "DEFAULT" msgstr "PREDEFINITO" #. 5 -#: ../cli/src/connections.c:134 +#: ../cli/src/connections.c:139 msgid "DEFAULT6" msgstr "PREDEFINITO6" #. 6 -#: ../cli/src/connections.c:135 +#: ../cli/src/connections.c:140 msgid "SPEC-OBJECT" msgstr "SPEC-OGGETTO" #. 7 #. 1 -#: ../cli/src/connections.c:136 ../cli/src/connections.c:150 +#: ../cli/src/connections.c:141 ../cli/src/connections.c:155 msgid "VPN" msgstr "VPN" #. 9 -#: ../cli/src/connections.c:138 +#: ../cli/src/connections.c:143 msgid "CON-PATH" msgstr "PERCORSO-CON" #. 10 -#: ../cli/src/connections.c:139 +#: ../cli/src/connections.c:144 msgid "ZONE" msgstr "ZONA" #. 11 -#: ../cli/src/connections.c:140 +#: ../cli/src/connections.c:145 msgid "MASTER-PATH" msgstr "PERCORSO-MASTER" -#: ../cli/src/connections.c:148 ../cli/src/devices.c:82 +#: ../cli/src/connections.c:153 ../cli/src/devices.c:83 msgid "GENERAL" msgstr "GENERALE" #. 0 -#: ../cli/src/connections.c:149 +#: ../cli/src/connections.c:154 msgid "IP" msgstr "IP" #. 1 -#: ../cli/src/connections.c:164 +#: ../cli/src/connections.c:169 msgid "USERNAME" msgstr "NOMEUTENTE" #. 2 -#: ../cli/src/connections.c:165 +#: ../cli/src/connections.c:170 msgid "GATEWAY" msgstr "GATEWAY" #. 3 -#: ../cli/src/connections.c:166 +#: ../cli/src/connections.c:171 msgid "BANNER" msgstr "BANNER" #. 4 -#: ../cli/src/connections.c:167 +#: ../cli/src/connections.c:172 msgid "VPN-STATE" msgstr "STATO-VPN" #. 5 -#: ../cli/src/connections.c:168 +#: ../cli/src/connections.c:173 msgid "CFG" msgstr "CFG" -#: ../cli/src/connections.c:190 +#: ../cli/src/connections.c:195 #, c-format msgid "" -"Usage: nmcli con { COMMAND | help }\n" +"Usage: nmcli connection { COMMAND | help }\n" " COMMAND := { list | status | up | down | delete }\n" "\n" " list [id <id> | uuid <id>]\n" @@ -491,8 +500,9 @@ msgid "" "<timeout>]\n" " down id <id> | uuid <id>\n" " delete id <id> | uuid <id>\n" +"\n" msgstr "" -"Uso: nmcli con { COMANDO | help }\n" +"Uso: nmcli connection { COMANDO | help }\n" " COMANDO := { list | status | up | down | delete }\n" "\n" " list [id <id> | uuid <id>]\n" @@ -504,358 +514,362 @@ msgstr "" " down id <id> | uuid <id>\n" " delete id <id> | uuid <id>\n" -#: ../cli/src/connections.c:249 ../cli/src/connections.c:609 +#: ../cli/src/connections.c:256 ../cli/src/connections.c:634 #, c-format msgid "Error: 'con list': %s" msgstr "Errore: «con list»: %s" -#: ../cli/src/connections.c:251 ../cli/src/connections.c:611 +#: ../cli/src/connections.c:258 ../cli/src/connections.c:636 #, c-format msgid "Error: 'con list': %s; allowed fields: %s" msgstr "Errore: «con list»: %s; campi consentiti: %s" -#: ../cli/src/connections.c:259 +#: ../cli/src/connections.c:266 msgid "Connection details" msgstr "Dettagli connessione" -#: ../cli/src/connections.c:484 +#: ../cli/src/connections.c:509 msgid "never" msgstr "mai" #. "CAPABILITIES" #. Print header #. "WIFI-PROPERTIES" -#: ../cli/src/connections.c:485 ../cli/src/connections.c:486 -#: ../cli/src/connections.c:714 ../cli/src/connections.c:715 -#: ../cli/src/connections.c:717 ../cli/src/devices.c:418 -#: ../cli/src/devices.c:471 ../cli/src/devices.c:587 ../cli/src/devices.c:588 -#: ../cli/src/devices.c:589 ../cli/src/devices.c:621 ../cli/src/devices.c:647 -#: ../cli/src/devices.c:648 ../cli/src/devices.c:649 ../cli/src/devices.c:650 -#: ../cli/src/devices.c:651 ../cli/src/network-manager.c:267 -#: ../cli/src/settings.c:694 ../cli/src/settings.c:764 -#: ../cli/src/settings.c:884 ../cli/src/settings.c:1166 -#: ../cli/src/settings.c:1167 ../cli/src/settings.c:1169 -#: ../cli/src/settings.c:1171 ../cli/src/settings.c:1172 -#: ../cli/src/settings.c:1303 ../cli/src/settings.c:1304 -#: ../cli/src/settings.c:1305 ../cli/src/settings.c:1306 -#: ../cli/src/settings.c:1383 ../cli/src/settings.c:1384 -#: ../cli/src/settings.c:1385 ../cli/src/settings.c:1386 -#: ../cli/src/settings.c:1387 ../cli/src/settings.c:1388 -#: ../cli/src/settings.c:1389 ../cli/src/settings.c:1390 -#: ../cli/src/settings.c:1391 ../cli/src/settings.c:1392 -#: ../cli/src/settings.c:1393 ../cli/src/settings.c:1394 -#: ../cli/src/settings.c:1395 ../cli/src/settings.c:1466 +#: ../cli/src/connections.c:510 ../cli/src/connections.c:511 +#: ../cli/src/connections.c:739 ../cli/src/connections.c:740 +#: ../cli/src/connections.c:742 ../cli/src/devices.c:444 +#: ../cli/src/devices.c:497 ../cli/src/devices.c:615 ../cli/src/devices.c:616 +#: ../cli/src/devices.c:617 ../cli/src/devices.c:649 ../cli/src/devices.c:676 +#: ../cli/src/devices.c:677 ../cli/src/devices.c:678 ../cli/src/devices.c:679 +#: ../cli/src/devices.c:680 ../cli/src/network-manager.c:267 +#: ../cli/src/settings.c:748 ../cli/src/settings.c:823 +#: ../cli/src/settings.c:943 ../cli/src/settings.c:1226 +#: ../cli/src/settings.c:1227 ../cli/src/settings.c:1229 +#: ../cli/src/settings.c:1231 ../cli/src/settings.c:1232 +#: ../cli/src/settings.c:1363 ../cli/src/settings.c:1364 +#: ../cli/src/settings.c:1365 ../cli/src/settings.c:1366 +#: ../cli/src/settings.c:1443 ../cli/src/settings.c:1444 +#: ../cli/src/settings.c:1445 ../cli/src/settings.c:1446 +#: ../cli/src/settings.c:1447 ../cli/src/settings.c:1448 +#: ../cli/src/settings.c:1449 ../cli/src/settings.c:1450 +#: ../cli/src/settings.c:1451 ../cli/src/settings.c:1452 +#: ../cli/src/settings.c:1453 ../cli/src/settings.c:1454 +#: ../cli/src/settings.c:1455 ../cli/src/settings.c:1526 +#: ../cli/src/settings.c:1869 ../cli/src/settings.c:1906 msgid "yes" msgstr "sì" -#: ../cli/src/connections.c:485 ../cli/src/connections.c:486 -#: ../cli/src/connections.c:714 ../cli/src/connections.c:715 -#: ../cli/src/connections.c:717 ../cli/src/devices.c:418 -#: ../cli/src/devices.c:471 ../cli/src/devices.c:587 ../cli/src/devices.c:588 -#: ../cli/src/devices.c:589 ../cli/src/devices.c:621 ../cli/src/devices.c:647 -#: ../cli/src/devices.c:648 ../cli/src/devices.c:649 ../cli/src/devices.c:650 -#: ../cli/src/devices.c:651 ../cli/src/network-manager.c:269 -#: ../cli/src/settings.c:694 ../cli/src/settings.c:696 -#: ../cli/src/settings.c:764 ../cli/src/settings.c:884 -#: ../cli/src/settings.c:1166 ../cli/src/settings.c:1167 -#: ../cli/src/settings.c:1169 ../cli/src/settings.c:1171 -#: ../cli/src/settings.c:1172 ../cli/src/settings.c:1303 -#: ../cli/src/settings.c:1304 ../cli/src/settings.c:1305 -#: ../cli/src/settings.c:1306 ../cli/src/settings.c:1383 -#: ../cli/src/settings.c:1384 ../cli/src/settings.c:1385 -#: ../cli/src/settings.c:1386 ../cli/src/settings.c:1387 -#: ../cli/src/settings.c:1388 ../cli/src/settings.c:1389 -#: ../cli/src/settings.c:1390 ../cli/src/settings.c:1391 -#: ../cli/src/settings.c:1392 ../cli/src/settings.c:1393 -#: ../cli/src/settings.c:1394 ../cli/src/settings.c:1395 -#: ../cli/src/settings.c:1466 +#: ../cli/src/connections.c:510 ../cli/src/connections.c:511 +#: ../cli/src/connections.c:739 ../cli/src/connections.c:740 +#: ../cli/src/connections.c:742 ../cli/src/devices.c:444 +#: ../cli/src/devices.c:497 ../cli/src/devices.c:615 ../cli/src/devices.c:616 +#: ../cli/src/devices.c:617 ../cli/src/devices.c:649 ../cli/src/devices.c:676 +#: ../cli/src/devices.c:677 ../cli/src/devices.c:678 ../cli/src/devices.c:679 +#: ../cli/src/devices.c:680 ../cli/src/network-manager.c:269 +#: ../cli/src/settings.c:748 ../cli/src/settings.c:750 +#: ../cli/src/settings.c:823 ../cli/src/settings.c:943 +#: ../cli/src/settings.c:1226 ../cli/src/settings.c:1227 +#: ../cli/src/settings.c:1229 ../cli/src/settings.c:1231 +#: ../cli/src/settings.c:1232 ../cli/src/settings.c:1363 +#: ../cli/src/settings.c:1364 ../cli/src/settings.c:1365 +#: ../cli/src/settings.c:1366 ../cli/src/settings.c:1443 +#: ../cli/src/settings.c:1444 ../cli/src/settings.c:1445 +#: ../cli/src/settings.c:1446 ../cli/src/settings.c:1447 +#: ../cli/src/settings.c:1448 ../cli/src/settings.c:1449 +#: ../cli/src/settings.c:1450 ../cli/src/settings.c:1451 +#: ../cli/src/settings.c:1452 ../cli/src/settings.c:1453 +#: ../cli/src/settings.c:1454 ../cli/src/settings.c:1455 +#: ../cli/src/settings.c:1526 ../cli/src/settings.c:1869 +#: ../cli/src/settings.c:1906 msgid "no" msgstr "no" -#: ../cli/src/connections.c:560 +#: ../cli/src/connections.c:585 msgid "Connection list" msgstr "Elenco connessioni" -#: ../cli/src/connections.c:573 ../cli/src/connections.c:1110 -#: ../cli/src/connections.c:1648 ../cli/src/connections.c:1663 -#: ../cli/src/connections.c:1672 ../cli/src/connections.c:1682 -#: ../cli/src/connections.c:1694 ../cli/src/connections.c:1802 -#: ../cli/src/connections.c:1904 ../cli/src/devices.c:1041 -#: ../cli/src/devices.c:1051 ../cli/src/devices.c:1169 -#: ../cli/src/devices.c:1177 ../cli/src/devices.c:1541 -#: ../cli/src/devices.c:1548 ../cli/src/devices.c:1562 -#: ../cli/src/devices.c:1569 ../cli/src/devices.c:1586 -#: ../cli/src/devices.c:1597 ../cli/src/devices.c:1818 -#: ../cli/src/devices.c:1825 +#: ../cli/src/connections.c:598 ../cli/src/connections.c:1135 +#: ../cli/src/connections.c:1673 ../cli/src/connections.c:1688 +#: ../cli/src/connections.c:1697 ../cli/src/connections.c:1707 +#: ../cli/src/connections.c:1719 ../cli/src/connections.c:1828 +#: ../cli/src/connections.c:1930 ../cli/src/devices.c:1127 +#: ../cli/src/devices.c:1137 ../cli/src/devices.c:1255 +#: ../cli/src/devices.c:1263 ../cli/src/devices.c:1627 +#: ../cli/src/devices.c:1634 ../cli/src/devices.c:1648 +#: ../cli/src/devices.c:1655 ../cli/src/devices.c:1672 +#: ../cli/src/devices.c:1683 ../cli/src/devices.c:1904 +#: ../cli/src/devices.c:1911 #, c-format msgid "Error: %s argument is missing." msgstr "Errore: manca l'argomento %s." -#: ../cli/src/connections.c:586 +#: ../cli/src/connections.c:611 #, c-format msgid "Error: %s - no such connection." msgstr "Errore: %s - la connessione non esiste." -#: ../cli/src/connections.c:592 ../cli/src/connections.c:1707 -#: ../cli/src/connections.c:1819 ../cli/src/connections.c:1911 -#: ../cli/src/devices.c:825 ../cli/src/devices.c:905 ../cli/src/devices.c:1065 -#: ../cli/src/devices.c:1183 ../cli/src/devices.c:1610 -#: ../cli/src/devices.c:1831 +#: ../cli/src/connections.c:617 ../cli/src/connections.c:1732 +#: ../cli/src/connections.c:1845 ../cli/src/connections.c:1937 +#: ../cli/src/devices.c:911 ../cli/src/devices.c:991 ../cli/src/devices.c:1151 +#: ../cli/src/devices.c:1269 ../cli/src/devices.c:1696 +#: ../cli/src/devices.c:1917 #, c-format msgid "Unknown parameter: %s\n" msgstr "Parametro sconosciuto: %s\n" -#: ../cli/src/connections.c:601 +#: ../cli/src/connections.c:626 #, c-format msgid "Error: no valid parameter specified." msgstr "Errore: non è stato specificato alcun parametro valido." -#: ../cli/src/connections.c:616 ../cli/src/connections.c:2004 -#: ../cli/src/devices.c:2039 ../cli/src/network-manager.c:596 +#: ../cli/src/connections.c:641 ../cli/src/connections.c:2033 +#: ../cli/src/devices.c:2128 ../cli/src/network-manager.c:599 #, c-format msgid "Error: %s." msgstr "Errore: %s." -#: ../cli/src/connections.c:629 +#: ../cli/src/connections.c:654 msgid "activating" msgstr "attivazione" -#: ../cli/src/connections.c:631 +#: ../cli/src/connections.c:656 msgid "activated" msgstr "attivato" -#: ../cli/src/connections.c:645 +#: ../cli/src/connections.c:670 msgid "VPN connecting (prepare)" msgstr "Connessione VPN (preparazione)" -#: ../cli/src/connections.c:647 +#: ../cli/src/connections.c:672 msgid "VPN connecting (need authentication)" msgstr "Connessione VPN (autenticazione necessaria)" -#: ../cli/src/connections.c:649 +#: ../cli/src/connections.c:674 msgid "VPN connecting" msgstr "Connessione VPN" -#: ../cli/src/connections.c:651 +#: ../cli/src/connections.c:676 msgid "VPN connecting (getting IP configuration)" msgstr "Connessione VPN (acquisizione configurazione IP)" -#: ../cli/src/connections.c:653 +#: ../cli/src/connections.c:678 msgid "VPN connected" msgstr "Connessi alla VPN" -#: ../cli/src/connections.c:655 +#: ../cli/src/connections.c:680 msgid "VPN connection failed" msgstr "Connessione VPN non riuscita" -#: ../cli/src/connections.c:657 +#: ../cli/src/connections.c:682 msgid "VPN disconnected" msgstr "Disconnessi dalla VPN" -#: ../cli/src/connections.c:710 ../cli/src/connections.c:720 +#: ../cli/src/connections.c:735 ../cli/src/connections.c:745 msgid "N/A" msgstr "N/D" -#: ../cli/src/connections.c:914 ../cli/src/connections.c:1138 +#: ../cli/src/connections.c:939 ../cli/src/connections.c:1163 #, c-format msgid "Error: 'con status': %s" msgstr "Errore: «con status»: %s" -#: ../cli/src/connections.c:916 ../cli/src/connections.c:1140 +#: ../cli/src/connections.c:941 ../cli/src/connections.c:1165 #, c-format msgid "Error: 'con status': %s; allowed fields: %s" msgstr "Errore: «con status»: %s; campi consentiti: %s" # [NdT] si tratta di un messaggio che descrive un'azione -#: ../cli/src/connections.c:924 +#: ../cli/src/connections.c:949 msgid "Active connection details" msgstr "Dettagli connessione attiva" -#: ../cli/src/connections.c:1060 ../cli/src/connections.c:1722 -#: ../cli/src/connections.c:1834 ../cli/src/connections.c:1925 -#: ../cli/src/devices.c:852 ../cli/src/devices.c:914 ../cli/src/devices.c:1080 -#: ../cli/src/devices.c:1213 ../cli/src/devices.c:1632 -#: ../cli/src/devices.c:1860 ../cli/src/network-manager.c:311 +#: ../cli/src/connections.c:1085 ../cli/src/connections.c:1747 +#: ../cli/src/connections.c:1860 ../cli/src/connections.c:1951 +#: ../cli/src/devices.c:938 ../cli/src/devices.c:1000 +#: ../cli/src/devices.c:1166 ../cli/src/devices.c:1299 +#: ../cli/src/devices.c:1718 ../cli/src/devices.c:1946 +#: ../cli/src/network-manager.c:311 #, c-format msgid "Error: Can't find out if NetworkManager is running: %s." msgstr "Errore: impossibile determinare se NetworkManager è in esecuzione: %s." -#: ../cli/src/connections.c:1064 ../cli/src/connections.c:1726 -#: ../cli/src/connections.c:1838 ../cli/src/connections.c:1929 -#: ../cli/src/devices.c:856 ../cli/src/devices.c:918 ../cli/src/devices.c:1084 -#: ../cli/src/devices.c:1217 ../cli/src/devices.c:1636 -#: ../cli/src/devices.c:1864 ../cli/src/network-manager.c:315 +#: ../cli/src/connections.c:1089 ../cli/src/connections.c:1751 +#: ../cli/src/connections.c:1864 ../cli/src/connections.c:1955 +#: ../cli/src/devices.c:942 ../cli/src/devices.c:1004 +#: ../cli/src/devices.c:1170 ../cli/src/devices.c:1303 +#: ../cli/src/devices.c:1722 ../cli/src/devices.c:1950 +#: ../cli/src/network-manager.c:315 #, c-format msgid "Error: NetworkManager is not running." msgstr "Errore: NetworkManager non è in esecuzione." # [NdT] si tratta di un messaggio che descrive un'azione -#: ../cli/src/connections.c:1096 +#: ../cli/src/connections.c:1121 msgid "Active connections" msgstr "Connessioni attive" -#: ../cli/src/connections.c:1121 +#: ../cli/src/connections.c:1146 #, c-format msgid "Error: '%s' is not an active connection." msgstr "Errore: «%s» non è una connessione attiva." -#: ../cli/src/connections.c:1126 +#: ../cli/src/connections.c:1151 #, c-format msgid "Error: unknown parameter: %s" msgstr "Errore: parametro sconosciuto: %s" -#: ../cli/src/connections.c:1233 +#: ../cli/src/connections.c:1258 #, c-format msgid "no active connection on device '%s'" msgstr "nessuna connessione attiva sul dispositivo «%s»" -#: ../cli/src/connections.c:1241 +#: ../cli/src/connections.c:1266 msgid "no active connection or device" msgstr "nessuna connessione o dispositivo attivo" -#: ../cli/src/connections.c:1312 +#: ../cli/src/connections.c:1337 #, c-format msgid "device '%s' not compatible with connection '%s'" msgstr "dispositivo «%s» non compatibile con la connessione «%s»" -#: ../cli/src/connections.c:1315 +#: ../cli/src/connections.c:1340 #, c-format msgid "no device found for connection '%s'" msgstr "nessun dispositivo trovato per la connessione «%s»" -#: ../cli/src/connections.c:1327 +#: ../cli/src/connections.c:1352 msgid "unknown reason" msgstr "motivo sconosciuto" -#: ../cli/src/connections.c:1329 +#: ../cli/src/connections.c:1354 msgid "none" msgstr "nessuno" -#: ../cli/src/connections.c:1331 +#: ../cli/src/connections.c:1356 msgid "the user was disconnected" msgstr "l'utente è stato scollegato" -#: ../cli/src/connections.c:1333 +#: ../cli/src/connections.c:1358 msgid "the base network connection was interrupted" msgstr "la connessione di rete di base è stata interrotta" -#: ../cli/src/connections.c:1335 +#: ../cli/src/connections.c:1360 msgid "the VPN service stopped unexpectedly" msgstr "il servizio VPN si è arrestato inaspettatamente" -#: ../cli/src/connections.c:1337 +#: ../cli/src/connections.c:1362 msgid "the VPN service returned invalid configuration" msgstr "il servizio VPN ha restituito una configurazione non valida" -#: ../cli/src/connections.c:1339 +#: ../cli/src/connections.c:1364 msgid "the connection attempt timed out" msgstr "il tentativo di connessione è scaduto" -#: ../cli/src/connections.c:1341 +#: ../cli/src/connections.c:1366 msgid "the VPN service did not start in time" msgstr "il servizio VPN non è stato avviato in tempo" -#: ../cli/src/connections.c:1343 +#: ../cli/src/connections.c:1368 msgid "the VPN service failed to start" msgstr "l'avvio del servizio VPN non è riuscito" -#: ../cli/src/connections.c:1345 +#: ../cli/src/connections.c:1370 msgid "no valid VPN secrets" msgstr "nessun segreto VPN valido" -#: ../cli/src/connections.c:1347 +#: ../cli/src/connections.c:1372 msgid "invalid VPN secrets" msgstr "segreti VPN non validi" -#: ../cli/src/connections.c:1349 +#: ../cli/src/connections.c:1374 msgid "the connection was removed" msgstr "la connessione è stata rimossa" -#: ../cli/src/connections.c:1366 ../cli/src/connections.c:1571 +#: ../cli/src/connections.c:1391 ../cli/src/connections.c:1596 #, c-format msgid "Connection successfully activated (D-Bus active path: %s)\n" msgstr "Connessione attivata con successo (percorso D-Bus attivo: %s)\n" #. Active connection failed and dissapeared, quit. -#: ../cli/src/connections.c:1371 ../cli/src/connections.c:1472 +#: ../cli/src/connections.c:1396 ../cli/src/connections.c:1497 #, c-format msgid "Error: Connection activation failed." msgstr "Errore: attivazione connessione non riuscita." -#: ../cli/src/connections.c:1396 +#: ../cli/src/connections.c:1421 #, c-format msgid "VPN connection successfully activated (D-Bus active path: %s)\n" msgstr "Connessione VPN attivata con successo (percorso D-Bus attivo: %s)\n" -#: ../cli/src/connections.c:1404 +#: ../cli/src/connections.c:1429 #, c-format msgid "Error: Connection activation failed: %s." msgstr "Errore: attivazione connessione non riuscita: %s." -#: ../cli/src/connections.c:1501 ../cli/src/devices.c:974 +#: ../cli/src/connections.c:1526 ../cli/src/devices.c:1060 #, c-format msgid "Error: Timeout %d sec expired." msgstr "Errore: timeout, %d sec scaduti." -#: ../cli/src/connections.c:1562 +#: ../cli/src/connections.c:1587 #, c-format msgid "Error: Connection activation failed: %s" msgstr "Errore: attivazione connessione non riuscita: %s" -#: ../cli/src/connections.c:1656 ../cli/src/connections.c:1810 -#: ../cli/src/connections.c:1938 +#: ../cli/src/connections.c:1681 ../cli/src/connections.c:1836 +#: ../cli/src/connections.c:1964 #, c-format msgid "Error: Unknown connection: %s." msgstr "Errore: connessione sconosciuta: %s." -#: ../cli/src/connections.c:1702 ../cli/src/devices.c:1059 -#: ../cli/src/devices.c:1605 +#: ../cli/src/connections.c:1727 ../cli/src/devices.c:1145 +#: ../cli/src/devices.c:1691 #, c-format msgid "Error: timeout value '%s' is not valid." msgstr "Errore: il valore di timeout «%s» non è valido." -#: ../cli/src/connections.c:1715 ../cli/src/connections.c:1827 -#: ../cli/src/connections.c:1918 +#: ../cli/src/connections.c:1740 ../cli/src/connections.c:1853 +#: ../cli/src/connections.c:1944 #, c-format msgid "Error: id or uuid has to be specified." msgstr "Errore: specificare id o uuid." -#: ../cli/src/connections.c:1747 +#: ../cli/src/connections.c:1773 #, c-format msgid "Error: No suitable device found: %s." msgstr "Errore: nessun dispositivo idoneo trovato: %s." -#: ../cli/src/connections.c:1749 +#: ../cli/src/connections.c:1775 #, c-format msgid "Error: No suitable device found." msgstr "Errore: nessun dispositivo idoneo trovato." -#: ../cli/src/connections.c:1863 +#: ../cli/src/connections.c:1889 #, c-format msgid "Warning: Connection not active\n" msgstr "Attenzione: connessione non attiva\n" -#: ../cli/src/connections.c:1877 +#: ../cli/src/connections.c:1903 #, c-format msgid "Error: Connection deletion failed: %s" msgstr "Errore: eliminazione connessione non riuscita: %s" -#: ../cli/src/connections.c:1995 +#: ../cli/src/connections.c:2024 #, c-format msgid "Error: 'con' command '%s' is not valid." msgstr "Errore: il comando «con» «%s» non è valido." -#: ../cli/src/connections.c:2063 +#: ../cli/src/connections.c:2092 #, c-format msgid "Error: could not connect to D-Bus." msgstr "Errore: impossibile collegarsi a D-Bus." -#: ../cli/src/connections.c:2071 +#: ../cli/src/connections.c:2100 #, c-format msgid "Error: Could not get system settings." msgstr "Errore: impossibile ottenere le impostazioni del sistema." -#: ../cli/src/connections.c:2081 +#: ../cli/src/connections.c:2110 #, c-format msgid "Error: Can't obtain connections: settings service is not running." msgstr "" @@ -865,243 +879,263 @@ msgstr "" #. 0 #. 9 #. 3 -#: ../cli/src/devices.c:70 ../cli/src/devices.c:106 ../cli/src/devices.c:187 -#: ../cli/src/devices.c:203 +#: ../cli/src/devices.c:71 ../cli/src/devices.c:109 ../cli/src/devices.c:190 +#: ../cli/src/devices.c:206 msgid "DEVICE" msgstr "DEVICE" #. 0 -#: ../cli/src/devices.c:83 +#: ../cli/src/devices.c:84 msgid "CAPABILITIES" msgstr "CAPACITÀ" #. 1 -#: ../cli/src/devices.c:84 +#: ../cli/src/devices.c:85 msgid "WIFI-PROPERTIES" msgstr "PROPRIETÀ-WIFI" #. 2 -#: ../cli/src/devices.c:85 +#: ../cli/src/devices.c:86 msgid "AP" msgstr "AP" #. 3 -#: ../cli/src/devices.c:86 +#: ../cli/src/devices.c:87 msgid "WIRED-PROPERTIES" msgstr "PROPRIETÀ-VIA-CAVO" #. 4 -#: ../cli/src/devices.c:87 +#: ../cli/src/devices.c:88 msgid "WIMAX-PROPERTIES" msgstr "PROPRIETÀ-WIMAX" #. 5 #. 0 -#: ../cli/src/devices.c:88 ../cli/src/devices.c:200 +#: ../cli/src/devices.c:89 ../cli/src/devices.c:203 msgid "NSP" msgstr "NSP" #. 6 -#: ../cli/src/devices.c:89 +#: ../cli/src/devices.c:90 msgid "IP4" msgstr "IP4" #. 7 -#: ../cli/src/devices.c:90 +#: ../cli/src/devices.c:91 msgid "DHCP4" msgstr "DHCP4" #. 8 -#: ../cli/src/devices.c:91 +#: ../cli/src/devices.c:92 msgid "IP6" msgstr "IP6" #. 9 -#: ../cli/src/devices.c:92 +#: ../cli/src/devices.c:93 msgid "DHCP6" msgstr "DHCP6" +#. 10 +#: ../cli/src/devices.c:94 +msgid "BOND" +msgstr "BOND" + +#. 11 +#: ../cli/src/devices.c:95 +msgid "VLAN" +msgstr "VLAN" + #. 2 -#: ../cli/src/devices.c:108 +#: ../cli/src/devices.c:111 msgid "VENDOR" msgstr "VENDOR" #. 3 -#: ../cli/src/devices.c:109 +#: ../cli/src/devices.c:112 msgid "PRODUCT" msgstr "PRODOTTO" #. 4 -#: ../cli/src/devices.c:110 +#: ../cli/src/devices.c:113 msgid "DRIVER" msgstr "DRIVER" #. 5 -#: ../cli/src/devices.c:111 +#: ../cli/src/devices.c:114 msgid "DRIVER-VERSION" msgstr "VERSIONE-DRIVER" #. 6 -#: ../cli/src/devices.c:112 +#: ../cli/src/devices.c:115 msgid "FIRMWARE-VERSION" msgstr "VERSIONE-FIRMWARE" #. 7 -#: ../cli/src/devices.c:113 +#: ../cli/src/devices.c:116 msgid "HWADDR" msgstr "HWADDR" #. 9 -#: ../cli/src/devices.c:115 +#: ../cli/src/devices.c:118 msgid "REASON" msgstr "MOTIVO" #. 10 -#: ../cli/src/devices.c:116 +#: ../cli/src/devices.c:119 msgid "UDI" msgstr "UDI" #. 11 -#: ../cli/src/devices.c:117 +#: ../cli/src/devices.c:120 msgid "IP-IFACE" msgstr "IP-IFACE" #. 12 -#: ../cli/src/devices.c:118 +#: ../cli/src/devices.c:121 msgid "NM-MANAGED" msgstr "NM-MANAGED" #. 14 -#: ../cli/src/devices.c:120 +#: ../cli/src/devices.c:123 msgid "FIRMWARE-MISSING" msgstr "FIRMWARE-MANCANTE" #. 15 -#: ../cli/src/devices.c:121 +#: ../cli/src/devices.c:124 msgid "CONNECTION" msgstr "CONNESSIONE" #. 0 -#: ../cli/src/devices.c:130 +#: ../cli/src/devices.c:133 msgid "CARRIER-DETECT" msgstr "RILEVAMENTO-PORTANTE" #. 1 -#: ../cli/src/devices.c:131 +#: ../cli/src/devices.c:134 msgid "SPEED" msgstr "VELOCITÀ" #. 0 -#: ../cli/src/devices.c:140 +#: ../cli/src/devices.c:143 msgid "CARRIER" msgstr "PORTANTE" #. 0 -#: ../cli/src/devices.c:150 +#: ../cli/src/devices.c:153 msgid "WEP" msgstr "WEP" #. 1 -#: ../cli/src/devices.c:151 +#: ../cli/src/devices.c:154 msgid "WPA" msgstr "WPA" #. 2 -#: ../cli/src/devices.c:152 +#: ../cli/src/devices.c:155 msgid "WPA2" msgstr "WPA2" #. 3 -#: ../cli/src/devices.c:153 +#: ../cli/src/devices.c:156 msgid "TKIP" msgstr "TKIP" #. 4 -#: ../cli/src/devices.c:154 +#: ../cli/src/devices.c:157 msgid "CCMP" msgstr "CCMP" #. 0 -#: ../cli/src/devices.c:164 +#: ../cli/src/devices.c:167 msgid "CTR-FREQ" msgstr "FREQ-CTR" #. 1 -#: ../cli/src/devices.c:165 +#: ../cli/src/devices.c:168 msgid "RSSI" msgstr "RSSI" #. 2 -#: ../cli/src/devices.c:166 +#: ../cli/src/devices.c:169 msgid "CINR" msgstr "CINR" #. 3 -#: ../cli/src/devices.c:167 +#: ../cli/src/devices.c:170 msgid "TX-POW" msgstr "TX-POW" #. 4 -#: ../cli/src/devices.c:168 +#: ../cli/src/devices.c:171 msgid "BSID" msgstr "BSID" #. 0 -#: ../cli/src/devices.c:178 +#: ../cli/src/devices.c:181 msgid "SSID" msgstr "SSID" #. 1 -#: ../cli/src/devices.c:179 +#: ../cli/src/devices.c:182 msgid "BSSID" msgstr "BSSID" #. 2 -#: ../cli/src/devices.c:180 +#: ../cli/src/devices.c:183 msgid "MODE" msgstr "MODALITÀ" #. 3 -#: ../cli/src/devices.c:181 +#: ../cli/src/devices.c:184 msgid "FREQ" msgstr "FREQ" #. 4 -#: ../cli/src/devices.c:182 +#: ../cli/src/devices.c:185 msgid "RATE" msgstr "VELOCITÀ" #. 5 #. 1 -#: ../cli/src/devices.c:183 ../cli/src/devices.c:201 +#: ../cli/src/devices.c:186 ../cli/src/devices.c:204 msgid "SIGNAL" msgstr "SEGNALE" #. 6 -#: ../cli/src/devices.c:184 +#: ../cli/src/devices.c:187 msgid "SECURITY" msgstr "SICUREZZA" #. 7 -#: ../cli/src/devices.c:185 +#: ../cli/src/devices.c:188 msgid "WPA-FLAGS" msgstr "FLAG-WPA" #. 8 -#: ../cli/src/devices.c:186 +#: ../cli/src/devices.c:189 msgid "RSN-FLAGS" msgstr "FLAG-RSN" #. 10 #. 4 -#: ../cli/src/devices.c:188 ../cli/src/devices.c:204 +#: ../cli/src/devices.c:191 ../cli/src/devices.c:207 msgid "ACTIVE" msgstr "ATTIVO" -#: ../cli/src/devices.c:223 +#. 0 +#: ../cli/src/devices.c:219 +msgid "SLAVES" +msgstr "SLAVE" + +#. 0 +#: ../cli/src/devices.c:228 +msgid "ID" +msgstr "ID" + +#: ../cli/src/devices.c:244 #, c-format msgid "" -"Usage: nmcli dev { COMMAND | help }\n" +"Usage: nmcli device { COMMAND | help }\n" "\n" " COMMAND := { status | list | disconnect | wifi | wimax }\n" "\n" @@ -1117,7 +1151,7 @@ msgid "" " wimax [list [iface <iface>] [nsp <name>]]\n" "\n" msgstr "" -"Uso: nmcli dev { COMANDO | help }\n" +"Uso: nmcli device { COMANDO | help }\n" "\n" " COMANDO := { status | list | disconnect | wifi | wimax }\n" "\n" @@ -1133,276 +1167,276 @@ msgstr "" " wimax [list [iface <iface>] [nsp <nome>]]\n" "\n" -#: ../cli/src/devices.c:323 +#: ../cli/src/devices.c:347 msgid "(none)" msgstr "(nessuno)" -#: ../cli/src/devices.c:379 +#: ../cli/src/devices.c:403 #, c-format msgid "%u MHz" msgstr "%u MHz" -#: ../cli/src/devices.c:380 +#: ../cli/src/devices.c:404 #, c-format msgid "%u MB/s" msgstr "%u MB/s" -#: ../cli/src/devices.c:389 +#: ../cli/src/devices.c:413 msgid "Encrypted: " msgstr "Cifrato: " -#: ../cli/src/devices.c:394 +#: ../cli/src/devices.c:418 msgid "WEP " msgstr "WEP " -#: ../cli/src/devices.c:396 +#: ../cli/src/devices.c:420 msgid "WPA " msgstr "WPA " -#: ../cli/src/devices.c:398 +#: ../cli/src/devices.c:422 msgid "WPA2 " msgstr "WPA2 " -#: ../cli/src/devices.c:401 +#: ../cli/src/devices.c:425 msgid "Enterprise " msgstr "Enterprise " -#: ../cli/src/devices.c:410 +#: ../cli/src/devices.c:434 msgid "Ad-Hoc" msgstr "Ad-Hoc" -#: ../cli/src/devices.c:410 +#: ../cli/src/devices.c:435 msgid "Infrastructure" msgstr "Infrastruttura" -#: ../cli/src/devices.c:445 +#: ../cli/src/devices.c:471 msgid "Home" msgstr "Home" -#: ../cli/src/devices.c:448 +#: ../cli/src/devices.c:474 msgid "Partner" msgstr "Partner" -#: ../cli/src/devices.c:451 +#: ../cli/src/devices.c:477 msgid "Roaming" msgstr "Roaming" -#: ../cli/src/devices.c:523 +#: ../cli/src/devices.c:549 #, c-format msgid "Error: 'dev list': %s" msgstr "Errore: «dev list»: %s" -#: ../cli/src/devices.c:525 +#: ../cli/src/devices.c:551 #, c-format msgid "Error: 'dev list': %s; allowed fields: %s" msgstr "Errore: «dev list»: %s; campi consentiti: %s" -#: ../cli/src/devices.c:534 +#: ../cli/src/devices.c:560 msgid "Device details" msgstr "Informazioni dispositivo" -#: ../cli/src/devices.c:579 ../cli/src/devices.c:582 ../cli/src/devices.c:1000 -#: ../cli/src/utils.c:477 +#: ../cli/src/devices.c:607 ../cli/src/devices.c:610 ../cli/src/devices.c:1086 +#: ../cli/src/utils.c:479 msgid "(unknown)" msgstr "(sconosciuto)" -#: ../cli/src/devices.c:591 +#: ../cli/src/devices.c:619 msgid "not connected" msgstr "non collegato" -#: ../cli/src/devices.c:618 +#: ../cli/src/devices.c:646 #, c-format msgid "%u Mb/s" msgstr "%u Mb/s" #. Print header #. "WIRED-PROPERTIES" -#: ../cli/src/devices.c:691 +#: ../cli/src/devices.c:720 msgid "on" msgstr "on" -#: ../cli/src/devices.c:691 +#: ../cli/src/devices.c:720 msgid "off" msgstr "off" -#: ../cli/src/devices.c:842 +#: ../cli/src/devices.c:928 #, c-format msgid "Error: 'dev status': %s" msgstr "Errore: «dev status»: %s" -#: ../cli/src/devices.c:844 +#: ../cli/src/devices.c:930 #, c-format msgid "Error: 'dev status': %s; allowed fields: %s" msgstr "Errore: «dev status»: %s; campi consentiti: %s" -#: ../cli/src/devices.c:867 +#: ../cli/src/devices.c:953 msgid "Status of devices" msgstr "Stato dispositivi" -#: ../cli/src/devices.c:898 +#: ../cli/src/devices.c:984 #, c-format msgid "Error: '%s' argument is missing." msgstr "Errore: manca l'argomento «%s»." -#: ../cli/src/devices.c:939 ../cli/src/devices.c:1104 -#: ../cli/src/devices.c:1245 ../cli/src/devices.c:1892 +#: ../cli/src/devices.c:1025 ../cli/src/devices.c:1190 +#: ../cli/src/devices.c:1331 ../cli/src/devices.c:1978 #, c-format msgid "Error: Device '%s' not found." msgstr "Errore: dispositivo «%s» non trovato." -#: ../cli/src/devices.c:962 +#: ../cli/src/devices.c:1048 #, c-format msgid "Success: Device '%s' successfully disconnected." msgstr "Successo: dispositivo «%s» scollegato con successo." -#: ../cli/src/devices.c:997 +#: ../cli/src/devices.c:1083 #, c-format msgid "Error: Device '%s' (%s) disconnecting failed: %s" msgstr "Errore: scollegamento dispositivo «%s» (%s) non riuscito: %s" -#: ../cli/src/devices.c:1010 +#: ../cli/src/devices.c:1096 #, c-format msgid "Device '%s' has been disconnected.\n" msgstr "Il dispositivo «%s» è stato scollegato con successo.\n" -#: ../cli/src/devices.c:1073 +#: ../cli/src/devices.c:1159 #, c-format msgid "Error: iface has to be specified." msgstr "Errore: iface deve essere specificato." -#: ../cli/src/devices.c:1203 +#: ../cli/src/devices.c:1289 #, c-format msgid "Error: 'dev wifi': %s" msgstr "Errore: «dev wifi»: %s" -#: ../cli/src/devices.c:1205 +#: ../cli/src/devices.c:1291 #, c-format msgid "Error: 'dev wifi': %s; allowed fields: %s" msgstr "Errore: «dev wifi»: %s; campi consentiti: %s" -#: ../cli/src/devices.c:1228 +#: ../cli/src/devices.c:1314 msgid "WiFi scan list" msgstr "Elenco scansione Wi-Fi" -#: ../cli/src/devices.c:1265 ../cli/src/devices.c:1319 +#: ../cli/src/devices.c:1351 ../cli/src/devices.c:1405 #, c-format msgid "Error: Access point with bssid '%s' not found." msgstr "Errore: punto di accesso con bssid «%s» non trovato." -#: ../cli/src/devices.c:1282 +#: ../cli/src/devices.c:1368 #, c-format msgid "Error: Device '%s' is not a WiFi device." msgstr "Errore: il dispositivo «%s» non è un dispositivo Wi-Fi." -#: ../cli/src/devices.c:1350 ../cli/src/devices.c:1396 +#: ../cli/src/devices.c:1436 ../cli/src/devices.c:1482 #, c-format msgid "Connection with UUID '%s' created and activated on device '%s'\n" msgstr "Connessione con UUID «%s» creata e attivata sul dispositivo «%s»\n" -#: ../cli/src/devices.c:1355 +#: ../cli/src/devices.c:1441 #, c-format msgid "Error: Connection activation failed: (%d) %s." msgstr "Errore: attivazione connessione non riuscita: (%d) %s." -#: ../cli/src/devices.c:1380 +#: ../cli/src/devices.c:1466 #, c-format msgid "Error: Failed to add/activate new connection: (%d) %s" msgstr "Errore: aggiunta/attivazione nuova connessione non riuscita: (%d) %s" -#: ../cli/src/devices.c:1388 +#: ../cli/src/devices.c:1474 #, c-format msgid "Error: Failed to add/activate new connection: Unknown error" msgstr "" "Errore: aggiunta/attivazione nuova connessione non riuscita: errore " "sconosciuto" -#: ../cli/src/devices.c:1532 +#: ../cli/src/devices.c:1618 #, c-format msgid "Error: SSID or BSSID are missing." msgstr "Errore: SSID o BSSID mancante." -#: ../cli/src/devices.c:1555 +#: ../cli/src/devices.c:1641 #, c-format msgid "Error: bssid argument value '%s' is not a valid BSSID." msgstr "Errore: il valore «%s» di bssid non è un BSSID valido." -#: ../cli/src/devices.c:1579 +#: ../cli/src/devices.c:1665 #, c-format msgid "" "Error: wep-key-type argument value '%s' is invalid, use 'key' or 'phrase'." msgstr "" "Errore: il valore «%s» di wep-key-type non è valido, usare «key» o «phrase»." -#: ../cli/src/devices.c:1619 +#: ../cli/src/devices.c:1705 #, c-format msgid "Error: BSSID to connect to (%s) differs from bssid argument (%s)." msgstr "Error: BSSID a cui connettersi (%s) diverso dall'argomento bssid (%s)." -#: ../cli/src/devices.c:1625 +#: ../cli/src/devices.c:1711 #, c-format msgid "Error: Parameter '%s' is neither SSID nor BSSID." msgstr "Errore: il parametro «%s» non è né SSID né BSSID." -#: ../cli/src/devices.c:1654 +#: ../cli/src/devices.c:1740 #, c-format msgid "Error: Device '%s' is not a Wi-Fi device." msgstr "Errore: il dispositivo «%s» non è un dispositivo Wi-Fi." -#: ../cli/src/devices.c:1656 +#: ../cli/src/devices.c:1742 #, c-format msgid "Error: No Wi-Fi device found." msgstr "Errore: nessun dispositivo Wi-Fi trovato." -#: ../cli/src/devices.c:1674 +#: ../cli/src/devices.c:1760 #, c-format msgid "Error: No network with SSID '%s' found." msgstr "Errore: rete con SSID «%s» non trovata." -#: ../cli/src/devices.c:1676 +#: ../cli/src/devices.c:1762 #, c-format msgid "Error: No access point with BSSID '%s' found." msgstr "Errore: punto di accesso con BSSID «%s» non trovato." -#: ../cli/src/devices.c:1774 +#: ../cli/src/devices.c:1860 #, c-format msgid "Error: 'dev wifi' command '%s' is not valid." msgstr "Errore: il comando «dev wifi» «%s» non è valido." -#: ../cli/src/devices.c:1850 +#: ../cli/src/devices.c:1936 #, c-format msgid "Error: 'dev wimax': %s" msgstr "Errore: «dev wimax»: %s" -#: ../cli/src/devices.c:1852 +#: ../cli/src/devices.c:1938 #, c-format msgid "Error: 'dev wimax': %s; allowed fields: %s" msgstr "Errore: «dev wimax»: %s; campi consentiti: %s" -#: ../cli/src/devices.c:1875 +#: ../cli/src/devices.c:1961 msgid "WiMAX NSP list" msgstr "Elenco NSP WiMAX" -#: ../cli/src/devices.c:1912 +#: ../cli/src/devices.c:1998 #, c-format msgid "Error: NSP with name '%s' not found." msgstr "Errore: NSP con nome «%s» non trovato." -#: ../cli/src/devices.c:1923 +#: ../cli/src/devices.c:2009 #, c-format msgid "Error: Device '%s' is not a WiMAX device." msgstr "Errore: il dispositivo «%s» non è un dispositivo WiMAX." -#: ../cli/src/devices.c:1954 +#: ../cli/src/devices.c:2040 #, c-format msgid "Error: Access point with nsp '%s' not found." msgstr "Errore: punto di accesso con nsp «%s» non trovato." -#: ../cli/src/devices.c:1981 +#: ../cli/src/devices.c:2067 #, c-format msgid "Error: 'dev wimax' command '%s' is not valid." msgstr "Errore: il comando «dev wimax» «%s» non è valido." -#: ../cli/src/devices.c:2031 +#: ../cli/src/devices.c:2120 #, c-format msgid "Error: 'dev' command '%s' is not valid." msgstr "Errore: il comando «dev» «%s» non è valido." @@ -1575,7 +1609,7 @@ msgstr "Errore: «nm permissions»: %s; campi consentiti: %s" msgid "NetworkManager permissions" msgstr "Permessi NetworkManager" -#: ../cli/src/network-manager.c:350 ../cli/src/utils.c:457 +#: ../cli/src/network-manager.c:350 ../cli/src/utils.c:459 #, c-format msgid "Error: Couldn't connect to system bus: %s" msgstr "Errore: impossibile collegarsi al bus di sistema: %s." @@ -1643,7 +1677,7 @@ msgstr "WiMAX abilitato" msgid "Error: invalid 'wimax' parameter: '%s'." msgstr "Errore: parametro «wimax» non valido: «%s»." -#: ../cli/src/network-manager.c:585 +#: ../cli/src/network-manager.c:588 #, c-format msgid "Error: 'nm' command '%s' is not valid." msgstr "Errore: comando «nm» «%s» non valido." @@ -1666,9 +1700,9 @@ msgid "" " -h[elp] print this help\n" "\n" "OBJECT\n" -" nm NetworkManager status\n" -" con NetworkManager connections\n" -" dev devices managed by NetworkManager\n" +" nm NetworkManager's status\n" +" c[onnection] NetworkManager's connections\n" +" d[evice] devices managed by NetworkManager\n" "\n" msgstr "" "Uso: %s [OPZIONI] OGGETTO { COMANDO | help }\n" @@ -1689,228 +1723,228 @@ msgstr "" " -h[elp] Stampa questo aiuto\n" "\n" "OGGETTO\n" -" nm Stato NetworkManager\n" -" con Connessioni NetworkManager\n" -" dev Dispositivi gestiti da NetworkManager\n" +" nm Stato NetworkManager\n" +" c[onnection] Connessioni NetworkManager\n" +" d[evice] Dispositivi gestiti da NetworkManager\n" "\n" -#: ../cli/src/nmcli.c:121 +#: ../cli/src/nmcli.c:124 #, c-format msgid "Error: Object '%s' is unknown, try 'nmcli help'." msgstr "Errore: l'oggetto «%s» è sconosciuto, provare «nmcli help»." -#: ../cli/src/nmcli.c:151 +#: ../cli/src/nmcli.c:154 #, c-format msgid "Error: Option '--terse' is specified the second time." msgstr "Errore: l'opzione «--terse» è stata specificata una seconda volta." -#: ../cli/src/nmcli.c:156 +#: ../cli/src/nmcli.c:159 #, c-format msgid "Error: Option '--terse' is mutually exclusive with '--pretty'." msgstr "Errore: l'opzione «--terse» si esclude con «--pretty»." -#: ../cli/src/nmcli.c:164 +#: ../cli/src/nmcli.c:167 #, c-format msgid "Error: Option '--pretty' is specified the second time." msgstr "Errore: l'opzione «--pretty» è stata specificata una seconda volta." -#: ../cli/src/nmcli.c:169 +#: ../cli/src/nmcli.c:172 #, c-format msgid "Error: Option '--pretty' is mutually exclusive with '--terse'." msgstr "Errore: l'opzione «--pretty» si esclude con «--terse»." -#: ../cli/src/nmcli.c:179 ../cli/src/nmcli.c:195 +#: ../cli/src/nmcli.c:182 ../cli/src/nmcli.c:198 #, c-format msgid "Error: missing argument for '%s' option." msgstr "Errore: manca l'argomento per l'opzione «%s»." -#: ../cli/src/nmcli.c:188 ../cli/src/nmcli.c:204 +#: ../cli/src/nmcli.c:191 ../cli/src/nmcli.c:207 #, c-format msgid "Error: '%s' is not valid argument for '%s' option." msgstr "Errore: \"%s\" non è un argomento valido per l'opzione «%s»." -#: ../cli/src/nmcli.c:211 +#: ../cli/src/nmcli.c:214 #, c-format msgid "Error: fields for '%s' options are missing." msgstr "Errore: mancano i campi per le opzioni «%s»." -#: ../cli/src/nmcli.c:219 +#: ../cli/src/nmcli.c:222 #, c-format msgid "nmcli tool, version %s\n" msgstr "Strumento nmcli, versione %s\n" -#: ../cli/src/nmcli.c:225 +#: ../cli/src/nmcli.c:228 #, c-format msgid "Error: Option '%s' is unknown, try 'nmcli -help'." msgstr "Errore: l'opzione «%s» è sconosciuta, provare «nmcli -help»." -#: ../cli/src/nmcli.c:244 +#: ../cli/src/nmcli.c:247 #, c-format msgid "Caught signal %d, shutting down..." msgstr "Intercettato segnale %d, arresto in corso." -#: ../cli/src/nmcli.c:269 +#: ../cli/src/nmcli.c:272 msgid "Error: Could not create NMClient object." msgstr "Errore: impossibile creare l'oggetto NMClient." -#: ../cli/src/nmcli.c:285 +#: ../cli/src/nmcli.c:288 msgid "Success" msgstr "Successo" -#: ../cli/src/settings.c:519 +#: ../cli/src/settings.c:563 #, c-format msgid "%d (hex-ascii-key)" msgstr "%d (hex-ascii-key)" -#: ../cli/src/settings.c:521 +#: ../cli/src/settings.c:565 #, c-format msgid "%d (104/128-bit passphrase)" msgstr "%d (frase di accesso a 104/128-bit)" -#: ../cli/src/settings.c:524 ../cli/src/settings.c:652 +#: ../cli/src/settings.c:568 ../cli/src/settings.c:696 #, c-format msgid "%d (unknown)" msgstr "%d (sconosciuto)" -#: ../cli/src/settings.c:550 +#: ../cli/src/settings.c:594 msgid "0 (unknown)" msgstr "0 (sconosciuto)" -#: ../cli/src/settings.c:556 +#: ../cli/src/settings.c:600 msgid "any, " msgstr "qualsiasi, " -#: ../cli/src/settings.c:558 +#: ../cli/src/settings.c:602 msgid "900 MHz, " msgstr "900 MHz, " -#: ../cli/src/settings.c:560 +#: ../cli/src/settings.c:604 msgid "1800 MHz, " msgstr "1800 MHz, " -#: ../cli/src/settings.c:562 +#: ../cli/src/settings.c:606 msgid "1900 MHz, " msgstr "1900 MHz, " -#: ../cli/src/settings.c:564 +#: ../cli/src/settings.c:608 msgid "850 MHz, " msgstr "850 MHz, " -#: ../cli/src/settings.c:566 +#: ../cli/src/settings.c:610 msgid "WCDMA 3GPP UMTS 2100 MHz, " msgstr "WCDMA 3GPP UMTS 2100 MHz, " -#: ../cli/src/settings.c:568 +#: ../cli/src/settings.c:612 msgid "WCDMA 3GPP UMTS 1800 MHz, " msgstr "WCDMA 3GPP UMTS 1800 MHz, " -#: ../cli/src/settings.c:570 +#: ../cli/src/settings.c:614 msgid "WCDMA 3GPP UMTS 1700/2100 MHz, " msgstr "WCDMA 3GPP UMTS 1700/2100 MHz, " -#: ../cli/src/settings.c:572 +#: ../cli/src/settings.c:616 msgid "WCDMA 3GPP UMTS 800 MHz, " msgstr "WCDMA 3GPP UMTS 800 MHz, " -#: ../cli/src/settings.c:574 +#: ../cli/src/settings.c:618 msgid "WCDMA 3GPP UMTS 850 MHz, " msgstr "WCDMA 3GPP UMTS 850 MHz, " -#: ../cli/src/settings.c:576 +#: ../cli/src/settings.c:620 msgid "WCDMA 3GPP UMTS 900 MHz, " msgstr "WCDMA 3GPP UMTS 900 MHz, " -#: ../cli/src/settings.c:578 +#: ../cli/src/settings.c:622 msgid "WCDMA 3GPP UMTS 1700 MHz, " msgstr "WCDMA 3GPP UMTS 1700 MHz, " -#: ../cli/src/settings.c:580 +#: ../cli/src/settings.c:624 msgid "WCDMA 3GPP UMTS 1900 MHz, " msgstr "WCDMA 3GPP UMTS 1900 MHz, " -#: ../cli/src/settings.c:582 +#: ../cli/src/settings.c:626 msgid "WCDMA 3GPP UMTS 2600 MHz, " msgstr "WCDMA 3GPP UMTS 2600 MHz, " -#: ../cli/src/settings.c:600 +#: ../cli/src/settings.c:644 msgid "0 (NONE)" msgstr "0 (NESSUNO)" -#: ../cli/src/settings.c:606 +#: ../cli/src/settings.c:650 msgid "REORDER_HEADERS, " msgstr "REORDER_HEADERS, " -#: ../cli/src/settings.c:608 +#: ../cli/src/settings.c:652 msgid "GVRP, " msgstr "GVRP, " -#: ../cli/src/settings.c:610 +#: ../cli/src/settings.c:654 msgid "LOOSE_BINDING, " msgstr "LOOSE_BINDING, " -#: ../cli/src/settings.c:646 +#: ../cli/src/settings.c:690 #, c-format msgid "%d (disabled)" msgstr "%d (disabilitato)" -#: ../cli/src/settings.c:648 +#: ../cli/src/settings.c:692 #, c-format msgid "%d (enabled, prefer public IP)" msgstr "%d (abilitato, preferire IP pubblico)" -#: ../cli/src/settings.c:650 +#: ../cli/src/settings.c:694 #, c-format msgid "%d (enabled, prefer temporary IP)" msgstr "%d (abilitato, preferire IP temporaneo)" -#: ../cli/src/settings.c:768 ../cli/src/settings.c:964 -#: ../cli/src/settings.c:1673 +#: ../cli/src/settings.c:827 ../cli/src/settings.c:1024 +#: ../cli/src/settings.c:1734 msgid "auto" msgstr "auto" -#: ../cli/src/utils.c:103 +#: ../cli/src/utils.c:105 #, c-format msgid "Error converting IP4 address '0x%X' to text form" msgstr "Errore nel convertire l'indirizzo IP4 «0x%X» in formato testuale" -#: ../cli/src/utils.c:131 +#: ../cli/src/utils.c:133 #, c-format msgid "Error converting IP6 address '%s' to text form" msgstr "Errore nel convertire l'indirizzo IP6 «%s» in formato testuale" -#: ../cli/src/utils.c:232 +#: ../cli/src/utils.c:234 #, c-format msgid "field '%s' has to be alone" msgstr "il campo «%s» deve essere isolato" -#: ../cli/src/utils.c:235 +#: ../cli/src/utils.c:237 #, c-format msgid "invalid field '%s'" msgstr "campo «%s» non valido" -#: ../cli/src/utils.c:254 +#: ../cli/src/utils.c:256 msgid "Option '--terse' requires specifying '--fields'" msgstr "Con l'opzione «--terse» è necessario specificare «--fields»" -#: ../cli/src/utils.c:258 +#: ../cli/src/utils.c:260 #, c-format msgid "Option '--terse' requires specific '--fields' option values , not '%s'" msgstr "" "L'opzione «--terse» richiede valori specifici dell'opzione «--fields», non " "«%s»" -#: ../cli/src/utils.c:468 +#: ../cli/src/utils.c:470 #, c-format msgid "Error: Couldn't create D-Bus object proxy for org.freedesktop.DBus" msgstr "" "Errore: impossibile creare l'oggetto proxy D-Bus per org.freedesktop.DBus" -#: ../cli/src/utils.c:476 +#: ../cli/src/utils.c:478 #, c-format msgid "Error: NameHasOwner request failed: %s" msgstr "Errore: richiesta NameHasOwner non riuscita: %s" -#: ../cli/src/utils.c:521 +#: ../cli/src/utils.c:523 #, c-format msgid "" "Warning: nmcli (%s) and NetworkManager (%s) versions don't match. Use --" @@ -1919,7 +1953,7 @@ msgstr "" "Attenzione: le versioni di nmcli (%s) e NetworkManager (%s) non " "corrispondono. Usare --nocheck per disabilitare questo avviso.\n" -#: ../cli/src/utils.c:530 +#: ../cli/src/utils.c:532 #, c-format msgid "" "Error: nmcli (%s) and NetworkManager (%s) versions don't match. Force " @@ -2279,44 +2313,44 @@ msgstr "Impossibile verificare il file PKCS#12: %d" msgid "Could not generate random data." msgstr "Impossibile generare dati casuali." -#: ../libnm-util/nm-utils.c:2040 +#: ../libnm-util/nm-utils.c:2078 #, c-format msgid "Not enough memory to make encryption key." msgstr "Memoria insufficiente per creare la chiave di cifratura." -#: ../libnm-util/nm-utils.c:2150 +#: ../libnm-util/nm-utils.c:2188 msgid "Could not allocate memory for PEM file creation." msgstr "Impossibile assegnare memoria per la creazione del file PEM." -#: ../libnm-util/nm-utils.c:2162 +#: ../libnm-util/nm-utils.c:2200 #, c-format msgid "Could not allocate memory for writing IV to PEM file." msgstr "Impossibile assegnare memoria per la scrittura di IV sul file PEM." -#: ../libnm-util/nm-utils.c:2174 +#: ../libnm-util/nm-utils.c:2212 #, c-format msgid "Could not allocate memory for writing encrypted key to PEM file." msgstr "" "Impossibile assegnare memoria per la scrittura della chiave cifrata sul file " "PEM." -#: ../libnm-util/nm-utils.c:2193 +#: ../libnm-util/nm-utils.c:2231 #, c-format msgid "Could not allocate memory for PEM file data." msgstr "Impossibile assegnare memoria per i dati del file PEM." -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:1 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:1 msgid "Enable or disable system networking" msgstr "Abilita o disabilita la rete di sistema" # [NdT] si tratta di un messaggio che descrive un'azione -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:2 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:2 msgid "System policy prevents enabling or disabling system networking" msgstr "" "La politica di sistema impedisce di abilitare o disabilitare la rete di " "sistema" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:3 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:3 msgid "" "Put NetworkManager to sleep or wake it up (should only be used by system " "power management)" @@ -2324,183 +2358,183 @@ msgstr "" "Sospendere o riattivare NetworkManager (dovrebbe essere usato solo dalla " "gestione dell'alimentazione di sistema)" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:4 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:4 msgid "System policy prevents putting NetworkManager to sleep or waking it up" msgstr "" "La politica di sistema impedisce di sospendere e riattivare NetworkManager" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:5 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:5 msgid "Enable or disable WiFi devices" msgstr "Abilita o disabilita i dispositivi Wi-Fi" # [NdT] si tratta di un messaggio che descrive un'azione -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:6 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:6 msgid "System policy prevents enabling or disabling WiFi devices" msgstr "" "La politica di sistema impedisce di abilitare o disabilitare i dispositivi " "Wi-Fi" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:7 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:7 msgid "Enable or disable mobile broadband devices" msgstr "Abilita o disabilita i dispositivi a banda larga mobile" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:8 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:8 msgid "System policy prevents enabling or disabling mobile broadband devices" msgstr "" "La politica di sistema impedisce di abilitare o disabilitare i dispositivi a " "banda larga mobile" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:9 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:9 msgid "Enable or disable WiMAX mobile broadband devices" msgstr "Abilita o disabilita i dispositivi WiMAX a banda larga mobile" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:10 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:10 msgid "" "System policy prevents enabling or disabling WiMAX mobile broadband devices" msgstr "" "La politica di sistema impedisce di abilitare o disabilitare i dispositivi " "WiMAX a banda larga mobile" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:11 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:11 msgid "Allow control of network connections" msgstr "Permettere il controllo delle connessioni di rete" # [NdT] si tratta di un messaggio che descrive un'azione -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:12 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:12 msgid "System policy prevents control of network connections" msgstr "La politica di sistema impedisce di controllare le connessioni di rete" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:13 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:13 msgid "Connection sharing via a protected WiFi network" msgstr "Condivisione della connessione attraverso una rete Wi-Fi protetta" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:14 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:14 msgid "System policy prevents sharing connections via a protected WiFi network" msgstr "" "La politica di sistema impedisce di condividere connessioni attraverso una " "rete Wi-Fi protetta" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:15 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:15 msgid "Connection sharing via an open WiFi network" msgstr "Condivisione della connessione attraverso una rete Wi-Fi aperta" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:16 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:16 msgid "System policy prevents sharing connections via an open WiFi network" msgstr "" "La politica di sistema impedisce di condividere connessioni attraverso una " "rete Wi-Fi aperta" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:17 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:17 msgid "Modify personal network connections" msgstr "Modifica le connessioni personali" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:18 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:18 msgid "System policy prevents modification of personal network settings" msgstr "" "La politica di sistema impedisce di modificare le impostazioni di rete " "personali" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:19 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:19 msgid "Modify network connections for all users" msgstr "Modifica le connessioni di sistema per tutti gli utenti" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:20 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:20 msgid "System policy prevents modification of network settings for all users" msgstr "" "La politica di sistema impedisce di modificare le impostazioni di rete per " "tutti gli utenti" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:21 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:21 msgid "Modify persistent system hostname" msgstr "Modificare il nome host persistente del sistema" -#: ../policy/org.freedesktop.NetworkManager.policy.in.h:22 +#: ../policy/org.freedesktop.NetworkManager.policy.in.in.h:22 msgid "System policy prevents modification of the persistent system hostname" msgstr "" "La politica di sistema impedisce di modificare il nome host persistente del " "sistema" -#: ../src/main.c:158 +#: ../src/main.c:135 #, c-format msgid "Failed to set signal mask: %d" msgstr "Impostazione della maschera di segnale non riuscita: %d" -#: ../src/main.c:167 +#: ../src/main.c:144 #, c-format msgid "Failed to create signal handling thread: %d" msgstr "Creazione del thread per la gestione del segnale non riuscita: %d" -#: ../src/main.c:182 +#: ../src/main.c:159 #, c-format msgid "Opening %s failed: %s\n" msgstr "Apertura di %s non riuscita: %s\n" -#: ../src/main.c:188 +#: ../src/main.c:165 #, c-format msgid "Writing to %s failed: %s\n" msgstr "Scrittura su %s non riuscita: %s\n" -#: ../src/main.c:193 +#: ../src/main.c:170 #, c-format msgid "Closing %s failed: %s\n" msgstr "Chiusura di %s non riuscita: %s\n" -#: ../src/main.c:236 +#: ../src/main.c:213 #, c-format msgid "NetworkManager is already running (pid %ld)\n" msgstr "NetworkManager è già in esecuzione (pid %ld)\n" -#: ../src/main.c:376 +#: ../src/main.c:340 msgid "Print NetworkManager version and exit" msgstr "Stampa la versione di NetworkManager ed esce" -#: ../src/main.c:377 +#: ../src/main.c:341 msgid "Don't become a daemon" msgstr "Non si avvia in modalità demone" -#: ../src/main.c:378 +#: ../src/main.c:342 msgid "Make all warnings fatal" msgstr "Rende tutti gli avvisi fatali" -#: ../src/main.c:379 +#: ../src/main.c:343 msgid "Specify the location of a PID file" msgstr "Specifica la posizione di un file PID" -#: ../src/main.c:379 +#: ../src/main.c:343 msgid "filename" msgstr "nomefile" -#: ../src/main.c:380 +#: ../src/main.c:344 msgid "State file location" msgstr "Posizione file di stato" -#: ../src/main.c:380 +#: ../src/main.c:344 msgid "/path/to/state.file" msgstr "/percorso/a/file.di.stato" -#: ../src/main.c:381 +#: ../src/main.c:345 msgid "Config file location" msgstr "Posizione file di configurazione" -#: ../src/main.c:381 +#: ../src/main.c:345 msgid "/path/to/config.file" msgstr "/percorso/a/file.di.config" -#: ../src/main.c:382 +#: ../src/main.c:346 msgid "List of plugins separated by ','" msgstr "Elenco di plugin separati da virgole" -#: ../src/main.c:382 +#: ../src/main.c:346 msgid "plugin1,plugin2" msgstr "plugin1,plugin2" #. Translators: Do not translate the values in the square brackets -#: ../src/main.c:384 +#: ../src/main.c:348 msgid "Log level: one of [ERR, WARN, INFO, DEBUG]" msgstr "Livello di registrazione, uno di [ERR, WARN, INFO, DEBUG]" #. Translators: Do not translate the values in the square brackets -#: ../src/main.c:387 +#: ../src/main.c:351 msgid "" "Log domains separated by ',': any combination of\n" " [NONE,HW,RFKILL,ETHER,WIFI," @@ -2520,28 +2554,28 @@ msgstr "" "CORE,DEVICE,OLPC,WIMAX,\n" " INFINIBAND,FIREWALL,ADSL]" -#: ../src/main.c:393 +#: ../src/main.c:357 msgid "An http(s) address for checking internet connectivity" msgstr "Un indirizzo HTTP(S) per verificare la connessione" -#: ../src/main.c:394 +#: ../src/main.c:358 msgid "The interval between connectivity checks (in seconds)" msgstr "L'intervallo tra i controlli di connettività (in secondi)" -#: ../src/main.c:395 +#: ../src/main.c:359 msgid "The expected start of the response" msgstr "L'inizio atteso della risposta" -#: ../src/main.c:395 +#: ../src/main.c:359 msgid "Bingo!" msgstr "Bingo!" -#: ../src/main.c:400 +#: ../src/main.c:364 #, c-format msgid "GModules are not supported on your platform!\n" msgstr "GModules non supportati su questa piattaforma.\n" -#: ../src/main.c:423 +#: ../src/main.c:383 msgid "" "NetworkManager monitors all network connections and automatically\n" "chooses the best connection to use. It also allows the user to\n" @@ -2553,43 +2587,43 @@ msgstr "" "utenti di specificare l'access point Wi-Fi e quale scheda\n" "Wi-Fi del computer associarvi." -#: ../src/main.c:429 +#: ../src/main.c:389 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "" "Opzione non valida. Usare --help per ottenere un elenco delle opzioni " "valide.\n" -#: ../src/main.c:439 +#: ../src/main.c:399 #, c-format msgid "You must be root to run NetworkManager!\n" msgstr "È necessario essere root per eseguire NetworkManager.\n" -#: ../src/main.c:460 +#: ../src/main.c:432 #, c-format msgid "Failed to read configuration: (%d) %s\n" msgstr "Lettura della configurazione non riuscita: (%d) %s\n" -#: ../src/main.c:471 +#: ../src/main.c:443 #, c-format msgid "%s. Please use --help to see a list of valid options.\n" msgstr "%s. Usare --help per ottenere un elenco di opzioni valide.\n" -#: ../src/main.c:478 +#: ../src/main.c:450 #, c-format msgid "State file %s parsing failed: (%d) %s\n" msgstr "Analisi del file di stato %s non riuscita: (%d) %s\n" -#: ../src/main.c:495 +#: ../src/main.c:467 #, c-format msgid "Could not daemonize: %s [error %u]\n" msgstr "Impossibile avviare come demone: %s [errore %u]\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:62 +#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:138 msgid "# Created by NetworkManager\n" msgstr "# Creato da NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:69 +#: ../src/dhcp-manager/nm-dhcp-dhclient-utils.c:145 #, c-format msgid "" "# Merged from %s\n" @@ -2615,165 +2649,177 @@ msgstr "è stato trovato «dhcpcd»." msgid "unsupported DHCP client '%s'" msgstr "client DHCP «%s» non supportato" -#: ../src/dns-manager/nm-dns-manager.c:380 +#: ../src/dns-manager/nm-dns-manager.c:375 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "Nota: il risolutore libc non supporta più di tre server di nomi." -#: ../src/dns-manager/nm-dns-manager.c:382 +#: ../src/dns-manager/nm-dns-manager.c:377 msgid "The nameservers listed below may not be recognized." msgstr "I server di nomi elencati sotto non possono essere riconosciuti." -#: ../src/logging/nm-logging.c:131 +#: ../src/logging/nm-logging.c:141 #, c-format msgid "Unknown log level '%s'" msgstr "Livello di registrazione «%s» sconosciuto" -#: ../src/logging/nm-logging.c:156 +#: ../src/logging/nm-logging.c:187 #, c-format msgid "Unknown log domain '%s'" msgstr "Dominio di registrazione «%s» sconosciuto" -#: ../src/modem-manager/nm-modem-cdma.c:281 ../src/nm-device-bt.c:351 +#: ../src/modem-manager/nm-modem-cdma.c:280 +#: ../src/modem-manager/nm-modem-broadband.c:553 ../src/nm-device-bt.c:345 #, c-format msgid "CDMA connection %d" msgstr "Connessione CDMA %d" -#: ../src/modem-manager/nm-modem-gsm.c:549 ../src/nm-device-bt.c:347 +#: ../src/modem-manager/nm-modem-gsm.c:558 +#: ../src/modem-manager/nm-modem-broadband.c:531 ../src/nm-device-bt.c:341 #, c-format msgid "GSM connection %d" msgstr "Connessione GSM %d" # [NdT] si tratta di un messaggio che descrive un'azione -#: ../src/nm-device-bond.c:191 +#: ../src/nm-device-bond.c:202 #, c-format msgid "Bond connection %d" msgstr "Connessione aggregata %d" -#: ../src/nm-device-adsl.c:193 +#: ../src/nm-device-adsl.c:194 #, c-format msgid "ADSL connection %d" msgstr "Connessione ADSL %d" -#: ../src/nm-device-bt.c:322 +# [NdT] si tratta di un messaggio che descrive un'azione +#: ../src/nm-device-bridge.c:208 +#, c-format +msgid "Bridge connection %d" +msgstr "Connessione bridge %d" + +#: ../src/nm-device-bt.c:316 #, c-format msgid "PAN connection %d" msgstr "Connessione PAN %d" -#: ../src/nm-device-bt.c:355 +#: ../src/nm-device-bt.c:349 #, c-format msgid "DUN connection %d" msgstr "Connessione DUN %d" -#: ../src/nm-device-ethernet.c:1327 +#: ../src/nm-device-ethernet.c:1324 #, c-format msgid "PPPoE connection %d" msgstr "Connessione PPPoE %d" # [NdT] si tratta di un messaggio che descrive un'azione -#: ../src/nm-device-ethernet.c:1327 ../src/settings/nm-settings-utils.c:50 +#: ../src/nm-device-ethernet.c:1324 ../src/settings/nm-settings-utils.c:50 #, c-format msgid "Wired connection %d" msgstr "Connessione via cavo %d" # [NdT] si tratta di un messaggio che descrive un'azione -#: ../src/nm-device-infiniband.c:303 +#: ../src/nm-device-infiniband.c:305 #, c-format msgid "InfiniBand connection %d" msgstr "Connessione InfiniBand %d" -#: ../src/nm-device-olpc-mesh.c:303 +#: ../src/nm-device-olpc-mesh.c:293 #, c-format msgid "Mesh %d" msgstr "Mesh %d" -#: ../src/nm-device-vlan.c:362 +#: ../src/nm-device-vlan.c:335 #, c-format msgid "VLAN connection %d" msgstr "Connessione VLAN %d" -#: ../src/nm-manager.c:661 +#: ../src/nm-manager.c:746 #, c-format msgid "VPN connection %d" msgstr "Connessione VPN %d" -#: ../src/nm-netlink-monitor.c:148 ../src/nm-netlink-monitor.c:272 -#: ../src/nm-netlink-monitor.c:695 +#: ../src/nm-netlink-monitor.c:152 ../src/nm-netlink-monitor.c:276 +#: ../src/nm-netlink-monitor.c:699 #, c-format msgid "error processing netlink message: %s" msgstr "errore nell'elaborare il messaggio netlink: %s" -#: ../src/nm-netlink-monitor.c:251 +#: ../src/nm-netlink-monitor.c:255 msgid "error occurred while waiting for data on socket" msgstr "si è verificato un errore durante l'attesa dei dati sul socket" -#: ../src/nm-netlink-monitor.c:296 +#: ../src/nm-netlink-monitor.c:300 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "" "impossibile collegarsi a netlink per monitorare lo stato del collegamento: %s" -#: ../src/nm-netlink-monitor.c:307 +#: ../src/nm-netlink-monitor.c:311 #, c-format msgid "unable to enable netlink handle credential passing: %s" msgstr "" "impossibile abilitare il passaggio delle credenziali handle netlink: %s" -#: ../src/nm-netlink-monitor.c:330 ../src/nm-netlink-monitor.c:390 +#: ../src/nm-netlink-monitor.c:334 ../src/nm-netlink-monitor.c:394 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "" "impossibile allocare un handle netlink per monitorare lo stato del " "collegamento: %s" -#: ../src/nm-netlink-monitor.c:415 +#: ../src/nm-netlink-monitor.c:419 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "" "impossibile allocare la cache dei collegamenti netlink per monitorare lo " "stato del collegamento: %s" -#: ../src/nm-netlink-monitor.c:542 +#: ../src/nm-netlink-monitor.c:546 #, c-format msgid "unable to join netlink group: %s" msgstr "impossibile unirsi a un gruppo netlink: %s" -#: ../src/nm-netlink-monitor.c:671 ../src/nm-netlink-monitor.c:684 +#: ../src/nm-netlink-monitor.c:675 ../src/nm-netlink-monitor.c:688 #, c-format msgid "error updating link cache: %s" msgstr "errore nell'aggiornare la cache dei link: %s" -#: ../src/settings/plugins/ifcfg-rh/reader.c:94 +#: ../src/settings/plugins/ifcfg-rh/reader.c:110 msgid "System" msgstr "Sistema" -#: ../src/settings/plugins/ifcfg-rh/reader.c:3641 +#: ../src/settings/plugins/ifcfg-rh/reader.c:3702 msgid "Bond" msgstr "Aggregata" -#: ../test/nm-online.c:112 +#: ../src/settings/plugins/ifcfg-rh/reader.c:3887 +msgid "Bridge" +msgstr "Bridge" + +#: ../test/nm-online.c:111 #, c-format msgid "\rConnecting" msgstr "\rConnessione in corso" -#: ../test/nm-online.c:143 +#: ../test/nm-online.c:142 msgid "Time to wait for a connection, in seconds (default is 30)" msgstr "Tempo di attesa per una connessione, in secondi (predefinito 30)" -#: ../test/nm-online.c:144 +#: ../test/nm-online.c:143 msgid "Exit immediately if NetworkManager is not running or connecting" msgstr "" "Esce immediatamente se il programma non è in esecuzione o non è in " "connessione" -#: ../test/nm-online.c:145 +#: ../test/nm-online.c:144 msgid "Don't print anything" msgstr "Non stampa nulla" -#: ../test/nm-online.c:163 +#: ../test/nm-online.c:162 msgid "Waits for a successful connection in NetworkManager." msgstr "Attende una connessione stabilita con successo" -#: ../test/nm-online.c:169 ../test/nm-online.c:178 +#: ../test/nm-online.c:168 ../test/nm-online.c:177 msgid "Invalid option. Please use --help to see a list of valid options." msgstr "" "Opzione non valida. Usare --help per ottenere un elenco delle opzioni valide." diff --git a/policy/Makefile.in b/policy/Makefile.in index 2d54c7c18..006975cd2 100644 --- a/policy/Makefile.in +++ b/policy/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -215,12 +214,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/Makefile.am b/src/Makefile.am index db11d6b78..cd124f6b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -355,18 +355,6 @@ endif NetworkManager_LDFLAGS = -rdynamic -libexec_PROGRAMS = nm-crash-logger -nm_crash_logger_SOURCES = nm-crash-logger.c -nm_crash_logger_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - -DBINDIR=\"$(bindir)\" \ - -DNMBINARY=\"$(nmbinary)\" \ - -DNMDATADIR=\"$(nmdatadir)\" \ - -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DNMSTATEDIR=\"$(nmstatedir)\" -nm_crash_logger_LDADD = $(GLIB_LIBS) - - NetworkManagerdir = $(datadir)/NetworkManager NetworkManager_DATA = gdb-cmd diff --git a/src/Makefile.in b/src/Makefile.in index 0011a0d3a..0a7e87f99 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -65,7 +65,6 @@ sbin_PROGRAMS = NetworkManager$(EXEEXT) @WITH_CONCHECK_TRUE@am__append_8 = $(LIBSOUP_CFLAGS) @SESSION_TRACKING_CK_TRUE@am__append_9 = -DCKDB_PATH=\"${CKDB_PATH}\" @WITH_CONCHECK_TRUE@am__append_10 = $(LIBSOUP_LIBS) -libexec_PROGRAMS = nm-crash-logger$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -76,12 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -115,9 +113,9 @@ am_libtest_wifi_ap_utils_la_OBJECTS = \ libtest_wifi_ap_utils_la-nm-wifi-ap-utils.lo libtest_wifi_ap_utils_la_OBJECTS = \ $(am_libtest_wifi_ap_utils_la_OBJECTS) -am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" \ +am__installdirs = "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(NetworkManagerdir)" "$(DESTDIR)$(dbusservicedir)" -PROGRAMS = $(libexec_PROGRAMS) $(sbin_PROGRAMS) +PROGRAMS = $(sbin_PROGRAMS) am__NetworkManager_SOURCES_DIST = nm-types.h nm-call-store.c \ nm-call-store.h nm-device.c nm-device.h nm-device-private.h \ nm-device-ethernet.c nm-device-ethernet.h nm-device-adsl.c \ @@ -224,10 +222,6 @@ NetworkManager_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(NetworkManager_LDFLAGS) $(LDFLAGS) -o \ $@ -am_nm_crash_logger_OBJECTS = \ - nm_crash_logger-nm-crash-logger.$(OBJEXT) -nm_crash_logger_OBJECTS = $(am_nm_crash_logger_OBJECTS) -nm_crash_logger_DEPENDENCIES = $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -256,12 +250,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libtest_dhcp_la_SOURCES) \ $(libtest_policy_hosts_la_SOURCES) \ - $(libtest_wifi_ap_utils_la_SOURCES) $(NetworkManager_SOURCES) \ - $(nm_crash_logger_SOURCES) + $(libtest_wifi_ap_utils_la_SOURCES) $(NetworkManager_SOURCES) DIST_SOURCES = $(libtest_dhcp_la_SOURCES) \ $(libtest_policy_hosts_la_SOURCES) \ $(libtest_wifi_ap_utils_la_SOURCES) \ - $(am__NetworkManager_SOURCES_DIST) $(nm_crash_logger_SOURCES) + $(am__NetworkManager_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -437,12 +430,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ @@ -748,16 +735,6 @@ NetworkManager_LDADD = ./generated/libnm-generated.la \ $(GLIB_LIBS) $(GUDEV_LIBS) $(LIBNL_LIBS) $(POLKIT_LIBS) \ $(SYSTEMD_LOGIN_LIBS) $(LIBM) $(LIBDL) $(am__append_10) NetworkManager_LDFLAGS = -rdynamic -nm_crash_logger_SOURCES = nm-crash-logger.c -nm_crash_logger_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - -DBINDIR=\"$(bindir)\" \ - -DNMBINARY=\"$(nmbinary)\" \ - -DNMDATADIR=\"$(nmdatadir)\" \ - -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DNMSTATEDIR=\"$(nmstatedir)\" - -nm_crash_logger_LDADD = $(GLIB_LIBS) NetworkManagerdir = $(datadir)/NetworkManager NetworkManager_DATA = gdb-cmd dbusservicedir = $(DBUS_SYS_DIR) @@ -819,52 +796,6 @@ libtest-policy-hosts.la: $(libtest_policy_hosts_la_OBJECTS) $(libtest_policy_hos $(AM_V_CCLD)$(LINK) $(libtest_policy_hosts_la_OBJECTS) $(libtest_policy_hosts_la_LIBADD) $(LIBS) libtest-wifi-ap-utils.la: $(libtest_wifi_ap_utils_la_OBJECTS) $(libtest_wifi_ap_utils_la_DEPENDENCIES) $(EXTRA_libtest_wifi_ap_utils_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtest_wifi_ap_utils_la_OBJECTS) $(libtest_wifi_ap_utils_la_LIBADD) $(LIBS) -install-libexecPROGRAMS: $(libexec_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_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 install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ @@ -914,9 +845,6 @@ clean-sbinPROGRAMS: NetworkManager$(EXEEXT): $(NetworkManager_OBJECTS) $(NetworkManager_DEPENDENCIES) $(EXTRA_NetworkManager_DEPENDENCIES) @rm -f NetworkManager$(EXEEXT) $(AM_V_CCLD)$(NetworkManager_LINK) $(NetworkManager_OBJECTS) $(NetworkManager_LDADD) $(LIBS) -nm-crash-logger$(EXEEXT): $(nm_crash_logger_OBJECTS) $(nm_crash_logger_DEPENDENCIES) $(EXTRA_nm_crash_logger_DEPENDENCIES) - @rm -f nm-crash-logger$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(nm_crash_logger_OBJECTS) $(nm_crash_logger_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -976,7 +904,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_dhcp_la-nm-ip6-config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_policy_hosts_la-nm-policy-hosts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_wifi_ap_utils_la-nm-wifi-ap-utils.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nm_crash_logger-nm-crash-logger.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1685,20 +1612,6 @@ NetworkManager-nm-sleep-monitor-upower.obj: nm-sleep-monitor-upower.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(NetworkManager_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o NetworkManager-nm-sleep-monitor-upower.obj `if test -f 'nm-sleep-monitor-upower.c'; then $(CYGPATH_W) 'nm-sleep-monitor-upower.c'; else $(CYGPATH_W) '$(srcdir)/nm-sleep-monitor-upower.c'; fi` -nm_crash_logger-nm-crash-logger.o: nm-crash-logger.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_crash_logger_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm_crash_logger-nm-crash-logger.o -MD -MP -MF $(DEPDIR)/nm_crash_logger-nm-crash-logger.Tpo -c -o nm_crash_logger-nm-crash-logger.o `test -f 'nm-crash-logger.c' || echo '$(srcdir)/'`nm-crash-logger.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm_crash_logger-nm-crash-logger.Tpo $(DEPDIR)/nm_crash_logger-nm-crash-logger.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nm-crash-logger.c' object='nm_crash_logger-nm-crash-logger.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_crash_logger_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm_crash_logger-nm-crash-logger.o `test -f 'nm-crash-logger.c' || echo '$(srcdir)/'`nm-crash-logger.c - -nm_crash_logger-nm-crash-logger.obj: nm-crash-logger.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_crash_logger_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nm_crash_logger-nm-crash-logger.obj -MD -MP -MF $(DEPDIR)/nm_crash_logger-nm-crash-logger.Tpo -c -o nm_crash_logger-nm-crash-logger.obj `if test -f 'nm-crash-logger.c'; then $(CYGPATH_W) 'nm-crash-logger.c'; else $(CYGPATH_W) '$(srcdir)/nm-crash-logger.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nm_crash_logger-nm-crash-logger.Tpo $(DEPDIR)/nm_crash_logger-nm-crash-logger.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nm-crash-logger.c' object='nm_crash_logger-nm-crash-logger.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nm_crash_logger_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nm_crash_logger-nm-crash-logger.obj `if test -f 'nm-crash-logger.c'; then $(CYGPATH_W) 'nm-crash-logger.c'; else $(CYGPATH_W) '$(srcdir)/nm-crash-logger.c'; fi` - mostlyclean-libtool: -rm -f *.lo @@ -1943,7 +1856,7 @@ check: $(BUILT_SOURCES) all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(NetworkManagerdir)" "$(DESTDIR)$(dbusservicedir)"; do \ + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(NetworkManagerdir)" "$(DESTDIR)$(dbusservicedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -1981,8 +1894,8 @@ maintainer-clean-generic: -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive -clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ - clean-noinstLTLIBRARIES clean-sbinPROGRAMS mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-sbinPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -2009,7 +1922,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: install-libexecPROGRAMS install-sbinPROGRAMS +install-exec-am: install-sbinPROGRAMS install-html: install-html-recursive @@ -2050,31 +1963,29 @@ ps: ps-recursive ps-am: uninstall-am: uninstall-NetworkManagerDATA uninstall-dbusserviceDATA \ - uninstall-libexecPROGRAMS uninstall-sbinPROGRAMS + uninstall-sbinPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-data-am \ install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic \ - clean-libexecPROGRAMS clean-libtool clean-noinstLTLIBRARIES \ - clean-sbinPROGRAMS ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-NetworkManagerDATA install-am install-data \ - install-data-am install-data-hook install-dbusserviceDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-libexecPROGRAMS install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-sbinPROGRAMS 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-recursive uninstall \ - uninstall-NetworkManagerDATA uninstall-am \ - uninstall-dbusserviceDATA uninstall-libexecPROGRAMS \ - uninstall-sbinPROGRAMS + all all-am check check-am clean clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-sbinPROGRAMS ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-NetworkManagerDATA \ + install-am install-data install-data-am install-data-hook \ + install-dbusserviceDATA 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-sbinPROGRAMS \ + 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-recursive \ + uninstall uninstall-NetworkManagerDATA uninstall-am \ + uninstall-dbusserviceDATA uninstall-sbinPROGRAMS nm-access-point-glue.h: $(top_srcdir)/introspection/nm-access-point.xml diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c index db627091e..f2d72bd15 100644 --- a/src/NetworkManagerUtils.c +++ b/src/NetworkManagerUtils.c @@ -607,20 +607,30 @@ value_hash_add_object_property (GHashTable *hash, value_hash_add (hash, key, value); } +/** + * nm_utils_do_sysctl: + * @path: path to write @value to + * @value: value to write to @path + * + * Writes @value to the file at @path, trying 3 times on failure. + * + * Returns: %TRUE on success. On failure, returns %FALSE and sets errno. + */ gboolean nm_utils_do_sysctl (const char *path, const char *value) { - int fd, len, nwrote, tries; + int fd, len, nwrote, tries, saved_errno = 0; char *actual; g_return_val_if_fail (path != NULL, FALSE); g_return_val_if_fail (value != NULL, FALSE); - g_return_val_if_fail (value[0], FALSE); fd = open (path, O_WRONLY | O_TRUNC); if (fd == -1) { + saved_errno = errno; nm_log_warn (LOGD_CORE, "sysctl: failed to open '%s': (%d) %s", - path, errno, strerror (errno)); + path, saved_errno, strerror (saved_errno)); + errno = saved_errno; return FALSE; } @@ -636,21 +646,24 @@ nm_utils_do_sysctl (const char *path, const char *value) /* Try to write the entire value three times if a partial write occurs */ len = strlen (actual); for (tries = 0, nwrote = 0; tries < 3 && nwrote != len; tries++) { + errno = 0; nwrote = write (fd, actual, len); if (nwrote == -1) { if (errno == EINTR) continue; + saved_errno = errno; break; } } g_free (actual); + close (fd); - if (nwrote != len) { + if (nwrote != len && saved_errno != EEXIST) { nm_log_warn (LOGD_CORE, "sysctl: failed to set '%s' to '%s': (%d) %s", - path, value, errno, strerror (errno)); + path, value, saved_errno, strerror (saved_errno)); } - close (fd); + errno = saved_errno; return (nwrote == len); } diff --git a/src/bluez-manager/Makefile.in b/src/bluez-manager/Makefile.in index f80f8cb0a..5606d11c3 100644 --- a/src/bluez-manager/Makefile.in +++ b/src/bluez-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -221,12 +220,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am index 04ae14894..40a058341 100644 --- a/src/dhcp-manager/Makefile.am +++ b/src/dhcp-manager/Makefile.am @@ -52,6 +52,7 @@ libdhcp_manager_la_SOURCES = \ libdhcp_manager_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ -DLOCALSTATEDIR=\"$(localstatedir)\" \ -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ diff --git a/src/dhcp-manager/Makefile.in b/src/dhcp-manager/Makefile.in index f161c2105..acd131145 100644 --- a/src/dhcp-manager/Makefile.in +++ b/src/dhcp-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -269,12 +268,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ @@ -466,6 +459,7 @@ libdhcp_manager_la_SOURCES = \ libdhcp_manager_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ + -DSYSCONFDIR=\"$(sysconfdir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ -DLOCALSTATEDIR=\"$(localstatedir)\" \ -DDHCLIENT_PATH=\"$(DHCLIENT_PATH)\" \ diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c index f721adf5b..2cdd304de 100644 --- a/src/dhcp-manager/nm-dhcp-client.c +++ b/src/dhcp-manager/nm-dhcp-client.c @@ -25,9 +25,8 @@ #include <errno.h> #include <unistd.h> #include <stdio.h> -#include <netinet/in.h> -#include <arpa/inet.h> #include <stdlib.h> +#include <uuid/uuid.h> #include "nm-utils.h" #include "nm-logging.h" @@ -36,9 +35,11 @@ typedef struct { char * iface; + GByteArray * hwaddr; gboolean ipv6; char * uuid; guint32 timeout; + GByteArray * duid; guchar state; GPid pid; @@ -67,6 +68,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; enum { PROP_0, PROP_IFACE, + PROP_HWADDR, PROP_IPV6, PROP_UUID, PROP_TIMEOUT, @@ -182,7 +184,7 @@ nm_dhcp_client_stop_pid (GPid pid, const char *iface, guint timeout_secs) } static void -stop (NMDHCPClient *self, gboolean release) +stop (NMDHCPClient *self, gboolean release, const GByteArray *duid) { NMDHCPClientPrivate *priv; @@ -321,6 +323,96 @@ nm_dhcp_client_start_ip4 (NMDHCPClient *self, return priv->pid ? TRUE : FALSE; } +static GByteArray * +generate_duid_from_machine_id (void) +{ + GByteArray *duid; + char *contents = NULL; + GError *error = NULL; + GChecksum *sum; + guint8 buffer[32]; /* SHA256 digest size */ + gsize sumlen = sizeof (buffer); + const guint16 duid_type = g_htons (4); + uuid_t uuid; + int ret; + + /* Get the machine ID from /etc/machine-id; it's always in /etc no matter + * where our configured SYSCONFDIR is. + */ + if (!g_file_get_contents ("/etc/machine-id", &contents, NULL, &error)) { + nm_log_warn (LOGD_DHCP6, "Failed to read " SYSCONFDIR "/machine-id to generate DHCPv6 DUID: (%d) %s", + error ? error->code : -1, + error ? error->message : "(unknown)"); + g_clear_error (&error); + return NULL; + } + + contents = g_strstrip (contents); + ret = uuid_parse (contents, uuid); + g_free (contents); + + if (ret != 0) { + nm_log_warn (LOGD_DHCP6, "Failed to parse " SYSCONFDIR "/machine-id to generate DHCPv6 DUID."); + return NULL; + } + + /* Hash the machine ID so it's not leaked to the network */ + sum = g_checksum_new (G_CHECKSUM_SHA256); + g_checksum_update (sum, (const guchar *) &uuid, sizeof (uuid)); + g_checksum_get_digest (sum, buffer, &sumlen); + g_checksum_free (sum); + + /* Generate a DHCP Unique Identifier for DHCPv6 using the + * DUID-UUID method (see RFC 6355 section 4). Format is: + * + * u16: type (DUID-UUID = 4) + * u8[16]: UUID bytes + */ + duid = g_byte_array_sized_new (18); + g_byte_array_append (duid, (guint8 *) &duid_type, sizeof (duid_type)); + + /* Since SHA256 is 256 bits, but UUID is 128 bits, we just take the first + * 128 bits of the SHA256 as the DUID-UUID. + */ + g_byte_array_append (duid, buffer, 16); + + return duid; +} + +static GByteArray * +get_duid (NMDHCPClient *self) +{ + static GByteArray *duid = NULL; + GByteArray *copy = NULL; + + if (G_UNLIKELY (duid == NULL)) + duid = generate_duid_from_machine_id (); + + if (G_LIKELY (duid)) { + copy = g_byte_array_sized_new (duid->len); + g_byte_array_append (copy, duid->data, duid->len); + } + + return copy; +} + +static char * +escape_duid (const GByteArray *duid) +{ + guint32 i = 0; + GString *s; + + g_return_val_if_fail (duid != NULL, NULL); + + s = g_string_sized_new (40); + while (i < duid->len) { + if (s->len) + g_string_append_c (s, ':'); + g_string_append_printf (s, "%02x", duid->data[i++]); + } + return g_string_free (s, FALSE); +} + gboolean nm_dhcp_client_start_ip6 (NMDHCPClient *self, NMSettingIP6Config *s_ip6, @@ -329,6 +421,7 @@ nm_dhcp_client_start_ip6 (NMDHCPClient *self, gboolean info_only) { NMDHCPClientPrivate *priv; + char *escaped; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), FALSE); @@ -338,12 +431,29 @@ nm_dhcp_client_start_ip6 (NMDHCPClient *self, g_return_val_if_fail (priv->ipv6 == TRUE, FALSE); g_return_val_if_fail (priv->uuid != NULL, FALSE); + /* If we don't have one yet, read the default DUID for this DHCPv6 client + * from the client-specific persistent configuration. + */ + if (!priv->duid) + priv->duid = NM_DHCP_CLIENT_GET_CLASS (self)->get_duid (self); + + if (nm_logging_level_enabled (LOGL_DEBUG)) { + escaped = escape_duid (priv->duid); + nm_log_dbg (LOGD_DHCP, "(%s): DHCPv6 DUID is '%s'", priv->iface, escaped); + g_free (escaped); + } + priv->info_only = info_only; nm_log_info (LOGD_DHCP, "Activation (%s) Beginning DHCPv6 transaction (timeout in %d seconds)", priv->iface, priv->timeout); - priv->pid = NM_DHCP_CLIENT_GET_CLASS (self)->ip6_start (self, s_ip6, dhcp_anycast_addr, hostname, info_only); + priv->pid = NM_DHCP_CLIENT_GET_CLASS (self)->ip6_start (self, + s_ip6, + dhcp_anycast_addr, + hostname, + info_only, + priv->duid); if (priv->pid > 0) start_monitor (self); @@ -397,7 +507,7 @@ nm_dhcp_client_stop (NMDHCPClient *self, gboolean release) /* Kill the DHCP client */ if (!priv->dead) { - NM_DHCP_CLIENT_GET_CLASS (self)->stop (self, release); + NM_DHCP_CLIENT_GET_CLASS (self)->stop (self, release, priv->duid); priv->dead = TRUE; nm_log_info (LOGD_DHCP, "(%s): canceled DHCP transaction, DHCP client pid %d", @@ -1323,6 +1433,9 @@ get_property (GObject *object, guint prop_id, case PROP_IFACE: g_value_set_string (value, priv->iface); break; + case PROP_HWADDR: + g_value_set_boxed (value, priv->hwaddr); + break; case PROP_IPV6: g_value_set_boolean (value, priv->ipv6); break; @@ -1349,6 +1462,10 @@ set_property (GObject *object, guint prop_id, /* construct-only */ priv->iface = g_strdup (g_value_get_string (value)); break; + case PROP_HWADDR: + /* construct only */ + priv->hwaddr = g_value_dup_boxed (value); + break; case PROP_IPV6: /* construct-only */ priv->ipv6 = g_value_get_boolean (value); @@ -1382,6 +1499,11 @@ dispose (GObject *object) g_hash_table_destroy (priv->options); g_free (priv->iface); + if (priv->hwaddr) + g_byte_array_free (priv->hwaddr, TRUE); + + if (priv->duid) + g_byte_array_free (priv->duid, TRUE); G_OBJECT_CLASS (nm_dhcp_client_parent_class)->dispose (object); } @@ -1399,6 +1521,7 @@ nm_dhcp_client_class_init (NMDHCPClientClass *client_class) object_class->set_property = set_property; client_class->stop = stop; + client_class->get_duid = get_duid; g_object_class_install_property (object_class, PROP_IFACE, @@ -1409,6 +1532,14 @@ nm_dhcp_client_class_init (NMDHCPClientClass *client_class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property + (object_class, PROP_HWADDR, + g_param_spec_boxed (NM_DHCP_CLIENT_HWADDR, + "hwaddr", + "hardware address", + G_TYPE_BYTE_ARRAY, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property (object_class, PROP_IPV6, g_param_spec_boolean (NM_DHCP_CLIENT_IPV6, "ipv6", diff --git a/src/dhcp-manager/nm-dhcp-client.h b/src/dhcp-manager/nm-dhcp-client.h index b93515f48..930ec1a5e 100644 --- a/src/dhcp-manager/nm-dhcp-client.h +++ b/src/dhcp-manager/nm-dhcp-client.h @@ -35,6 +35,7 @@ #define NM_DHCP_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP_CLIENT, NMDHCPClientClass)) #define NM_DHCP_CLIENT_INTERFACE "iface" +#define NM_DHCP_CLIENT_HWADDR "hwaddr" #define NM_DHCP_CLIENT_IPV6 "ipv6" #define NM_DHCP_CLIENT_UUID "uuid" #define NM_DHCP_CLIENT_TIMEOUT "timeout" @@ -85,10 +86,23 @@ typedef struct { NMSettingIP6Config *s_ip6, guint8 *anycast_addr, const char *hostname, - gboolean info_only); + gboolean info_only, + const GByteArray *duid); void (*stop) (NMDHCPClient *self, - gboolean release); + gboolean release, + const GByteArray *duid); + + /** + * get_duid: + * @self: the #NMDHCPClient + * + * Attempts to find an existing DHCPv6 DUID for this client in the DHCP + * client's persistent configuration. Returned DUID should be the binary + * representation of the DUID. If no DUID is found, %NULL should be + * returned. + */ + GByteArray * (*get_duid) (NMDHCPClient *self); /* Signals */ void (*state_changed) (NMDHCPClient *self, NMDHCPState state); diff --git a/src/dhcp-manager/nm-dhcp-dhclient-utils.c b/src/dhcp-manager/nm-dhcp-dhclient-utils.c index f3d3b1b6c..8dc7902f4 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient-utils.c +++ b/src/dhcp-manager/nm-dhcp-dhclient-utils.c @@ -22,6 +22,7 @@ #include <glib.h> #include <glib/gi18n.h> #include <string.h> +#include <ctype.h> #include "nm-dhcp-dhclient-utils.h" @@ -255,3 +256,165 @@ nm_dhcp_dhclient_create_config (const char *interface, return g_string_free (new_contents, FALSE); } +/* Roughly follow what dhclient's quotify_buf() and pretty_escape() functions do */ +char * +nm_dhcp_dhclient_escape_duid (const GByteArray *duid) +{ + char *escaped; + const guint8 *s = duid->data; + char *d; + + d = escaped = g_malloc0 ((duid->len * 4) + 1); + while (s < (duid->data + duid->len)) { + if (!g_ascii_isprint (*s)) { + *d++ = '\\'; + *d++ = '0' + ((*s >> 6) & 0x7); + *d++ = '0' + ((*s >> 3) & 0x7); + *d++ = '0' + (*s++ & 0x7); + } else if (*s == '"' || *s == '\'' || *s == '$' || + *s == '`' || *s == '\\' || *s == '|' || + *s == '&') { + *d++ = '\\'; + *d++ = *s++; + } else + *d++ = *s++; + } + return escaped; +} + +static inline gboolean +isoctal (const guint8 *p) +{ + return ( p[0] >= '0' && p[0] <= '3' + && p[1] >= '0' && p[1] <= '7' + && p[2] >= '0' && p[2] <= '7'); +} + +GByteArray * +nm_dhcp_dhclient_unescape_duid (const char *duid) +{ + GByteArray *unescaped; + const guint8 *p = (const guint8 *) duid; + guint i, len; + guint8 octal; + + len = strlen (duid); + unescaped = g_byte_array_sized_new (len); + for (i = 0; i < len; i++) { + if (p[i] == '\\') { + i++; + if (isdigit (p[i])) { + /* Octal escape sequence */ + if (i + 2 >= len || !isoctal (p + i)) + goto error; + octal = ((p[i] - '0') << 6) + ((p[i + 1] - '0') << 3) + (p[i + 2] - '0'); + g_byte_array_append (unescaped, &octal, 1); + i += 2; + } else { + /* One of ", ', $, `, \, |, or & */ + g_warn_if_fail (p[i] == '"' || p[i] == '\'' || p[i] == '$' || + p[i] == '`' || p[i] == '\\' || p[i] == '|' || + p[i] == '&'); + g_byte_array_append (unescaped, &p[i], 1); + } + } else + g_byte_array_append (unescaped, &p[i], 1); + } + + return unescaped; + +error: + g_byte_array_free (unescaped, TRUE); + return NULL; +} + +#define DUID_PREFIX "default-duid \"" + +GByteArray * +nm_dhcp_dhclient_read_duid (const char *leasefile, GError **error) +{ + GByteArray *duid = NULL; + char *contents; + char **line, **split, *p, *e; + + if (!g_file_test (leasefile, G_FILE_TEST_EXISTS)) + return NULL; + + if (!g_file_get_contents (leasefile, &contents, NULL, error)) + return NULL; + + split = g_strsplit_set (contents, "\n\r", -1); + for (line = split; line && *line && (duid == NULL); line++) { + p = g_strstrip (*line); + if (g_str_has_prefix (p, DUID_PREFIX)) { + p += strlen (DUID_PREFIX); + + /* look for trailing "; */ + e = p + strlen (p) - 2; + if (strcmp (e, "\";") != 0) + continue; + *e = '\0'; + + duid = nm_dhcp_dhclient_unescape_duid (p); + } + } + g_free (contents); + g_strfreev (split); + + return duid; +} + +gboolean +nm_dhcp_dhclient_save_duid (const char *leasefile, + const char *escaped_duid, + GError **error) +{ + char **lines = NULL, **iter, *l; + GString *s; + gboolean success; + gsize len = 0; + + g_return_val_if_fail (leasefile != NULL, FALSE); + g_return_val_if_fail (escaped_duid != NULL, FALSE); + + if (g_file_test (leasefile, G_FILE_TEST_EXISTS)) { + char *contents = NULL; + + if (!g_file_get_contents (leasefile, &contents, &len, error)) { + g_prefix_error (error, "failed to read lease file %s: ", leasefile); + return FALSE; + } + + /* If the file already contains an uncommented DUID, leave it */ + g_assert (contents); + lines = g_strsplit_set (contents, "\n\r", -1); + g_free (contents); + for (iter = lines; iter && *iter; iter++) { + l = *iter; + while (g_ascii_isspace (*l)) + l++; + if (g_str_has_prefix (l, DUID_PREFIX)) { + g_strfreev (lines); + return TRUE; + } + } + } + + s = g_string_sized_new (len + 50); + g_string_append_printf (s, DUID_PREFIX "%s\";\n", escaped_duid); + + /* Preserve existing leasefile contents */ + if (lines) { + for (iter = lines; iter && *iter; iter++) + g_string_append (s, *iter[0] ? *iter : "\n"); + g_strfreev (lines); + } + + success = g_file_set_contents (leasefile, s->str, -1, error); + if (!success) + g_prefix_error (error, "failed to set DUID in lease file %s: ", leasefile); + + g_string_free (s, TRUE); + return success; +} + diff --git a/src/dhcp-manager/nm-dhcp-dhclient-utils.h b/src/dhcp-manager/nm-dhcp-dhclient-utils.h index 2f9f7c454..95cb05680 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient-utils.h +++ b/src/dhcp-manager/nm-dhcp-dhclient-utils.h @@ -34,5 +34,15 @@ char *nm_dhcp_dhclient_create_config (const char *interface, const char *orig_path, const char *orig_contents); +char *nm_dhcp_dhclient_escape_duid (const GByteArray *duid); + +GByteArray *nm_dhcp_dhclient_unescape_duid (const char *duid); + +GByteArray *nm_dhcp_dhclient_read_duid (const char *leasefile, GError **error); + +gboolean nm_dhcp_dhclient_save_duid (const char *leasefile, + const char *escaped_duid, + GError **error); + #endif /* NM_DHCP_DHCLIENT_UTILS_H */ diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c index 347d97c4f..d9f51352c 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient.c +++ b/src/dhcp-manager/nm-dhcp-dhclient.c @@ -50,6 +50,7 @@ G_DEFINE_TYPE (NMDHCPDhclient, nm_dhcp_dhclient, NM_TYPE_DHCP_CLIENT) typedef struct { const char *path; char *conf_file; + const char *def_leasefile; char *lease_file; char *pid_file; } NMDHCPDhclientPrivate; @@ -445,6 +446,7 @@ dhclient_child_setup (gpointer user_data G_GNUC_UNUSED) static GPid dhclient_start (NMDHCPClient *client, const char *mode_opt, + const GByteArray *duid, gboolean release) { NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (client); @@ -575,7 +577,7 @@ ip4_start (NMDHCPClient *client, return -1; } - return dhclient_start (client, NULL, FALSE); + return dhclient_start (client, NULL, NULL, FALSE); } static GPid @@ -583,7 +585,8 @@ ip6_start (NMDHCPClient *client, NMSettingIP6Config *s_ip6, guint8 *dhcp_anycast_addr, const char *hostname, - gboolean info_only) + gboolean info_only, + const GByteArray *duid) { NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (client); const char *iface; @@ -596,16 +599,16 @@ ip6_start (NMDHCPClient *client, return -1; } - return dhclient_start (client, info_only ? "-S" : "-N", FALSE); + return dhclient_start (client, info_only ? "-S" : "-N", duid, FALSE); } static void -stop (NMDHCPClient *client, gboolean release) +stop (NMDHCPClient *client, gboolean release, const GByteArray *duid) { NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (client); /* Chain up to parent */ - NM_DHCP_CLIENT_CLASS (nm_dhcp_dhclient_parent_class)->stop (client, release); + NM_DHCP_CLIENT_CLASS (nm_dhcp_dhclient_parent_class)->stop (client, release, duid); if (priv->conf_file) remove (priv->conf_file); @@ -618,7 +621,7 @@ stop (NMDHCPClient *client, gboolean release) if (release) { GPid rpid; - rpid = dhclient_start (client, NULL, TRUE); + rpid = dhclient_start (client, NULL, duid, TRUE); if (rpid > 0) { /* Wait a few seconds for the release to happen */ nm_dhcp_client_stop_pid (rpid, nm_dhcp_client_get_iface (client), 5); @@ -626,14 +629,75 @@ stop (NMDHCPClient *client, gboolean release) } } +static GByteArray * +get_duid (NMDHCPClient *client) +{ + NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (client); + GByteArray *duid = NULL; + char *leasefile; + GError *error = NULL; + + /* Look in interface-specific leasefile first for backwards compat */ + leasefile = get_dhclient_leasefile (nm_dhcp_client_get_iface (client), + nm_dhcp_client_get_uuid (client), + TRUE); + nm_log_dbg (LOGD_DHCP, "Looking for DHCPv6 DUID in '%s'.", leasefile); + duid = nm_dhcp_dhclient_read_duid (leasefile, &error); + g_free (leasefile); + + if (error) { + nm_log_warn (LOGD_DHCP, "Failed to read leasefile '%s': (%d) %s", + leasefile, + error ? error->code : -1, + error ? error->message : "(unknown)"); + g_clear_error (&error); + } + + if (!duid && priv->def_leasefile) { + /* Otherwise read the default machine-wide DUID */ + nm_log_dbg (LOGD_DHCP, "Looking for default DHCPv6 DUID in '%s'.", priv->def_leasefile); + duid = nm_dhcp_dhclient_read_duid (priv->def_leasefile, &error); + if (error) { + nm_log_warn (LOGD_DHCP, "Failed to read leasefile '%s': (%d) %s", + priv->def_leasefile, + error ? error->code : -1, + error ? error->message : "(unknown)"); + g_clear_error (&error); + } + } + + /* return our DUID, otherwise let the parent class make a default DUID */ + return duid ? duid : NM_DHCP_CLIENT_CLASS (nm_dhcp_dhclient_parent_class)->get_duid (client); +} + /***************************************************/ +static const char *def_leasefiles[] = { + SYSCONFDIR "/dhclient6.leases", + LOCALSTATEDIR "/lib/dhcp/dhclient6.leases", + LOCALSTATEDIR "/lib/dhclient/dhclient6.leases", + NULL +}; + static void nm_dhcp_dhclient_init (NMDHCPDhclient *self) { NMDHCPDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (self); + const char **iter = &def_leasefiles[0]; priv->path = nm_dhcp_dhclient_get_path (DHCLIENT_PATH); + + while (iter && *iter) { + if (g_file_test (*iter, G_FILE_TEST_EXISTS)) { + priv->def_leasefile = *iter; + break; + } + iter++; + } + + /* Fallback option */ + if (!priv->def_leasefile) + priv->def_leasefile = SYSCONFDIR "/dhclient6.leases"; } static void @@ -662,5 +726,6 @@ nm_dhcp_dhclient_class_init (NMDHCPDhclientClass *dhclient_class) client_class->ip4_start = ip4_start; client_class->ip6_start = ip6_start; client_class->stop = stop; + client_class->get_duid = get_duid; } diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c index dda96e2a0..f3245ee5e 100644 --- a/src/dhcp-manager/nm-dhcp-dhcpcd.c +++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c @@ -170,19 +170,20 @@ ip6_start (NMDHCPClient *client, NMSettingIP6Config *s_ip6, guint8 *dhcp_anycast_addr, const char *hostname, - gboolean info_only) + gboolean info_only, + const GByteArray *duid) { nm_log_warn (LOGD_DHCP6, "the dhcpcd backend does not support IPv6."); return -1; } static void -stop (NMDHCPClient *client, gboolean release) +stop (NMDHCPClient *client, gboolean release, const GByteArray *duid) { NMDHCPDhcpcdPrivate *priv = NM_DHCP_DHCPCD_GET_PRIVATE (client); /* Chain up to parent */ - NM_DHCP_CLIENT_CLASS (nm_dhcp_dhcpcd_parent_class)->stop (client, release); + NM_DHCP_CLIENT_CLASS (nm_dhcp_dhcpcd_parent_class)->stop (client, release, duid); if (priv->pid_file) remove (priv->pid_file); diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c index 995bff479..1bd7f9842 100644 --- a/src/dhcp-manager/nm-dhcp-manager.c +++ b/src/dhcp-manager/nm-dhcp-manager.c @@ -384,6 +384,7 @@ add_client (NMDHCPManager *self, NMDHCPClient *client) static NMDHCPClient * client_start (NMDHCPManager *self, const char *iface, + const GByteArray *hwaddr, const char *uuid, gboolean ipv6, NMSettingIP4Config *s_ip4, @@ -417,6 +418,7 @@ client_start (NMDHCPManager *self, /* And make a new one */ client = g_object_new (priv->client_type, NM_DHCP_CLIENT_INTERFACE, iface, + NM_DHCP_CLIENT_HWADDR, hwaddr, NM_DHCP_CLIENT_IPV6, ipv6, NM_DHCP_CLIENT_UUID, uuid, NM_DHCP_CLIENT_TIMEOUT, timeout ? timeout : DHCP_TIMEOUT, @@ -442,13 +444,13 @@ client_start (NMDHCPManager *self, NMDHCPClient * nm_dhcp_manager_start_ip4 (NMDHCPManager *self, const char *iface, + const GByteArray *hwaddr, const char *uuid, NMSettingIP4Config *s_ip4, guint32 timeout, guint8 *dhcp_anycast_addr) { NMDHCPManagerPrivate *priv; - NMDHCPClient *client = NULL; const char *hostname = NULL; gboolean send_hostname = TRUE; @@ -485,15 +487,14 @@ nm_dhcp_manager_start_ip4 (NMDHCPManager *self, } } - client = client_start (self, iface, uuid, FALSE, s_ip4, NULL, timeout, dhcp_anycast_addr, hostname, FALSE); - - return client; + return client_start (self, iface, hwaddr, uuid, FALSE, s_ip4, NULL, timeout, dhcp_anycast_addr, hostname, FALSE); } /* Caller owns a reference to the NMDHCPClient on return */ NMDHCPClient * nm_dhcp_manager_start_ip6 (NMDHCPManager *self, const char *iface, + const GByteArray *hwaddr, const char *uuid, NMSettingIP6Config *s_ip6, guint32 timeout, @@ -516,7 +517,7 @@ nm_dhcp_manager_start_ip6 (NMDHCPManager *self, hostname = NULL; } - return client_start (self, iface, uuid, TRUE, NULL, s_ip6, timeout, dhcp_anycast_addr, hostname, info_only); + return client_start (self, iface, hwaddr, uuid, TRUE, NULL, s_ip6, timeout, dhcp_anycast_addr, hostname, info_only); } static void diff --git a/src/dhcp-manager/nm-dhcp-manager.h b/src/dhcp-manager/nm-dhcp-manager.h index 68db7e370..a29a33fdb 100644 --- a/src/dhcp-manager/nm-dhcp-manager.h +++ b/src/dhcp-manager/nm-dhcp-manager.h @@ -67,6 +67,7 @@ void nm_dhcp_manager_set_hostname_provider(NMDHCPManager *manager, NMDHCPClient * nm_dhcp_manager_start_ip4 (NMDHCPManager *manager, const char *iface, + const GByteArray *hwaddr, const char *uuid, NMSettingIP4Config *s_ip4, guint32 timeout, @@ -74,6 +75,7 @@ NMDHCPClient * nm_dhcp_manager_start_ip4 (NMDHCPManager *manager, NMDHCPClient * nm_dhcp_manager_start_ip6 (NMDHCPManager *manager, const char *iface, + const GByteArray *hwaddr, const char *uuid, NMSettingIP6Config *s_ip6, guint32 timeout, diff --git a/src/dhcp-manager/tests/Makefile.am b/src/dhcp-manager/tests/Makefile.am index 251aa224e..8c9d06c15 100644 --- a/src/dhcp-manager/tests/Makefile.am +++ b/src/dhcp-manager/tests/Makefile.am @@ -15,7 +15,8 @@ test_dhcp_dhclient_SOURCES = \ test-dhcp-dhclient.c test_dhcp_dhclient_CPPFLAGS = \ - $(GLIB_CFLAGS) + $(GLIB_CFLAGS) \ + -DTESTDIR="\"$(abs_srcdir)\"" test_dhcp_dhclient_LDADD = \ -ldl \ @@ -27,3 +28,8 @@ check-local: test-dhcp-dhclient $(abs_builddir)/test-dhcp-dhclient endif + +EXTRA_DIST = \ + test-dhclient-duid.leases \ + test-dhclient-commented-duid.leases + diff --git a/src/dhcp-manager/tests/Makefile.in b/src/dhcp-manager/tests/Makefile.in index 32cdf4dbb..921ccaf3a 100644 --- a/src/dhcp-manager/tests/Makefile.in +++ b/src/dhcp-manager/tests/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -219,12 +218,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ @@ -377,7 +370,8 @@ with_resolvconf = @with_resolvconf@ @ENABLE_TESTS_TRUE@ test-dhcp-dhclient.c @ENABLE_TESTS_TRUE@test_dhcp_dhclient_CPPFLAGS = \ -@ENABLE_TESTS_TRUE@ $(GLIB_CFLAGS) +@ENABLE_TESTS_TRUE@ $(GLIB_CFLAGS) \ +@ENABLE_TESTS_TRUE@ -DTESTDIR="\"$(abs_srcdir)\"" @ENABLE_TESTS_TRUE@test_dhcp_dhclient_LDADD = \ @ENABLE_TESTS_TRUE@ -ldl \ @@ -385,6 +379,10 @@ with_resolvconf = @with_resolvconf@ @ENABLE_TESTS_TRUE@ $(top_builddir)/libnm-util/libnm-util.la \ @ENABLE_TESTS_TRUE@ $(GLIB_LIBS) +EXTRA_DIST = \ + test-dhclient-duid.leases \ + test-dhclient-commented-duid.leases + all: all-am .SUFFIXES: diff --git a/src/dhcp-manager/tests/test-dhclient-commented-duid.leases b/src/dhcp-manager/tests/test-dhclient-commented-duid.leases new file mode 100644 index 000000000..3e46ae7d0 --- /dev/null +++ b/src/dhcp-manager/tests/test-dhclient-commented-duid.leases @@ -0,0 +1,2 @@ +#default-duid "\000\001\000\001\030y\246\023`g \354Lp"; + diff --git a/src/dhcp-manager/tests/test-dhclient-duid.leases b/src/dhcp-manager/tests/test-dhclient-duid.leases new file mode 100644 index 000000000..229331d47 --- /dev/null +++ b/src/dhcp-manager/tests/test-dhclient-duid.leases @@ -0,0 +1,2 @@ +default-duid "\000\001\000\001\030y\246\023`g \354Lp"; + diff --git a/src/dhcp-manager/tests/test-dhcp-dhclient.c b/src/dhcp-manager/tests/test-dhcp-dhclient.c index a87c29aa0..7eb2d3586 100644 --- a/src/dhcp-manager/tests/test-dhcp-dhclient.c +++ b/src/dhcp-manager/tests/test-dhcp-dhclient.c @@ -20,6 +20,7 @@ #include <glib.h> #include <string.h> +#include <unistd.h> #include "nm-dhcp-dhclient-utils.h" #include "nm-utils.h" @@ -225,6 +226,173 @@ test_existing_multiline_alsoreq (void) /*******************************************/ +static void +test_one_duid (const char *escaped, const guint8 *unescaped, guint len) +{ + GByteArray *t; + char *w; + + t = nm_dhcp_dhclient_unescape_duid (escaped); + g_assert (t); + g_assert_cmpint (t->len, ==, len); + g_assert_cmpint (memcmp (t->data, unescaped, len), ==, 0); + g_byte_array_free (t, TRUE); + + t = g_byte_array_sized_new (len); + g_byte_array_append (t, unescaped, len); + w = nm_dhcp_dhclient_escape_duid (t); + g_assert (w); + g_assert_cmpint (strlen (escaped), ==, strlen (w)); + g_assert_cmpstr (escaped, ==, w); +} + +static void +test_duids (void) +{ + const guint8 test1_u[] = { 0x00, 0x01, 0x00, 0x01, 0x13, 0x6f, 0x13, 0x6e, + 0x00, 0x22, 0xfa, 0x8c, 0xd6, 0xc2 }; + const char *test1_s = "\\000\\001\\000\\001\\023o\\023n\\000\\\"\\372\\214\\326\\302"; + + const guint8 test2_u[] = { 0x00, 0x01, 0x00, 0x01, 0x17, 0x57, 0xee, 0x39, + 0x00, 0x23, 0x15, 0x08, 0x7E, 0xac }; + const char *test2_s = "\\000\\001\\000\\001\\027W\\3569\\000#\\025\\010~\\254"; + + const guint8 test3_u[] = { 0x00, 0x01, 0x00, 0x01, 0x17, 0x58, 0xe8, 0x58, + 0x00, 0x23, 0x15, 0x08, 0x7e, 0xac }; + const char *test3_s = "\\000\\001\\000\\001\\027X\\350X\\000#\\025\\010~\\254"; + + const guint8 test4_u[] = { 0x00, 0x01, 0x00, 0x01, 0x15, 0xd5, 0x31, 0x97, + 0x00, 0x16, 0xeb, 0x04, 0x45, 0x18 }; + const char *test4_s = "\\000\\001\\000\\001\\025\\3251\\227\\000\\026\\353\\004E\\030"; + + const char *bad_s = "\\000\\001\\000\\001\\425\\3251\\227\\000\\026\\353\\004E\\030"; + + test_one_duid (test1_s, test1_u, sizeof (test1_u)); + test_one_duid (test2_s, test2_u, sizeof (test2_u)); + test_one_duid (test3_s, test3_u, sizeof (test3_u)); + test_one_duid (test4_s, test4_u, sizeof (test4_u)); + + /* Invalid octal digit */ + g_assert (nm_dhcp_dhclient_unescape_duid (bad_s) == NULL); +} + +static void +test_read_duid_from_leasefile (void) +{ + const guint8 expected[] = { 0x00, 0x01, 0x00, 0x01, 0x18, 0x79, 0xa6, + 0x13, 0x60, 0x67, 0x20, 0xec, 0x4c, 0x70 }; + GByteArray *duid; + GError *error = NULL; + + duid = nm_dhcp_dhclient_read_duid (TESTDIR "/test-dhclient-duid.leases", &error); + g_assert_no_error (error); + g_assert (duid); + g_assert_cmpint (duid->len, ==, sizeof (expected)); + g_assert_cmpint (memcmp (duid->data, expected, duid->len), ==, 0); + + g_byte_array_free (duid, TRUE); +} + +static void +test_read_commented_duid_from_leasefile (void) +{ + GByteArray *duid; + GError *error = NULL; + + duid = nm_dhcp_dhclient_read_duid (TESTDIR "/test-dhclient-commented-duid.leases", &error); + g_assert_no_error (error); + g_assert (duid == NULL); +} + +static void +test_write_duid (void) +{ + const char *duid = "\\000\\001\\000\\001\\027X\\350X\\000#\\025\\010~\\254"; + const char *expected_contents = "default-duid \"\\000\\001\\000\\001\\027X\\350X\\000#\\025\\010~\\254\";\n"; + GError *error = NULL; + char *contents = NULL; + gboolean success; + const char *path = "test-dhclient-write-duid.leases"; + + success = nm_dhcp_dhclient_save_duid (path, duid, &error); + g_assert_no_error (error); + g_assert (success); + + success = g_file_get_contents (path, &contents, NULL, &error); + g_assert_no_error (error); + g_assert (success); + + unlink (path); + g_assert_cmpstr (expected_contents, ==, contents); + + g_free (contents); +} + +static void +test_write_existing_duid (void) +{ + const char *duid = "\\000\\001\\000\\001\\023o\\023n\\000\\\"\\372\\214\\326\\302"; + const char *expected_contents = "default-duid \"\\000\\001\\000\\001\\027X\\350X\\000#\\025\\010~\\254\";\n"; + GError *error = NULL; + char *contents = NULL; + gboolean success; + const char *path = "test-dhclient-write-existing-duid.leases"; + + success = g_file_set_contents (path, expected_contents, -1, &error); + g_assert_no_error (error); + g_assert (success); + + /* Save other DUID; should be a no-op */ + success = nm_dhcp_dhclient_save_duid (path, duid, &error); + g_assert_no_error (error); + g_assert (success); + + /* reread original contents */ + success = g_file_get_contents (path, &contents, NULL, &error); + g_assert_no_error (error); + g_assert (success); + + unlink (path); + g_assert_cmpstr (expected_contents, ==, contents); + + g_free (contents); +} + +static void +test_write_existing_commented_duid (void) +{ + #define DUID "\\000\\001\\000\\001\\023o\\023n\\000\\\"\\372\\214\\326\\302" + #define ORIG_CONTENTS "#default-duid \"\\000\\001\\000\\001\\027X\\350X\\000#\\025\\010~\\254\";\n" + const char *expected_contents = \ + "default-duid \"" DUID "\";\n" + ORIG_CONTENTS; + GError *error = NULL; + char *contents = NULL; + gboolean success; + const char *path = "test-dhclient-write-existing-commented-duid.leases"; + + success = g_file_set_contents (path, ORIG_CONTENTS, -1, &error); + g_assert_no_error (error); + g_assert (success); + + /* Save other DUID; should be a no-op */ + success = nm_dhcp_dhclient_save_duid (path, DUID, &error); + g_assert_no_error (error); + g_assert (success); + + /* reread original contents */ + success = g_file_get_contents (path, &contents, NULL, &error); + g_assert_no_error (error); + g_assert (success); + + unlink (path); + g_assert_cmpstr (expected_contents, ==, contents); + + g_free (contents); +} + +/*******************************************/ + #if GLIB_CHECK_VERSION(2,25,12) typedef GTestFixtureFunc TCFunc; #else @@ -248,6 +416,14 @@ int main (int argc, char **argv) g_test_suite_add (suite, TESTCASE (test_override_hostname, NULL)); g_test_suite_add (suite, TESTCASE (test_existing_alsoreq, NULL)); g_test_suite_add (suite, TESTCASE (test_existing_multiline_alsoreq, NULL)); + g_test_suite_add (suite, TESTCASE (test_duids, NULL)); + + g_test_suite_add (suite, TESTCASE (test_read_duid_from_leasefile, NULL)); + g_test_suite_add (suite, TESTCASE (test_read_commented_duid_from_leasefile, NULL)); + + g_test_suite_add (suite, TESTCASE (test_write_duid, NULL)); + g_test_suite_add (suite, TESTCASE (test_write_existing_duid, NULL)); + g_test_suite_add (suite, TESTCASE (test_write_existing_commented_duid, NULL)); return g_test_run (); } diff --git a/src/dns-manager/Makefile.in b/src/dns-manager/Makefile.in index b0ea7e776..e5dfb187a 100644 --- a/src/dns-manager/Makefile.in +++ b/src/dns-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -222,12 +221,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/dns-manager/nm-dns-dnsmasq.c b/src/dns-manager/nm-dns-dnsmasq.c index e07240c56..f7e27da3f 100644 --- a/src/dns-manager/nm-dns-dnsmasq.c +++ b/src/dns-manager/nm-dns-dnsmasq.c @@ -183,19 +183,23 @@ error: } static gboolean -add_ip6_config (GString *str, NMIP6Config *ip6, gboolean split, const char *iface) +add_ip6_config (GString *str, NMIP6Config *ip6, gboolean split) { const struct in6_addr *addr; char *buf; int n, i; gboolean added = FALSE; + const char *iface; + + iface = g_object_get_data (G_OBJECT (ip6), IP_CONFIG_IFACE_TAG); + g_assert (iface); if (split) { if (nm_ip6_config_get_num_nameservers (ip6) == 0) return FALSE; /* FIXME: it appears that dnsmasq can only handle one nameserver - * per domain (at the manpage seems to indicate that) so only use + * per domain (at least the manpage seems to indicate that) so only use * the first nameserver here. */ addr = nm_ip6_config_get_nameserver (ip6, 0); @@ -247,8 +251,7 @@ update (NMDnsPlugin *plugin, const GSList *vpn_configs, const GSList *dev_configs, const GSList *other_configs, - const char *hostname, - const char *iface) + const char *hostname) { NMDnsDnsmasq *self = NM_DNS_DNSMASQ (plugin); GString *conf; @@ -274,7 +277,7 @@ update (NMDnsPlugin *plugin, if (NM_IS_IP4_CONFIG (iter->data)) add_ip4_config (conf, NM_IP4_CONFIG (iter->data), TRUE); else if (NM_IS_IP6_CONFIG (iter->data)) - add_ip6_config (conf, NM_IP6_CONFIG (iter->data), TRUE, iface); + add_ip6_config (conf, NM_IP6_CONFIG (iter->data), TRUE); } /* Now add interface configs without split DNS */ @@ -282,7 +285,7 @@ update (NMDnsPlugin *plugin, if (NM_IS_IP4_CONFIG (iter->data)) add_ip4_config (conf, NM_IP4_CONFIG (iter->data), FALSE); else if (NM_IS_IP6_CONFIG (iter->data)) - add_ip6_config (conf, NM_IP6_CONFIG (iter->data), FALSE, iface); + add_ip6_config (conf, NM_IP6_CONFIG (iter->data), FALSE); } /* And any other random configs */ @@ -290,7 +293,7 @@ update (NMDnsPlugin *plugin, if (NM_IS_IP4_CONFIG (iter->data)) add_ip4_config (conf, NM_IP4_CONFIG (iter->data), FALSE); else if (NM_IS_IP6_CONFIG (iter->data)) - add_ip6_config (conf, NM_IP6_CONFIG (iter->data), FALSE, iface); + add_ip6_config (conf, NM_IP6_CONFIG (iter->data), FALSE); } /* Write out the config file */ diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c index 38691f37d..b838e9f03 100644 --- a/src/dns-manager/nm-dns-manager.c +++ b/src/dns-manager/nm-dns-manager.c @@ -74,11 +74,7 @@ typedef struct { GSList *plugins; - /* This is a hack because SUSE's netconfig always wants changes - * associated with a network interface, but sometimes a change isn't - * associated with a network interface (like hostnames). - */ - char *last_iface; + gboolean dns_touched; } NMDnsManagerPrivate; @@ -158,14 +154,19 @@ merge_one_ip4_config (NMResolvConfData *rc, NMIP4Config *src) } static void -merge_one_ip6_config (NMResolvConfData *rc, NMIP6Config *src, const char *iface) +merge_one_ip6_config (NMResolvConfData *rc, NMIP6Config *src) { guint32 num, i; + const char *iface; + + iface = g_object_get_data (G_OBJECT (src), IP_CONFIG_IFACE_TAG); + g_assert (iface); num = nm_ip6_config_get_num_nameservers (src); for (i = 0; i < num; i++) { const struct in6_addr *addr; char buf[INET6_ADDRSTRLEN]; + char *tmp; addr = nm_ip6_config_get_nameserver (src, i); @@ -176,7 +177,6 @@ merge_one_ip6_config (NMResolvConfData *rc, NMIP6Config *src, const char *iface) } else { if (inet_ntop (AF_INET6, addr, buf, INET6_ADDRSTRLEN) > 0) { if (IN6_IS_ADDR_LINKLOCAL (addr) && strchr (buf, '%') == NULL) { - char *tmp; tmp = g_strdup_printf ("%s%%%s", buf, iface); add_string_item (rc->nameservers, tmp); g_free (tmp); @@ -261,7 +261,6 @@ dispatch_netconfig (const char *domain, char **nameservers, const char *nis_domain, char **nis_servers, - const char *iface, GError **error) { char *str, *tmp; @@ -273,16 +272,10 @@ dispatch_netconfig (const char *domain, if (pid < 0) return FALSE; - // FIXME: this is wrong. We are not writing out the iface-specific - // resolv.conf data, we are writing out an already-fully-merged - // resolv.conf. Assuming netconfig works in the obvious way, then - // there are various failure modes, such as, eg, bringing up a VPN on - // eth0, then bringing up wlan0, then bringing down the VPN. Because - // NMDnsManager would have claimed that the VPN DNS server was also - // part of the wlan0 config, it will remain in resolv.conf after the - // VPN goes down, even though it is presumably no longer reachable - // at that point. - write_to_netconfig (fd, "INTERFACE", iface); + /* NM is writing already-merged DNS information to netconfig, so it + * does not apply to a specific network interface. + */ + write_to_netconfig (fd, "INTERFACE", "NetworkManager"); if (searches) { str = g_strjoinv (" ", searches); @@ -404,7 +397,6 @@ static gboolean dispatch_resolvconf (const char *domain, char **searches, char **nameservers, - const char *iface, GError **error) { char *cmd; @@ -416,7 +408,7 @@ dispatch_resolvconf (const char *domain, if (domain || searches || nameservers) { cmd = g_strconcat (RESOLVCONF_PATH, " -a ", "NetworkManager", NULL); - nm_log_info (LOGD_DNS, "(%s): writing resolv.conf to %s", iface, RESOLVCONF_PATH); + nm_log_info (LOGD_DNS, "Writing DNS information to %s", RESOLVCONF_PATH); if ((f = popen (cmd, "w")) == NULL) g_set_error (error, NM_DNS_MANAGER_ERROR, @@ -430,7 +422,7 @@ dispatch_resolvconf (const char *domain, } } else { cmd = g_strconcat (RESOLVCONF_PATH, " -d ", "NetworkManager", NULL); - nm_log_info (LOGD_DNS, "(%s): removing resolv.conf from %s", iface, RESOLVCONF_PATH); + nm_log_info (LOGD_DNS, "Removing DNS information from %s", RESOLVCONF_PATH); if (nm_spawn_process (cmd) == 0) retval = TRUE; } @@ -445,7 +437,6 @@ static gboolean update_resolv_conf (const char *domain, char **searches, char **nameservers, - const char *iface, GError **error) { char *tmp_resolv_conf; @@ -569,7 +560,6 @@ compute_hash (NMDnsManager *self, guint8 buffer[HASH_LEN]) static gboolean update_dns (NMDnsManager *self, - const char *iface, gboolean no_caching, GError **error) { @@ -589,12 +579,9 @@ update_dns (NMDnsManager *self, priv = NM_DNS_MANAGER_GET_PRIVATE (self); - nm_log_dbg (LOGD_DNS, "updating resolv.conf"); + priv->dns_touched = TRUE; - if (iface && (iface != priv->last_iface)) { - g_free (priv->last_iface); - priv->last_iface = g_strdup (iface); - } + nm_log_dbg (LOGD_DNS, "updating resolv.conf"); /* Update hash with config we're applying */ compute_hash (self, priv->hash); @@ -611,9 +598,9 @@ update_dns (NMDnsManager *self, merge_one_ip4_config (&rc, priv->ip4_device_config); if (priv->ip6_vpn_config) - merge_one_ip6_config (&rc, priv->ip6_vpn_config, iface); + merge_one_ip6_config (&rc, priv->ip6_vpn_config); if (priv->ip6_device_config) - merge_one_ip6_config (&rc, priv->ip6_device_config, iface); + merge_one_ip6_config (&rc, priv->ip6_device_config); for (iter = priv->configs; iter; iter = g_slist_next (iter)) { if ( (iter->data == priv->ip4_vpn_config) @@ -629,7 +616,7 @@ update_dns (NMDnsManager *self, } else if (NM_IS_IP6_CONFIG (iter->data)) { NMIP6Config *config = NM_IP6_CONFIG (iter->data); - merge_one_ip6_config (&rc, config, iface); + merge_one_ip6_config (&rc, config); } else g_assert_not_reached (); } @@ -721,8 +708,7 @@ update_dns (NMDnsManager *self, vpn_configs, dev_configs, other_configs, - priv->hostname, - iface)) { + priv->hostname)) { nm_log_warn (LOGD_DNS, "DNS: plugin %s update failed", plugin_name); /* If the plugin failed to update, we shouldn't write out a local @@ -747,19 +733,18 @@ update_dns (NMDnsManager *self, } #ifdef RESOLVCONF_PATH - success = dispatch_resolvconf (domain, searches, nameservers, iface, error); + success = dispatch_resolvconf (domain, searches, nameservers, error); #endif #ifdef NETCONFIG_PATH if (success == FALSE) { success = dispatch_netconfig (domain, searches, nameservers, - nis_domain, nis_servers, - iface, error); + nis_domain, nis_servers, error); } #endif if (success == FALSE) - success = update_resolv_conf (domain, searches, nameservers, iface, error); + success = update_resolv_conf (domain, searches, nameservers, error); if (searches) g_strfreev (searches); @@ -775,7 +760,6 @@ static void plugin_failed (NMDnsPlugin *plugin, gpointer user_data) { NMDnsManager *self = NM_DNS_MANAGER (user_data); - NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (self); GError *error = NULL; /* Errors with non-caching plugins aren't fatal */ @@ -783,7 +767,7 @@ plugin_failed (NMDnsPlugin *plugin, gpointer user_data) return; /* Disable caching until the next DNS update */ - if (!update_dns (self, priv->last_iface, TRUE, &error)) { + if (!update_dns (self, TRUE, &error)) { nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", error ? error->code : -1, error && error->message ? error->message : "(unknown)"); @@ -806,6 +790,8 @@ nm_dns_manager_add_ip4_config (NMDnsManager *mgr, priv = NM_DNS_MANAGER_GET_PRIVATE (mgr); + g_object_set_data_full (G_OBJECT (config), IP_CONFIG_IFACE_TAG, g_strdup (iface), g_free); + switch (cfg_type) { case NM_DNS_IP_CONFIG_TYPE_VPN: priv->ip4_vpn_config = config; @@ -821,7 +807,7 @@ nm_dns_manager_add_ip4_config (NMDnsManager *mgr, if (!g_slist_find (priv->configs, config)) priv->configs = g_slist_append (priv->configs, g_object_ref (config)); - if (!priv->updates_queue && !update_dns (mgr, iface, FALSE, &error)) { + if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", error ? error->code : -1, error && error->message ? error->message : "(unknown)"); @@ -832,15 +818,12 @@ nm_dns_manager_add_ip4_config (NMDnsManager *mgr, } gboolean -nm_dns_manager_remove_ip4_config (NMDnsManager *mgr, - const char *iface, - NMIP4Config *config) +nm_dns_manager_remove_ip4_config (NMDnsManager *mgr, NMIP4Config *config) { NMDnsManagerPrivate *priv; GError *error = NULL; g_return_val_if_fail (mgr != NULL, FALSE); - g_return_val_if_fail (iface != NULL, FALSE); g_return_val_if_fail (config != NULL, FALSE); priv = NM_DNS_MANAGER_GET_PRIVATE (mgr); @@ -858,13 +841,15 @@ nm_dns_manager_remove_ip4_config (NMDnsManager *mgr, g_object_unref (config); - if (!priv->updates_queue && !update_dns (mgr, iface, FALSE, &error)) { + if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", error ? error->code : -1, error && error->message ? error->message : "(unknown)"); g_clear_error (&error); } + g_object_set_data (G_OBJECT (config), IP_CONFIG_IFACE_TAG, NULL); + return TRUE; } @@ -883,6 +868,8 @@ nm_dns_manager_add_ip6_config (NMDnsManager *mgr, priv = NM_DNS_MANAGER_GET_PRIVATE (mgr); + g_object_set_data_full (G_OBJECT (config), IP_CONFIG_IFACE_TAG, g_strdup (iface), g_free); + switch (cfg_type) { case NM_DNS_IP_CONFIG_TYPE_VPN: priv->ip6_vpn_config = config; @@ -898,7 +885,7 @@ nm_dns_manager_add_ip6_config (NMDnsManager *mgr, if (!g_slist_find (priv->configs, config)) priv->configs = g_slist_append (priv->configs, g_object_ref (config)); - if (!priv->updates_queue && !update_dns (mgr, iface, FALSE, &error)) { + if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", error ? error->code : -1, error && error->message ? error->message : "(unknown)"); @@ -909,15 +896,12 @@ nm_dns_manager_add_ip6_config (NMDnsManager *mgr, } gboolean -nm_dns_manager_remove_ip6_config (NMDnsManager *mgr, - const char *iface, - NMIP6Config *config) +nm_dns_manager_remove_ip6_config (NMDnsManager *mgr, NMIP6Config *config) { NMDnsManagerPrivate *priv; GError *error = NULL; g_return_val_if_fail (mgr != NULL, FALSE); - g_return_val_if_fail (iface != NULL, FALSE); g_return_val_if_fail (config != NULL, FALSE); priv = NM_DNS_MANAGER_GET_PRIVATE (mgr); @@ -935,13 +919,15 @@ nm_dns_manager_remove_ip6_config (NMDnsManager *mgr, g_object_unref (config); - if (!priv->updates_queue && !update_dns (mgr, iface, FALSE, &error)) { + if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", error ? error->code : -1, error && error->message ? error->message : "(unknown)"); g_clear_error (&error); } + g_object_set_data (G_OBJECT (config), IP_CONFIG_IFACE_TAG, NULL); + return TRUE; } @@ -973,7 +959,7 @@ nm_dns_manager_set_hostname (NMDnsManager *mgr, * wants one. But hostname changes are system-wide and *not* tied to a * specific interface, so netconfig can't really handle this. Fake it. */ - if (!priv->updates_queue && !update_dns (mgr, priv->last_iface, FALSE, &error)) { + if (!priv->updates_queue && !update_dns (mgr, FALSE, &error)) { nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", error ? error->code : -1, error && error->message ? error->message : "(unknown)"); @@ -1023,7 +1009,7 @@ nm_dns_manager_end_updates (NMDnsManager *mgr, const char *func) /* Commit all the outstanding changes */ nm_log_dbg (LOGD_DNS, "(%s): committing DNS changes (%d)", func, priv->updates_queue); - if (!update_dns (mgr, priv->last_iface, FALSE, &error)) { + if (!update_dns (mgr, FALSE, &error)) { nm_log_warn (LOGD_DNS, "could not commit DNS changes: (%d) %s", error ? error->code : -1, error && error->message ? error->message : "(unknown)"); @@ -1124,20 +1110,16 @@ dispose (GObject *object) g_slist_free (priv->plugins); priv->plugins = NULL; - /* If last_iface is NULL, this means we haven't done a DNS update before, - * so no reason to try and take down entries from resolv.conf. + /* If we're quitting leave a valid resolv.conf in place, not one + * pointing to 127.0.0.1 if any plugins were active. Thus update + * DNS after disposing of all plugins. But if we haven't done any + * DNS updates yet, there's no reason to touch resolv.conf on shutdown. */ - if (priv->last_iface != NULL) { - /* If we're quitting leave a valid resolv.conf in place, not one - * pointing to 127.0.0.1 if any plugins were active. Thus update - * DNS after disposing of all plugins. - */ - if (!update_dns (self, priv->last_iface, TRUE, &error)) { - nm_log_warn (LOGD_DNS, "could not commit DNS changes on shutdown: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); - g_clear_error (&error); - } + if (priv->dns_touched && !update_dns (self, TRUE, &error)) { + nm_log_warn (LOGD_DNS, "could not commit DNS changes on shutdown: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); + g_clear_error (&error); } g_slist_foreach (priv->configs, (GFunc) g_object_unref, NULL); @@ -1154,7 +1136,6 @@ finalize (GObject *object) NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (object); g_free (priv->hostname); - g_free (priv->last_iface); G_OBJECT_CLASS (nm_dns_manager_parent_class)->finalize (object); } diff --git a/src/dns-manager/nm-dns-manager.h b/src/dns-manager/nm-dns-manager.h index f559865b4..234920120 100644 --- a/src/dns-manager/nm-dns-manager.h +++ b/src/dns-manager/nm-dns-manager.h @@ -75,18 +75,14 @@ gboolean nm_dns_manager_add_ip4_config (NMDnsManager *mgr, NMIP4Config *config, NMDnsIPConfigType cfg_type); -gboolean nm_dns_manager_remove_ip4_config (NMDnsManager *mgr, - const char *iface, - NMIP4Config *config); +gboolean nm_dns_manager_remove_ip4_config (NMDnsManager *mgr, NMIP4Config *config); gboolean nm_dns_manager_add_ip6_config (NMDnsManager *mgr, const char *iface, NMIP6Config *config, NMDnsIPConfigType cfg_type); -gboolean nm_dns_manager_remove_ip6_config (NMDnsManager *mgr, - const char *iface, - NMIP6Config *config); +gboolean nm_dns_manager_remove_ip6_config (NMDnsManager *mgr, NMIP6Config *config); void nm_dns_manager_set_hostname (NMDnsManager *mgr, const char *hostname); diff --git a/src/dns-manager/nm-dns-plugin.c b/src/dns-manager/nm-dns-plugin.c index b26f2b946..e85b2a097 100644 --- a/src/dns-manager/nm-dns-plugin.c +++ b/src/dns-manager/nm-dns-plugin.c @@ -56,8 +56,7 @@ nm_dns_plugin_update (NMDnsPlugin *self, const GSList *vpn_configs, const GSList *dev_configs, const GSList *other_configs, - const char *hostname, - const char *iface) + const char *hostname) { g_return_val_if_fail (NM_DNS_PLUGIN_GET_CLASS (self)->update != NULL, FALSE); @@ -65,8 +64,7 @@ nm_dns_plugin_update (NMDnsPlugin *self, vpn_configs, dev_configs, other_configs, - hostname, - iface); + hostname); } static gboolean diff --git a/src/dns-manager/nm-dns-plugin.h b/src/dns-manager/nm-dns-plugin.h index de4ad84e9..2a66557be 100644 --- a/src/dns-manager/nm-dns-plugin.h +++ b/src/dns-manager/nm-dns-plugin.h @@ -32,6 +32,8 @@ #define NM_DNS_PLUGIN_FAILED "failed" #define NM_DNS_PLUGIN_CHILD_QUIT "child-quit" +#define IP_CONFIG_IFACE_TAG "dns-manager-iface" + typedef struct { GObject parent; } NMDnsPlugin; @@ -53,8 +55,7 @@ typedef struct { const GSList *vpn_configs, const GSList *dev_configs, const GSList *other_configs, - const char *hostname, - const char *iface); + const char *hostname); /* Subclasses should override and return TRUE if they start a local * caching nameserver that listens on localhost and would block any @@ -92,8 +93,7 @@ gboolean nm_dns_plugin_update (NMDnsPlugin *self, const GSList *vpn_configs, const GSList *dev_configs, const GSList *other_configs, - const char *hostname, - const char *iface); + const char *hostname); /* For subclasses/plugins */ diff --git a/src/dnsmasq-manager/Makefile.in b/src/dnsmasq-manager/Makefile.in index 55bdc75a0..69d0e8251 100644 --- a/src/dnsmasq-manager/Makefile.in +++ b/src/dnsmasq-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -219,12 +218,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/firewall-manager/Makefile.in b/src/firewall-manager/Makefile.in index bf3f46c49..c221c9ebf 100644 --- a/src/firewall-manager/Makefile.in +++ b/src/firewall-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -218,12 +217,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/generated/Makefile.in b/src/generated/Makefile.in index 7d55789b8..98d22222d 100644 --- a/src/generated/Makefile.in +++ b/src/generated/Makefile.in @@ -63,12 +63,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -218,12 +217,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/generated/nm-enum-types.c b/src/generated/nm-enum-types.c index 6d09c50a5..c1eac45e0 100644 --- a/src/generated/nm-enum-types.c +++ b/src/generated/nm-enum-types.c @@ -5,10 +5,10 @@ #include "nm-enum-types.h" -#include "nm-hostname-provider.h" #include "nm-sleep-monitor.h" #include "nm-device.h" #include "nm-rfkill.h" +#include "NetworkManagerUtils.h" #include "nm-device-vlan.h" #include "nm-device-factory.h" #include "nm-active-connection.h" @@ -26,6 +26,7 @@ #include "nm-connection-provider.h" #include "nm-device-bond.h" #include "nm-wifi-ap-utils.h" +#include "nm-hostname-provider.h" #include "nm-device-adsl.h" #include "nm-policy-hosts.h" #include "nm-dispatcher.h" @@ -42,7 +43,6 @@ #include "nm-device-private.h" #include "nm-policy.h" #include "nm-manager-auth.h" -#include "NetworkManagerUtils.h" #include "nm-config.h" #include "nm-netlink-utils.h" #include "nm-netlink-monitor.h" @@ -349,6 +349,7 @@ nm_manager_error_get_type (void) { NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED, "NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED", "AlreadyEnabledOrDisabled" }, { NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE, "NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE", "UnsupportedConnectionType" }, { NM_MANAGER_ERROR_DEPENDENCY_FAILED, "NM_MANAGER_ERROR_DEPENDENCY_FAILED", "DependencyFailed" }, + { NM_MANAGER_ERROR_AUTOCONNECT_NOT_ALLOWED, "NM_MANAGER_ERROR_AUTOCONNECT_NOT_ALLOWED", "AutoconnectNotAllowed" }, { 0, NULL, NULL } }; GType g_define_type_id = diff --git a/src/ip6-manager/Makefile.in b/src/ip6-manager/Makefile.in index 317f27fb9..e80c1103a 100644 --- a/src/ip6-manager/Makefile.in +++ b/src/ip6-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -219,12 +218,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c index 490e9574b..c2871e4ac 100644 --- a/src/ip6-manager/nm-ip6-manager.c +++ b/src/ip6-manager/nm-ip6-manager.c @@ -93,6 +93,11 @@ typedef struct { NMIP6Manager *manager; char *iface; int ifindex; + /* +7 since this field is used directly by stuff that expects + * padding to multiples of 8 bytes. + */ + guint8 hwaddr[NM_UTILS_HWADDR_LEN_MAX + 7]; + guint hwaddr_len; gboolean has_linklocal; gboolean has_nonlinklocal; @@ -164,12 +169,18 @@ nm_ip6_device_destroy (NMIP6Device *device) } static NMIP6Device * -nm_ip6_device_new (NMIP6Manager *manager, int ifindex) +nm_ip6_device_new (NMIP6Manager *manager, + int ifindex, + const guint8 *hwaddr, + guint hwaddr_len) { NMIP6ManagerPrivate *priv = NM_IP6_MANAGER_GET_PRIVATE (manager); NMIP6Device *device; g_return_val_if_fail (ifindex > 0, NULL); + g_return_val_if_fail (hwaddr != NULL, NULL); + g_return_val_if_fail (hwaddr_len > 0, NULL); + g_return_val_if_fail (hwaddr_len <= NM_UTILS_HWADDR_LEN_MAX, NULL); device = g_slice_new0 (NMIP6Device); if (!device) { @@ -186,6 +197,9 @@ nm_ip6_device_new (NMIP6Manager *manager, int ifindex) goto error; } + memcpy (device->hwaddr, hwaddr, hwaddr_len); + device->hwaddr_len = hwaddr_len; + device->manager = manager; device->rdnss_servers = g_array_new (FALSE, FALSE, sizeof (NMIP6RDNSS)); @@ -222,28 +236,6 @@ nm_ip6_manager_get_device (NMIP6Manager *manager, int ifindex) return g_hash_table_lookup (priv->devices, GINT_TO_POINTER (ifindex)); } -static int -get_hwaddr (int ifindex, guint8 *buf) -{ - struct rtnl_link *lk; - struct nl_addr *addr; - int len; - - lk = nm_netlink_index_to_rtnl_link (ifindex); - if (!lk) - return -1; - - addr = rtnl_link_get_addr (lk); - len = nl_addr_get_len (addr); - if (len > NM_UTILS_HWADDR_LEN_MAX) - len = -1; - else - memcpy (buf, nl_addr_get_binary_addr (addr), len); - - rtnl_link_put (lk); - return len; -} - static void device_send_router_solicitation (NMIP6Device *device, const char *why) { @@ -251,8 +243,6 @@ device_send_router_solicitation (NMIP6Device *device, const char *why) struct sockaddr_in6 sin6; struct nd_router_solicit rs; struct nd_opt_hdr lladdr_hdr; - guint8 hwaddr[NM_UTILS_HWADDR_LEN_MAX + 7]; - int hwaddr_len; static const guint8 local_routers_addr[] = { 0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }; @@ -301,18 +291,15 @@ device_send_router_solicitation (NMIP6Device *device, const char *why) iov[0].iov_len = sizeof (rs); iov[0].iov_base = &rs; - memset (hwaddr, 0, sizeof (hwaddr)); - hwaddr_len = get_hwaddr (device->ifindex, hwaddr); - - if (hwaddr_len > 0) { + if (device->hwaddr_len > 0) { memset (&lladdr_hdr, 0, sizeof (lladdr_hdr)); lladdr_hdr.nd_opt_type = ND_OPT_SOURCE_LINKADDR; - lladdr_hdr.nd_opt_len = (sizeof (lladdr_hdr) + hwaddr_len + 7) % 8; + lladdr_hdr.nd_opt_len = (sizeof (lladdr_hdr) + device->hwaddr_len + 7) % 8; iov[1].iov_len = sizeof (lladdr_hdr); iov[1].iov_base = &lladdr_hdr; iov[2].iov_len = (lladdr_hdr.nd_opt_len * 8) - 2; - iov[2].iov_base = hwaddr; + iov[2].iov_base = device->hwaddr; mhdr.msg_iovlen = 3; } else @@ -1372,6 +1359,8 @@ netlink_notification (NMNetlinkMonitor *monitor, struct nl_msg *msg, gpointer us gboolean nm_ip6_manager_prepare_interface (NMIP6Manager *manager, int ifindex, + const guint8 *hwaddr, + guint hwaddr_len, NMSettingIP6Config *s_ip6, const char *accept_ra_path) { @@ -1381,10 +1370,13 @@ nm_ip6_manager_prepare_interface (NMIP6Manager *manager, g_return_val_if_fail (NM_IS_IP6_MANAGER (manager), FALSE); g_return_val_if_fail (ifindex > 0, FALSE); + g_return_val_if_fail (hwaddr != NULL, FALSE); + g_return_val_if_fail (hwaddr_len > 0, FALSE); + g_return_val_if_fail (hwaddr_len <= NM_UTILS_HWADDR_LEN_MAX, FALSE); priv = NM_IP6_MANAGER_GET_PRIVATE (manager); - device = nm_ip6_device_new (manager, ifindex); + device = nm_ip6_device_new (manager, ifindex, hwaddr, hwaddr_len); g_return_val_if_fail (device != NULL, FALSE); g_return_val_if_fail ( strchr (device->iface, '/') == NULL && strcmp (device->iface, "all") != 0 diff --git a/src/ip6-manager/nm-ip6-manager.h b/src/ip6-manager/nm-ip6-manager.h index 7ad0903f1..886399f7b 100644 --- a/src/ip6-manager/nm-ip6-manager.h +++ b/src/ip6-manager/nm-ip6-manager.h @@ -73,6 +73,8 @@ GType nm_ip6_manager_get_type (void); NMIP6Manager *nm_ip6_manager_get (void); gboolean nm_ip6_manager_prepare_interface (NMIP6Manager *manager, int ifindex, + const guint8 *hwaddr, + guint hwaddr_len, NMSettingIP6Config *s_ip6, const char *accept_ra_path); void nm_ip6_manager_begin_addrconf (NMIP6Manager *manager, diff --git a/src/logging/Makefile.in b/src/logging/Makefile.in index 38c994c2a..555d414fc 100644 --- a/src/logging/Makefile.in +++ b/src/logging/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -215,12 +214,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index 3461412e8..8c6638280 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -32,22 +32,18 @@ #include <strings.h> #include <string.h> -#ifdef ENABLE_CRASHTRACE -#include <execinfo.h> -#endif - #include <glib/gi18n.h> #include "nm-logging.h" #define LOGD_ALL \ - (LOGD_HW | LOGD_RFKILL | LOGD_ETHER | LOGD_WIFI | LOGD_BT | LOGD_MB | \ + (LOGD_PLATFORM | LOGD_RFKILL | LOGD_ETHER | LOGD_WIFI | LOGD_BT | LOGD_MB | \ LOGD_DHCP4 | LOGD_DHCP6 | LOGD_PPP | LOGD_WIFI_SCAN | LOGD_IP4 | \ LOGD_IP6 | LOGD_AUTOIP4 | LOGD_DNS | LOGD_VPN | LOGD_SHARING | \ LOGD_SUPPLICANT | LOGD_AGENTS | LOGD_SETTINGS | LOGD_SUSPEND | \ LOGD_CORE | LOGD_DEVICE | LOGD_OLPC_MESH | LOGD_WIMAX | \ LOGD_INFINIBAND | LOGD_FIREWALL | LOGD_ADSL | LOGD_BOND | \ - LOGD_VLAN) + LOGD_VLAN | LOGD_BRIDGE) #define LOGD_DEFAULT (LOGD_ALL & ~LOGD_WIFI_SCAN) @@ -69,7 +65,7 @@ static const LogDesc level_descs[] = { static const LogDesc domain_descs[] = { { LOGD_NONE, "NONE" }, - { LOGD_HW, "HW" }, + { LOGD_PLATFORM, "PLATFORM" }, { LOGD_RFKILL, "RFKILL" }, { LOGD_ETHER, "ETHER" }, { LOGD_WIFI, "WIFI" }, @@ -98,6 +94,7 @@ static const LogDesc domain_descs[] = { { LOGD_ADSL, "ADSL" }, { LOGD_BOND, "BOND" }, { LOGD_VLAN, "VLAN" }, + { LOGD_BRIDGE, "BRIDGE" }, { 0, NULL } }; @@ -180,6 +177,12 @@ nm_logging_setup (const char *level, const char *domains, GError **error) found = TRUE; } + /* Check for compatibility domains */ + if (!strcasecmp (*iter, "HW")) { + new_domains |= LOGD_PLATFORM; + found = TRUE; + } + if (!found) { g_set_error (error, NM_LOGGING_ERROR, NM_LOGGING_ERROR_UNKNOWN_DOMAIN, _("Unknown log domain '%s'"), *iter); @@ -271,88 +274,6 @@ _nm_log (const char *loc, /************************************************************************/ static void -fallback_get_backtrace (void) -{ -#ifdef ENABLE_CRASHTRACE - void *frames[64]; - Dl_info info; - size_t size; - guint32 i; - const char *name; - - size = backtrace (frames, G_N_ELEMENTS (frames)); - - syslog (LOG_CRIT, "******************* START **********************************"); - for (i = 0; i < size; i++) { - dladdr (frames[i], &info); - name = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)"; - if (info.dli_saddr) { - syslog (LOG_CRIT, "Frame %d: %s (%s+0x%lx) [%p]", - i, name, - info.dli_sname, - (gulong)((guchar *)frames[i] - (guchar *)info.dli_saddr), - frames[i]); - } else { - syslog (LOG_CRIT, "Frame %d: %s (%p+0x%lx) [%p]", - i, name, - info.dli_fbase, - (gulong)((guchar *)frames[i] - (guchar *)info.dli_saddr), - frames[i]); - } - } - syslog (LOG_CRIT, "******************* END **********************************"); -#endif /* ENABLE_CRASHTRACE */ -} - - -static gboolean -crashlogger_get_backtrace (void) -{ - gboolean success = FALSE; - int pid; - - pid = fork(); - if (pid > 0) - { - /* Wait for the child to finish */ - int estatus; - if (waitpid (pid, &estatus, 0) != -1) - { - /* Only succeed if the crashlogger succeeded */ - if (WIFEXITED (estatus) && (WEXITSTATUS (estatus) == 0)) - success = TRUE; - } - } - else if (pid == 0) - { - /* Child process */ - execl (LIBEXECDIR"/nm-crash-logger", - LIBEXECDIR"/nm-crash-logger", NULL); - } - - return success; -} - - -void -nm_logging_backtrace (void) -{ - struct stat s; - gboolean fallback = TRUE; - - /* Try to use gdb via nm-crash-logger if it exists, since - * we get much better information out of it. Otherwise - * fall back to execinfo. - */ - if (stat (LIBEXECDIR"/nm-crash-logger", &s) == 0) - fallback = crashlogger_get_backtrace () ? FALSE : TRUE; - - if (fallback) - fallback_get_backtrace (); -} - - -static void nm_log_handler (const gchar *log_domain, GLogLevelFlags level, const gchar *message, diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h index b3c583f22..2c6dadb98 100644 --- a/src/logging/nm-logging.h +++ b/src/logging/nm-logging.h @@ -28,7 +28,7 @@ /* Log domains */ enum { LOGD_NONE = 0x00000000, - LOGD_HW = 0x00000001, /* Hardware detection and info */ + LOGD_PLATFORM = 0x00000001, /* Platform services */ LOGD_RFKILL = 0x00000002, LOGD_ETHER = 0x00000004, LOGD_WIFI = 0x00000008, @@ -57,10 +57,12 @@ enum { LOGD_ADSL = 0x04000000, LOGD_BOND = 0x08000000, LOGD_VLAN = 0x10000000, + LOGD_BRIDGE = 0x20000000, }; #define LOGD_DHCP (LOGD_DHCP4 | LOGD_DHCP6) #define LOGD_IP (LOGD_IP4 | LOGD_IP6) +#define LOGD_HW LOGD_PLATFORM /* Log levels */ enum { @@ -107,7 +109,6 @@ gboolean nm_logging_level_enabled (guint32 level); gboolean nm_logging_domain_enabled (guint32 domain); /* Undefine the nm-utils.h logging stuff to ensure errors */ -#undef nm_print_backtrace #undef nm_get_timestamp #undef nm_info #undef nm_info_str @@ -120,7 +121,6 @@ gboolean nm_logging_domain_enabled (guint32 domain); gboolean nm_logging_setup (const char *level, const char *domains, GError **error); void nm_logging_start (gboolean become_daemon); -void nm_logging_backtrace (void); void nm_logging_shutdown (void); #endif /* NM_LOGGING_H */ diff --git a/src/main.c b/src/main.c index b074bd8a8..85bfc2725 100644 --- a/src/main.c +++ b/src/main.c @@ -88,22 +88,6 @@ signal_handling_thread (void *arg) sigwait (&signal_set, &signo); switch (signo) { - case SIGSEGV: - case SIGBUS: - case SIGILL: - case SIGABRT: - case SIGQUIT: - nm_log_warn (LOGD_CORE, "caught signal %d. Generating backtrace...", signo); - nm_logging_backtrace (); - exit (1); - break; - case SIGFPE: - case SIGPIPE: - nm_log_warn (LOGD_CORE, "caught signal %d, shutting down abnormally. Generating backtrace...", signo); - nm_logging_backtrace (); - quit_early = TRUE; /* for quitting before entering the main loop */ - g_main_loop_quit (main_loop); - break; case SIGINT: case SIGTERM: nm_log_info (LOGD_CORE, "caught signal %d, shutting down normally.", signo); @@ -142,13 +126,6 @@ setup_signals (void) sigemptyset (&signal_set); sigaddset (&signal_set, SIGHUP); sigaddset (&signal_set, SIGINT); - sigaddset (&signal_set, SIGQUIT); - sigaddset (&signal_set, SIGILL); - sigaddset (&signal_set, SIGABRT); - sigaddset (&signal_set, SIGFPE); - sigaddset (&signal_set, SIGBUS); - sigaddset (&signal_set, SIGSEGV); - sigaddset (&signal_set, SIGPIPE); sigaddset (&signal_set, SIGTERM); sigaddset (&signal_set, SIGUSR1); @@ -529,16 +506,10 @@ main (int argc, char *argv[]) dbus_threads_init_default (); #endif -#ifndef HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS -#error HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS not defined -#endif - -#if HAVE_DBUS_GLIB_DISABLE_LEGACY_PROP_ACCESS /* Ensure that non-exported properties don't leak out, and that the * introspection 'access' permissions are respected. */ dbus_glib_global_set_disable_legacy_property_access (); -#endif nm_logging_start (become_daemon); diff --git a/src/modem-manager/Makefile.in b/src/modem-manager/Makefile.in index 0546ee2e5..3b278c6e2 100644 --- a/src/modem-manager/Makefile.in +++ b/src/modem-manager/Makefile.in @@ -69,12 +69,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -238,12 +237,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/modem-manager/nm-modem-cdma.c b/src/modem-manager/nm-modem-cdma.c index 73c87c289..6bed8c2a4 100644 --- a/src/modem-manager/nm-modem-cdma.c +++ b/src/modem-manager/nm-modem-cdma.c @@ -201,18 +201,9 @@ get_best_auto_connection (NMModem *modem, for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - - if (!nm_setting_connection_get_autoconnect (s_con)) - continue; - - if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_CDMA_SETTING_NAME)) - continue; - - return connection; + if (nm_connection_is_type (connection, NM_SETTING_CDMA_SETTING_NAME)) + return connection; } return NULL; } diff --git a/src/modem-manager/nm-modem-gsm.c b/src/modem-manager/nm-modem-gsm.c index b6d3c857a..be793db9c 100644 --- a/src/modem-manager/nm-modem-gsm.c +++ b/src/modem-manager/nm-modem-gsm.c @@ -475,18 +475,9 @@ get_best_auto_connection (NMModem *modem, for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - - if (!nm_setting_connection_get_autoconnect (s_con)) - continue; - - if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_GSM_SETTING_NAME)) - continue; - - return connection; + if (nm_connection_is_type (connection, NM_SETTING_GSM_SETTING_NAME)) + return connection; } return NULL; } diff --git a/src/modem-manager/nm-modem-manager.c b/src/modem-manager/nm-modem-manager.c index d896b4680..fc5ebfdf7 100644 --- a/src/modem-manager/nm-modem-manager.c +++ b/src/modem-manager/nm-modem-manager.c @@ -54,6 +54,9 @@ struct _NMModemManagerPrivate { guint modem_manager_1_poke_id; gboolean old_modem_manager_found; gboolean new_modem_manager_found; + guint modem_manager_1_name_owner_changed_id; + guint modem_manager_1_object_added_id; + guint modem_manager_1_object_removed_id; #endif /* Common */ @@ -411,6 +414,37 @@ nm_modem_manager_name_owner_changed (NMDBusManager *dbus_mgr, #if WITH_MODEM_MANAGER_1 static void +modem_manager_1_clear_signals (NMModemManager *self) +{ + if (!self->priv->modem_manager_1) + return; + + if (self->priv->modem_manager_1_name_owner_changed_id) { + if (g_signal_handler_is_connected (self->priv->modem_manager_1, + self->priv->modem_manager_1_name_owner_changed_id)) + g_signal_handler_disconnect (self->priv->modem_manager_1, + self->priv->modem_manager_1_name_owner_changed_id); + self->priv->modem_manager_1_name_owner_changed_id = 0; + } + + if (self->priv->modem_manager_1_object_added_id) { + if (g_signal_handler_is_connected (self->priv->modem_manager_1, + self->priv->modem_manager_1_object_added_id)) + g_signal_handler_disconnect (self->priv->modem_manager_1, + self->priv->modem_manager_1_object_added_id); + self->priv->modem_manager_1_object_added_id = 0; + } + + if (self->priv->modem_manager_1_object_removed_id) { + if (g_signal_handler_is_connected (self->priv->modem_manager_1, + self->priv->modem_manager_1_object_removed_id)) + g_signal_handler_disconnect (self->priv->modem_manager_1, + self->priv->modem_manager_1_object_removed_id); + self->priv->modem_manager_1_object_removed_id = 0; + } +} + +static void clear_modem_manager_1_support (NMModemManager *self) { if (self->priv->modem_manager_1_poke_id) { @@ -418,6 +452,7 @@ clear_modem_manager_1_support (NMModemManager *self) self->priv->modem_manager_1_poke_id = 0; } + modem_manager_1_clear_signals (self); g_clear_object (&self->priv->modem_manager_1); g_clear_object (&self->priv->dbus_connection); } @@ -505,26 +540,101 @@ modem_manager_1_available (NMModemManager *self) static void schedule_modem_manager_1_relaunch (NMModemManager *self, guint n_seconds); +static void ensure_client (NMModemManager *self); static void modem_manager_1_name_owner_changed (MMManager *modem_manager_1, GParamSpec *pspec, NMModemManager *self) { + gchar *name_owner; + /* Quit poking, if any */ if (self->priv->modem_manager_1_poke_id) { g_source_remove (self->priv->modem_manager_1_poke_id); self->priv->modem_manager_1_poke_id = 0; } - if (!g_dbus_object_manager_client_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (modem_manager_1))) { + name_owner = g_dbus_object_manager_client_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (modem_manager_1)); + if (!name_owner) { nm_log_info (LOGD_MB, "ModemManager disappeared from bus"); schedule_modem_manager_1_relaunch (self, 0); return; } /* Available! */ - modem_manager_1_available (self); + g_free (name_owner); + + /* Hack alert: GDBusObjectManagerClient won't signal neither 'object-added' + * nor 'object-removed' if it was created while there was no ModemManager in + * the bus. This hack avoids this issue until we get a GIO with the fix + * included... */ + modem_manager_1_clear_signals (self); + g_clear_object (&self->priv->modem_manager_1); + ensure_client (self); + + /* Whenever GDBusObjectManagerClient is fixed, we can just do the following: + * modem_manager_1_available (self); + */ +} + +static void +modem_manager_1_poke_cb (GDBusConnection *connection, + GAsyncResult *res, + NMModemManager *self) +{ + GError *error = NULL; + GVariant *result; + + result = g_dbus_connection_call_finish (connection, res, &error); + if (error) { + /* Ignore common errors when MM is not installed and such */ + if ( !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN) + && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_EXEC_FAILED) + && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FORK_FAILED) + && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FAILED) + && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_TIMEOUT) + && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND)) { + nm_log_warn (LOGD_MB, "error poking ModemManager: %s", error->message); + } + + g_error_free (error); + /* Setup timeout to relaunch */ + schedule_modem_manager_1_relaunch (self, MODEM_POKE_INTERVAL); + } else + g_variant_unref (result); + + /* Balance refcount */ + g_object_unref (self); +} + +static void +modem_manager_1_poke (NMModemManager *self) +{ + gchar *name_owner; + + /* If there is no current owner right away, ensure we poke to get one */ + name_owner = g_dbus_object_manager_client_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (self->priv->modem_manager_1)); + if (name_owner) { + /* Available! */ + modem_manager_1_available (self); + g_free (name_owner); + return; + } + + /* Poke! */ + g_dbus_connection_call (self->priv->dbus_connection, + "org.freedesktop.ModemManager1", + "/org/freedesktop/ModemManager1", + "org.freedesktop.DBus.Peer", + "Ping", + NULL, /* inputs */ + NULL, /* outputs */ + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, /* cancellable */ + (GAsyncReadyCallback)modem_manager_1_poke_cb, /* callback */ + g_object_ref (self)); /* user_data */ } static void @@ -539,14 +649,10 @@ manager_new_ready (GObject *source, g_assert (!self->priv->modem_manager_1); self->priv->modem_manager_1 = mm_manager_new_finish (res, &error); if (!self->priv->modem_manager_1) { - if ( !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN) - && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_EXEC_FAILED) - && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FORK_FAILED) - && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_FAILED) - && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_TIMEOUT) - && !g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND)) { - nm_log_warn (LOGD_MB, "error creating ModemManager client: %s", error->message); - } + /* We're not really supposed to get any error here. If we do get one, + * though, just re-schedule the MMManager creation after some time. + * During this period, name-owner changes won't be followed. */ + nm_log_warn (LOGD_MB, "error creating ModemManager client: %s", error->message); g_error_free (error); /* Setup timeout to relaunch */ schedule_modem_manager_1_relaunch (self, MODEM_POKE_INTERVAL); @@ -554,32 +660,24 @@ manager_new_ready (GObject *source, /* If we found the old MM, abort */ clear_modem_manager_1_support (self); } else { - gchar *name_owner; - - g_signal_connect (self->priv->modem_manager_1, - "notify::name-owner", - G_CALLBACK (modem_manager_1_name_owner_changed), - self); - g_signal_connect (self->priv->modem_manager_1, - "object-added", - G_CALLBACK (modem_object_added), - self); - g_signal_connect (self->priv->modem_manager_1, - "object-removed", - G_CALLBACK (modem_object_removed), - self); - - /* If there is no current owner right away, ensure we poke until we get - * one */ - name_owner = g_dbus_object_manager_client_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (self->priv->modem_manager_1)); - if (!name_owner) { - /* Setup timeout to wait for an owner */ - schedule_modem_manager_1_relaunch (self, MODEM_POKE_INTERVAL); - } else { - /* Available! */ - modem_manager_1_available (self); - g_free (name_owner); - } + /* Setup signals in the GDBusObjectManagerClient */ + self->priv->modem_manager_1_name_owner_changed_id = + g_signal_connect (self->priv->modem_manager_1, + "notify::name-owner", + G_CALLBACK (modem_manager_1_name_owner_changed), + self); + self->priv->modem_manager_1_object_added_id = + g_signal_connect (self->priv->modem_manager_1, + "object-added", + G_CALLBACK (modem_object_added), + self); + self->priv->modem_manager_1_object_removed_id = + g_signal_connect (self->priv->modem_manager_1, + "object-removed", + G_CALLBACK (modem_object_removed), + self); + /* Poke the MMManager! */ + modem_manager_1_poke (self); } /* Balance refcount */ @@ -587,19 +685,24 @@ manager_new_ready (GObject *source, } static void -recreate_client (NMModemManager *self) +ensure_client (NMModemManager *self) { g_assert (self->priv->dbus_connection); - /* Re-create the GDBusObjectManagerClient so that we request again the owner - * for the well-known name. - * Note that we pass an extra reference always */ - g_clear_object (&self->priv->modem_manager_1); - mm_manager_new (self->priv->dbus_connection, - G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE, - NULL, - (GAsyncReadyCallback)manager_new_ready, - g_object_ref (self)); + /* Create the GDBusObjectManagerClient. We do not request to autostart, as + * we don't really want the MMManager creation to fail. We can always poke + * later on if we want to request the autostart */ + if (!self->priv->modem_manager_1) { + mm_manager_new (self->priv->dbus_connection, + G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START, + NULL, + (GAsyncReadyCallback)manager_new_ready, + g_object_ref (self)); + return; + } + + /* If already available, poke! */ + modem_manager_1_poke (self); } static void @@ -622,7 +725,7 @@ bus_get_ready (GObject *source, clear_modem_manager_1_support (self); } else { /* Got the bus, create new ModemManager client. */ - recreate_client (self); + ensure_client (self); } /* Balance refcount */ @@ -632,8 +735,6 @@ bus_get_ready (GObject *source, static gboolean ensure_bus (NMModemManager *self) { - nm_log_dbg (LOGD_MB, "Requesting to (re)launch ModemManager..."); - /* Clear poke ID */ self->priv->modem_manager_1_poke_id = 0; @@ -643,8 +744,8 @@ ensure_bus (NMModemManager *self) (GAsyncReadyCallback)bus_get_ready, g_object_ref (self)); else - /* If bus is already available, launch client re-creation */ - recreate_client (self); + /* If bus is already available, ensure client */ + ensure_client (self); return FALSE; } diff --git a/src/nm-crash-logger.c b/src/nm-crash-logger.c deleted file mode 100644 index f10e9ffe0..000000000 --- a/src/nm-crash-logger.c +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* NetworkManager -- Network link manager - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Copyright (C) 2006 - 2008 Red Hat, Inc. - */ - - -#include <glib.h> -#include <stdio.h> -#include <unistd.h> -#include <errno.h> -#include <sys/wait.h> -#include <stdlib.h> -#include <syslog.h> - -int main (int argc, char ** argv) -{ - GPid gdb_pid; - int out; - char nm_pid[16]; - char line[256]; - int gdb_stat; - int bytes_read; - gboolean done = FALSE; - char * args[] = { BINDIR "/gdb", - "--batch", - "--quiet", - "--command=" NMDATADIR "/gdb-cmd", - NMBINARY, - NULL, NULL }; - - snprintf (nm_pid, sizeof (nm_pid), "%d", getppid ()); - args[5] = &nm_pid[0]; - if (!g_spawn_async_with_pipes (NULL, args, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, - &gdb_pid, NULL, &out, NULL, NULL)) - { - exit (1); - } - - openlog ("NetworkManager", LOG_CONS | LOG_PERROR, LOG_DAEMON); - syslog (LOG_CRIT, "******************* START **********************************"); - while (!done) - { - line[sizeof (line) - 1] = '\0'; - bytes_read = read (out, line, sizeof (line) - 1); - if (bytes_read > 0) - { - char *end = &line[0]; - char *start = &line[0]; - - /* Can't just funnel the output to syslog, have to do a separate - * syslog () for each line in the output. - */ - line[bytes_read] = '\0'; - while (*end != '\0') - { - if (*end == '\n') - { - *end = '\0'; - syslog (LOG_CRIT, "%s", start); - start = end + 1; - } - end++; - } - } - else if ((bytes_read <= 0) || ((errno != EINTR) && (errno != EAGAIN))) - done = TRUE; - } - syslog (LOG_CRIT, "******************* END **********************************"); - close (out); - waitpid (gdb_pid, &gdb_stat, 0); - exit (0); -} diff --git a/src/nm-device-adsl.c b/src/nm-device-adsl.c index 29d30cd01..db678d9f2 100644 --- a/src/nm-device-adsl.c +++ b/src/nm-device-adsl.c @@ -82,6 +82,7 @@ typedef struct { int brfd; int nas_ifindex; char * nas_ifname; + guint8 nas_hw_addr[ETH_ALEN]; } NMDeviceAdslPrivate; enum { @@ -207,22 +208,12 @@ get_best_auto_connection (NMDevice *dev, for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; - NMSettingAdsl *s_adsl; if (!nm_connection_is_type (connection, NM_SETTING_ADSL_SETTING_NAME)) continue; - s_adsl = nm_connection_get_setting_adsl (connection); - if (!s_adsl) - continue; - - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - if (!nm_setting_connection_get_autoconnect (s_con)) - continue; - - return connection; + if (nm_connection_get_setting_adsl (connection)) + return connection; } return NULL; } @@ -233,6 +224,7 @@ static void set_nas_iface (NMDeviceAdsl *self, int idx, const char *name) { NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (self); + gsize addrlen; g_return_if_fail (name != NULL); @@ -245,6 +237,13 @@ set_nas_iface (NMDeviceAdsl *self, int idx, const char *name) g_warn_if_fail (priv->nas_ifname == NULL); priv->nas_ifname = g_strdup (name); + + /* Update NAS interface's MAC address */ + addrlen = nm_device_read_hwaddr (NM_DEVICE (self), + priv->nas_hw_addr, + sizeof (priv->nas_hw_addr), + NULL); + g_warn_if_fail (addrlen == sizeof (priv->nas_hw_addr)); } static gboolean @@ -591,10 +590,20 @@ deactivate (NMDevice *device) priv->nas_ifindex = -1; g_free (priv->nas_ifname); priv->nas_ifname = NULL; + memset (priv->nas_hw_addr, 0, sizeof (priv->nas_hw_addr)); } /**************************************************************/ +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (device); + + *out_len = priv->nas_ifname ? sizeof (priv->nas_hw_addr) : 0; + return priv->nas_hw_addr; +} + static void set_carrier (NMDeviceAdsl *self, const gboolean carrier) { @@ -818,6 +827,7 @@ nm_device_adsl_class_init (NMDeviceAdslClass *klass) parent_class->get_best_auto_connection = get_best_auto_connection; parent_class->complete_connection = complete_connection; + parent_class->get_hw_address = get_hw_address; parent_class->act_stage2_config = act_stage2_config; parent_class->act_stage3_ip4_config_start = act_stage3_ip4_config_start; parent_class->deactivate = deactivate; diff --git a/src/nm-device-bond.c b/src/nm-device-bond.c index 30df94fa2..7f47a3a62 100644 --- a/src/nm-device-bond.c +++ b/src/nm-device-bond.c @@ -46,8 +46,8 @@ G_DEFINE_TYPE (NMDeviceBond, nm_device_bond, NM_TYPE_DEVICE_WIRED) #define NM_BOND_ERROR (nm_bond_error_quark ()) typedef struct { - gboolean ip4_waiting; - gboolean ip6_waiting; + guint8 hw_addr[NM_UTILS_HWADDR_LEN_MAX]; + gsize hw_addr_len; } NMDeviceBondPrivate; enum { @@ -81,44 +81,42 @@ nm_bond_error_quark (void) /******************************************************************/ static void -device_state_changed (NMDevice *device, - NMDeviceState new_state, - NMDeviceState old_state, - NMDeviceStateReason reason) +carrier_action (NMDeviceWired *self, NMDeviceState state, gboolean carrier) { - NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (device); - - if (new_state == NM_DEVICE_STATE_UNAVAILABLE) { - /* Use NM_DEVICE_STATE_REASON_CARRIER to make sure num retries is reset */ - nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER); - } - - if (new_state <= NM_DEVICE_STATE_DISCONNECTED || new_state > NM_DEVICE_STATE_ACTIVATED) { - priv->ip4_waiting = FALSE; - priv->ip6_waiting = FALSE; - } + /* Carrier can't be used to signal availability of the bond master because + * the bond's carrier follows the slaves' carriers. So carrier gets + * ignored when determining whether or not the device can be activated. + * + * Second, just because all slaves have been removed or have lost carrier + * does not mean the master should be deactivated. This could be due to + * user addition/removal of slaves, and is also normal operation with some + * failover modes. + * + * For these reasons, carrier changes are effectively ignored by overriding + * the parent class' carrier handling and doing nothing. + */ } static void update_hw_address (NMDevice *dev) { - const guint8 *hw_addr; - guint8 old_addr[NM_UTILS_HWADDR_LEN_MAX]; - int addrtype, addrlen; - - addrtype = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (dev)); - g_assert (addrtype >= 0); - addrlen = nm_utils_hwaddr_len (addrtype); - g_assert (addrlen > 0); - - hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); - memcpy (old_addr, hw_addr, addrlen); - - NM_DEVICE_CLASS (nm_device_bond_parent_class)->update_hw_address (dev); + NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (dev); + gsize addrlen; + gboolean changed = FALSE; + + addrlen = nm_device_read_hwaddr (dev, priv->hw_addr, sizeof (priv->hw_addr), &changed); + if (addrlen) { + priv->hw_addr_len = addrlen; + if (changed) + g_object_notify (G_OBJECT (dev), NM_DEVICE_BOND_HW_ADDRESS); + } +} - hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); - if (memcmp (old_addr, hw_addr, addrlen)) - g_object_notify (G_OBJECT (dev), NM_DEVICE_BOND_HW_ADDRESS); +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + *out_len = NM_DEVICE_BOND_GET_PRIVATE (device)->hw_addr_len; + return NM_DEVICE_BOND_GET_PRIVATE (device)->hw_addr; } static guint32 @@ -128,6 +126,14 @@ get_generic_capabilities (NMDevice *dev) } static gboolean +is_available (NMDevice *dev) +{ + if (NM_DEVICE_GET_CLASS (dev)->hw_is_up) + return NM_DEVICE_GET_CLASS (dev)->hw_is_up (dev); + return FALSE; +} + +static gboolean match_bond_connection (NMDevice *device, NMConnection *connection, GError **error) { const char *iface; @@ -162,12 +168,8 @@ get_best_auto_connection (NMDevice *dev, for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - if ( nm_setting_connection_get_autoconnect (s_con) - && match_bond_connection (dev, connection, NULL)) + if (match_bond_connection (dev, connection, NULL)) return connection; } return NULL; @@ -241,10 +243,11 @@ complete_connection (NMDevice *device, static gboolean spec_match_list (NMDevice *device, const GSList *specs) { + NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (device); char *hwaddr; gboolean matched; - hwaddr = nm_utils_hwaddr_ntoa (nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)), ARPHRD_ETHER); + hwaddr = nm_utils_hwaddr_ntoa (priv->hw_addr, nm_utils_hwaddr_type (priv->hw_addr_len)); matched = nm_match_spec_hwaddr (specs, hwaddr); g_free (hwaddr); @@ -311,9 +314,6 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); - NM_DEVICE_BOND_GET_PRIVATE (dev)->ip4_waiting = FALSE; - NM_DEVICE_BOND_GET_PRIVATE (dev)->ip6_waiting = FALSE; - ret = NM_DEVICE_CLASS (nm_device_bond_parent_class)->act_stage1_prepare (dev, reason); if (ret == NM_ACT_STAGE_RETURN_SUCCESS) { connection = nm_device_get_connection (dev); @@ -335,7 +335,6 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) static gboolean enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection) { - NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (device); gboolean success, no_firmware = FALSE; const char *iface = nm_device_get_ip_iface (device); const char *slave_iface = nm_device_get_ip_iface (slave); @@ -352,19 +351,6 @@ enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection) if (success) { nm_log_info (LOGD_BOND, "(%s): enslaved bond slave %s", iface, slave_iface); g_object_notify (G_OBJECT (device), "slaves"); - - /* If waiting for a slave to continue with IP config, start now */ - if (priv->ip4_waiting) { - nm_log_info (LOGD_BOND | LOGD_IP4, "(%s): retrying IPv4 config with first slave", iface); - priv->ip4_waiting = FALSE; - nm_device_activate_stage3_ip4_start (device); - } - - if (priv->ip6_waiting) { - nm_log_info (LOGD_BOND | LOGD_IP6, "(%s): retrying IPv6 config with first slave", iface); - priv->ip6_waiting = FALSE; - nm_device_activate_stage3_ip6_start (device); - } } return success; @@ -373,7 +359,7 @@ enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection) static gboolean release_slave (NMDevice *device, NMDevice *slave) { - gboolean success; + gboolean success, no_firmware = FALSE; success = nm_system_bond_release (nm_device_get_ip_ifindex (device), nm_device_get_ip_iface (device), @@ -384,93 +370,17 @@ release_slave (NMDevice *device, NMDevice *slave) nm_device_get_ip_iface (slave), success); g_object_notify (G_OBJECT (device), "slaves"); - return success; -} - -static NMActStageReturn -act_stage3_ip4_config_start (NMDevice *device, - NMIP4Config **out_config, - NMDeviceStateReason *reason) -{ - NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (device); - NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS; - NMConnection *connection; - NMSettingIP4Config *s_ip4; - const char *method = NULL; - GSList *slaves; - - priv->ip4_waiting = FALSE; - - slaves = nm_device_master_get_slaves (device); - if (slaves == NULL) { - connection = nm_device_get_connection (device); - g_assert (connection); - - s_ip4 = nm_connection_get_setting_ip4_config (connection); - if (s_ip4) - method = nm_setting_ip4_config_get_method (s_ip4); - - if (g_strcmp0 (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0) - priv->ip4_waiting = TRUE; - } - g_slist_free (slaves); - - if (priv->ip4_waiting) { - ret = NM_ACT_STAGE_RETURN_WAIT; - nm_log_info (LOGD_BOND | LOGD_IP4, "(%s): IPv4 config waiting until slaves are present", - nm_device_get_ip_iface (device)); - } else { - /* We have slaves; proceed with normal IPv4 configuration */ - ret = NM_DEVICE_CLASS (nm_device_bond_parent_class)->act_stage3_ip4_config_start (device, out_config, reason); - } - - return ret; -} -static NMActStageReturn -act_stage3_ip6_config_start (NMDevice *device, - NMIP6Config **out_config, - NMDeviceStateReason *reason) -{ - NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (device); - NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS; - NMConnection *connection; - NMSettingIP6Config *s_ip6; - const char *method = NULL; - GSList *slaves; - - priv->ip6_waiting = FALSE; - - slaves = nm_device_master_get_slaves (device); - if (slaves == NULL) { - connection = nm_device_get_connection (device); - g_assert (connection); - - s_ip6 = nm_connection_get_setting_ip6_config (connection); - if (s_ip6) - method = nm_setting_ip6_config_get_method (s_ip6); - - /* SLAAC, DHCP, and Link-Local depend on connectivity (and thus slaves) - * to complete addressing. SLAAC and DHCP obviously need a peer to - * provide a prefix, while Link-Local must perform DAD on the local link. - */ - if ( !g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) - || !g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_DHCP) - || !g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) - priv->ip6_waiting = TRUE; - } - g_slist_free (slaves); - - if (priv->ip6_waiting) { - ret = NM_ACT_STAGE_RETURN_WAIT; - nm_log_info (LOGD_BOND | LOGD_IP6, "(%s): IPv6 config waiting until slaves are present", - nm_device_get_ip_iface (device)); - } else { - /* We have slaves; proceed with normal IPv6 configuration */ - ret = NM_DEVICE_CLASS (nm_device_bond_parent_class)->act_stage3_ip6_config_start (device, out_config, reason); + /* Kernel bonding code "closes" the slave when releasing it, (which clears + * IFF_UP), so we must bring it back up here to ensure carrier changes and + * other state is noticed by the now-released slave. + */ + if (!nm_device_hw_bring_up (slave, TRUE, &no_firmware)) { + nm_log_warn (LOGD_BOND, "(%s): released bond slave could not be brought up.", + nm_device_get_iface (slave)); } - return ret; + return success; } /******************************************************************/ @@ -487,6 +397,7 @@ nm_device_bond_new (const char *udi, const char *iface) NM_DEVICE_DRIVER, "bonding", NM_DEVICE_TYPE_DESC, "Bond", NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_BOND, + NM_DEVICE_IS_MASTER, TRUE, NULL); } @@ -509,14 +420,15 @@ static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - const guint8 *current_addr; + NMDeviceBondPrivate *priv = NM_DEVICE_BOND_GET_PRIVATE (object); GPtrArray *slaves; GSList *list, *iter; + char *hwaddr; switch (prop_id) { case PROP_HW_ADDRESS: - current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (object)); - g_value_take_string (value, nm_utils_hwaddr_ntoa (current_addr, ARPHRD_ETHER)); + hwaddr = nm_utils_hwaddr_ntoa (priv->hw_addr, nm_utils_hwaddr_type (priv->hw_addr_len)); + g_value_take_string (value, hwaddr); break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_wired_get_carrier (NM_DEVICE_WIRED (object))); @@ -551,6 +463,7 @@ nm_device_bond_class_init (NMDeviceBondClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass); + NMDeviceWiredClass *wired_class = NM_DEVICE_WIRED_CLASS (klass); g_type_class_add_private (object_class, sizeof (NMDeviceBondPrivate)); @@ -561,6 +474,8 @@ nm_device_bond_class_init (NMDeviceBondClass *klass) parent_class->get_generic_capabilities = get_generic_capabilities; parent_class->update_hw_address = update_hw_address; + parent_class->get_hw_address = get_hw_address; + parent_class->is_available = is_available; parent_class->get_best_auto_connection = get_best_auto_connection; parent_class->check_connection_compatible = check_connection_compatible; parent_class->complete_connection = complete_connection; @@ -569,12 +484,10 @@ nm_device_bond_class_init (NMDeviceBondClass *klass) parent_class->connection_match_config = connection_match_config; parent_class->act_stage1_prepare = act_stage1_prepare; - parent_class->act_stage3_ip4_config_start = act_stage3_ip4_config_start; - parent_class->act_stage3_ip6_config_start = act_stage3_ip6_config_start; parent_class->enslave_slave = enslave_slave; parent_class->release_slave = release_slave; - parent_class->state_changed = device_state_changed; + wired_class->carrier_action = carrier_action; /* properties */ g_object_class_install_property diff --git a/src/nm-device-bridge.c b/src/nm-device-bridge.c index 6f3d70e4b..39275c8b4 100644 --- a/src/nm-device-bridge.c +++ b/src/nm-device-bridge.c @@ -46,8 +46,8 @@ G_DEFINE_TYPE (NMDeviceBridge, nm_device_bridge, NM_TYPE_DEVICE_WIRED) #define NM_BRIDGE_ERROR (nm_bridge_error_quark ()) typedef struct { - gboolean ip4_waiting; - gboolean ip6_waiting; + guint8 hw_addr[NM_UTILS_HWADDR_LEN_MAX]; + gsize hw_addr_len; } NMDeviceBridgePrivate; enum { @@ -81,44 +81,39 @@ nm_bridge_error_quark (void) /******************************************************************/ static void -device_state_changed (NMDevice *device, - NMDeviceState new_state, - NMDeviceState old_state, - NMDeviceStateReason reason) +carrier_action (NMDeviceWired *self, NMDeviceState state, gboolean carrier) { - NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (device); - - if (new_state == NM_DEVICE_STATE_UNAVAILABLE) { - /* Use NM_DEVICE_STATE_REASON_CARRIER to make sure num retries is reset */ - nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER); - } - - if (new_state <= NM_DEVICE_STATE_DISCONNECTED || new_state > NM_DEVICE_STATE_ACTIVATED) { - priv->ip4_waiting = FALSE; - priv->ip6_waiting = FALSE; - } + /* Bridge carrier state follows IFF_UP with no ports, and port carrier + * states when ports are added. Thus carrier isn't useful when deciding + * to auto-activate the bridge master. Also, like bond masters, when the + * carrier state changes due to slave changes, we shouldn't deactivate the + * bridge since the user may be reconfiguring ports. + * + * For these reasons, carrier changes are effectively ignored by overriding + * the parent class' carrier handling and doing nothing. + */ } static void update_hw_address (NMDevice *dev) { - const guint8 *hw_addr; - guint8 old_addr[NM_UTILS_HWADDR_LEN_MAX]; - int addrtype, addrlen; - - addrtype = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (dev)); - g_assert (addrtype >= 0); - addrlen = nm_utils_hwaddr_len (addrtype); - g_assert (addrlen > 0); - - hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); - memcpy (old_addr, hw_addr, addrlen); - - NM_DEVICE_CLASS (nm_device_bridge_parent_class)->update_hw_address (dev); + NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (dev); + gsize addrlen; + gboolean changed = FALSE; + + addrlen = nm_device_read_hwaddr (dev, priv->hw_addr, sizeof (priv->hw_addr), &changed); + if (addrlen) { + priv->hw_addr_len = addrlen; + if (changed) + g_object_notify (G_OBJECT (dev), NM_DEVICE_BRIDGE_HW_ADDRESS); + } +} - hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); - if (memcmp (old_addr, hw_addr, addrlen)) - g_object_notify (G_OBJECT (dev), NM_DEVICE_BRIDGE_HW_ADDRESS); +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + *out_len = NM_DEVICE_BRIDGE_GET_PRIVATE (device)->hw_addr_len; + return NM_DEVICE_BRIDGE_GET_PRIVATE (device)->hw_addr; } static guint32 @@ -247,10 +242,11 @@ complete_connection (NMDevice *device, static gboolean spec_match_list (NMDevice *device, const GSList *specs) { + NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (device); char *hwaddr; gboolean matched; - hwaddr = nm_utils_hwaddr_ntoa (nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)), ARPHRD_ETHER); + hwaddr = nm_utils_hwaddr_ntoa (priv->hw_addr, nm_utils_hwaddr_type (priv->hw_addr_len)); matched = nm_match_spec_hwaddr (specs, hwaddr); g_free (hwaddr); @@ -311,6 +307,7 @@ static void set_sysfs_uint (const char *iface, GObject *obj, const char *obj_prop, + const char *dir, const char *sysfs_prop, gboolean default_if_zero, gboolean user_hz_compensate) @@ -353,7 +350,7 @@ set_sysfs_uint (const char *iface, if (user_hz_compensate) uval *= 100; - path = g_strdup_printf ("/sys/class/net/%s/bridge/%s", iface, sysfs_prop); + path = g_strdup_printf ("/sys/class/net/%s/%s/%s", iface, dir, sysfs_prop); s = g_strdup_printf ("%u", uval); /* FIXME: how should failure be handled? */ nm_utils_do_sysctl (path, s); @@ -371,9 +368,6 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); - NM_DEVICE_BRIDGE_GET_PRIVATE (dev)->ip4_waiting = FALSE; - NM_DEVICE_BRIDGE_GET_PRIVATE (dev)->ip6_waiting = FALSE; - ret = NM_DEVICE_CLASS (nm_device_bridge_parent_class)->act_stage1_prepare (dev, reason); if (ret == NM_ACT_STAGE_RETURN_SUCCESS) { connection = nm_device_get_connection (dev); @@ -385,12 +379,12 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) iface = nm_device_get_ip_iface (dev); g_assert (iface); - set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_STP, "stp_state", FALSE, FALSE); - set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_PRIORITY, "priority", TRUE, FALSE); - set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_FORWARD_DELAY, "forward_delay", TRUE, TRUE); - set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_HELLO_TIME, "hello_time", TRUE, TRUE); - set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_MAX_AGE, "max_age", TRUE, TRUE); - set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_AGEING_TIME, "ageing_time", TRUE, TRUE); + set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_STP, "bridge", "stp_state", FALSE, FALSE); + set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_PRIORITY, "bridge", "priority", TRUE, FALSE); + set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_FORWARD_DELAY, "bridge", "forward_delay", TRUE, TRUE); + set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_HELLO_TIME, "bridge", "hello_time", TRUE, TRUE); + set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_MAX_AGE, "bridge", "max_age", TRUE, TRUE); + set_sysfs_uint (iface, G_OBJECT (s_bridge), NM_SETTING_BRIDGE_AGEING_TIME, "bridge", "ageing_time", TRUE, TRUE); } return ret; } @@ -398,7 +392,6 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) static gboolean enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection) { - NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (device); gboolean success; NMSettingBridgePort *s_port; const char *iface = nm_device_get_ip_iface (device); @@ -414,28 +407,15 @@ enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection) /* Set port properties */ s_port = nm_connection_get_setting_bridge_port (connection); if (s_port) { - set_sysfs_uint (slave_iface, G_OBJECT (s_port), NM_SETTING_BRIDGE_PORT_PRIORITY, "priority", TRUE, FALSE); - set_sysfs_uint (slave_iface, G_OBJECT (s_port), NM_SETTING_BRIDGE_PORT_PATH_COST, "path_cost", TRUE, FALSE); - set_sysfs_uint (slave_iface, G_OBJECT (s_port), NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE, "hairpin_mode", FALSE, FALSE); + set_sysfs_uint (slave_iface, G_OBJECT (s_port), NM_SETTING_BRIDGE_PORT_PRIORITY, "brport", "priority", TRUE, FALSE); + set_sysfs_uint (slave_iface, G_OBJECT (s_port), NM_SETTING_BRIDGE_PORT_PATH_COST, "brport", "path_cost", TRUE, FALSE); + set_sysfs_uint (slave_iface, G_OBJECT (s_port), NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE, "brport", "hairpin_mode", FALSE, FALSE); } - nm_log_info (LOGD_DEVICE, "(%s): attached bridge port %s", iface, slave_iface); + nm_log_info (LOGD_BRIDGE, "(%s): attached bridge port %s", iface, slave_iface); g_object_notify (G_OBJECT (device), NM_DEVICE_BRIDGE_SLAVES); - /* If waiting for a slave to continue with IP config, start now */ - if (priv->ip4_waiting) { - nm_log_info (LOGD_DEVICE | LOGD_IP4, "(%s): retrying IPv4 config with first slave", iface); - priv->ip4_waiting = FALSE; - nm_device_activate_stage3_ip4_start (device); - } - - if (priv->ip6_waiting) { - nm_log_info (LOGD_DEVICE | LOGD_IP6, "(%s): retrying IPv6 config with first slave", iface); - priv->ip6_waiting = FALSE; - nm_device_activate_stage3_ip6_start (device); - } - return TRUE; } @@ -448,7 +428,7 @@ release_slave (NMDevice *device, NMDevice *slave) nm_device_get_ip_iface (device), nm_device_get_ip_ifindex (slave), nm_device_get_ip_iface (slave)); - nm_log_info (LOGD_DEVICE, "(%s): detached bridge port %s (success %d)", + nm_log_info (LOGD_BRIDGE, "(%s): detached bridge port %s (success %d)", nm_device_get_ip_iface (device), nm_device_get_ip_iface (slave), success); @@ -456,92 +436,6 @@ release_slave (NMDevice *device, NMDevice *slave) return success; } -static NMActStageReturn -act_stage3_ip4_config_start (NMDevice *device, - NMIP4Config **out_config, - NMDeviceStateReason *reason) -{ - NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (device); - NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS; - NMConnection *connection; - NMSettingIP4Config *s_ip4; - const char *method = NULL; - GSList *slaves; - - priv->ip4_waiting = FALSE; - - slaves = nm_device_master_get_slaves (device); - if (slaves == NULL) { - connection = nm_device_get_connection (device); - g_assert (connection); - - s_ip4 = nm_connection_get_setting_ip4_config (connection); - if (s_ip4) - method = nm_setting_ip4_config_get_method (s_ip4); - - if (g_strcmp0 (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0) - priv->ip4_waiting = TRUE; - } - g_slist_free (slaves); - - if (priv->ip4_waiting) { - ret = NM_ACT_STAGE_RETURN_WAIT; - nm_log_info (LOGD_DEVICE | LOGD_IP4, "(%s): IPv4 config waiting until slaves are present", - nm_device_get_ip_iface (device)); - } else { - /* We have slaves; proceed with normal IPv4 configuration */ - ret = NM_DEVICE_CLASS (nm_device_bridge_parent_class)->act_stage3_ip4_config_start (device, out_config, reason); - } - - return ret; -} - -static NMActStageReturn -act_stage3_ip6_config_start (NMDevice *device, - NMIP6Config **out_config, - NMDeviceStateReason *reason) -{ - NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (device); - NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS; - NMConnection *connection; - NMSettingIP6Config *s_ip6; - const char *method = NULL; - GSList *slaves; - - priv->ip6_waiting = FALSE; - - slaves = nm_device_master_get_slaves (device); - if (slaves == NULL) { - connection = nm_device_get_connection (device); - g_assert (connection); - - s_ip6 = nm_connection_get_setting_ip6_config (connection); - if (s_ip6) - method = nm_setting_ip6_config_get_method (s_ip6); - - /* SLAAC, DHCP, and Link-Local depend on connectivity (and thus slaves) - * to complete addressing. SLAAC and DHCP obviously need a peer to - * provide a prefix, while Link-Local must perform DAD on the local link. - */ - if ( !g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) - || !g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_DHCP) - || !g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL)) - priv->ip6_waiting = TRUE; - } - g_slist_free (slaves); - - if (priv->ip6_waiting) { - ret = NM_ACT_STAGE_RETURN_WAIT; - nm_log_info (LOGD_DEVICE | LOGD_IP6, "(%s): IPv6 config waiting until slaves are present", - nm_device_get_ip_iface (device)); - } else { - /* We have slaves; proceed with normal IPv6 configuration */ - ret = NM_DEVICE_CLASS (nm_device_bridge_parent_class)->act_stage3_ip6_config_start (device, out_config, reason); - } - - return ret; -} - /******************************************************************/ NMDevice * @@ -556,6 +450,7 @@ nm_device_bridge_new (const char *udi, const char *iface) NM_DEVICE_DRIVER, "bridge", NM_DEVICE_TYPE_DESC, "Bridge", NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_BRIDGE, + NM_DEVICE_IS_MASTER, TRUE, NULL); } @@ -564,7 +459,7 @@ constructed (GObject *object) { G_OBJECT_CLASS (nm_device_bridge_parent_class)->constructed (object); - nm_log_dbg (LOGD_HW | LOGD_DEVICE, "(%s): kernel ifindex %d", + nm_log_dbg (LOGD_HW | LOGD_BRIDGE, "(%s): kernel ifindex %d", nm_device_get_iface (NM_DEVICE (object)), nm_device_get_ifindex (NM_DEVICE (object))); } @@ -578,14 +473,15 @@ static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - const guint8 *current_addr; + NMDeviceBridgePrivate *priv = NM_DEVICE_BRIDGE_GET_PRIVATE (object); GPtrArray *slaves; GSList *list, *iter; + char *hwaddr; switch (prop_id) { case PROP_HW_ADDRESS: - current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (object)); - g_value_take_string (value, nm_utils_hwaddr_ntoa (current_addr, ARPHRD_ETHER)); + hwaddr = nm_utils_hwaddr_ntoa (priv->hw_addr, nm_utils_hwaddr_type (priv->hw_addr_len)); + g_value_take_string (value, hwaddr); break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_wired_get_carrier (NM_DEVICE_WIRED (object))); @@ -620,6 +516,7 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass); + NMDeviceWiredClass *wired_class = NM_DEVICE_WIRED_CLASS (klass); g_type_class_add_private (object_class, sizeof (NMDeviceBridgePrivate)); @@ -630,6 +527,7 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass) parent_class->get_generic_capabilities = get_generic_capabilities; parent_class->update_hw_address = update_hw_address; + parent_class->get_hw_address = get_hw_address; parent_class->is_available = is_available; parent_class->get_best_auto_connection = get_best_auto_connection; parent_class->check_connection_compatible = check_connection_compatible; @@ -639,12 +537,10 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass) parent_class->connection_match_config = connection_match_config; parent_class->act_stage1_prepare = act_stage1_prepare; - parent_class->act_stage3_ip4_config_start = act_stage3_ip4_config_start; - parent_class->act_stage3_ip6_config_start = act_stage3_ip6_config_start; parent_class->enslave_slave = enslave_slave; parent_class->release_slave = release_slave; - parent_class->state_changed = device_state_changed; + wired_class->carrier_action = carrier_action; /* properties */ g_object_class_install_property diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c index cadedcf7b..366e2683f 100644 --- a/src/nm-device-bt.c +++ b/src/nm-device-bt.c @@ -63,6 +63,7 @@ typedef struct { guint mm_watch_id; gboolean mm_running; + guint8 hw_addr[ETH_ALEN]; /* binary representation of bdaddr */ char *bdaddr; char *name; guint32 capabilities; @@ -117,14 +118,6 @@ guint32 nm_device_bt_get_capabilities (NMDeviceBt *self) return NM_DEVICE_BT_GET_PRIVATE (self)->capabilities; } -const char *nm_device_bt_get_hw_address (NMDeviceBt *self) -{ - g_return_val_if_fail (self != NULL, NULL); - g_return_val_if_fail (NM_IS_DEVICE_BT (self), NULL); - - return NM_DEVICE_BT_GET_PRIVATE (self)->bdaddr; -} - static guint32 get_connection_bt_type (NMConnection *connection) { @@ -156,16 +149,9 @@ get_best_auto_connection (NMDevice *device, for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; guint32 bt_type; - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - - if (!nm_setting_connection_get_autoconnect (s_con)) - continue; - - if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_BLUETOOTH_SETTING_NAME)) + if (!nm_connection_is_type (connection, NM_SETTING_BLUETOOTH_SETTING_NAME)) continue; bt_type = get_connection_bt_type (connection); @@ -401,6 +387,15 @@ get_generic_capabilities (NMDevice *dev) return NM_DEVICE_CAP_NM_SUPPORTED; } +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device); + + *out_len = sizeof (priv->hw_addr); + return priv->hw_addr; +} + static gboolean hwaddr_matches (NMDevice *device, NMConnection *connection, @@ -1231,6 +1226,8 @@ set_property (GObject *object, guint prop_id, case PROP_HW_ADDRESS: /* Construct only */ priv->bdaddr = g_ascii_strup (g_value_get_string (value), -1); + if (!nm_utils_hwaddr_aton (priv->bdaddr, ARPHRD_ETHER, &priv->hw_addr)) + nm_log_err (LOGD_HW, "Failed to convert BT address '%s'", priv->bdaddr); break; case PROP_BT_NAME: /* Construct only */ @@ -1326,6 +1323,7 @@ nm_device_bt_class_init (NMDeviceBtClass *klass) device_class->check_connection_available = check_connection_available; device_class->complete_connection = complete_connection; device_class->hwaddr_matches = hwaddr_matches; + device_class->get_hw_address = get_hw_address; device_class->is_available = is_available; device_class->state_changed = device_state_changed; diff --git a/src/nm-device-bt.h b/src/nm-device-bt.h index 0d54d6079..9382ee254 100644 --- a/src/nm-device-bt.h +++ b/src/nm-device-bt.h @@ -65,8 +65,6 @@ NMDevice *nm_device_bt_new (const char *udi, guint32 nm_device_bt_get_capabilities (NMDeviceBt *device); -const char *nm_device_bt_get_hw_address (NMDeviceBt *device); - gboolean nm_device_bt_modem_added (NMDeviceBt *device, NMModem *modem, const char *driver); diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index 4b8f9497f..cf4541db1 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -81,6 +81,7 @@ typedef struct Supplicant { } Supplicant; typedef struct { + guint8 hw_addr[ETH_ALEN]; /* Current MAC address */ guint8 perm_hw_addr[ETH_ALEN]; /* Permanent MAC address */ guint8 initial_hw_addr[ETH_ALEN]; /* Initial MAC address (as seen when NM starts) */ @@ -350,16 +351,17 @@ nm_device_ethernet_new (const char *udi, } static void -_update_hw_addr (NMDeviceEthernet *self, const guint8 *addr) +update_hw_address (NMDevice *dev) { - const guint8 *current_addr; - - g_return_if_fail (addr != NULL); - - current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self)); - if (memcmp (current_addr, addr, ETH_ALEN)) { - nm_device_wired_set_hwaddr (NM_DEVICE_WIRED (self), addr, ETH_ALEN); - g_object_notify (G_OBJECT (self), NM_DEVICE_ETHERNET_HW_ADDRESS); + NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (dev); + gsize addrlen; + gboolean changed = FALSE; + + addrlen = nm_device_read_hwaddr (dev, priv->hw_addr, sizeof (priv->hw_addr), &changed); + if (addrlen) { + g_return_if_fail (addrlen == ETH_ALEN); + if (changed) + g_object_notify (G_OBJECT (dev), NM_DEVICE_ETHERNET_HW_ADDRESS); } } @@ -367,7 +369,7 @@ static gboolean _set_hw_addr (NMDeviceEthernet *self, const guint8 *addr, const char *detail) { NMDevice *dev = NM_DEVICE (self); - const guint8 *current_addr; + NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); const char *iface; char *mac_str = NULL; gboolean success = FALSE; @@ -377,8 +379,7 @@ _set_hw_addr (NMDeviceEthernet *self, const guint8 *addr, const char *detail) iface = nm_device_get_iface (dev); /* Do nothing if current MAC is same */ - current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self)); - if (!memcmp (current_addr, addr, ETH_ALEN)) { + if (!memcmp (priv->hw_addr, addr, ETH_ALEN)) { nm_log_dbg (LOGD_DEVICE | LOGD_ETHER, "(%s): no MAC address change needed", iface); return TRUE; } @@ -392,9 +393,15 @@ _set_hw_addr (NMDeviceEthernet *self, const guint8 *addr, const char *detail) success = nm_system_iface_set_mac (nm_device_get_ip_ifindex (dev), (struct ether_addr *) addr); if (success) { /* MAC address succesfully changed; update the current MAC to match */ - _update_hw_addr (self, addr); - nm_log_info (LOGD_DEVICE | LOGD_ETHER, "(%s): %s MAC address to %s", - iface, detail, mac_str); + update_hw_address (dev); + if (memcmp (priv->hw_addr, addr, ETH_ALEN) == 0) { + nm_log_info (LOGD_DEVICE | LOGD_ETHER, "(%s): %s MAC address to %s", + iface, detail, mac_str); + } else { + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, "(%s): new MAC address %s " + "not successfully set", + iface, mac_str); + } } else { nm_log_warn (LOGD_DEVICE | LOGD_ETHER, "(%s): failed to %s MAC address to %s", iface, detail, mac_str); @@ -406,22 +413,6 @@ _set_hw_addr (NMDeviceEthernet *self, const guint8 *addr, const char *detail) } static void -update_hw_address (NMDevice *dev) -{ - const guint8 *hw_addr; - guint8 old_addr[ETH_ALEN]; - - hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); - memcpy (old_addr, hw_addr, ETH_ALEN); - - NM_DEVICE_CLASS (nm_device_ethernet_parent_class)->update_hw_address (dev); - - hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); - if (memcmp (old_addr, hw_addr, ETH_ALEN)) - g_object_notify (G_OBJECT (dev), NM_DEVICE_ETHERNET_HW_ADDRESS); -} - -static void update_permanent_hw_address (NMDevice *dev) { NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev); @@ -448,13 +439,10 @@ update_permanent_hw_address (NMDevice *dev) errno = 0; ret = ioctl (fd, SIOCETHTOOL, &req); if ((ret < 0) || !nm_ethernet_address_is_valid ((struct ether_addr *) epaddr->data)) { - const guint8 *current_addr; - nm_log_err (LOGD_HW | LOGD_ETHER, "(%s): unable to read permanent MAC address (error %d)", nm_device_get_iface (dev), errno); /* Fall back to current address */ - current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self)); - memcpy (epaddr->data, current_addr, ETH_ALEN); + memcpy (epaddr->data, priv->hw_addr, ETH_ALEN); } if (memcmp (&priv->perm_hw_addr, epaddr->data, ETH_ALEN)) { @@ -470,23 +458,26 @@ update_initial_hw_address (NMDevice *dev) { NMDeviceEthernet *self = NM_DEVICE_ETHERNET (dev); NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); - const guint8 *current_addr; + gsize addrlen; char *mac_str = NULL; - guint8 *addr = priv->initial_hw_addr; - guint8 zero[ETH_ALEN] = {0,0,0,0,0,0}; /* This sets initial MAC address from current MAC address. It should only * be called from NMDevice constructor() to really get the initial address. */ - current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self)); - if (!memcmp (current_addr, &zero, ETH_ALEN)) - update_hw_address (dev); - - if (memcmp (&priv->initial_hw_addr, current_addr, ETH_ALEN)) - memcpy (&priv->initial_hw_addr, current_addr, ETH_ALEN); + addrlen = nm_device_read_hwaddr (dev, + priv->initial_hw_addr, + sizeof (priv->initial_hw_addr), + NULL); + if (addrlen) + g_return_if_fail (addrlen == ETH_ALEN); mac_str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X", - addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); + priv->initial_hw_addr[0], + priv->initial_hw_addr[1], + priv->initial_hw_addr[2], + priv->initial_hw_addr[3], + priv->initial_hw_addr[4], + priv->initial_hw_addr[5]); nm_log_dbg (LOGD_DEVICE | LOGD_ETHER, "(%s): read initial MAC address %s", nm_device_get_iface (dev), mac_str); @@ -494,6 +485,13 @@ update_initial_hw_address (NMDevice *dev) g_free (mac_str); } +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + *out_len = ETH_ALEN; + return NM_DEVICE_ETHERNET_GET_PRIVATE (device)->hw_addr; +} + static guint32 get_generic_capabilities (NMDevice *dev) { @@ -626,13 +624,8 @@ get_best_auto_connection (NMDevice *dev, for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - - if ( nm_setting_connection_get_autoconnect (s_con) - && match_ethernet_connection (dev, connection, TRUE, NULL)) + if (match_ethernet_connection (dev, connection, TRUE, NULL)) return connection; } @@ -1418,14 +1411,9 @@ hwaddr_matches (NMDevice *device, guint other_hwaddr_len, gboolean fail_if_no_hwaddr) { + NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (device); NMSettingWired *s_wired; - const guint8 *devaddr; const GByteArray *mac = NULL; - int devtype; - - devtype = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (device)); - devaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)); - g_return_val_if_fail (devaddr != NULL, FALSE); s_wired = nm_connection_get_setting_wired (connection); if (s_wired) @@ -1437,7 +1425,7 @@ hwaddr_matches (NMDevice *device, g_return_val_if_fail (other_hwaddr_len == ETH_ALEN, FALSE); if (memcmp (mac->data, other_hwaddr, mac->len) == 0) return TRUE; - } else if (memcmp (mac->data, devaddr, mac->len) == 0) + } else if (memcmp (mac->data, priv->hw_addr, mac->len) == 0) return TRUE; } else if (fail_if_no_hwaddr == FALSE) return TRUE; @@ -1465,12 +1453,10 @@ get_property (GObject *object, guint prop_id, { NMDeviceEthernet *self = NM_DEVICE_ETHERNET (object); NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); - const guint8 *current_addr; switch (prop_id) { case PROP_HW_ADDRESS: - current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self)); - g_value_take_string (value, nm_utils_hwaddr_ntoa (current_addr, ARPHRD_ETHER)); + g_value_take_string (value, nm_utils_hwaddr_ntoa (priv->hw_addr, ARPHRD_ETHER)); break; case PROP_PERM_HW_ADDRESS: g_value_take_string (value, nm_utils_hwaddr_ntoa (&priv->perm_hw_addr, ARPHRD_ETHER)); @@ -1517,6 +1503,7 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass) parent_class->bring_up = bring_up; parent_class->take_down = take_down; parent_class->update_hw_address = update_hw_address; + parent_class->get_hw_address = get_hw_address; parent_class->update_permanent_hw_address = update_permanent_hw_address; parent_class->update_initial_hw_address = update_initial_hw_address; parent_class->get_best_auto_connection = get_best_auto_connection; diff --git a/src/nm-device-infiniband.c b/src/nm-device-infiniband.c index b2915f9ee..c7dcf19c8 100644 --- a/src/nm-device-infiniband.c +++ b/src/nm-device-infiniband.c @@ -44,7 +44,7 @@ G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE_WIRED) #define NM_INFINIBAND_ERROR (nm_infiniband_error_quark ()) typedef struct { - int dummy; + guint8 hw_addr[INFINIBAND_ALEN]; } NMDeviceInfinibandPrivate; enum { @@ -120,21 +120,26 @@ nm_device_infiniband_new (const char *udi, NULL); } - static void update_hw_address (NMDevice *dev) { - const guint8 *hw_addr; - guint8 old_addr[INFINIBAND_ALEN]; - - hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); - memcpy (old_addr, hw_addr, INFINIBAND_ALEN); - - NM_DEVICE_CLASS (nm_device_infiniband_parent_class)->update_hw_address (dev); + NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (dev); + gsize addrlen; + gboolean changed = FALSE; + + addrlen = nm_device_read_hwaddr (dev, priv->hw_addr, sizeof (priv->hw_addr), &changed); + if (addrlen) { + g_return_if_fail (addrlen == INFINIBAND_ALEN); + if (changed) + g_object_notify (G_OBJECT (dev), NM_DEVICE_INFINIBAND_HW_ADDRESS); + } +} - hw_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); - if (memcmp (old_addr, hw_addr, INFINIBAND_ALEN)) - g_object_notify (G_OBJECT (dev), NM_DEVICE_INFINIBAND_HW_ADDRESS); +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + *out_len = INFINIBAND_ALEN; + return NM_DEVICE_INFINIBAND_GET_PRIVATE (device)->hw_addr; } static guint32 @@ -148,31 +153,25 @@ get_best_auto_connection (NMDevice *dev, GSList *connections, char **specific_object) { + NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (dev); GSList *iter; for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; NMSettingInfiniband *s_infiniband; - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - if (!nm_connection_is_type (connection, NM_SETTING_INFINIBAND_SETTING_NAME)) continue; - if (!nm_setting_connection_get_autoconnect (s_con)) - continue; s_infiniband = nm_connection_get_setting_infiniband (connection); if (!s_infiniband) continue; if (s_infiniband) { - const guint8 *hwaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (dev)); const GByteArray *mac; mac = nm_setting_infiniband_get_mac_address (s_infiniband); - if (mac && memcmp (mac->data, hwaddr, INFINIBAND_ALEN)) + if (mac && memcmp (mac->data, priv->hw_addr, INFINIBAND_ALEN)) continue; } @@ -249,6 +248,7 @@ check_connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { + NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (device); NMSettingInfiniband *s_infiniband; const GByteArray *mac; @@ -269,10 +269,8 @@ check_connection_compatible (NMDevice *device, } if (s_infiniband) { - const guint8 *hwaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)); - mac = nm_setting_infiniband_get_mac_address (s_infiniband); - if (mac && memcmp (mac->data, hwaddr, INFINIBAND_ALEN)) { + if (mac && memcmp (mac->data, priv->hw_addr, INFINIBAND_ALEN)) { g_set_error (error, NM_INFINIBAND_ERROR, NM_INFINIBAND_ERROR_CONNECTION_INCOMPATIBLE, @@ -291,9 +289,9 @@ complete_connection (NMDevice *device, const GSList *existing_connections, GError **error) { + NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (device); NMSettingInfiniband *s_infiniband; const GByteArray *setting_mac; - const guint8 *hwaddr; nm_utils_complete_generic (connection, NM_SETTING_INFINIBAND_SETTING_NAME, @@ -308,11 +306,10 @@ complete_connection (NMDevice *device, nm_connection_add_setting (connection, NM_SETTING (s_infiniband)); } - hwaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)); setting_mac = nm_setting_infiniband_get_mac_address (s_infiniband); if (setting_mac) { /* Make sure the setting MAC (if any) matches the device's MAC */ - if (memcmp (setting_mac->data, hwaddr, INFINIBAND_ALEN)) { + if (memcmp (setting_mac->data, priv->hw_addr, INFINIBAND_ALEN)) { g_set_error_literal (error, NM_SETTING_INFINIBAND_ERROR, NM_SETTING_INFINIBAND_ERROR_INVALID_PROPERTY, @@ -323,8 +320,8 @@ complete_connection (NMDevice *device, GByteArray *mac; /* Lock the connection to this device by default */ - mac = g_byte_array_sized_new (INFINIBAND_ALEN); - g_byte_array_append (mac, hwaddr, INFINIBAND_ALEN); + mac = g_byte_array_sized_new (sizeof (priv->hw_addr)); + g_byte_array_append (mac, priv->hw_addr, sizeof (priv->hw_addr)); g_object_set (G_OBJECT (s_infiniband), NM_SETTING_INFINIBAND_MAC_ADDRESS, mac, NULL); g_byte_array_free (mac, TRUE); } @@ -338,10 +335,11 @@ complete_connection (NMDevice *device, static gboolean spec_match_list (NMDevice *device, const GSList *specs) { + NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (device); char *hwaddr; gboolean matched; - hwaddr = nm_utils_hwaddr_ntoa (nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)), ARPHRD_INFINIBAND); + hwaddr = nm_utils_hwaddr_ntoa (priv->hw_addr, ARPHRD_INFINIBAND); matched = nm_match_spec_hwaddr (specs, hwaddr); g_free (hwaddr); @@ -351,6 +349,7 @@ spec_match_list (NMDevice *device, const GSList *specs) static gboolean infiniband_match_config (NMDevice *self, NMConnection *connection) { + NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (self); NMSettingInfiniband *s_infiniband; const GByteArray *s_mac; @@ -360,7 +359,7 @@ infiniband_match_config (NMDevice *self, NMConnection *connection) /* MAC address check */ s_mac = nm_setting_infiniband_get_mac_address (s_infiniband); - if (s_mac && memcmp (s_mac->data, nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (self)), INFINIBAND_ALEN)) + if (s_mac && memcmp (s_mac->data, priv->hw_addr, INFINIBAND_ALEN)) return FALSE; return TRUE; @@ -403,14 +402,9 @@ hwaddr_matches (NMDevice *device, guint other_hwaddr_len, gboolean fail_if_no_hwaddr) { + NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (device); NMSettingInfiniband *s_ib; - const guint8 *devaddr; const GByteArray *mac = NULL; - int devtype; - - devtype = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (device)); - devaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)); - g_return_val_if_fail (devaddr != NULL, FALSE); s_ib = nm_connection_get_setting_infiniband (connection); if (s_ib) @@ -422,7 +416,7 @@ hwaddr_matches (NMDevice *device, g_return_val_if_fail (other_hwaddr_len == INFINIBAND_ALEN, FALSE); if (memcmp (mac->data, other_hwaddr, mac->len) == 0) return TRUE; - } else if (memcmp (mac->data, devaddr, mac->len) == 0) + } else if (memcmp (mac->data, priv->hw_addr, mac->len) == 0) return TRUE; } else if (fail_if_no_hwaddr == FALSE) return TRUE; @@ -434,12 +428,11 @@ static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - const guint8 *current_addr; + NMDeviceInfinibandPrivate *priv = NM_DEVICE_INFINIBAND_GET_PRIVATE (object); switch (prop_id) { case PROP_HW_ADDRESS: - current_addr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (object)); - g_value_take_string (value, nm_utils_hwaddr_ntoa (current_addr, ARPHRD_INFINIBAND)); + g_value_take_string (value, nm_utils_hwaddr_ntoa (priv->hw_addr, ARPHRD_INFINIBAND)); break; case PROP_CARRIER: g_value_set_boolean (value, nm_device_wired_get_carrier (NM_DEVICE_WIRED (object))); @@ -476,6 +469,7 @@ nm_device_infiniband_class_init (NMDeviceInfinibandClass *klass) parent_class->get_generic_capabilities = get_generic_capabilities; parent_class->update_hw_address = update_hw_address; + parent_class->get_hw_address = get_hw_address; parent_class->get_best_auto_connection = get_best_auto_connection; parent_class->check_connection_compatible = check_connection_compatible; parent_class->complete_connection = complete_connection; diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c index 57f0bf8ef..24d9cefbf 100644 --- a/src/nm-device-modem.c +++ b/src/nm-device-modem.c @@ -254,22 +254,6 @@ complete_connection (NMDevice *device, return nm_modem_complete_connection (priv->modem, connection, existing_connections, error); } -static gboolean -hw_is_up (NMDevice *device) -{ - int ifindex = nm_device_get_ip_ifindex (device); - - return ifindex > 0 ? nm_system_iface_is_up (ifindex) : TRUE; -} - -static gboolean -hw_bring_up (NMDevice *device, gboolean *no_firmware) -{ - int ifindex = nm_device_get_ip_ifindex (device); - - return ifindex > 0 ? nm_system_iface_set_up (ifindex, TRUE, no_firmware) : TRUE; -} - static void deactivate (NMDevice *device) { @@ -508,8 +492,6 @@ nm_device_modem_class_init (NMDeviceModemClass *mclass) device_class->get_best_auto_connection = get_best_auto_connection; device_class->check_connection_compatible = check_connection_compatible; device_class->complete_connection = complete_connection; - device_class->hw_is_up = hw_is_up; - device_class->hw_bring_up = hw_bring_up; device_class->deactivate = deactivate; device_class->act_stage1_prepare = act_stage1_prepare; device_class->act_stage2_config = act_stage2_config; diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c index 289e5be39..1417736fb 100644 --- a/src/nm-device-olpc-mesh.c +++ b/src/nm-device-olpc-mesh.c @@ -94,7 +94,7 @@ struct _NMDeviceOlpcMeshPrivate { gboolean dispose_has_run; - struct ether_addr hw_addr; + guint8 hw_addr[ETH_ALEN]; GByteArray * ssid; @@ -139,7 +139,7 @@ nm_device_olpc_mesh_init (NMDeviceOlpcMesh * self) priv->companion = NULL; priv->stage1_waiting = FALSE; - memset (&(priv->hw_addr), 0, sizeof (struct ether_addr)); + memset (&priv->hw_addr, 0, sizeof (priv->hw_addr)); } static GObject* @@ -187,24 +187,6 @@ constructor (GType type, } static gboolean -hw_is_up (NMDevice *device) -{ - return nm_system_iface_is_up (nm_device_get_ip_ifindex (device)); -} - -static gboolean -hw_bring_up (NMDevice *dev, gboolean *no_firmware) -{ - return nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), TRUE, no_firmware); -} - -static void -hw_take_down (NMDevice *dev) -{ - nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), FALSE, NULL); -} - -static gboolean is_up (NMDevice *device) { NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (device); @@ -315,23 +297,6 @@ complete_connection (NMDevice *device, return TRUE; } -/* - * nm_device_olpc_mesh_get_address - * - * Get a device's hardware address - * - */ -static void -nm_device_olpc_mesh_get_address (NMDeviceOlpcMesh *self, - struct ether_addr *addr) -{ - NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); - g_return_if_fail (self != NULL); - g_return_if_fail (addr != NULL); - - memcpy (addr, &(priv->hw_addr), sizeof (struct ether_addr)); -} - /****************************************************************************/ static void @@ -339,34 +304,26 @@ update_hw_address (NMDevice *dev) { NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (dev); NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); - struct ifreq req; - int ret, fd; - - fd = socket (PF_INET, SOCK_DGRAM, 0); - if (fd < 0) { - nm_log_warn (LOGD_OLPC_MESH, "could not open control socket."); - return; - } - - memset (&req, 0, sizeof (struct ifreq)); - strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); - ret = ioctl (fd, SIOCGIFHWADDR, &req); - if (ret) { - nm_log_warn (LOGD_OLPC_MESH, "(%s): error getting hardware address: %d", - nm_device_get_iface (dev), errno); - goto out; + gsize addrlen; + gboolean changed = FALSE; + + addrlen = nm_device_read_hwaddr (dev, priv->hw_addr, sizeof (priv->hw_addr), &changed); + if (addrlen) { + g_return_if_fail (addrlen == ETH_ALEN); + if (changed) + g_object_notify (G_OBJECT (dev), NM_DEVICE_OLPC_MESH_HW_ADDRESS); } +} - if (memcmp (&priv->hw_addr, &req.ifr_hwaddr.sa_data, sizeof (struct ether_addr))) { - memcpy (&priv->hw_addr, &req.ifr_hwaddr.sa_data, sizeof (struct ether_addr)); - g_object_notify (G_OBJECT (dev), NM_DEVICE_OLPC_MESH_HW_ADDRESS); - } +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (device); -out: - close (fd); + *out_len = sizeof (priv->hw_addr); + return priv->hw_addr; } - static NMActStageReturn act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) { @@ -506,12 +463,10 @@ get_property (GObject *object, guint prop_id, { NMDeviceOlpcMesh *device = NM_DEVICE_OLPC_MESH (object); NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (device); - struct ether_addr hw_addr; switch (prop_id) { case PROP_HW_ADDRESS: - nm_device_olpc_mesh_get_address (device, &hw_addr); - g_value_take_string (value, nm_utils_hwaddr_ntoa (&hw_addr, ARPHRD_ETHER)); + g_value_take_string (value, nm_utils_hwaddr_ntoa (priv->hw_addr, ARPHRD_ETHER)); break; case PROP_COMPANION: if (priv->companion) @@ -554,13 +509,11 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) parent_class->get_type_capabilities = NULL; parent_class->get_generic_capabilities = get_generic_capabilities; - parent_class->hw_is_up = hw_is_up; - parent_class->hw_bring_up = hw_bring_up; - parent_class->hw_take_down = hw_take_down; parent_class->is_up = is_up; parent_class->bring_up = bring_up; parent_class->take_down = take_down; parent_class->update_hw_address = update_hw_address; + parent_class->get_hw_address = get_hw_address; parent_class->check_connection_compatible = check_connection_compatible; parent_class->complete_connection = complete_connection; @@ -672,18 +625,17 @@ static gboolean is_companion (NMDeviceOlpcMesh *self, NMDevice *other) { NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); - struct ether_addr their_addr; + const guint8 *their_addr; + guint their_addr_len = 0; NMManager *manager; if (!NM_IS_DEVICE_WIFI (other)) return FALSE; - nm_device_wifi_get_address (NM_DEVICE_WIFI (other), &their_addr); - - if (memcmp (priv->hw_addr.ether_addr_octet, - their_addr.ether_addr_octet, ETH_ALEN) != 0) { + their_addr = nm_device_get_hw_address (other, &their_addr_len); + if ( (their_addr_len != ETH_ALEN) + || (memcmp (priv->hw_addr, their_addr, ETH_ALEN) != 0)) return FALSE; - } priv->companion = other; diff --git a/src/nm-device-private.h b/src/nm-device-private.h index 57e16c0f8..8edae6602 100644 --- a/src/nm-device-private.h +++ b/src/nm-device-private.h @@ -46,6 +46,8 @@ gboolean nm_device_hw_bring_up (NMDevice *self, gboolean wait, gboolean *no_firm void nm_device_hw_take_down (NMDevice *self, gboolean block); +gsize nm_device_read_hwaddr (NMDevice *dev, guint8 *out_buf, gsize buf_len, gboolean *out_changed); + gboolean nm_device_ip_config_should_fail (NMDevice *self, gboolean ip6); void nm_device_set_firmware_missing (NMDevice *self, gboolean missing); @@ -63,7 +65,10 @@ void nm_device_activate_schedule_ip6_config_result (NMDevice *device, NMIP6Confi void nm_device_activate_schedule_ip6_config_timeout (NMDevice *device); gboolean nm_device_activate_ip4_state_in_conf (NMDevice *device); +gboolean nm_device_activate_ip4_state_in_wait (NMDevice *device); + gboolean nm_device_activate_ip6_state_in_conf (NMDevice *device); +gboolean nm_device_activate_ip6_state_in_wait (NMDevice *device); void nm_device_set_dhcp_timeout (NMDevice *device, guint32 timeout); void nm_device_set_dhcp_anycast_address (NMDevice *device, guint8 *addr); @@ -80,4 +85,8 @@ void nm_device_queued_state_clear (NMDevice *device); NMDeviceState nm_device_queued_state_peek (NMDevice *device); +gboolean nm_device_get_enslaved (NMDevice *device); + +NMDevice *nm_device_master_get_slave_by_ifindex (NMDevice *dev, int ifindex); + #endif /* NM_DEVICE_PRIVATE_H */ diff --git a/src/nm-device-vlan.c b/src/nm-device-vlan.c index f22d47d83..d8e1f3c1d 100644 --- a/src/nm-device-vlan.c +++ b/src/nm-device-vlan.c @@ -130,19 +130,13 @@ get_carrier_sync (NMDeviceVlan *self) } static gboolean -hw_is_up (NMDevice *device) -{ - return nm_system_iface_is_up (nm_device_get_ip_ifindex (device)); -} - -static gboolean hw_bring_up (NMDevice *dev, gboolean *no_firmware) { gboolean success = FALSE, carrier; guint i = 20; while (i-- > 0 && !success) { - success = nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), TRUE, no_firmware); + success = NM_DEVICE_CLASS (nm_device_vlan_parent_class)->hw_bring_up (dev, no_firmware); g_usleep (50); } @@ -163,49 +157,28 @@ hw_bring_up (NMDevice *dev, gboolean *no_firmware) } static void -hw_take_down (NMDevice *dev) -{ - nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), FALSE, NULL); -} - -static void update_hw_address (NMDevice *dev) { NMDeviceVlan *self = NM_DEVICE_VLAN (dev); NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (self); - struct rtnl_link *rtnl; - struct nl_addr *addr; - - rtnl = nm_netlink_index_to_rtnl_link (nm_device_get_ip_ifindex (dev)); - if (!rtnl) { - nm_log_err (LOGD_HW | LOGD_VLAN, - "(%s) failed to read hardware address (error %d)", - nm_device_get_iface (dev), errno); - return; - } - - addr = rtnl_link_get_addr (rtnl); - if (!addr) { - nm_log_err (LOGD_HW | LOGD_VLAN, - "(%s) no hardware address?", - nm_device_get_iface (dev)); - goto out; + gsize addrlen; + gboolean changed = FALSE; + + addrlen = nm_device_read_hwaddr (dev, priv->hw_addr, sizeof (priv->hw_addr), &changed); + if (addrlen) { + priv->hw_addr_len = addrlen; + if (changed) + g_object_notify (G_OBJECT (self), NM_DEVICE_VLAN_HW_ADDRESS); } +} - if (nl_addr_get_len (addr) > sizeof (priv->hw_addr)) { - nm_log_err (LOGD_HW | LOGD_VLAN, - "(%s) hardware address is wrong length (got %d max %zd)", - nm_device_get_iface (dev), - nl_addr_get_len (addr), - sizeof (priv->hw_addr)); - } else { - priv->hw_addr_len = nl_addr_get_len (addr); - memcpy (&priv->hw_addr, nl_addr_get_binary_addr (addr), priv->hw_addr_len); - g_object_notify (G_OBJECT (self), NM_DEVICE_VLAN_HW_ADDRESS); - } +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device); -out: - rtnl_link_put (rtnl); + *out_len = priv->hw_addr_len; + return priv->hw_addr; } static gboolean @@ -327,12 +300,8 @@ get_best_auto_connection (NMDevice *dev, for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; - s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); - if ( nm_setting_connection_get_autoconnect (s_con) - && match_vlan_connection (NM_DEVICE_VLAN (dev), connection, NULL)) + if (match_vlan_connection (NM_DEVICE_VLAN (dev), connection, NULL)) return connection; } return NULL; @@ -760,9 +729,8 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) parent_class->get_generic_capabilities = get_generic_capabilities; parent_class->update_hw_address = update_hw_address; - parent_class->hw_is_up = hw_is_up; + parent_class->get_hw_address = get_hw_address; parent_class->hw_bring_up = hw_bring_up; - parent_class->hw_take_down = hw_take_down; parent_class->can_interrupt_activation = can_interrupt_activation; parent_class->is_available = is_available; diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index eb5ac1aa4..67a10d43f 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -203,6 +203,8 @@ static void schedule_scanlist_cull (NMDeviceWifi *self); static gboolean request_wireless_scan (gpointer user_data); +static void update_hw_address (NMDevice *dev); + /*****************************************************************/ #define NM_WIFI_ERROR (nm_wifi_error_quark ()) @@ -804,24 +806,12 @@ periodic_update (gpointer user_data) } static gboolean -hw_is_up (NMDevice *device) -{ - return nm_system_iface_is_up (nm_device_get_ip_ifindex (device)); -} - -static gboolean hw_bring_up (NMDevice *device, gboolean *no_firmware) { if (!NM_DEVICE_WIFI_GET_PRIVATE (device)->enabled) return FALSE; - return nm_system_iface_set_up (nm_device_get_ip_ifindex (device), TRUE, no_firmware); -} - -static void -hw_take_down (NMDevice *device) -{ - nm_system_iface_set_up (nm_device_get_ip_ifindex (device), FALSE, NULL); + return NM_DEVICE_CLASS (nm_device_wifi_parent_class)->hw_bring_up (device, no_firmware); } static gboolean @@ -843,19 +833,6 @@ bring_up (NMDevice *dev) return TRUE; } -static void -_update_hw_addr (NMDeviceWifi *self, const guint8 *addr) -{ - NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - - g_return_if_fail (addr != NULL); - - if (memcmp (&priv->hw_addr, addr, ETH_ALEN)) { - memcpy (&priv->hw_addr, addr, ETH_ALEN); - g_object_notify (G_OBJECT (self), NM_DEVICE_WIFI_HW_ADDRESS); - } -} - static gboolean _set_hw_addr (NMDeviceWifi *self, const guint8 *addr, const char *detail) { @@ -880,12 +857,12 @@ _set_hw_addr (NMDeviceWifi *self, const guint8 *addr, const char *detail) } /* Can't change MAC address while device is up */ - hw_take_down (dev); + nm_device_hw_take_down (dev, FALSE); success = nm_system_iface_set_mac (nm_device_get_ip_ifindex (dev), (struct ether_addr *) addr); if (success) { /* MAC address succesfully changed; update the current MAC to match */ - _update_hw_addr (self, addr); + update_hw_address (dev); nm_log_info (LOGD_DEVICE | LOGD_ETHER, "(%s): %s MAC address to %s", iface, detail, mac_str); } else { @@ -1409,7 +1386,6 @@ get_best_auto_connection (NMDevice *dev, for (iter = connections; iter; iter = g_slist_next (iter)) { NMConnection *connection = NM_CONNECTION (iter->data); - NMSettingConnection *s_con; NMSettingWireless *s_wireless; const GByteArray *mac; const GSList *mac_blacklist, *mac_blacklist_iter; @@ -1418,12 +1394,7 @@ get_best_auto_connection (NMDevice *dev, const char *method = NULL; guint64 timestamp = 0; - s_con = nm_connection_get_setting_connection (connection); - if (s_con == NULL) - continue; - if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIRELESS_SETTING_NAME)) - continue; - if (!nm_setting_connection_get_autoconnect (s_con)) + if (!nm_connection_is_type (connection, NM_SETTING_WIRELESS_SETTING_NAME)) continue; /* Don't autoconnect to networks that have been tried at least once @@ -1483,25 +1454,6 @@ get_best_auto_connection (NMDevice *dev, return NULL; } -/* - * nm_device_wifi_get_address - * - * Get a device's hardware address - * - */ -void -nm_device_wifi_get_address (NMDeviceWifi *self, - struct ether_addr *addr) -{ - NMDeviceWifiPrivate *priv; - - g_return_if_fail (self != NULL); - g_return_if_fail (addr != NULL); - - priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - memcpy (addr, &priv->hw_addr, sizeof (struct ether_addr)); -} - static void ap_list_dump (NMDeviceWifi *self) { @@ -2878,26 +2830,16 @@ error: static void update_hw_address (NMDevice *dev) { - NMDeviceWifi *self = NM_DEVICE_WIFI (dev); - struct ifreq req; - int fd; + NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (dev); + gsize addrlen; + gboolean changed = FALSE; - fd = socket (PF_INET, SOCK_DGRAM, 0); - if (fd < 0) { - nm_log_err (LOGD_HW, "could not open control socket."); - return; + addrlen = nm_device_read_hwaddr (dev, priv->hw_addr, sizeof (priv->hw_addr), &changed); + if (addrlen) { + g_return_if_fail (addrlen == ETH_ALEN); + if (changed) + g_object_notify (G_OBJECT (dev), NM_DEVICE_WIFI_HW_ADDRESS); } - - memset (&req, 0, sizeof (struct ifreq)); - strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); - errno = 0; - if (ioctl (fd, SIOCGIFHWADDR, &req) < 0) { - nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): unable to read hardware address (error %d)", - nm_device_get_iface (dev), errno); - } else - _update_hw_addr (self, (const guint8 *) &req.ifr_hwaddr.sa_data); - - close (fd); } static void @@ -2969,6 +2911,15 @@ update_initial_hw_address (NMDevice *dev) g_free (mac_str); } +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (device); + + *out_len = ETH_ALEN; + return priv->hw_addr; +} + static NMActStageReturn act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) { @@ -3789,13 +3740,12 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) parent_class->get_type_capabilities = get_type_capabilities; parent_class->get_generic_capabilities = get_generic_capabilities; - parent_class->hw_is_up = hw_is_up; parent_class->hw_bring_up = hw_bring_up; - parent_class->hw_take_down = hw_take_down; parent_class->is_up = is_up; parent_class->bring_up = bring_up; parent_class->take_down = take_down; parent_class->update_hw_address = update_hw_address; + parent_class->get_hw_address = get_hw_address; parent_class->update_permanent_hw_address = update_permanent_hw_address; parent_class->update_initial_hw_address = update_initial_hw_address; parent_class->get_best_auto_connection = get_best_auto_connection; diff --git a/src/nm-device-wifi.h b/src/nm-device-wifi.h index 26d66ffcf..425b85251 100644 --- a/src/nm-device-wifi.h +++ b/src/nm-device-wifi.h @@ -94,8 +94,6 @@ NMDevice *nm_device_wifi_new (const char *udi, const char *iface, const char *driver); -void nm_device_wifi_get_address (NMDeviceWifi *dev, struct ether_addr *addr); - NMAccessPoint * nm_device_wifi_get_activation_ap (NMDeviceWifi *self); RfKillState nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self); diff --git a/src/nm-device-wired.c b/src/nm-device-wired.c index 44510fc63..6d4596302 100644 --- a/src/nm-device-wired.c +++ b/src/nm-device-wired.c @@ -49,9 +49,6 @@ G_DEFINE_TYPE (NMDeviceWired, nm_device_wired, NM_TYPE_DEVICE) #define NM_DEVICE_WIRED_LOG_LEVEL(dev) ((nm_device_get_device_type (dev) == NM_DEVICE_TYPE_INFINIBAND) ? LOGD_INFINIBAND : LOGD_ETHER) typedef struct { - guint8 hw_addr[NM_UTILS_HWADDR_LEN_MAX]; /* Currently set MAC address */ - guint hw_addr_type; - guint hw_addr_len; gboolean carrier; guint32 speed; @@ -134,31 +131,37 @@ carrier_action_defer_clear (NMDeviceWired *self) } } -static gboolean -carrier_action_defer_cb (gpointer user_data) +static void +carrier_action (NMDeviceWired *self, NMDeviceState state, gboolean carrier) { - NMDeviceWired *self = NM_DEVICE_WIRED (user_data); - NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self); - NMDeviceState state; + NMDevice *device = NM_DEVICE (self); - priv->carrier_action_defer_id = 0; - - state = nm_device_get_state (NM_DEVICE (self)); if (state == NM_DEVICE_STATE_UNAVAILABLE) { - if (priv->carrier) - nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER); + if (carrier) + nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER); else { /* clear any queued state changes if they wouldn't be valid when the * carrier is off. */ - if (nm_device_queued_state_peek (NM_DEVICE (self)) >= NM_DEVICE_STATE_DISCONNECTED) - nm_device_queued_state_clear (NM_DEVICE (self)); + if (nm_device_queued_state_peek (device) >= NM_DEVICE_STATE_DISCONNECTED) + nm_device_queued_state_clear (device); } } else if (state >= NM_DEVICE_STATE_DISCONNECTED) { - if (!priv->carrier) - nm_device_queue_state (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_CARRIER); + if (!carrier && !nm_device_get_enslaved (device)) + nm_device_queue_state (device, NM_DEVICE_STATE_UNAVAILABLE, NM_DEVICE_STATE_REASON_CARRIER); } +} +static gboolean +carrier_action_defer_cb (gpointer user_data) +{ + NMDeviceWired *self = NM_DEVICE_WIRED (user_data); + NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self); + + priv->carrier_action_defer_id = 0; + NM_DEVICE_WIRED_GET_CLASS (self)->carrier_action (self, + nm_device_get_state (NM_DEVICE (self)), + priv->carrier); return FALSE; } @@ -167,13 +170,11 @@ set_carrier (NMDeviceWired *self, const gboolean carrier, const gboolean defer_action) { - NMDeviceWiredPrivate *priv; + NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self); + NMDevice *device = NM_DEVICE (self); NMDeviceState state; guint32 caps; - g_return_if_fail (NM_IS_DEVICE (self)); - - priv = NM_DEVICE_WIRED_GET_PRIVATE (self); if (priv->carrier == carrier) return; @@ -184,22 +185,32 @@ set_carrier (NMDeviceWired *self, * doesn't support carrier detect. These devices assume * the carrier is always up. */ - caps = nm_device_get_capabilities (NM_DEVICE (self)); + caps = nm_device_get_capabilities (device); g_return_if_fail (caps & NM_DEVICE_CAP_CARRIER_DETECT); priv->carrier = carrier; - g_object_notify (G_OBJECT (self), "carrier"); - state = nm_device_get_state (NM_DEVICE (self)); + state = nm_device_get_state (device); if (state >= NM_DEVICE_STATE_UNAVAILABLE) { - nm_log_info (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (NM_DEVICE (self)), + nm_log_info (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (device), "(%s): carrier now %s (device state %d%s)", - nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_iface (device), carrier ? "ON" : "OFF", state, defer_action ? ", deferring action for 4 seconds" : ""); } + g_object_notify (G_OBJECT (self), "carrier"); + + /* Retry IP configuration for master devices now that the carrier is on */ + if (nm_device_is_master (device) && priv->carrier) { + if (nm_device_activate_ip4_state_in_wait (device)) + nm_device_activate_stage3_ip4_start (device); + + if (nm_device_activate_ip6_state_in_wait (device)) + nm_device_activate_stage3_ip6_start (device); + } + if (defer_action) priv->carrier_action_defer_id = g_timeout_add_seconds (4, carrier_action_defer_cb, self); else @@ -301,22 +312,6 @@ constructor (GType type, nm_device_get_iface (NM_DEVICE (self)), nm_device_get_ifindex (NM_DEVICE (self))); - if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_ETHERNET) { - priv->hw_addr_type = ARPHRD_ETHER; - priv->hw_addr_len = ETH_ALEN; - } else if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_INFINIBAND) { - priv->hw_addr_type = ARPHRD_INFINIBAND; - priv->hw_addr_len = INFINIBAND_ALEN; - } else if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_BOND) { - /* We may not know the hardware address type until a slave is added */ - priv->hw_addr_type = ARPHRD_ETHER; - priv->hw_addr_len = ETH_ALEN; - } else if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_BRIDGE) { - priv->hw_addr_type = ARPHRD_ETHER; - priv->hw_addr_len = ETH_ALEN; - } else - g_assert_not_reached (); - caps = nm_device_get_capabilities (self); if (caps & NM_DEVICE_CAP_CARRIER_DETECT) { /* Only listen to netlink for cards that support carrier detect */ @@ -357,70 +352,20 @@ nm_device_wired_init (NMDeviceWired * self) } static gboolean -hw_is_up (NMDevice *device) -{ - return nm_system_iface_is_up (nm_device_get_ip_ifindex (device)); -} - -static gboolean hw_bring_up (NMDevice *dev, gboolean *no_firmware) { - gboolean success, carrier; + gboolean result, carrier; guint32 caps; - success = nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), TRUE, no_firmware); - if (success) { + result = NM_DEVICE_CLASS(nm_device_wired_parent_class)->hw_bring_up (dev, no_firmware); + if (result) { caps = nm_device_get_capabilities (dev); if (caps & NM_DEVICE_CAP_CARRIER_DETECT) { carrier = get_carrier_sync (NM_DEVICE_WIRED (dev)); set_carrier (NM_DEVICE_WIRED (dev), carrier, carrier ? FALSE : TRUE); } } - return success; -} - -static void -hw_take_down (NMDevice *dev) -{ - nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), FALSE, NULL); -} - -static void -update_hw_address (NMDevice *dev) -{ - NMDeviceWired *self = NM_DEVICE_WIRED (dev); - NMDeviceWiredPrivate *priv = NM_DEVICE_WIRED_GET_PRIVATE (self); - struct rtnl_link *rtnl; - struct nl_addr *addr; - - rtnl = nm_netlink_index_to_rtnl_link (nm_device_get_ip_ifindex (dev)); - if (!rtnl) { - nm_log_err (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (dev), - "(%s) failed to read hardware address (error %d)", - nm_device_get_iface (dev), errno); - return; - } - - addr = rtnl_link_get_addr (rtnl); - if (!addr) { - nm_log_err (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (dev), - "(%s) no hardware address?", - nm_device_get_iface (dev)); - rtnl_link_put (rtnl); - return; - } - - if (nl_addr_get_len (addr) != priv->hw_addr_len) { - nm_log_err (LOGD_HW | NM_DEVICE_WIRED_LOG_LEVEL (dev), - "(%s) hardware address is wrong length (expected %d got %d)", - nm_device_get_iface (dev), - priv->hw_addr_len, nl_addr_get_len (addr)); - } else { - memcpy (&priv->hw_addr, nl_addr_get_binary_addr (addr), - priv->hw_addr_len); - } - - rtnl_link_put (rtnl); + return result; } static gboolean @@ -468,6 +413,36 @@ connection_match_config (NMDevice *self, const GSList *connections) return NULL; } +static NMActStageReturn +act_stage3_ip4_config_start (NMDevice *device, + NMIP4Config **out_config, + NMDeviceStateReason *reason) +{ + if (nm_device_is_master (device) && !nm_device_wired_get_carrier (NM_DEVICE_WIRED (device))) { + nm_log_info (LOGD_IP4 | NM_DEVICE_WIRED_LOG_LEVEL (device), + "(%s): IPv4 config waiting until carrier is on", + nm_device_get_ip_iface (device)); + return NM_ACT_STAGE_RETURN_WAIT; + } + + return NM_DEVICE_CLASS (nm_device_wired_parent_class)->act_stage3_ip4_config_start (device, out_config, reason); +} + +static NMActStageReturn +act_stage3_ip6_config_start (NMDevice *device, + NMIP6Config **out_config, + NMDeviceStateReason *reason) +{ + if (nm_device_is_master (device) && !nm_device_wired_get_carrier (NM_DEVICE_WIRED (device))) { + nm_log_info (LOGD_IP6 | NM_DEVICE_WIRED_LOG_LEVEL (device), + "(%s): IPv6 config waiting until carrier is on", + nm_device_get_ip_iface (device)); + return NM_ACT_STAGE_RETURN_WAIT; + } + + return NM_DEVICE_CLASS (nm_device_wired_parent_class)->act_stage3_ip6_config_start (device, out_config, reason); +} + static void dispose (GObject *object) { @@ -498,6 +473,7 @@ nm_device_wired_class_init (NMDeviceWiredClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); NMDeviceClass *parent_class = NM_DEVICE_CLASS (klass); + NMDeviceWiredClass *wired_class = NM_DEVICE_WIRED_CLASS (klass); g_type_class_add_private (object_class, sizeof (NMDeviceWiredPrivate)); @@ -505,75 +481,14 @@ nm_device_wired_class_init (NMDeviceWiredClass *klass) object_class->constructor = constructor; object_class->dispose = dispose; - parent_class->hw_is_up = hw_is_up; parent_class->hw_bring_up = hw_bring_up; - parent_class->hw_take_down = hw_take_down; parent_class->can_interrupt_activation = can_interrupt_activation; - parent_class->update_hw_address = update_hw_address; parent_class->is_available = is_available; parent_class->connection_match_config = connection_match_config; -} - -/** - * nm_device_wired_get_hwaddr: - * @dev: an #NMDeviceWired - * - * Get a device's hardware address - * - * Returns: (transfer none): @dev's hardware address - */ -const guint8 * -nm_device_wired_get_hwaddr (NMDeviceWired *dev) -{ - NMDeviceWiredPrivate *priv; - - g_return_val_if_fail (dev != NULL, NULL); + parent_class->act_stage3_ip4_config_start = act_stage3_ip4_config_start; + parent_class->act_stage3_ip6_config_start = act_stage3_ip6_config_start; - priv = NM_DEVICE_WIRED_GET_PRIVATE (dev); - return priv->hw_addr; -} - -/** - * nm_device_wired_set_hwaddr: - * @dev: an #NMDeviceWired - * @addr: the new hardware address, @addrlen bytes in length - * @addrlen: the length in bytes of @addr - * - * Sets the device's hardware address. - */ -void -nm_device_wired_set_hwaddr (NMDeviceWired *dev, - const guint8 *addr, - guint addrlen) -{ - NMDeviceWiredPrivate *priv; - - g_return_if_fail (dev != NULL); - g_return_if_fail (addr != NULL); - - priv = NM_DEVICE_WIRED_GET_PRIVATE (dev); - g_return_if_fail (addrlen == priv->hw_addr_len); - - memcpy (priv->hw_addr, addr, priv->hw_addr_len); -} - -/** - * nm_device_wired_get_hwaddr_type: - * @dev: an #NMDeviceWired - * - * Get the type of a device's hardware address - * - * Returns: the type of @dev's hardware address - */ -int -nm_device_wired_get_hwaddr_type (NMDeviceWired *dev) -{ - NMDeviceWiredPrivate *priv; - - g_return_val_if_fail (dev != NULL, -1); - - priv = NM_DEVICE_WIRED_GET_PRIVATE (dev); - return priv->hw_addr_type; + wired_class->carrier_action = carrier_action; } /** diff --git a/src/nm-device-wired.h b/src/nm-device-wired.h index 3180ee45a..a80843521 100644 --- a/src/nm-device-wired.h +++ b/src/nm-device-wired.h @@ -42,15 +42,13 @@ typedef struct { typedef struct { NMDeviceClass parent; + void (*carrier_action) (NMDeviceWired *self, + NMDeviceState state, + gboolean carrier); } NMDeviceWiredClass; GType nm_device_wired_get_type (void); -const guint8 *nm_device_wired_get_hwaddr (NMDeviceWired *dev); -void nm_device_wired_set_hwaddr (NMDeviceWired *dev, - const guint8 *addr, - guint addrlen); -int nm_device_wired_get_hwaddr_type (NMDeviceWired *dev); gboolean nm_device_wired_get_carrier (NMDeviceWired *dev); guint32 nm_device_wired_get_speed (NMDeviceWired *dev); diff --git a/src/nm-device.c b/src/nm-device.c index c4cfbce03..b08106800 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -126,6 +126,7 @@ enum { PROP_RFKILL_TYPE, PROP_IFINDEX, PROP_AVAILABLE_CONNECTIONS, + PROP_IS_MASTER, LAST_PROP }; @@ -250,8 +251,9 @@ typedef struct { NMDevice * master; gboolean enslaved; - /* list of SlaveInfo for bond/bridge master */ - GSList * slaves; + /* slave management */ + gboolean is_master; + GSList * slaves; /* list of SlaveInfo */ NMConnectionProvider *con_provider; @@ -498,6 +500,14 @@ nm_device_hw_is_up (NMDevice *self) return TRUE; } +static gboolean +hw_is_up (NMDevice *device) +{ + int ifindex = nm_device_get_ip_ifindex (device); + + return ifindex > 0 ? nm_system_iface_is_up (ifindex) : TRUE; +} + static guint32 get_generic_capabilities (NMDevice *dev) { @@ -603,6 +613,18 @@ nm_device_set_ip_iface (NMDevice *self, const char *iface) g_free (old_ip_iface); } +const guint8 * +nm_device_get_hw_address (NMDevice *dev, guint *out_len) +{ + g_return_val_if_fail (dev != NULL, NULL); + g_return_val_if_fail (NM_IS_DEVICE (dev), NULL); + g_return_val_if_fail (out_len != NULL, NULL); + g_return_val_if_fail (*out_len == 0, NULL); + + if (NM_DEVICE_GET_CLASS (dev)->get_hw_address) + return NM_DEVICE_GET_CLASS (dev)->get_hw_address (dev, out_len); + return NULL; +} /* * Get/set functions for driver @@ -830,6 +852,25 @@ nm_device_enslave_slave (NMDevice *dev, NMDevice *slave, NMConnection *connectio info->enslaved = TRUE; nm_device_slave_notify_enslaved (info->slave, TRUE, FALSE); } + + /* Ensure the device's hardware address is up-to-date; it often changes + * when slaves change. + */ + if (NM_DEVICE_GET_CLASS (dev)->update_hw_address) + NM_DEVICE_GET_CLASS (dev)->update_hw_address (dev); + + /* Restart IP configuration if we're waiting for slaves. Do this + * after updating the hardware address as IP config may need the + * new address. + */ + if (success) { + if (NM_DEVICE_GET_PRIVATE (dev)->ip4_state == IP_WAIT) + nm_device_activate_stage3_ip4_start (dev); + + if (NM_DEVICE_GET_PRIVATE (dev)->ip6_state == IP_WAIT) + nm_device_activate_stage3_ip6_start (dev); + } + return success; } @@ -867,6 +908,13 @@ nm_device_release_one_slave (NMDevice *dev, NMDevice *slave, gboolean failed) priv->slaves = g_slist_remove (priv->slaves, info); free_slave_info (info); + + /* Ensure the device's hardware address is up-to-date; it often changes + * when slaves change. + */ + if (NM_DEVICE_GET_CLASS (dev)->update_hw_address) + NM_DEVICE_GET_CLASS (dev)->update_hw_address (dev); + return success; } @@ -907,8 +955,10 @@ slave_state_changed (NMDevice *slave, if (release) { nm_device_release_one_slave (self, slave, FALSE); - if (priv->slaves == NULL) { - /* FIXME: all slaves gone; do something? */ + /* Bridge/bond interfaces are left up until manually deactivated */ + if (priv->slaves == NULL && priv->state == NM_DEVICE_STATE_ACTIVATED) { + nm_log_dbg (LOGD_DEVICE, "(%s): last slave removed; remaining activated", + nm_device_get_iface (self)); } } } @@ -964,6 +1014,40 @@ nm_device_master_get_slaves (NMDevice *dev) return slaves; } +/** + * nm_device_master_get_slave_by_ifindex: + * @dev: the master device + * @ifindex: the slave's interface index + * + * Returns: the slave with the given @ifindex of which @device is the master, + * or %NULL if no device with @ifinidex is a slave of @device. + */ +NMDevice * +nm_device_master_get_slave_by_ifindex (NMDevice *dev, int ifindex) +{ + GSList *iter; + + for (iter = NM_DEVICE_GET_PRIVATE (dev)->slaves; iter; iter = g_slist_next (iter)) { + SlaveInfo *info = iter->data; + + if (nm_device_get_ip_ifindex (info->slave) == ifindex) + return info->slave; + } + return NULL; +} + +/** + * nm_device_is_master: + * @dev: the device + * + * Returns: whether @dev can enslave other devices (eg, bridge or bond) + */ +gboolean +nm_device_is_master (NMDevice *dev) +{ + return NM_DEVICE_GET_PRIVATE (dev)->is_master; +} + /* release all slaves */ static void nm_device_master_release_slaves (NMDevice *self, gboolean failed) @@ -997,9 +1081,8 @@ nm_device_slave_notify_enslaved (NMDevice *dev, NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (dev); NMConnection *connection = nm_device_get_connection (dev); - g_assert (priv->master); - if (enslaved) { + g_assert (priv->master); g_warn_if_fail (priv->enslaved == FALSE); g_warn_if_fail (priv->state == NM_DEVICE_STATE_IP_CONFIG); @@ -1019,25 +1102,41 @@ nm_device_slave_notify_enslaved (NMDevice *dev, NMDeviceState new_state = NM_DEVICE_STATE_DISCONNECTED; NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; - if (master_failed) { - new_state = NM_DEVICE_STATE_FAILED; - reason = NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED; + if ( priv->state > NM_DEVICE_STATE_DISCONNECTED + && priv->state <= NM_DEVICE_STATE_ACTIVATED) { + if (master_failed) { + new_state = NM_DEVICE_STATE_FAILED; + reason = NM_DEVICE_STATE_REASON_DEPENDENCY_FAILED; + + nm_log_warn (LOGD_DEVICE, + "Activation (%s) connection '%s' master failed", + nm_device_get_iface (dev), + nm_connection_get_id (connection)); + } else { + nm_log_dbg (LOGD_DEVICE, + "Activation (%s) connection '%s' master deactivated", + nm_device_get_iface (dev), + nm_connection_get_id (connection)); + } - nm_log_warn (LOGD_DEVICE, - "Activation (%s) connection '%s' master failed", - nm_device_get_iface (dev), - nm_connection_get_id (connection)); - } else { - nm_log_dbg (LOGD_DEVICE, - "Activation (%s) connection '%s' master deactivated", - nm_device_get_iface (dev), - nm_connection_get_id (connection)); + nm_device_queue_state (dev, new_state, reason); } - - nm_device_queue_state (dev, new_state, reason); } } +/** + * nm_device_get_enslaved: + * @device: the #NMDevice + * + * Returns: %TRUE if the device is enslaved to a master device (eg bridge or + * bond), %FALSE if not + */ +gboolean +nm_device_get_enslaved (NMDevice *device) +{ + return NM_DEVICE_GET_PRIVATE (device)->enslaved; +} + /* * nm_device_get_act_request * @@ -1141,6 +1240,8 @@ nm_device_get_best_auto_connection (NMDevice *dev, char **specific_object) { guint32 caps; + GSList *iter, *available_conns; + NMConnection *best_connection; g_return_val_if_fail (NM_IS_DEVICE (dev), NULL); g_return_val_if_fail (specific_object != NULL, NULL); @@ -1154,7 +1255,24 @@ nm_device_get_best_auto_connection (NMDevice *dev, if (!NM_DEVICE_GET_CLASS (dev)->get_best_auto_connection) return NULL; - return NM_DEVICE_GET_CLASS (dev)->get_best_auto_connection (dev, connections, specific_object); + available_conns = NULL; + for (iter = connections; iter; iter = iter->next) { + NMConnection *connection = NM_CONNECTION (iter->data); + NMSettingConnection *s_con; + + s_con = nm_connection_get_setting_connection (connection); + g_assert (s_con); + if (nm_setting_connection_get_autoconnect (s_con)) + available_conns = g_slist_prepend (available_conns, connection); + } + + if (!available_conns) + return NULL; + + best_connection = NM_DEVICE_GET_CLASS (dev)->get_best_auto_connection (dev, available_conns, specific_object); + + g_slist_free (available_conns); + return best_connection; } gboolean @@ -1903,6 +2021,9 @@ dhcp4_start (NMDevice *self, NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMSettingIP4Config *s_ip4; guint8 *anycast = NULL; + GByteArray *tmp = NULL; + guint hwaddr_len = 0; + const guint8 *hwaddr; s_ip4 = nm_connection_get_setting_ip4_config (connection); @@ -1914,14 +2035,25 @@ dhcp4_start (NMDevice *self, g_object_unref (priv->dhcp4_config); priv->dhcp4_config = nm_dhcp4_config_new (); + hwaddr = nm_device_get_hw_address (self, &hwaddr_len); + if (hwaddr) { + tmp = g_byte_array_sized_new (hwaddr_len); + g_byte_array_append (tmp, hwaddr, hwaddr_len); + } + /* Begin DHCP on the interface */ g_warn_if_fail (priv->dhcp4_client == NULL); priv->dhcp4_client = nm_dhcp_manager_start_ip4 (priv->dhcp_manager, nm_device_get_ip_iface (self), + tmp, nm_connection_get_uuid (connection), s_ip4, priv->dhcp_timeout, anycast); + + if (tmp) + g_byte_array_free (tmp, TRUE); + if (!priv->dhcp4_client) { *reason = NM_DEVICE_STATE_REASON_DHCP_START_FAILED; return NM_ACT_STAGE_RETURN_FAILURE; @@ -2026,6 +2158,35 @@ shared4_new_config (NMDevice *self, NMDeviceStateReason *reason) /*********************************************/ +static gboolean +have_any_ready_slaves (NMDevice *device, const GSList *slaves) +{ + const GSList *iter; + + /* Any enslaved slave is "ready" in the generic case as it's + * at least >= NM_DEVCIE_STATE_IP_CONFIG and has had Layer 2 + * properties set up. + */ + for (iter = slaves; iter; iter = g_slist_next (iter)) { + if (nm_device_get_enslaved (iter->data)) + return TRUE; + } + return FALSE; +} + +static gboolean +ip4_requires_slaves (NMConnection *connection) +{ + NMSettingIP4Config *s_ip4; + const char *method = NM_SETTING_IP4_CONFIG_METHOD_AUTO; + + s_ip4 = nm_connection_get_setting_ip4_config (connection); + if (s_ip4) + method = nm_setting_ip4_config_get_method (s_ip4); + + return g_strcmp0 (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0; +} + static NMActStageReturn act_stage3_ip4_config_start (NMDevice *self, NMIP4Config **out_config, @@ -2036,12 +2197,30 @@ act_stage3_ip4_config_start (NMDevice *self, NMSettingIP4Config *s_ip4; NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; const char *method = NM_SETTING_IP4_CONFIG_METHOD_AUTO; + GSList *slaves; + gboolean ready_slaves; g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); connection = nm_device_get_connection (self); g_assert (connection); + if (priv->is_master && ip4_requires_slaves (connection)) { + /* If the master has no ready slaves, and depends on slaves for + * a successful IPv4 attempt, then postpone IPv4 addressing. + */ + slaves = nm_device_master_get_slaves (self); + ready_slaves = NM_DEVICE_GET_CLASS (self)->have_any_ready_slaves (self, slaves); + g_slist_free (slaves); + + if (ready_slaves == FALSE) { + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "(%s): IPv4 config waiting until slaves are ready", + nm_device_get_ip_iface (self)); + return NM_ACT_STAGE_RETURN_WAIT; + } + } + /* If we did not receive IP4 configuration information, default to DHCP */ s_ip4 = nm_connection_get_setting_ip4_config (connection); if (s_ip4) @@ -2286,7 +2465,9 @@ dhcp6_start (NMDevice *self, NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; guint8 *anycast = NULL; - const char *ip_iface; + GByteArray *tmp = NULL; + guint hwaddr_len = 0; + const guint8 *hwaddr; if (!connection) { connection = nm_device_get_connection (self); @@ -2309,14 +2490,23 @@ dhcp6_start (NMDevice *self, priv->dhcp6_ip6_config = NULL; } - ip_iface = nm_device_get_ip_iface (self); + hwaddr = nm_device_get_hw_address (self, &hwaddr_len); + if (hwaddr) { + tmp = g_byte_array_sized_new (hwaddr_len); + g_byte_array_append (tmp, hwaddr, hwaddr_len); + } + priv->dhcp6_client = nm_dhcp_manager_start_ip6 (priv->dhcp_manager, - ip_iface, + nm_device_get_ip_iface (self), + tmp, nm_connection_get_uuid (connection), nm_connection_get_setting_ip6_config (connection), priv->dhcp_timeout, anycast, (dhcp_opt == IP6_DHCP_OPT_OTHERCONF) ? TRUE : FALSE); + if (tmp) + g_byte_array_free (tmp, TRUE); + if (priv->dhcp6_client) { priv->dhcp6_state_sigid = g_signal_connect (priv->dhcp6_client, "state-changed", @@ -2448,6 +2638,8 @@ addrconf6_start (NMDevice *self) NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMConnection *connection; gboolean success; + const guint8 *hwaddr; + guint hwaddr_len = 0; connection = nm_device_get_connection (self); g_assert (connection); @@ -2470,8 +2662,12 @@ addrconf6_start (NMDevice *self) self); } + hwaddr = nm_device_get_hw_address (self, &hwaddr_len); + g_warn_if_fail (hwaddr != NULL); success = nm_ip6_manager_prepare_interface (priv->ip6_manager, nm_device_get_ip_ifindex (self), + hwaddr, + hwaddr_len, nm_connection_get_setting_ip6_config (connection), priv->ip6_accept_ra_path); if (success) { @@ -2555,6 +2751,25 @@ done: return ret; } +static gboolean +ip6_requires_slaves (NMConnection *connection) +{ + NMSettingIP6Config *s_ip6; + const char *method = NM_SETTING_IP6_CONFIG_METHOD_AUTO; + + s_ip6 = nm_connection_get_setting_ip6_config (connection); + if (s_ip6) + method = nm_setting_ip6_config_get_method (s_ip6); + + /* SLAAC, DHCP, and Link-Local depend on connectivity (and thus slaves) + * to complete addressing. SLAAC and DHCP obviously need a peer to + * provide a prefix, while Link-Local must perform DAD on the local link. + */ + return g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0 + || g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_DHCP) == 0 + || g_strcmp0 (method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) == 0; +} + static NMActStageReturn act_stage3_ip6_config_start (NMDevice *self, NMIP6Config **out_config, @@ -2568,6 +2783,8 @@ act_stage3_ip6_config_start (NMDevice *self, int conf_use_tempaddr; NMSettingIP6ConfigPrivacy ip6_privacy = NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN; const char *ip6_privacy_str = "0\n"; + GSList *slaves; + gboolean ready_slaves; g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); @@ -2576,6 +2793,22 @@ act_stage3_ip6_config_start (NMDevice *self, ip_iface = nm_device_get_ip_iface (self); + if (priv->is_master && ip6_requires_slaves (connection)) { + /* If the master has no ready slaves, and depends on slaves for + * a successful IPv6 attempt, then postpone IPv6 addressing. + */ + slaves = nm_device_master_get_slaves (self); + ready_slaves = NM_DEVICE_GET_CLASS (self)->have_any_ready_slaves (self, slaves); + g_slist_free (slaves); + + if (ready_slaves == FALSE) { + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "(%s): IPv6 config waiting until slaves are ready", + ip_iface); + return NM_ACT_STAGE_RETURN_WAIT; + } + } + update_accept_ra_save (self); update_ip6_privacy_save (self); @@ -3247,6 +3480,13 @@ nm_device_activate_ip4_state_in_conf (NMDevice *self) return NM_DEVICE_GET_PRIVATE (self)->ip4_state == IP_CONF; } +gboolean +nm_device_activate_ip4_state_in_wait (NMDevice *self) +{ + g_return_val_if_fail (self != NULL, FALSE); + return NM_DEVICE_GET_PRIVATE (self)->ip4_state == IP_WAIT; +} + static gboolean nm_device_activate_ip6_config_commit (gpointer user_data) { @@ -3339,6 +3579,13 @@ nm_device_activate_ip6_state_in_conf (NMDevice *self) return NM_DEVICE_GET_PRIVATE (self)->ip6_state == IP_CONF; } +gboolean +nm_device_activate_ip6_state_in_wait (NMDevice *self) +{ + g_return_val_if_fail (self != NULL, FALSE); + return NM_DEVICE_GET_PRIVATE (self)->ip6_state == IP_WAIT; +} + static void clear_act_request (NMDevice *self) { @@ -3553,10 +3800,10 @@ nm_device_deactivate (NMDevice *self, NMDeviceStateReason reason) NM_DEVICE_GET_CLASS (self)->deactivate (self); /* master: release slaves */ - g_clear_object (&priv->master); nm_device_master_release_slaves (self, FALSE); /* slave: mark no longer enslaved */ + g_clear_object (&priv->master); priv->enslaved = FALSE; /* Tear down an existing activation request */ @@ -3919,6 +4166,14 @@ out: return TRUE; } +static gboolean +hw_bring_up (NMDevice *device, gboolean *no_firmware) +{ + int ifindex = nm_device_get_ip_ifindex (device); + + return ifindex > 0 ? nm_system_iface_set_up (ifindex, TRUE, no_firmware) : TRUE; +} + void nm_device_hw_take_down (NMDevice *self, gboolean block) { @@ -3939,6 +4194,12 @@ nm_device_hw_take_down (NMDevice *self, gboolean block) g_usleep (200); } +static void +hw_take_down (NMDevice *device) +{ + nm_system_iface_set_up (nm_device_get_ip_ifindex (device), FALSE, NULL); +} + static gboolean nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) { @@ -4177,6 +4438,9 @@ set_property (GObject *object, guint prop_id, case PROP_RFKILL_TYPE: priv->rfkill_type = g_value_get_uint (value); break; + case PROP_IS_MASTER: + priv->is_master = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -4299,6 +4563,9 @@ get_property (GObject *object, guint prop_id, g_ptr_array_add (array, g_strdup (nm_connection_get_path (connection))); g_value_take_boxed (value, array); break; + case PROP_IS_MASTER: + g_value_set_boolean (value, priv->is_master); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -4329,7 +4596,12 @@ nm_device_class_init (NMDeviceClass *klass) klass->act_stage3_ip6_config_start = act_stage3_ip6_config_start; klass->act_stage4_ip4_config_timeout = act_stage4_ip4_config_timeout; klass->act_stage4_ip6_config_timeout = act_stage4_ip6_config_timeout; + klass->have_any_ready_slaves = have_any_ready_slaves; + klass->check_connection_available = check_connection_available; + klass->hw_is_up = hw_is_up; + klass->hw_bring_up = hw_bring_up; + klass->hw_take_down = hw_take_down; /* Properties */ g_object_class_install_property @@ -4517,6 +4789,14 @@ nm_device_class_init (NMDeviceClass *klass) DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, G_PARAM_READABLE)); + g_object_class_install_property + (object_class, PROP_IS_MASTER, + g_param_spec_boolean (NM_DEVICE_IS_MASTER, + "IsMaster", + "IsMaster", + FALSE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + /* Signals */ signals[STATE_CHANGED] = g_signal_new ("state-changed", @@ -5015,9 +5295,9 @@ nm_device_set_managed (NMDevice *device, return; priv->managed = managed; - nm_log_info (LOGD_DEVICE, "(%s): now %s", - nm_device_get_iface (device), - managed ? "managed" : "unmanaged"); + nm_log_dbg (LOGD_DEVICE, "(%s): now %s", + nm_device_get_iface (device), + managed ? "managed" : "unmanaged"); g_object_notify (G_OBJECT (device), NM_DEVICE_MANAGED); @@ -5333,3 +5613,71 @@ nm_device_supports_vlans (NMDevice *device) /* At the moment, NM's VLAN code assumes all VLANs are over ethernet. */ return NM_IS_DEVICE_ETHERNET (device); } + +/** + * nm_device_read_hwaddr: + * @dev: the device + * @buf: an allocated buffer which on success holds the device's hardware + * address + * @buf_len: the size of @buf + * @out_changed: on success, %TRUE if the contents of @buf are different from + * the original contents of @buf when this function was called + * + * Reads the device's hardware address from the kernel and copies it into + * @buf, returning the size of the data copied into @buf. On failure + * @buf is not modified. + * + * Returns: the size of the hardware address in bytes on success, 0 on failure + */ +gsize +nm_device_read_hwaddr (NMDevice *dev, + guint8 *buf, + gsize buf_len, + gboolean *out_changed) +{ + struct rtnl_link *rtnl; + struct nl_addr *addr; + int idx; + gsize addrlen = 0; + const guint8 *binaddr; + + g_return_val_if_fail (dev != NULL, 0); + g_return_val_if_fail (buf != NULL, 0); + g_return_val_if_fail (buf_len > 0, 0); + + idx = nm_device_get_ip_ifindex (dev); + g_return_val_if_fail (idx > 0, 0); + + rtnl = nm_netlink_index_to_rtnl_link (idx); + if (!rtnl) { + nm_log_err (LOGD_HW | LOGD_DEVICE, + "(%s): failed to read hardware address (error %d)", + nm_device_get_iface (dev), errno); + return 0; + } + + addr = rtnl_link_get_addr (rtnl); + if (!addr) { + nm_log_err (LOGD_HW | LOGD_DEVICE, + "(%s): no hardware address?", + nm_device_get_iface (dev)); + goto out; + } + + addrlen = nl_addr_get_len (addr); + if (addrlen > buf_len) { + nm_log_err (LOGD_HW | LOGD_DEVICE, + "(%s): hardware address is wrong length (got %zd max %zd)", + nm_device_get_iface (dev), addrlen, buf_len); + addrlen = 0; + } else { + binaddr = nl_addr_get_binary_addr (addr); + if (out_changed) + *out_changed = memcmp (buf, binaddr, addrlen) ? TRUE : FALSE; + memcpy (buf, binaddr, addrlen); + } + +out: + rtnl_link_put (rtnl); + return addrlen; +} diff --git a/src/nm-device.h b/src/nm-device.h index 05b396225..87e428f59 100644 --- a/src/nm-device.h +++ b/src/nm-device.h @@ -60,6 +60,7 @@ #define NM_DEVICE_TYPE_DESC "type-desc" /* Internal only */ #define NM_DEVICE_RFKILL_TYPE "rfkill-type" /* Internal only */ #define NM_DEVICE_IFINDEX "ifindex" /* Internal only */ +#define NM_DEVICE_IS_MASTER "is-master" /* Internal only */ #define NM_DEVICE_AVAILABLE_CONNECTIONS "available-connections" /* Internal signals */ @@ -112,6 +113,7 @@ typedef struct { void (* update_hw_address) (NMDevice *self); void (* update_permanent_hw_address) (NMDevice *self); void (* update_initial_hw_address) (NMDevice *self); + const guint8 * (* get_hw_address) (NMDevice *self, guint *out_len); guint32 (* get_type_capabilities) (NMDevice *self); guint32 (* get_generic_capabilities) (NMDevice *self); @@ -186,6 +188,9 @@ typedef struct { gboolean (* release_slave) (NMDevice *self, NMDevice *slave); + + gboolean (* have_any_ready_slaves) (NMDevice *self, + const GSList *slaves); } NMDeviceClass; @@ -212,6 +217,8 @@ NMDeviceType nm_device_get_device_type (NMDevice *dev); int nm_device_get_priority (NMDevice *dev); +const guint8 * nm_device_get_hw_address (NMDevice *dev, guint *out_len); + NMDHCP4Config * nm_device_get_dhcp4_config (NMDevice *dev); NMDHCP6Config * nm_device_get_dhcp6_config (NMDevice *dev); @@ -221,6 +228,7 @@ NMIP6Config * nm_device_get_ip6_config (NMDevice *dev); /* Master */ gboolean nm_device_master_add_slave (NMDevice *dev, NMDevice *slave); GSList * nm_device_master_get_slaves (NMDevice *dev); +gboolean nm_device_is_master (NMDevice *dev); /* Slave */ void nm_device_slave_notify_enslaved (NMDevice *dev, diff --git a/src/nm-manager.c b/src/nm-manager.c index fbc9d23d3..3dc60d858 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -165,6 +165,8 @@ static GSList * remove_one_device (NMManager *manager, NMDevice *device, gboolean quitting); +static void rfkill_change_wifi (const char *desc, gboolean enabled); + #define SSD_POKE_INTERVAL 120 #define ORIGDEV_TAG "originating-device" @@ -244,6 +246,8 @@ typedef struct { guint timestamp_update_id; + GHashTable *nm_bridges; + gboolean disposed; } NMManagerPrivate; @@ -1130,6 +1134,92 @@ get_virtual_iface_placeholder_udi (void) return g_strdup_printf ("/virtual/device/placeholder/%d", id++); } +/***************************/ + +/* FIXME: remove when we handle bridges non-destructively */ + +#define NM_BRIDGE_FILE NMRUNDIR "/nm-bridges" + +static void +read_nm_created_bridges (NMManager *self) +{ + NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); + char *contents; + char **lines, **iter; + GTimeVal tv; + glong ts; + + if (!g_file_get_contents (NM_BRIDGE_FILE, &contents, NULL, NULL)) + return; + + g_get_current_time (&tv); + + lines = g_strsplit_set (contents, "\n", 0); + g_free (contents); + + for (iter = lines; iter && *iter; iter++) { + if (g_str_has_prefix (*iter, "ts=")) { + errno = 0; + ts = strtol (*iter + 3, NULL, 10); + /* allow 30 minutes time difference before we ignore the file */ + if (errno || ABS (tv.tv_sec - ts) > 1800) + goto out; + } else if (g_str_has_prefix (*iter, "iface=")) + g_hash_table_insert (priv->nm_bridges, g_strdup (*iter + 6), GUINT_TO_POINTER (1)); + } + +out: + g_strfreev (lines); + unlink (NM_BRIDGE_FILE); +} + +static void +write_nm_created_bridges (NMManager *self) +{ + NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); + GString *br_list; + GSList *iter; + GError *error = NULL; + GTimeVal tv; + gboolean found = FALSE; + + /* write out nm-created bridges list */ + br_list = g_string_sized_new (50); + + /* Timestamp is first line */ + g_get_current_time (&tv); + g_string_append_printf (br_list, "ts=%ld\n", tv.tv_sec); + + for (iter = priv->devices; iter; iter = g_slist_next (iter)) { + NMDevice *device = iter->data; + + if (nm_device_get_device_type (device) == NM_DEVICE_TYPE_BRIDGE) { + g_string_append_printf (br_list, "iface=%s\n", nm_device_get_iface (device)); + found = TRUE; + } + } + + if (found) { + if (!g_file_set_contents (NM_BRIDGE_FILE, br_list->str, -1, &error)) { + nm_log_warn (LOGD_BRIDGE, "Failed to write NetworkManager-created bridge list; " + "on restart bridges may not be recognized. (%s)", + error ? error->message : "unknown"); + g_clear_error (&error); + } + } + g_string_free (br_list, TRUE); +} + +static gboolean +bridge_created_by_nm (NMManager *self, const char *iface) +{ + NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); + + return (priv->nm_bridges && g_hash_table_lookup (priv->nm_bridges, iface)); +} + +/***************************/ + /** * system_create_virtual_device: * @self: the #NMManager @@ -1179,12 +1269,21 @@ system_create_virtual_device (NMManager *self, NMConnection *connection) device = nm_device_bond_new (udi, iface); g_free (udi); } else if (nm_connection_is_type (connection, NM_SETTING_BRIDGE_SETTING_NAME)) { - if (!nm_system_create_bridge (iface)) { + gboolean exists = FALSE; + + if (!nm_system_create_bridge (iface, &exists)) { nm_log_warn (LOGD_DEVICE, "(%s): failed to add bridging interface for '%s'", iface, nm_connection_get_id (connection)); goto out; } + /* FIXME: remove when we handle bridges non-destructively */ + if (exists && !bridge_created_by_nm (self, iface)) { + nm_log_warn (LOGD_DEVICE, "(%s): cannot use existing bridge for '%s'", + iface, nm_connection_get_id (connection)); + goto out; + } + udi = get_virtual_iface_placeholder_udi (); device = nm_device_bridge_new (udi, iface); g_free (udi); @@ -2175,9 +2274,14 @@ udev_device_added_cb (NMUdevManager *udev_mgr, device = nm_device_infiniband_new (sysfs_path, iface, driver); else if (is_bond (ifindex)) device = nm_device_bond_new (sysfs_path, iface); - else if (is_bridge (ifindex)) - device = nm_device_bridge_new (sysfs_path, iface); - else if (is_vlan (ifindex)) { + else if (is_bridge (ifindex)) { + + /* FIXME: always create device when we handle bridges non-destructively */ + if (bridge_created_by_nm (self, iface)) + device = nm_device_bridge_new (sysfs_path, iface); + else + nm_log_info (LOGD_BRIDGE, "(%s): ignoring bridge not created by NetworkManager", iface); + } else if (is_vlan (ifindex)) { int parent_ifindex = -1; NMDevice *parent; @@ -2215,23 +2319,32 @@ udev_device_removed_cb (NMUdevManager *manager, NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); NMDevice *device; guint32 ifindex; - const char *iface = g_udev_device_get_name (udev_device); - - /* Ignore PPP interfaces as they are the IP interface of a device, - * but they come and go when the device gets activated or deactivated. - * We don't want their transient nature to affect their master device. - */ - if (strncmp (iface, "ppp", 3) == 0) - return; ifindex = g_udev_device_get_property_as_int (udev_device, "IFINDEX"); device = find_device_by_ifindex (self, ifindex); if (!device) { - /* On removal we won't always be able to read properties anymore, as - * they may have already been removed from sysfs. Instead, we just - * have to fall back to the device's interface name. + GSList *iter; + const char *iface = g_udev_device_get_name (udev_device); + + /* On removal we aren't always be able to read properties like IFINDEX + * anymore, as they may have already been removed from sysfs. So we + * have to fall back on device name (eg, interface name). + * + * Also, some devices (namely PPPoE (pppX), ADSL (nasX, pppX), and + * mobile broadband (pppX, bnepX)) create a kernel netdevice for IP + * communication (called the "IP interface" in NM) as part of the + * connection process and thus the IP interface lifetime does not + * correspond to the NMDevice lifetime. For these devices we must + * ignore removal events for the IP interface name otherwise the + * NMDevice would be removed. Hence the usage here of + * nm_device_get_iface() rather than nm_device_get_ip_iface(). */ - device = find_device_by_ip_iface (self, iface); + for (iter = priv->devices; iter; iter = g_slist_next (iter)) { + if (g_strcmp0 (nm_device_get_iface (NM_DEVICE (iter->data)), iface) == 0) { + device = iter->data; + break; + } + } } if (device) @@ -2529,6 +2642,8 @@ ensure_master_active_connection (NMManager *self, nm_device_get_path (master_device), dbus_sender, error); + if (!master_ac) + g_prefix_error (error, "%s", "Master device activation failed: "); g_slist_free (connections); return master_ac; } @@ -2569,24 +2684,30 @@ ensure_master_active_connection (NMManager *self, if (master_state != NM_DEVICE_STATE_DISCONNECTED) continue; - return nm_manager_activate_connection (self, - master_connection, - NULL, - nm_device_get_path (candidate), - dbus_sender, - error); + master_ac = nm_manager_activate_connection (self, + master_connection, + NULL, + nm_device_get_path (candidate), + dbus_sender, + error); + if (!master_ac) + g_prefix_error (error, "%s", "Master device activation failed: "); + return master_ac; } /* Device described by master_connection may be a virtual one that's * not created yet. */ if (!found_device && connection_needs_virtual_device (master_connection)) { - return nm_manager_activate_connection (self, - master_connection, - NULL, - NULL, - dbus_sender, - error); + master_ac = nm_manager_activate_connection (self, + master_connection, + NULL, + NULL, + dbus_sender, + error); + if (!master_ac) + g_prefix_error (error, "%s", "Master device activation failed: "); + return master_ac; } g_set_error (error, @@ -2774,6 +2895,16 @@ nm_manager_activate_connection (NMManager *manager, return NULL; } + /* If this is an autoconnect request, but the device isn't allowing autoconnect + * right now, we reject it. + */ + if (!dbus_sender && !nm_device_autoconnect_allowed (device)) { + g_set_error (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_AUTOCONNECT_NOT_ALLOWED, + "%s does not allow automatic connections at this time", + nm_device_get_iface (device)); + return NULL; + } + /* Try to find the master connection/device if the connection has a dependency */ if (!find_master (manager, connection, device, &master_connection, &master_device)) { g_set_error_literal (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE, @@ -3621,6 +3752,13 @@ nm_manager_start (NMManager *self) system_unmanaged_devices_changed_cb (priv->settings, NULL, self); system_hostname_changed_cb (priv->settings, NULL, self); + /* FIXME: remove when we handle bridges non-destructively */ + /* Read a list of bridges NM managed when it last quit, and only + * manage those bridges to avoid conflicts with external tools. + */ + priv->nm_bridges = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + read_nm_created_bridges (self); + nm_udev_manager_query_devices (priv->udev_mgr); nm_bluez_manager_query_devices (priv->bluez_mgr); @@ -3637,6 +3775,10 @@ nm_manager_start (NMManager *self) * connection-added signals thus devices have to be created manually. */ system_create_virtual_devices (self); + + /* FIXME: remove when we handle bridges non-destructively */ + g_hash_table_unref (priv->nm_bridges); + priv->nm_bridges = NULL; } static gboolean @@ -4016,6 +4158,12 @@ nm_manager_new (NMSettings *settings, G_CALLBACK (bluez_manager_bdaddr_removed_cb), singleton); + /* Force kernel WiFi rfkill state to follow NM saved wifi state in case + * the BIOS doesn't save rfkill state, and to be consistent with user + * changes to the WirelessEnabled property which toggles kernel rfkill. + */ + rfkill_change_wifi (priv->radio_states[RFKILL_TYPE_WLAN].desc, initial_wifi_enabled); + return singleton; } @@ -4046,6 +4194,10 @@ dispose (GObject *object) nm_auth_changed_func_unregister (authority_changed_cb, manager); + /* FIXME: remove when we handle bridges non-destructively */ + write_nm_created_bridges (manager); + + /* Remove all devices */ while (g_slist_length (priv->devices)) { priv->devices = remove_one_device (manager, priv->devices, diff --git a/src/nm-manager.h b/src/nm-manager.h index 66d067831..710840385 100644 --- a/src/nm-manager.h +++ b/src/nm-manager.h @@ -46,6 +46,7 @@ typedef enum { NM_MANAGER_ERROR_ALREADY_ENABLED_OR_DISABLED, /*< nick=AlreadyEnabledOrDisabled >*/ NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE, /*< nick=UnsupportedConnectionType >*/ NM_MANAGER_ERROR_DEPENDENCY_FAILED, /*< nick=DependencyFailed >*/ + NM_MANAGER_ERROR_AUTOCONNECT_NOT_ALLOWED, /*< nick=AutoconnectNotAllowed >*/ } NMManagerError; #define NM_MANAGER_VERSION "version" diff --git a/src/nm-netlink-compat.c b/src/nm-netlink-compat.c index 68ee12159..9c90eabea 100644 --- a/src/nm-netlink-compat.c +++ b/src/nm-netlink-compat.c @@ -18,19 +18,11 @@ * Copyright (C) 2011 Caixa Magica Software. */ -#include <config.h> #include <glib.h> -#include <unistd.h> -#include <sys/ioctl.h> -#include <sys/socket.h> -#include <linux/if_vlan.h> -#include <linux/sockios.h> -#include "nm-logging.h" #include "nm-netlink-compat.h" -#if HAVE_LIBNL != 1 -struct rtnl_nexthop * +static struct rtnl_nexthop * nm_netlink_get_nh (struct rtnl_route * route) { int hops; @@ -91,152 +83,3 @@ rtnl_route_get_dst_len(struct rtnl_route * rtnlroute) dst = rtnl_route_get_dst(rtnlroute); return nl_addr_get_prefixlen(dst); } -#endif - -#if HAVE_LIBNL == 1 -int -nl_compat_error (int err) -{ - err = abs (err); - - if (err == EEXIST) - err = NLE_EXIST; - else if (err == ENOENT || err == ESRCH) - err = NLE_OBJ_NOTFOUND; - else if (err == ERANGE) - err = NLE_RANGE; - - return -err; -} - -int -rtnl_link_vlan_get_id (struct rtnl_link *l) -{ - int fd; - struct vlan_ioctl_args if_request; - char *if_name = NULL; - - memset (&if_request, 0, sizeof (struct vlan_ioctl_args)); - - if ((if_name = rtnl_link_get_name (l)) == NULL) - return -1; - - g_strlcpy (if_request.device1, if_name, sizeof (if_request.device1)); - - if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) { - nm_log_err (LOGD_DEVICE, "couldn't open control socket."); - return -1; - } - - if_request.cmd = GET_VLAN_VID_CMD; - if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) { - nm_log_err (LOGD_DEVICE, "couldn't get vlan id for %s.", if_name); - goto err_out; - } - - close(fd); - return if_request.u.VID; -err_out: - close(fd); - return -1; -} - -int -rtnl_link_vlan_set_flags (struct rtnl_link *l, unsigned int flags) -{ - int fd; - struct vlan_ioctl_args if_request; - char *if_name = NULL; - - - if ((if_name = rtnl_link_get_name (l)) == NULL) - return -1; - - if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) { - nm_log_err (LOGD_DEVICE, "couldn't open control socket."); - return -1; - } - - memset (&if_request, 0, sizeof (struct vlan_ioctl_args)); - g_strlcpy (if_request.device1, if_name, sizeof (if_request.device1)); - if_request.cmd = SET_VLAN_FLAG_CMD; - if_request.u.flag = flags; - - if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) { - nm_log_err (LOGD_DEVICE, "couldn't set flag in device %s.", if_name); - goto err_out; - } - - close(fd); - return 0; -err_out: - close(fd); - return -1; -} - -int -rtnl_link_vlan_set_ingress_map (struct rtnl_link *l, int from, uint32_t to) -{ - int fd; - struct vlan_ioctl_args if_request; - char *if_name = NULL; - - if ((if_name = rtnl_link_get_name (l)) == NULL) - return -1; - - if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) { - nm_log_err (LOGD_DEVICE, "couldn't open control socket."); - return -1; - } - - memset (&if_request, 0, sizeof (struct vlan_ioctl_args)); - g_strlcpy (if_request.device1, if_name, sizeof (if_request.device1)); - if_request.cmd = SET_VLAN_INGRESS_PRIORITY_CMD; - if_request.u.skb_priority = from; - if_request.vlan_qos = to; - - if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) { - nm_log_err (LOGD_DEVICE, "couldn't set ingress map on device %s.", if_name); - goto err_out; - } - - close(fd); - return 0; -err_out: - close(fd); - return -1; -} - -int -rtnl_link_vlan_set_egress_map (struct rtnl_link *l, int from, uint32_t to) -{ - int fd; - struct vlan_ioctl_args if_request; - char *if_name = NULL; - - if ((if_name = rtnl_link_get_name (l)) == NULL) - return -1; - - if ((fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) { - nm_log_err (LOGD_DEVICE, "couldn't open control socket."); - return -1; - } - - memset (&if_request, 0, sizeof (struct vlan_ioctl_args)); - g_strlcpy (if_request.device1, if_name, sizeof (if_request.device1)); - if_request.cmd = SET_VLAN_EGRESS_PRIORITY_CMD; - if_request.u.skb_priority = from; - if_request.vlan_qos = to; - - if (ioctl (fd, SIOCSIFVLAN, &if_request) < 0) { - nm_log_err (LOGD_DEVICE, "couldn't set egress map on device %s.", if_name); - goto err_out; - } - - close(fd); - return 0; -err_out: - close(fd); - return -1; -} -#endif diff --git a/src/nm-netlink-compat.h b/src/nm-netlink-compat.h index 80df09673..a844e9f28 100644 --- a/src/nm-netlink-compat.h +++ b/src/nm-netlink-compat.h @@ -22,260 +22,13 @@ #ifndef NM_NETLINK_COMPAT_H #define NM_NETLINK_COMPAT_H -#include <errno.h> - -#include <netlink/netlink.h> -#include <netlink/route/rtnl.h> -#include <netlink/route/link.h> -#include <netlink/route/route.h> -#include <netlink/route/addr.h> - - -#include <netlink/netlink.h> -#include <netlink/cache.h> -#include <netlink/utils.h> -#include <netlink/data.h> -#include <netlink/route/rtnl.h> #include <netlink/route/route.h> -#include <netlink/route/link.h> -#include <netlink/route/nexthop.h> - -#include <config.h> - -/* libnl-1 API compatibility for libnl-2/3*/ -#if HAVE_LIBNL != 1 -struct rtnl_nexthop * nm_netlink_get_nh(struct rtnl_route *); +/* libnl-1 API compatibility for libnl-3 */ int rtnl_route_get_oif(struct rtnl_route *); int rtnl_route_set_oif(struct rtnl_route *, int); int rtnl_route_set_gateway(struct rtnl_route *, struct nl_addr *); int rtnl_route_get_dst_len(struct rtnl_route *); struct nl_addr * rtnl_route_get_gateway(struct rtnl_route *); -#endif - -/* libnl-2 API compatibility for libnl-3 */ -#if HAVE_LIBNL == 3 -static inline int -__rtnl_link_alloc_cache (struct nl_sock *h, struct nl_cache **cache) -{ - return rtnl_link_alloc_cache (h, AF_UNSPEC, cache); -} -#define rtnl_link_alloc_cache __rtnl_link_alloc_cache -#endif - - -/* libnl-2.0 compat functions */ -#if HAVE_LIBNL == 2 - -/* functions with similar prototypes */ -#define nlmsg_datalen nlmsg_len -#endif - - -/* libnl-1.0 compat functions */ -#if HAVE_LIBNL == 1 - -#define nl_sock nl_handle - -/* libnl-1.0 functions with similar prototypes */ -#define nl_socket_alloc nl_handle_alloc -#define nl_socket_alloc_cb nl_handle_alloc_cb -#define nl_socket_free nl_handle_destroy -#define nl_socket_set_passcred nl_set_passcred -#define nl_socket_disable_seq_check nl_disable_sequence_check -#define rtnl_route_set_priority rtnl_route_set_prio -#define nlmsg_datalen nlmsg_len - -/* auxiliary functions */ -int nl_compat_error (int); - -/* libnl-1.0 functions with modified prototypes in libnl-2/3*/ -static inline const char * -__nl_geterror (int err) -{ - /* err is set, can be parsed */ - return nl_geterror (); -} -#define nl_geterror __nl_geterror - -static inline int -__rtnl_addr_alloc_cache (struct nl_sock *h, struct nl_cache **cache) -{ - g_return_val_if_fail (cache != NULL, -EINVAL); - - *cache = rtnl_addr_alloc_cache (h); - return *cache ? 0 : -ENOMEM; -} -#define rtnl_addr_alloc_cache __rtnl_addr_alloc_cache - -static inline int -__rtnl_route_alloc_cache (struct nl_sock *h, int family, int flags, struct nl_cache **cache) -{ - g_return_val_if_fail (cache != NULL, -EINVAL); - - *cache = rtnl_route_alloc_cache (h); - return *cache ? 0 : -ENOMEM; -} -#define rtnl_route_alloc_cache __rtnl_route_alloc_cache - -static inline int -__rtnl_link_alloc_cache (struct nl_sock *h, struct nl_cache **cache) -{ - g_return_val_if_fail (cache != NULL, -EINVAL); - - *cache = rtnl_link_alloc_cache (h); - return *cache ? 0 : -ENOMEM; -} -#define rtnl_link_alloc_cache __rtnl_link_alloc_cache - -static inline int -__rtnl_route_get_metric (struct rtnl_route *route, int metric, unsigned int *value) -{ - g_return_val_if_fail (value != NULL, -EINVAL); - - *value = rtnl_route_get_metric (route, metric); - return 0; -} -#define rtnl_route_get_metric __rtnl_route_get_metric - -static inline int -__rtnl_addr_add (struct nl_sock *h, struct rtnl_addr *addr, int flags) -{ - return nl_compat_error (rtnl_addr_add (h, addr, flags)); -} -#define rtnl_addr_add __rtnl_addr_add - -static inline int -__rtnl_route_add (struct nl_sock *sk, struct rtnl_route *route, int flags) -{ - return nl_compat_error (rtnl_route_add (sk, route, flags)); -} -#define rtnl_route_add __rtnl_route_add - -static inline int -rtnl_route_delete (struct nl_sock *h, struct rtnl_route *route, int flags) -{ - return nl_compat_error (rtnl_route_del (h, route, flags)); -} -#define rtnl_route_del rtnl_route_delete - -static inline int -__rtnl_link_change (struct nl_sock *h, struct rtnl_link *old, struct rtnl_link *tmpl, int flags) -{ - return nl_compat_error (rtnl_link_change (h, old, tmpl,flags)); -} -#define rtnl_link_change __rtnl_link_change - -static inline int -__nl_cache_include (struct nl_cache *cache, struct nl_object *obj, change_func_t cb, void *data) -{ - return nl_cache_include (cache, obj, cb); -} -#define nl_cache_include __nl_cache_include - -#define NLE_SUCCESS 0 -#define NLE_FAILURE 1 -#define NLE_INTR 2 -#define NLE_BAD_SOCK 3 -#define NLE_AGAIN 4 -#define NLE_NOMEM 5 -#define NLE_EXIST 6 -#define NLE_INVAL 7 -#define NLE_RANGE 8 -#define NLE_MSGSIZE 9 -#define NLE_OPNOTSUPP 10 -#define NLE_AF_NOSUPPORT 11 -#define NLE_OBJ_NOTFOUND 12 -#define NLE_NOATTR 13 -#define NLE_MISSING_ATTR 14 -#define NLE_AF_MISMATCH 15 -#define NLE_SEQ_MISMATCH 16 -#define NLE_MSG_OVERFLOW 17 -#define NLE_MSG_TRUNC 18 -#define NLE_NOADDR 19 -#define NLE_SRCRT_NOSUPPORT 20 -#define NLE_MSG_TOOSHORT 21 -#define NLE_MSGTYPE_NOSUPPORT 22 -#define NLE_OBJ_MISMATCH 23 -#define NLE_NOCACHE 24 -#define NLE_BUSY 25 -#define NLE_PROTO_MISMATCH 26 -#define NLE_NOACCESS 27 -#define NLE_PERM 28 -#define NLE_PKTLOC_FILE 29 - -#endif - -/* Stuff that only libnl3 has */ -#if HAVE_LIBNL == 1 || HAVE_LIBNL == 2 - -static inline int -rtnl_link_bond_add (struct nl_sock *h, const char *name, void *data) -{ - /* Bonding only in libnl3 */ - return -NLE_OPNOTSUPP; -} - -static inline int -rtnl_link_get_kernel (struct nl_sock *h, int f, const char *name, struct rtnl_link **out_link) -{ - /* Bonding only in libnl3 */ - return -NLE_OPNOTSUPP; -} - -static inline char * -rtnl_link_get_type (struct rtnl_link *rtnl_link) -{ - /* Bonding only in libnl3 */ - return NULL; -} - -static inline int -rtnl_link_bond_enslave_ifindex (struct nl_sock *h, int master_ifidx, int slave_ifidx) -{ - /* Bonding only in libnl3 */ - return -NLE_OPNOTSUPP; -} - -static inline int -rtnl_link_bond_release_ifindex (struct nl_sock *h, int slave_ifidx) -{ - /* Bonding only in libnl3 */ - return -NLE_OPNOTSUPP; -} - -static inline int -rtnl_link_vlan_set_id (struct rtnl_link *l, int id) -{ - /* VLAN only in libnl3 */ - return -NLE_OPNOTSUPP; -} - -int rtnl_link_vlan_get_id (struct rtnl_link *l); -int rtnl_link_vlan_set_flags (struct rtnl_link *l, unsigned int flags); -int rtnl_link_vlan_set_ingress_map (struct rtnl_link *l, int from, uint32_t to); -int rtnl_link_vlan_set_egress_map (struct rtnl_link *l, int from, uint32_t to); - -static inline int -rtnl_link_set_type (struct rtnl_link *l, const char *type) -{ - /* Operation only in libnl3 */ - return -NLE_OPNOTSUPP; -} - -static inline int -rtnl_link_add (struct nl_sock *sk, struct rtnl_link *l, int flags) -{ - /* Operation only in libnl3 */ - return -NLE_OPNOTSUPP; -} - -static inline int -rtnl_link_delete(struct nl_sock *sk, const struct rtnl_link *l) -{ - /* Operation only in libnl3 */ - return -NLE_OPNOTSUPP; -} -#endif #endif /* NM_NETLINK_COMPAT_H */ diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c index 29a21e3c7..111dffaa1 100644 --- a/src/nm-netlink-monitor.c +++ b/src/nm-netlink-monitor.c @@ -38,7 +38,11 @@ #include <linux/if.h> #include <linux/unistd.h> #include <unistd.h> +#include <netlink/version.h> +#if LIBNL_VER_NUM == LIBNL_VER (3, 2) && LIBNL_VER_MIC < 20 #include <netlink/object-api.h> +#endif +#include <netlink/object.h> #include <netlink/route/addr.h> #include <netlink/route/rtnl.h> @@ -408,7 +412,7 @@ sync_connection_setup (NMNetlinkMonitor *self, GError **error) nl_cache_free (addr_cache); #endif - err = rtnl_link_alloc_cache (priv->nlh_sync, &priv->link_cache); + err = rtnl_link_alloc_cache (priv->nlh_sync, AF_UNSPEC, &priv->link_cache); if (err < 0) { g_set_error (error, NM_NETLINK_MONITOR_ERROR, NM_NETLINK_MONITOR_ERROR_NETLINK_ALLOC_LINK_CACHE, @@ -592,6 +596,24 @@ nm_netlink_monitor_request_ip6_info (NMNetlinkMonitor *self, GError **error) return TRUE; } +gboolean +nm_netlink_monitor_request_bridge_info (NMNetlinkMonitor *self, GError **error) +{ + NMNetlinkMonitorPrivate *priv; + + g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (NM_IS_NETLINK_MONITOR (self), FALSE); + + priv = NM_NETLINK_MONITOR_GET_PRIVATE (self); + + /* FIXME: nl_rtgen_request() gets the return value screwed up with + * libnl-1.1; revisit this and return a proper error when we port to + * a later libnl. + */ + nl_rtgen_request (priv->nlh_event, RTM_GETLINK, AF_BRIDGE, NLM_F_DUMP); + + return TRUE; +} static gboolean deferred_emit_carrier_state (gpointer user_data) diff --git a/src/nm-netlink-monitor.h b/src/nm-netlink-monitor.h index 4e0787bdc..b9468fdc8 100644 --- a/src/nm-netlink-monitor.h +++ b/src/nm-netlink-monitor.h @@ -23,7 +23,6 @@ #ifndef NM_NETLINK_MONITOR_H #define NM_NETLINK_MONITOR_H -#include <glib.h> #include <glib-object.h> #include <netlink/netlink.h> #include <netlink/route/link.h> @@ -82,6 +81,9 @@ void nm_netlink_monitor_unsubscribe (NMNetlinkMonitor *monitor gboolean nm_netlink_monitor_request_ip6_info (NMNetlinkMonitor *monitor, GError **error); +gboolean nm_netlink_monitor_request_bridge_info (NMNetlinkMonitor *monitor, + GError **error); + void nm_netlink_monitor_request_status (NMNetlinkMonitor *monitor); gboolean nm_netlink_monitor_get_flags_sync (NMNetlinkMonitor *monitor, diff --git a/src/nm-netlink-utils.c b/src/nm-netlink-utils.c index be8c17eda..100b46701 100644 --- a/src/nm-netlink-utils.c +++ b/src/nm-netlink-utils.c @@ -25,12 +25,8 @@ #include <arpa/inet.h> #include <netinet/in.h> -#include <netlink/netlink.h> -#include <netlink/addr.h> #include <netlink/route/addr.h> -#include <errno.h> - typedef struct { int ifindex; int family; diff --git a/src/nm-netlink-utils.h b/src/nm-netlink-utils.h index 697faaf01..1f7c67962 100644 --- a/src/nm-netlink-utils.h +++ b/src/nm-netlink-utils.h @@ -21,10 +21,7 @@ #ifndef NM_NETLINK_UTILS_H #define NM_NETLINK_UTILS_H -#include <glib.h> -#include <netlink/route/rtnl.h> #include <netlink/route/route.h> -#include <netinet/in.h> gboolean nm_netlink_find_address (int ifindex, int family, diff --git a/src/nm-policy.c b/src/nm-policy.c index 420a94113..752cf44eb 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1396,7 +1396,7 @@ device_ip4_config_changed (NMDevice *device, /* Old configs get removed immediately */ if (old_config) - nm_dns_manager_remove_ip4_config (dns_mgr, ip_iface, old_config); + nm_dns_manager_remove_ip4_config (dns_mgr, old_config); /* Ignore IP config changes while the device is activating, because we'll * catch all the changes when the device moves to ACTIVATED state. @@ -1433,7 +1433,7 @@ device_ip6_config_changed (NMDevice *device, /* Old configs get removed immediately */ if (old_config) - nm_dns_manager_remove_ip6_config (dns_mgr, ip_iface, old_config); + nm_dns_manager_remove_ip6_config (dns_mgr, old_config); /* Ignore IP config changes while the device is activating, because we'll * catch all the changes when the device moves to ACTIVATED state. @@ -1608,7 +1608,7 @@ vpn_connection_deactivated (NMPolicy *policy, NMVPNConnection *vpn) ip4_config = nm_vpn_connection_get_ip4_config (vpn); if (ip4_config) { /* Remove the VPN connection's IP4 config from DNS */ - nm_dns_manager_remove_ip4_config (mgr, ip_iface, ip4_config); + nm_dns_manager_remove_ip4_config (mgr, ip4_config); /* Re-apply routes and addresses of the VPN connection's parent interface, * which the VPN might have overridden. @@ -1629,7 +1629,7 @@ vpn_connection_deactivated (NMPolicy *policy, NMVPNConnection *vpn) ip6_config = nm_vpn_connection_get_ip6_config (vpn); if (ip6_config) { /* Remove the VPN connection's IP6 config from DNS */ - nm_dns_manager_remove_ip6_config (mgr, ip_iface, ip6_config); + nm_dns_manager_remove_ip6_config (mgr, ip6_config); /* Re-apply routes and addresses of the VPN connection's parent interface, * which the VPN might have overridden. diff --git a/src/nm-system.c b/src/nm-system.c index 5d1a48953..031daf8aa 100644 --- a/src/nm-system.c +++ b/src/nm-system.c @@ -60,11 +60,8 @@ #include <netlink/netlink.h> #include <netlink/utils.h> #include <netlink/route/link.h> - -#if HAVE_LIBNL == 3 #include <netlink/route/link/bonding.h> #include <netlink/route/link/vlan.h> -#endif #if !HAVE_VLAN_FLAG_LOOSE_BINDING /* Older kernels don't have this flag */ @@ -1689,9 +1686,29 @@ nm_system_bond_enslave (gint master_ifindex, g_assert (!nm_system_iface_is_up (slave_ifindex)); if (nm_system_iface_get_flags (slave_ifindex) & IFF_SLAVE) { - nm_log_err (LOGD_DEVICE, "(%s): %s is already a slave", - master_iface, slave_iface); - return FALSE; + struct rtnl_link *link; + int existing_master = -1; + + /* Get the ifindex of the existing master device */ + link = nm_netlink_index_to_rtnl_link (slave_ifindex); + g_warn_if_fail (link != NULL); + if (link) { + existing_master = rtnl_link_get_master (link); + rtnl_link_put (link); + } + + if (existing_master > 0) { + /* Fail if the device is already a slave of a different master */ + if (existing_master != master_ifindex) { + nm_log_err (LOGD_DEVICE, "(%s): already a slave of a different master", + slave_iface); + return FALSE; + } + + nm_log_dbg (LOGD_DEVICE, "(%s): %s is already enslaved", + master_iface, slave_iface); + return TRUE; + } } err = rtnl_link_bond_enslave_ifindex (sock, master_ifindex, slave_ifindex); @@ -1783,7 +1800,7 @@ nm_system_bond_release (gint master_ifindex, } /** - * nm_system_get_iface_type_compat: + * nm_system_compat_get_iface_type: * @ifindex: interface index * @name: name of interface * @@ -1796,10 +1813,11 @@ static int nm_system_compat_get_iface_type (int ifindex, const char *name) { int res = NM_IFACE_TYPE_UNSPEC; - char *ifname = NULL; + char *ifname = NULL, *path = NULL; struct vlan_ioctl_args ifv; struct ifreq ifr; struct ifbond ifb; + struct stat st; int fd; g_return_val_if_fail (ifindex > 0 || name, NM_IFACE_TYPE_UNSPEC); @@ -1833,7 +1851,15 @@ nm_system_compat_get_iface_type (int ifindex, const char *name) goto out; } + /* and bridge */ + path = g_strdup_printf ("/sys/class/net/%s/bridge", ifname ? ifname : name); + if ((stat (path, &st) == 0) && S_ISDIR (st.st_mode)) { + res = NM_IFACE_TYPE_BRIDGE; + goto out; + } + out: + g_free (path); close (fd); g_free (ifname); return res; @@ -1918,7 +1944,7 @@ nm_system_get_iface_vlan_info (int ifindex, if (!nlh) return FALSE; - ret = rtnl_link_alloc_cache (nlh, &cache); + ret = rtnl_link_alloc_cache (nlh, AF_UNSPEC, &cache); g_return_val_if_fail (ret == 0, FALSE); g_return_val_if_fail (cache != NULL, FALSE); @@ -2295,7 +2321,7 @@ nm_system_del_vlan_iface (const char *iface) nlh = nm_netlink_get_default_handle (); g_return_val_if_fail (nlh != NULL, FALSE); - ret = rtnl_link_alloc_cache (nlh, &cache); + ret = rtnl_link_alloc_cache (nlh, AF_UNSPEC, &cache); g_return_val_if_fail (ret == 0, FALSE); g_return_val_if_fail (cache != NULL, FALSE); @@ -2337,14 +2363,16 @@ _bridge_create_compat (const char *iface) /** * nm_system_create_bridge: * @iface: Name bridging device to create + * @out_exists: on return, %TRUE if the bridge already exists * * Creates a new bridging device in the kernel. If a bridging device with - * the specified name already exists, it is being reused. + * the specified name already exists, it is reused and no error is returned, + * but @out_exists is set to %TRUE. * * Returns: %TRUE on success, %FALSE on error. */ gboolean -nm_system_create_bridge (const char *iface) +nm_system_create_bridge (const char *iface, gboolean *out_exists) { int err; @@ -2355,6 +2383,8 @@ nm_system_create_bridge (const char *iface) iface, strerror (-err)); return FALSE; } + if (out_exists && err == -EEXIST) + *out_exists = TRUE; return TRUE; } @@ -2490,9 +2520,14 @@ nm_system_bridge_attach (int master_ifindex, mif ? mif : master_iface, slave_ifindex, sif ? sif : slave_iface); - if (err < 0 && err != -EBUSY) { - nm_log_err (LOGD_DEVICE, "(%s): failed to attach slave %s: %s", - master_iface, slave_iface, strerror (-err)); + if (err < 0) { + if (err == -EBUSY) { + /* Interface already attached to the given bridge */ + err = 0; + } else { + nm_log_err (LOGD_DEVICE, "(%s): failed to attach slave %s: %s", + master_iface, slave_iface, strerror (-err)); + } } out: diff --git a/src/nm-system.h b/src/nm-system.h index ca07d0f25..632786d3d 100644 --- a/src/nm-system.h +++ b/src/nm-system.h @@ -128,7 +128,7 @@ gboolean nm_system_add_vlan_iface (NMConnection *connection, int parent_ifindex); gboolean nm_system_del_vlan_iface (const char *iface); -gboolean nm_system_create_bridge (const char *iface); +gboolean nm_system_create_bridge (const char *iface, gboolean *out_exists); gboolean nm_system_del_bridge (const char *iface); gboolean nm_system_bridge_attach (int master_ifindex, diff --git a/src/posix-signals/Makefile.in b/src/posix-signals/Makefile.in index db24efa64..14aeba6ce 100644 --- a/src/posix-signals/Makefile.in +++ b/src/posix-signals/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -216,12 +215,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/ppp-manager/Makefile.in b/src/ppp-manager/Makefile.in index f53e808bd..026ce4b83 100644 --- a/src/ppp-manager/Makefile.in +++ b/src/ppp-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -261,12 +260,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/Makefile.in b/src/settings/Makefile.in index 0c95d9683..38fe0a5e9 100644 --- a/src/settings/Makefile.in +++ b/src/settings/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -280,12 +279,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 0c139174e..fa474e09b 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -1379,12 +1379,13 @@ have_connection_for_device (NMSettings *self, GByteArray *mac, NMDevice *device) /* Search through the list of blacklisted MAC addresses in the config file. */ static gboolean -is_mac_auto_wired_blacklisted (NMSettings *self, const GByteArray *mac, int hwaddr_type) +is_mac_auto_wired_blacklisted (NMSettings *self, const GByteArray *mac) { NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self); GKeyFile *config; char **list, **iter; gboolean found = FALSE; + int hwaddr_type; g_return_val_if_fail (mac != NULL, FALSE); @@ -1401,6 +1402,8 @@ is_mac_auto_wired_blacklisted (NMSettings *self, const GByteArray *mac, int hwad if (!g_key_file_load_from_file (config, priv->config_file, G_KEY_FILE_NONE, NULL)) goto out; + hwaddr_type = nm_utils_hwaddr_type (mac->len); + list = g_key_file_get_string_list (config, "main", CONFIG_KEY_NO_AUTO_DEFAULT, NULL, NULL); for (iter = list; iter && *iter; iter++) { guint8 *candidate, buffer[NM_UTILS_HWADDR_LEN_MAX]; @@ -1584,7 +1587,7 @@ nm_settings_device_added (NMSettings *self, NMDevice *device) NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self); GByteArray *mac = NULL; const guint8 *hwaddr; - int hwaddr_type; + guint hwaddr_len = 0; NMDefaultWiredConnection *wired; gboolean read_only = TRUE; const char *id; @@ -1600,14 +1603,13 @@ nm_settings_device_added (NMSettings *self, NMDevice *device) || g_object_get_data (G_OBJECT (device), DEFAULT_WIRED_TAG)) return; - hwaddr = nm_device_wired_get_hwaddr (NM_DEVICE_WIRED (device)); - hwaddr_type = nm_device_wired_get_hwaddr_type (NM_DEVICE_WIRED (device)); + hwaddr = nm_device_get_hw_address (device, &hwaddr_len); - mac = g_byte_array_new (); - g_byte_array_append (mac, hwaddr, nm_utils_hwaddr_len (hwaddr_type)); + mac = g_byte_array_sized_new (hwaddr_len); + g_byte_array_append (mac, hwaddr, hwaddr_len); if ( have_connection_for_device (self, mac, device) - || is_mac_auto_wired_blacklisted (self, mac, hwaddr_type)) + || is_mac_auto_wired_blacklisted (self, mac)) goto ignore; if (get_plugin (self, NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_CONNECTIONS)) diff --git a/src/settings/plugins/Makefile.in b/src/settings/plugins/Makefile.in index 5642eda70..a6d283f92 100644 --- a/src/settings/plugins/Makefile.in +++ b/src/settings/plugins/Makefile.in @@ -64,12 +64,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -228,12 +227,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/example/Makefile.in b/src/settings/plugins/example/Makefile.in index fcdcd7b36..491c577a1 100644 --- a/src/settings/plugins/example/Makefile.in +++ b/src/settings/plugins/example/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -226,12 +225,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/ifcfg-rh/Makefile.in b/src/settings/plugins/ifcfg-rh/Makefile.in index 53492e72a..bdd6f233a 100644 --- a/src/settings/plugins/ifcfg-rh/Makefile.in +++ b/src/settings/plugins/ifcfg-rh/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -305,12 +304,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.in b/src/settings/plugins/ifcfg-rh/tests/Makefile.in index 155cb672e..843d2f61a 100644 --- a/src/settings/plugins/ifcfg-rh/tests/Makefile.in +++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.in @@ -63,12 +63,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -268,12 +267,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in index 43b0aadb6..b19cd1d0f 100644 --- a/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in +++ b/src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -184,12 +183,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/ifcfg-suse/Makefile.in b/src/settings/plugins/ifcfg-suse/Makefile.in index 8832e679e..e15fd3e5f 100644 --- a/src/settings/plugins/ifcfg-suse/Makefile.in +++ b/src/settings/plugins/ifcfg-suse/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -252,12 +251,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/ifnet/Makefile.in b/src/settings/plugins/ifnet/Makefile.in index 6cdf335df..dc8396229 100644 --- a/src/settings/plugins/ifnet/Makefile.in +++ b/src/settings/plugins/ifnet/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -300,12 +299,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/ifnet/tests/Makefile.in b/src/settings/plugins/ifnet/tests/Makefile.in index 0c2c1910e..ee264631f 100644 --- a/src/settings/plugins/ifnet/tests/Makefile.in +++ b/src/settings/plugins/ifnet/tests/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -221,12 +220,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/ifupdown/Makefile.in b/src/settings/plugins/ifupdown/Makefile.in index def93ad77..1d192555a 100644 --- a/src/settings/plugins/ifupdown/Makefile.in +++ b/src/settings/plugins/ifupdown/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -298,12 +297,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/ifupdown/tests/Makefile.in b/src/settings/plugins/ifupdown/tests/Makefile.in index 2d4be7bff..42e76335e 100644 --- a/src/settings/plugins/ifupdown/tests/Makefile.in +++ b/src/settings/plugins/ifupdown/tests/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -222,12 +221,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/keyfile/Makefile.in b/src/settings/plugins/keyfile/Makefile.in index 071838b15..4c1c79945 100644 --- a/src/settings/plugins/keyfile/Makefile.in +++ b/src/settings/plugins/keyfile/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -269,12 +268,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/keyfile/tests/Makefile.in b/src/settings/plugins/keyfile/tests/Makefile.in index ae5836f54..f9f0a9d38 100644 --- a/src/settings/plugins/keyfile/tests/Makefile.in +++ b/src/settings/plugins/keyfile/tests/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -260,12 +259,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/plugins/keyfile/tests/keyfiles/Makefile.in b/src/settings/plugins/keyfile/tests/keyfiles/Makefile.in index 0f0a04457..66d078ac6 100644 --- a/src/settings/plugins/keyfile/tests/keyfiles/Makefile.in +++ b/src/settings/plugins/keyfile/tests/keyfiles/Makefile.in @@ -60,12 +60,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -184,12 +183,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/settings/tests/Makefile.in b/src/settings/tests/Makefile.in index 1b7450cf1..51a0e9ce2 100644 --- a/src/settings/tests/Makefile.in +++ b/src/settings/tests/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -220,12 +219,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/supplicant-manager/Makefile.in b/src/supplicant-manager/Makefile.in index ae6768f8e..bd972cb57 100644 --- a/src/supplicant-manager/Makefile.in +++ b/src/supplicant-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -260,12 +259,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/supplicant-manager/nm-supplicant-manager.c b/src/supplicant-manager/nm-supplicant-manager.c index 430a3852c..ac57e8a36 100644 --- a/src/supplicant-manager/nm-supplicant-manager.c +++ b/src/supplicant-manager/nm-supplicant-manager.c @@ -179,7 +179,7 @@ get_capabilities_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_ nm_log_dbg (LOGD_SUPPLICANT, "AP mode is %ssupported", (priv->ap_support == AP_SUPPORT_YES) ? "" : - (priv->ap_support == AP_SUPPORT_NO) ? "not " : " possibly"); + (priv->ap_support == AP_SUPPORT_NO) ? "not " : "possibly "); /* EAP-FAST */ priv->fast_supported = FALSE; diff --git a/src/supplicant-manager/tests/Makefile.in b/src/supplicant-manager/tests/Makefile.in index cf4be05d8..973411a10 100644 --- a/src/supplicant-manager/tests/Makefile.in +++ b/src/supplicant-manager/tests/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -220,12 +219,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index df19fc42a..f2cb37d09 100644 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -64,12 +64,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -238,12 +237,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/vpn-manager/Makefile.in b/src/vpn-manager/Makefile.in index bb8efd17c..38dbb39d0 100644 --- a/src/vpn-manager/Makefile.in +++ b/src/vpn-manager/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -222,12 +221,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 639d66d05..f2e31a8d6 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -166,8 +166,7 @@ vpn_cleanup (NMVPNConnection *connection) if (priv->ip_ifindex) { nm_system_iface_set_up (priv->ip_ifindex, FALSE, NULL); - /* FIXME: use AF_UNSPEC here when we have IPv6 support */ - nm_system_iface_flush_routes (priv->ip_ifindex, AF_INET); + nm_system_iface_flush_routes (priv->ip_ifindex, AF_UNSPEC); nm_system_iface_flush_addresses (priv->ip_ifindex, AF_UNSPEC); } diff --git a/src/wifi/Makefile.in b/src/wifi/Makefile.in index 5019bbeb4..ed80fdec4 100644 --- a/src/wifi/Makefile.in +++ b/src/wifi/Makefile.in @@ -62,12 +62,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -224,12 +223,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/wifi/wifi-utils-nl80211.c b/src/wifi/wifi-utils-nl80211.c index 62ec6c2be..5a7103ee3 100644 --- a/src/wifi/wifi-utils-nl80211.c +++ b/src/wifi/wifi-utils-nl80211.c @@ -33,6 +33,7 @@ #include <netlink/genl/genl.h> #include <netlink/genl/family.h> #include <netlink/genl/ctrl.h> +#include <netlink/route/link.h> #include <linux/nl80211.h> @@ -40,7 +41,6 @@ #include "wifi-utils-nl80211.h" #include "nm-logging.h" #include "nm-utils.h" -#include "nm-netlink-compat.h" typedef struct { WifiData parent; @@ -813,7 +813,7 @@ iface_to_index (struct nl_sock *nl_sock, const char *iface) int err, ifindex; /* name to index */ - err = rtnl_link_alloc_cache (nl_sock, &link_cache); + err = rtnl_link_alloc_cache (nl_sock, AF_UNSPEC, &link_cache); if (err < 0) { nm_log_warn (LOGD_HW, "failed to allocate link cache: (%d) %s", err, nl_geterror (err)); diff --git a/src/wimax/Makefile.in b/src/wimax/Makefile.in index 8e2352777..60f8ad661 100644 --- a/src/wimax/Makefile.in +++ b/src/wimax/Makefile.in @@ -61,12 +61,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -255,12 +254,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/src/wimax/nm-device-wimax.c b/src/wimax/nm-device-wimax.c index d549e67e5..3e2e2833b 100644 --- a/src/wimax/nm-device-wimax.c +++ b/src/wimax/nm-device-wimax.c @@ -87,7 +87,7 @@ typedef struct { gboolean enabled; gboolean wimaxd_enabled; - struct ether_addr hw_addr; + guint8 hw_addr[ETH_ALEN]; guint activation_timeout_id; /* Track whether stage1 (Prepare) is completed yet or not */ @@ -124,18 +124,6 @@ nm_wimax_error_quark (void) /***********************************************************/ -void -nm_device_wimax_get_hw_address (NMDeviceWimax *self, struct ether_addr *addr) -{ - NMDeviceWimaxPrivate *priv; - - g_return_if_fail (NM_IS_DEVICE_WIMAX (self)); - g_return_if_fail (addr != NULL); - - priv = NM_DEVICE_WIMAX_GET_PRIVATE (self); - memcpy (addr, &(priv->hw_addr), sizeof (struct ether_addr)); -} - guint32 nm_device_wimax_get_center_frequency (NMDeviceWimax *self) { @@ -356,12 +344,6 @@ take_down (NMDevice *device) } static gboolean -hw_is_up (NMDevice *device) -{ - return nm_system_iface_is_up (nm_device_get_ip_ifindex (device)); -} - -static gboolean hw_bring_up (NMDevice *dev, gboolean *no_firmware) { NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (dev); @@ -369,13 +351,7 @@ hw_bring_up (NMDevice *dev, gboolean *no_firmware) if (!priv->enabled || !priv->wimaxd_enabled) return FALSE; - return nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), TRUE, no_firmware); -} - -static void -hw_take_down (NMDevice *dev) -{ - nm_system_iface_set_up (nm_device_get_ip_ifindex (dev), FALSE, NULL); + return NM_DEVICE_GET_CLASS (dev)->hw_bring_up (dev, no_firmware); } static void @@ -383,32 +359,24 @@ update_hw_address (NMDevice *dev) { NMDeviceWimax *self = NM_DEVICE_WIMAX (dev); NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self); - struct ifreq req; - int fd; - const char *iface; - - iface = nm_device_get_iface (dev); - - fd = socket (PF_INET, SOCK_DGRAM, 0); - if (fd < 0) { - nm_log_warn (LOGD_HW, "(%s): couldn't open control socket.", iface); - return; + gboolean changed = FALSE; + gsize addrlen; + + addrlen = nm_device_read_hwaddr (dev, priv->hw_addr, sizeof (priv->hw_addr), &changed); + if (addrlen) { + g_return_if_fail (addrlen == ETH_ALEN); + if (changed) + g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_HW_ADDRESS); } +} - memset (&req, 0, sizeof (struct ifreq)); - strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); - - errno = 0; - if (ioctl (fd, SIOCGIFHWADDR, &req) < 0) { - nm_log_err (LOGD_HW | LOGD_WIMAX, - "(%s): failed to read hardware address (error %d)", - iface, errno); - } else { - memcpy (&priv->hw_addr, &req.ifr_hwaddr.sa_data, ETH_ALEN); - g_object_notify (G_OBJECT (self), NM_DEVICE_WIMAX_HW_ADDRESS); - } +static const guint8 * +get_hw_address (NMDevice *device, guint *out_len) +{ + NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (device); - close (fd); + *out_len = sizeof (priv->hw_addr); + return priv->hw_addr; } static gboolean @@ -432,7 +400,7 @@ hwaddr_matches (NMDevice *device, g_return_val_if_fail (other_hwaddr_len == ETH_ALEN, FALSE); if (memcmp (mac->data, other_hwaddr, mac->len) == 0) return TRUE; - } else if (memcmp (mac->data, priv->hw_addr.ether_addr_octet, mac->len) == 0) + } else if (memcmp (mac->data, priv->hw_addr, mac->len) == 0) return TRUE; } else if (fail_if_no_hwaddr == FALSE) return TRUE; @@ -471,7 +439,7 @@ check_connection_compatible (NMDevice *device, } mac = nm_setting_wimax_get_mac_address (s_wimax); - if (mac && memcmp (mac->data, &(priv->hw_addr.ether_addr_octet), ETH_ALEN)) { + if (mac && memcmp (mac->data, &priv->hw_addr, ETH_ALEN)) { g_set_error (error, NM_WIMAX_ERROR, NM_WIMAX_ERROR_CONNECTION_INCOMPATIBLE, "The connection's MAC address did not match this device."); @@ -585,7 +553,7 @@ complete_connection (NMDevice *device, setting_mac = nm_setting_wimax_get_mac_address (s_wimax); if (setting_mac) { /* Make sure the setting MAC (if any) matches the device's permanent MAC */ - if (memcmp (setting_mac->data, &priv->hw_addr.ether_addr_octet, ETH_ALEN)) { + if (memcmp (setting_mac->data, &priv->hw_addr, ETH_ALEN)) { g_set_error (error, NM_SETTING_WIMAX_ERROR, NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY, @@ -597,9 +565,9 @@ complete_connection (NMDevice *device, const guint8 null_mac[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 }; /* Lock the connection to this device by default */ - if (memcmp (&priv->hw_addr.ether_addr_octet, null_mac, ETH_ALEN)) { + if (memcmp (&priv->hw_addr, null_mac, ETH_ALEN)) { mac = g_byte_array_sized_new (ETH_ALEN); - g_byte_array_append (mac, priv->hw_addr.ether_addr_octet, ETH_ALEN); + g_byte_array_append (mac, priv->hw_addr, ETH_ALEN); g_object_set (G_OBJECT (s_wimax), NM_SETTING_WIMAX_MAC_ADDRESS, mac, NULL); g_byte_array_free (mac, TRUE); } @@ -638,7 +606,7 @@ get_best_auto_connection (NMDevice *device, continue; mac = nm_setting_wimax_get_mac_address (s_wimax); - if (mac && memcmp (mac->data, priv->hw_addr.ether_addr_octet, ETH_ALEN)) + if (mac && memcmp (mac->data, priv->hw_addr, ETH_ALEN)) continue; for (iter = priv->nsp_list; iter; iter = iter->next) { @@ -1433,12 +1401,10 @@ get_property (GObject *object, guint prop_id, { NMDeviceWimax *self = NM_DEVICE_WIMAX (object); NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self); - struct ether_addr hw_addr; switch (prop_id) { case PROP_HW_ADDRESS: - nm_device_wimax_get_hw_address (self, &hw_addr); - g_value_take_string (value, nm_utils_hwaddr_ntoa (&hw_addr, ARPHRD_ETHER)); + g_value_take_string (value, nm_utils_hwaddr_ntoa (priv->hw_addr, ARPHRD_ETHER)); break; case PROP_ACTIVE_NSP: if (priv->current_nsp) @@ -1518,10 +1484,9 @@ nm_device_wimax_class_init (NMDeviceWimaxClass *klass) object_class->dispose = dispose; device_class->take_down = take_down; - device_class->hw_is_up = hw_is_up; device_class->hw_bring_up = hw_bring_up; - device_class->hw_take_down = hw_take_down; device_class->update_hw_address = update_hw_address; + device_class->get_hw_address = get_hw_address; device_class->check_connection_compatible = check_connection_compatible; device_class->check_connection_available = check_connection_available; device_class->complete_connection = complete_connection; diff --git a/src/wimax/nm-device-wimax.h b/src/wimax/nm-device-wimax.h index a67ff17d0..c43c5dd2d 100644 --- a/src/wimax/nm-device-wimax.h +++ b/src/wimax/nm-device-wimax.h @@ -70,9 +70,6 @@ NMDevice *nm_device_wimax_new (const char *udi, const char *iface, const char *driver); -void nm_device_wimax_get_hw_address (NMDeviceWimax *self, - struct ether_addr *addr); - NMWimaxNsp *nm_device_wimax_get_active_nsp (NMDeviceWimax *self); guint nm_device_wimax_get_center_frequency (NMDeviceWimax *self); diff --git a/test/Makefile.in b/test/Makefile.in index c759530ed..e8d872294 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -63,12 +63,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -237,12 +236,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ diff --git a/tools/Makefile.am b/tools/Makefile.am index dbbe18c63..38d861ec0 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1 +1,29 @@ -EXTRA_DIST = doc-generator.xsl check-exports.sh glib-mkenums +GENERATE_SETTINGS_SPEC_SOURCE = generate-settings-spec.c + +INCLUDES = \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/libnm-util \ + -I$(top_builddir)/libnm-util + +noinst_PROGRAMS = \ + generate-settings-spec + +generate_settings_spec_SOURCES = \ + $(GENERATE_SETTINGS_SPEC_SOURCE) + +generate_settings_spec_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) + +generate_settings_spec_LDADD = \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(GLIB_LIBS) \ + $(DBUS_LIBS) + +EXTRA_DIST = \ + doc-generator.xsl \ + manpages-docbook.xsl \ + check-exports.sh \ + glib-mkenums \ + $(GENERATE_SETTINGS_SPEC_SOURCE) diff --git a/tools/Makefile.in b/tools/Makefile.in index 8f460e493..23d33f286 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -14,6 +14,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + VPATH = @srcdir@ am__make_dryrun = \ { \ @@ -50,6 +51,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +noinst_PROGRAMS = generate-settings-spec$(EXEEXT) subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -60,31 +62,64 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +PROGRAMS = $(noinst_PROGRAMS) +am__objects_1 = \ + generate_settings_spec-generate-settings-spec.$(OBJEXT) +am_generate_settings_spec_OBJECTS = $(am__objects_1) +generate_settings_spec_OBJECTS = $(am_generate_settings_spec_OBJECTS) +am__DEPENDENCIES_1 = +generate_settings_spec_DEPENDENCIES = \ + $(top_builddir)/libnm-util/libnm-util.la $(am__DEPENDENCIES_1) \ + $(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 +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_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ -SOURCES = -DIST_SOURCES = +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_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(generate_settings_spec_SOURCES) +DIST_SOURCES = $(generate_settings_spec_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +ETAGS = etags +CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -184,12 +219,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ @@ -329,10 +358,36 @@ with_dhclient = @with_dhclient@ with_dhcpcd = @with_dhcpcd@ with_netconfig = @with_netconfig@ with_resolvconf = @with_resolvconf@ -EXTRA_DIST = doc-generator.xsl check-exports.sh glib-mkenums +GENERATE_SETTINGS_SPEC_SOURCE = generate-settings-spec.c +INCLUDES = \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/libnm-util \ + -I$(top_builddir)/libnm-util + +generate_settings_spec_SOURCES = \ + $(GENERATE_SETTINGS_SPEC_SOURCE) + +generate_settings_spec_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) + +generate_settings_spec_LDADD = \ + $(top_builddir)/libnm-util/libnm-util.la \ + $(GLIB_LIBS) \ + $(DBUS_LIBS) + +EXTRA_DIST = \ + doc-generator.xsl \ + manpages-docbook.xsl \ + check-exports.sh \ + glib-mkenums \ + $(GENERATE_SETTINGS_SPEC_SOURCE) + all: all-am .SUFFIXES: +.SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -364,17 +419,118 @@ $(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 +generate-settings-spec$(EXEEXT): $(generate_settings_spec_OBJECTS) $(generate_settings_spec_DEPENDENCIES) $(EXTRA_generate_settings_spec_DEPENDENCIES) + @rm -f generate-settings-spec$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(generate_settings_spec_OBJECTS) $(generate_settings_spec_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_settings_spec-generate-settings-spec.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 $< + +.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 `$(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 $@ $< + +generate_settings_spec-generate-settings-spec.o: generate-settings-spec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(generate_settings_spec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT generate_settings_spec-generate-settings-spec.o -MD -MP -MF $(DEPDIR)/generate_settings_spec-generate-settings-spec.Tpo -c -o generate_settings_spec-generate-settings-spec.o `test -f 'generate-settings-spec.c' || echo '$(srcdir)/'`generate-settings-spec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/generate_settings_spec-generate-settings-spec.Tpo $(DEPDIR)/generate_settings_spec-generate-settings-spec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='generate-settings-spec.c' object='generate_settings_spec-generate-settings-spec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(generate_settings_spec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o generate_settings_spec-generate-settings-spec.o `test -f 'generate-settings-spec.c' || echo '$(srcdir)/'`generate-settings-spec.c + +generate_settings_spec-generate-settings-spec.obj: generate-settings-spec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(generate_settings_spec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT generate_settings_spec-generate-settings-spec.obj -MD -MP -MF $(DEPDIR)/generate_settings_spec-generate-settings-spec.Tpo -c -o generate_settings_spec-generate-settings-spec.obj `if test -f 'generate-settings-spec.c'; then $(CYGPATH_W) 'generate-settings-spec.c'; else $(CYGPATH_W) '$(srcdir)/generate-settings-spec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/generate_settings_spec-generate-settings-spec.Tpo $(DEPDIR)/generate_settings_spec-generate-settings-spec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='generate-settings-spec.c' object='generate_settings_spec-generate-settings-spec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(generate_settings_spec_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o generate_settings_spec-generate-settings-spec.obj `if test -f 'generate-settings-spec.c'; then $(CYGPATH_W) 'generate-settings-spec.c'; else $(CYGPATH_W) '$(srcdir)/generate-settings-spec.c'; fi` + mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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 -CTAGS: - +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -408,7 +564,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am @@ -442,11 +598,14 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool mostlyclean-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-generic +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags dvi: dvi-am @@ -489,12 +648,14 @@ 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-generic mostlyclean-libtool +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -508,16 +669,18 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool 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-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags 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 tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/generate-settings-spec.c b/tools/generate-settings-spec.c new file mode 100644 index 000000000..5281dcbf3 --- /dev/null +++ b/tools/generate-settings-spec.c @@ -0,0 +1,434 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * Dan Williams <dcbw@redhat.com> + * + * 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 2009 - 2013 Red Hat, Inc. + */ + +#include <stdio.h> +#include <errno.h> +#include <unistd.h> +#include <string.h> +#include <time.h> + +#include <glib.h> +#include <dbus/dbus-glib.h> +#include "config.h" + +#include <nm-setting-8021x.h> +#include <nm-setting-adsl.h> +#include <nm-setting-bluetooth.h> +#include <nm-setting-cdma.h> +#include <nm-setting-connection.h> +#include <nm-setting-gsm.h> +#include <nm-setting.h> +#include <nm-setting-ip4-config.h> +#include <nm-setting-ip6-config.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-vpn.h> +#include <nm-setting-wimax.h> +#include <nm-setting-wired.h> +#include <nm-setting-wireless.h> +#include <nm-setting-wireless-security.h> +#include <nm-setting-infiniband.h> +#include <nm-setting-bond.h> +#include <nm-setting-bridge.h> +#include <nm-setting-bridge-port.h> +#include <nm-setting-vlan.h> + +#include <nm-utils.h> + +typedef NMSetting* (*SettingNewFunc) (void); + +static SettingNewFunc funcs[] = { + nm_setting_802_1x_new, + nm_setting_adsl_new, + nm_setting_bluetooth_new, + nm_setting_bond_new, + nm_setting_bridge_new, + nm_setting_bridge_port_new, + nm_setting_cdma_new, + nm_setting_connection_new, + nm_setting_gsm_new, + nm_setting_infiniband_new, + nm_setting_ip4_config_new, + nm_setting_ip6_config_new, + nm_setting_olpc_mesh_new, + nm_setting_ppp_new, + nm_setting_pppoe_new, + nm_setting_serial_new, + nm_setting_vlan_new, + nm_setting_vpn_new, + nm_setting_wimax_new, + nm_setting_wired_new, + nm_setting_wireless_new, + nm_setting_wireless_security_new, + NULL +}; + +typedef struct { + const char *gvalue_name; + const char *new_name; +} TypeNameElement; + +static TypeNameElement name_map[] = { + { "gchararray", "string" }, + { "GSList_gchararray_", "array of string" }, + { "GArray_guchar_", "byte array" }, + { "gboolean", "boolean" }, + { "guint64", "uint64" }, + { "gint", "int32" }, + { "guint", "uint32" }, + { "GArray_guint_", "array of uint32" }, + { "GPtrArray_GArray_guint__", "array of array of uint32" }, + { "GPtrArray_GArray_guchar__", "array of byte array" }, + { "GPtrArray_gchararray_", "array of string" }, + { "GHashTable_gchararray+gchararray_", "dict of (string::string)" }, + { "GPtrArray_GValueArray_GArray_guchar_+guint+GArray_guchar___", "array of (byte array, uint32, byte array)" }, + { "GPtrArray_GValueArray_GArray_guchar_+guint+GArray_guchar_+guint__", "array of (byte array, uint32, byte array, uint32)" }, + { NULL, NULL } +}; + +static void +write_one_setting (FILE *f, gboolean book, SettingNewFunc func) +{ + NMSetting *s; + GParamSpec **props, **iter; + guint num; + const char *row_fmt_str; + + s = func (); + + /* write out section header */ + (void) fprintf (f, + "<table>\n" + " <title>%s setting</title>\n" + " <tgroup cols=\"4\">\n" + " <thead>\n" + " <row>\n" + " <entry>Key Name</entry>\n" + " <entry>Value Type</entry>\n" + " <entry>Default Value</entry>\n" + " <entry>Value Description</entry>\n" + " </row>\n" + " </thead>\n" + " <tbody>\n", + nm_setting_get_name (s)); + + props = g_object_class_list_properties (G_OBJECT_GET_CLASS (G_OBJECT (s)), &num); + for (iter = props; iter && *iter; iter++) { + const char *key_name, *value_type, *value_desc; + char *default_value; + TypeNameElement *name_iter; + GValue value = { 0, }; + char *flags_str = NULL; + + value_type = g_type_name (G_PARAM_SPEC_VALUE_TYPE (*iter)); + for (name_iter = &name_map[0]; name_iter && name_iter->gvalue_name; name_iter++) { + if (!strcmp (value_type, name_iter->gvalue_name)) { + value_type = name_iter->new_name; + break; + } + } + + key_name = g_param_spec_get_name (*iter); + value_desc = g_param_spec_get_blurb (*iter); + + g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (*iter)); + g_param_value_set_default (*iter, &value); + default_value = g_strdup_value_contents (&value); + if (default_value && !strcmp (default_value, "NULL")) { + g_free (default_value); + default_value = NULL; + } + + if (!strcmp (key_name, NM_SETTING_NAME)) { + g_free (default_value); + default_value = NULL; + g_object_get (G_OBJECT (s), NM_SETTING_NAME, &default_value, NULL); + } + + if (g_str_has_suffix (key_name, "-flags")) + flags_str = g_strdup_printf (" (see <xref linkend=\"secrets-flags\"/> for flag values)"); + + if (book) + row_fmt_str = + " <row>\n" + " <entry><screen>%s</screen></entry>\n" + " <entry><screen>%s</screen></entry>\n" + " <entry><screen>%s</screen></entry>\n" + " <entry>%s%s</entry>\n" + " </row>\n"; + else + row_fmt_str = + " <row>\n" + " <entry align=\"left\">%s</entry>\n" + " <entry align=\"left\">%s</entry>\n" + " <entry align=\"left\">%s</entry>\n" + " <entry>%s%s</entry>\n" + " </row>\n"; + + (void) fprintf (f, row_fmt_str, + key_name, + value_type, + default_value ? default_value : "", + value_desc, + flags_str ? flags_str : ""); + + g_free (flags_str); + g_free (default_value); + } + + (void) fprintf (f, + " </tbody>\n" + " </tgroup>\n" + "</table>\n"); + + g_object_unref (s); +} + +static void +writer_header_docbook_section (FILE *f) +{ + (void) fprintf (f, + "<?xml version=\"1.0\"?>\n" + "<!DOCTYPE section PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"\n" + " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\" [\n" + "<!ENTITY %% local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" + "]>" + "<section>\n" + " <title>Configuration Settings</title>\n" + " <para>\n"); +} + +static void +writer_footer_docbook_section (FILE *f) +{ + (void) fprintf (f, + " </para>\n" + "</section>\n"); +} + +static void +writer_header_docbook_manpage (FILE *f) +{ + char time_str[64]; + time_t t; + + t = time (NULL); + strftime (time_str, sizeof (time_str), "%d %B %Y", localtime (&t)); + + (void) fprintf (f, + "<?xml version=\"1.0\"?>\n" + "<!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"\n" + " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\" [\n" + "<!ENTITY %% local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" + "]>" + "<refentry id=\"nm-settings\">\n" + " <refentryinfo>\n" + " <date>%s</date>\n" + " </refentryinfo>\n" + " <refmeta>\n" + " <refentrytitle>nm-settings</refentrytitle>\n" + " <manvolnum>5</manvolnum>\n" + " <refmiscinfo class=\"source\">NetworkManager</refmiscinfo>\n" + " <refmiscinfo class=\"manual\">Configuration</refmiscinfo>\n" + " <refmiscinfo class=\"version\">%s</refmiscinfo>\n" + " </refmeta>\n" + " <refnamediv>\n" + " <refname>nm-settings</refname>\n" + " <refpurpose>Description of settings and parameters of NetworkManager connections.</refpurpose>\n" + " </refnamediv>\n" + " <refsect1>\n" + " <title>DESCRIPTION</title>\n" + " <para>\n" + " NetworkManager is based on a concept of connections. These connections are\n" + " then applied to a device to make an active network connection. Users can create\n" + " as many connections as they see fit. The connections are handled by NetworkManager\n" + " via <emphasis>settings service</emphasis> and are exported on D-Bus \n" + " (<emphasis>/org/freedesktop/NetworkManager/Settings/<num></emphasis> objects).\n" + " The conceptual objects can be described as follows:\n" + " <variablelist>\n" + " <varlistentry>\n" + " <term>Connection</term>\n" + " <listitem>\n" + " <para>\n" + " A specific, encapsulated, independent group of settings describing\n" + " all the configuration required to connect to a specific network.\n" + " It is referred to by a unique identifier called the UUID. A connection\n" + " is tied to a one specific device type, but not necessarily a specific\n" + " hardware device. It is composed of one or more <emphasis>Settings</emphasis>\n" + " objects.\n" + " </para>\n" + " </listitem>\n" + " </varlistentry>\n" + " </variablelist>\n" + " <variablelist>\n" + " <varlistentry>\n" + " <term>Setting</term>\n" + " <listitem>\n" + " <para>\n" + " A group of related key/value pairs describing a specific piece of a\n" + " <emphasis>Connection</emphasis>. Settings keys and allowed values are\n" + " described in the tables below. Developers can find the settings\n" + " objects in the libnm-util sources. Look for the <function>class_init</function>\n" + " functions near the bottoms of each setting source file.\n" + " </para>\n" + " </listitem>\n" + " </varlistentry>\n" + " </variablelist>\n", + time_str, VERSION); +} + +static void +writer_footer_docbook_manpage (FILE *f) +{ + (void) fprintf (f, + " </para>\n" + " <refsect2 id=\"secrets-flags\">\n" + " <title>Secret flag types:</title>\n" + " <para>\n" + " Each secret property in a setting has an associated <emphasis>flags</emphasis> property\n" + " that describes how to handle that secret. The <emphasis>flags</emphasis> property is a bitfield\n" + " that contains zero or more of the following values logically OR-ed together.\n" + " </para>\n" + " <itemizedlist>\n" + " <listitem>\n" + " <para>0x0 (none) - the system is responsible for providing and storing this secret.</para>\n" + " </listitem>\n" + " <listitem>\n" + " <para>0x1 (agent-owned) - a user-session secret agent is responsible for providing and storing\n" + " this secret; when it is required, agents will be asked to provide it.</para>\n" + " </listitem>\n" + " <listitem>\n" + " <para>0x2 (not-saved) - this secret should not be saved but should be requested from the user\n" + " each time it is required. This flag should be used for One-Time-Pad secrets, PIN codes from hardware tokens,\n" + " or if the user simply does not want to save the secret.</para>\n" + " </listitem>\n" + " <listitem>\n" + " <para>0x4 (not-required) - in some situations it cannot be automatically determined that a secret\n" + " is required or not. This flag hints that the secret is not required and should not be requested from the user.</para>\n" + " </listitem>\n" + " </itemizedlist>\n" + " </refsect2>\n" + " </refsect1>\n" + " <refsect1>\n" + " <title>AUTHOR</title>\n" + " <para>\n" + " <author>\n" + " <firstname>NetworkManager developers</firstname>\n" + " </author>\n" + " </para>\n" + " </refsect1>\n" + " <refsect1>\n" + " <title>FILES</title>\n" + " <para>/etc/NetworkManager/system-connections</para>\n" + " <para>or distro plugin-specific location</para>\n" + " </refsect1>\n" + " <refsect1>\n" + " <title>SEE ALSO</title>\n" + " <para>https://live.gnome.org/NetworkManagerConfiguration</para>\n" + " <para>NetworkManager(8), nmcli(1), NetworkManager.conf(5)</para>\n" + " </refsect1>\n" + "</refentry>\n"); +} + +static void +usage (const char *str) +{ + fprintf (stderr, "Usage: %s <type> <output file> [<type> <output file>]\n" + "<type> := book|refentry\n", + str); + _exit (1); +} + +int +main (int argc, char *argv[]) +{ + GError *error = NULL; + FILE *f1 = NULL, *f2 = NULL; + SettingNewFunc *fptr; + const char *book_file = NULL, *refentry_file = NULL;; + + if (argc != 3 && argc != 5) + usage (argv[0]); + + if (strcmp (argv[1], "book") == 0) + book_file = argv[2]; + else if (strcmp (argv[1], "refentry") == 0) + refentry_file = argv[2]; + else + usage (argv[0]); + + if (argc == 5) { + if (strcmp (argv[3], "book") == 0 && !book_file) + book_file = argv[4]; + else if (strcmp (argv[3], "refentry") == 0 && !refentry_file) + refentry_file = argv[4]; + else + usage (argv[0]); + } + + g_type_init (); + + if (!nm_utils_init (&error)) { + fprintf (stderr, "ERR: failed to initialize libnm-util: %s", error->message); + _exit (2); + } + + if (book_file) { + f1 = fopen (book_file, "w"); + if (!f1) { + fprintf (stderr, "ERR: could not create %s: %d\n", book_file, errno); + _exit (3); + } + } + if (refentry_file) { + f2 = fopen (refentry_file, "w"); + if (!f2) { + fprintf (stderr, "ERR: could not create %s: %d\n", refentry_file, errno); + _exit (3); + } + } + + /* Write out docbook 'book' xml - for html generation */ + if (f1) { + writer_header_docbook_section (f1); + for (fptr = funcs; fptr && *fptr; fptr++) + write_one_setting (f1, TRUE, *fptr); + writer_footer_docbook_section (f1); + } + + /* Write out docbook 'refentry' xml - for man page generation */ + if (f2) { + writer_header_docbook_manpage (f2); + for (fptr = funcs; fptr && *fptr; fptr++) + write_one_setting (f2, FALSE, *fptr); + writer_footer_docbook_manpage (f2); + } + + if (f1) + fclose (f1); + if (f2) + fclose (f2); + _exit (0); +} + diff --git a/tools/manpages-docbook.xsl b/tools/manpages-docbook.xsl new file mode 100644 index 000000000..15e87a0f5 --- /dev/null +++ b/tools/manpages-docbook.xsl @@ -0,0 +1,5 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version='1.0'> +<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/> +</xsl:stylesheet> diff --git a/vapi/Makefile.in b/vapi/Makefile.in index 6c30f944a..d1e9f2d49 100644 --- a/vapi/Makefile.in +++ b/vapi/Makefile.in @@ -100,12 +100,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.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/libnl-check.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 + $(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) mkinstalldirs = $(install_sh) -d @@ -253,12 +252,6 @@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBM = @LIBM@ -LIBNL1_CFLAGS = @LIBNL1_CFLAGS@ -LIBNL1_LIBS = @LIBNL1_LIBS@ -LIBNL2_CFLAGS = @LIBNL2_CFLAGS@ -LIBNL2_LIBS = @LIBNL2_LIBS@ -LIBNL3_CFLAGS = @LIBNL3_CFLAGS@ -LIBNL3_LIBS = @LIBNL3_LIBS@ LIBNL_CFLAGS = @LIBNL_CFLAGS@ LIBNL_LIBS = @LIBNL_LIBS@ LIBOBJS = @LIBOBJS@ |