diff options
Diffstat (limited to 'libnm')
61 files changed, 699 insertions, 377 deletions
diff --git a/libnm/NetworkManager.h b/libnm/NetworkManager.h index d0dec1a0..97327f92 100644 --- a/libnm/NetworkManager.h +++ b/libnm/NetworkManager.h @@ -23,79 +23,82 @@ #define __NETWORKMANAGER_H_INSIDE__ -#include <nm-access-point.h> -#include <nm-active-connection.h> -#include <nm-client.h> -#include <nm-connection.h> -#include <nm-core-enum-types.h> -#include <nm-dbus-interface.h> -#include <nm-device-adsl.h> -#include <nm-device-bond.h> -#include <nm-device-bridge.h> -#include <nm-device-bt.h> -#include <nm-device-ethernet.h> -#include <nm-device-generic.h> -#include <nm-device-infiniband.h> -#include <nm-device-ip-tunnel.h> -#include <nm-device-macvlan.h> -#include <nm-device-modem.h> -#include <nm-device-olpc-mesh.h> -#include <nm-device-team.h> -#include <nm-device-tun.h> -#include <nm-device-vlan.h> -#include <nm-device-vxlan.h> -#include <nm-device-wifi.h> -#include <nm-device-wimax.h> -#include <nm-device.h> -#include <nm-dhcp-config.h> -#include <nm-enum-types.h> -#include <nm-ip-config.h> -#include <nm-object.h> -#include <nm-remote-connection.h> -#include <nm-setting-8021x.h> -#include <nm-setting-adsl.h> -#include <nm-setting-bluetooth.h> -#include <nm-setting-bond.h> -#include <nm-setting-bridge.h> -#include <nm-setting-bridge-port.h> -#include <nm-setting-cdma.h> -#include <nm-setting-connection.h> -#include <nm-setting-dcb.h> -#include <nm-setting-generic.h> -#include <nm-setting-gsm.h> -#include <nm-setting-infiniband.h> -#include <nm-setting-ip4-config.h> -#include <nm-setting-ip6-config.h> -#include <nm-setting-ip-config.h> -#include <nm-setting-ip-tunnel.h> -#include <nm-setting-macsec.h> -#include <nm-setting-macvlan.h> -#include <nm-setting-olpc-mesh.h> -#include <nm-setting-ppp.h> -#include <nm-setting-pppoe.h> -#include <nm-setting-proxy.h> -#include <nm-setting-serial.h> -#include <nm-setting-team.h> -#include <nm-setting-team-port.h> -#include <nm-setting-tun.h> -#include <nm-setting-vlan.h> -#include <nm-setting-vpn.h> -#include <nm-setting-vxlan.h> -#include <nm-setting-wimax.h> -#include <nm-setting-wired.h> -#include <nm-setting-wireless.h> -#include <nm-setting-wireless-security.h> -#include <nm-setting.h> -#include <nm-simple-connection.h> -#include <nm-utils.h> -#include <nm-version.h> -#include <nm-vpn-connection.h> -#include <nm-vpn-dbus-interface.h> -#include <nm-vpn-editor.h> -#include <nm-vpn-editor-plugin.h> -#include <nm-vpn-plugin-info.h> -#include <nm-vpn-service-plugin.h> -#include <nm-wimax-nsp.h> +#include "nm-access-point.h" +#include "nm-active-connection.h" +#include "nm-client.h" +#include "nm-connection.h" +#include "nm-core-enum-types.h" +#include "nm-dbus-interface.h" +#include "nm-device-adsl.h" +#include "nm-device-bond.h" +#include "nm-device-bridge.h" +#include "nm-device-bt.h" +#include "nm-device-dummy.h" +#include "nm-device-ethernet.h" +#include "nm-device-generic.h" +#include "nm-device-infiniband.h" +#include "nm-device-ip-tunnel.h" +#include "nm-device-macvlan.h" +#include "nm-device-modem.h" +#include "nm-device-olpc-mesh.h" +#include "nm-device-team.h" +#include "nm-device-tun.h" +#include "nm-device-vlan.h" +#include "nm-device-vxlan.h" +#include "nm-device-wifi.h" +#include "nm-device-wimax.h" +#include "nm-device.h" +#include "nm-dhcp-config.h" +#include "nm-enum-types.h" +#include "nm-ip-config.h" +#include "nm-object.h" +#include "nm-remote-connection.h" +#include "nm-setting-8021x.h" +#include "nm-setting-adsl.h" +#include "nm-setting-bluetooth.h" +#include "nm-setting-bond.h" +#include "nm-setting-bridge.h" +#include "nm-setting-bridge-port.h" +#include "nm-setting-cdma.h" +#include "nm-setting-connection.h" +#include "nm-setting-dcb.h" +#include "nm-setting-dummy.h" +#include "nm-setting-generic.h" +#include "nm-setting-gsm.h" +#include "nm-setting-infiniband.h" +#include "nm-setting-ip4-config.h" +#include "nm-setting-ip6-config.h" +#include "nm-setting-ip-config.h" +#include "nm-setting-ip-tunnel.h" +#include "nm-setting-macsec.h" +#include "nm-setting-macvlan.h" +#include "nm-setting-olpc-mesh.h" +#include "nm-setting-ppp.h" +#include "nm-setting-pppoe.h" +#include "nm-setting-proxy.h" +#include "nm-setting-serial.h" +#include "nm-setting-team.h" +#include "nm-setting-team-port.h" +#include "nm-setting-tun.h" +#include "nm-setting-user.h" +#include "nm-setting-vlan.h" +#include "nm-setting-vpn.h" +#include "nm-setting-vxlan.h" +#include "nm-setting-wimax.h" +#include "nm-setting-wired.h" +#include "nm-setting-wireless.h" +#include "nm-setting-wireless-security.h" +#include "nm-setting.h" +#include "nm-simple-connection.h" +#include "nm-utils.h" +#include "nm-version.h" +#include "nm-vpn-connection.h" +#include "nm-vpn-dbus-interface.h" +#include "nm-vpn-editor.h" +#include "nm-vpn-editor-plugin.h" +#include "nm-vpn-plugin-info.h" +#include "nm-vpn-service-plugin.h" +#include "nm-wimax-nsp.h" #undef __NETWORKMANAGER_H_INSIDE__ diff --git a/libnm/generate-setting-docs.py b/libnm/generate-setting-docs.py index e1ea9723..d0625b01 100755 --- a/libnm/generate-setting-docs.py +++ b/libnm/generate-setting-docs.py @@ -112,7 +112,7 @@ def get_prop_type(setting, pspec, propxml): return prop_type -def get_docs(setting, pspec, propxml): +def get_docs(propxml): doc_xml = propxml.find('gi:doc', ns_map) if doc_xml is None: return None @@ -162,6 +162,11 @@ def get_default_value(setting, pspec, propxml): return default_value +def settings_sort_key(x): + x_prefix = x.attrib['{%s}symbol-prefix' % ns_map['c']] + # always sort NMSettingConnection first + return (x_prefix != "setting_connection", x_prefix); + def escape(val): return str(val).replace('"', '"') @@ -186,7 +191,7 @@ settings = girxml.findall('./gi:namespace/gi:class[@parent="Setting"]', ns_map) # Hack. Need a better way to do this ipxml = girxml.find('./gi:namespace/gi:class[@name="SettingIPConfig"]', ns_map) settings.extend(girxml.findall('./gi:namespace/gi:class[@parent="SettingIPConfig"]', ns_map)) -settings = sorted(settings, key=lambda setting: setting.attrib['{%s}symbol-prefix' % ns_map['c']]) +settings = sorted(settings, key=settings_sort_key) init_constants(girxml, settings) @@ -207,7 +212,10 @@ for settingxml in settings: new_func = NM.__getattr__(settingxml.attrib['name']) setting = new_func() - outfile.write(" <setting name=\"%s\">\n" % setting.props.name) + class_desc = get_docs(settingxml) + if class_desc is None: + raise Exception("%s needs a gtk-doc block with one-line description" % setting.props.name) + outfile.write(" <setting name=\"%s\" description=\"%s\">\n" % (setting.props.name, class_desc)) setting_properties = { prop.name: prop for prop in GObject.list_properties(setting) } if args.overrides is None: @@ -231,7 +239,7 @@ for settingxml in settings: propxml = ipxml.find('./gi:property[@name="%s"]' % pspec.name, ns_map) value_type = get_prop_type(setting, pspec, propxml) - value_desc = get_docs(setting, pspec, propxml) + value_desc = get_docs(propxml) default_value = get_default_value(setting, pspec, propxml) if prop in setting_overrides: diff --git a/libnm/libnm.ver b/libnm/libnm.ver index d0562e2c..b767bf83 100644 --- a/libnm/libnm.ver +++ b/libnm/libnm.ver @@ -1143,3 +1143,37 @@ global: nm_utils_version; nm_utils_is_valid_iface_name; } libnm_1_4_0; + +libnm_1_8_0 { +global: + nm_active_connection_state_reason_get_type; + nm_active_connection_get_state_reason; + nm_connection_get_setting_dummy; + nm_device_dummy_get_type; + nm_ip_route_get_variant_attribute_spec; + nm_ip_route_attribute_validate; + nm_setting_802_1x_auth_flags_get_type; + nm_setting_802_1x_get_auth_timeout; + nm_setting_802_1x_get_ca_cert_password; + nm_setting_802_1x_get_ca_cert_password_flags; + nm_setting_802_1x_get_client_cert_password; + nm_setting_802_1x_get_client_cert_password_flags; + nm_setting_802_1x_get_phase1_auth_flags; + nm_setting_802_1x_get_phase2_ca_cert_password; + nm_setting_802_1x_get_phase2_ca_cert_password_flags; + nm_setting_802_1x_get_phase2_client_cert_password; + nm_setting_802_1x_get_phase2_client_cert_password_flags; + nm_setting_cdma_get_mtu; + nm_setting_dummy_get_type; + nm_setting_dummy_new; + nm_setting_gsm_get_mtu; + nm_setting_user_check_key; + nm_setting_user_check_val; + nm_setting_user_get_data; + nm_setting_user_get_keys; + nm_setting_user_get_type; + nm_setting_user_new; + nm_setting_user_set_data; + nm_utils_format_variant_attributes; + nm_utils_parse_variant_attributes; +} libnm_1_6_0; diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c index 60b8e33d..ed0135ba 100644 --- a/libnm/nm-access-point.c +++ b/libnm/nm-access-point.c @@ -271,9 +271,11 @@ nm_access_point_connection_valid (NMAccessPoint *ap, NMConnection *connection) guint32 ap_freq, setting_chan, ap_chan; s_con = nm_connection_get_setting_connection (connection); - g_assert (s_con); + if (!s_con) + return FALSE; + ctype = nm_setting_connection_get_connection_type (s_con); - if (strcmp (ctype, NM_SETTING_WIRELESS_SETTING_NAME) != 0) + if (!ctype || !nm_streq (ctype, NM_SETTING_WIRELESS_SETTING_NAME)) return FALSE; s_wifi = nm_connection_get_setting_wireless (connection); @@ -282,25 +284,30 @@ nm_access_point_connection_valid (NMAccessPoint *ap, NMConnection *connection) /* SSID checks */ ap_ssid = nm_access_point_get_ssid (ap); - g_warn_if_fail (ap_ssid != NULL); - setting_ssid = nm_setting_wireless_get_ssid (s_wifi); - if (!setting_ssid || !ap_ssid) + if (!ap_ssid) return FALSE; - if (!g_bytes_equal (ap_ssid, setting_ssid)) + setting_ssid = nm_setting_wireless_get_ssid (s_wifi); + if ( !setting_ssid + || !g_bytes_equal (ap_ssid, setting_ssid)) return FALSE; /* BSSID checks */ ap_bssid = nm_access_point_get_bssid (ap); - g_warn_if_fail (ap_bssid); + if (!ap_bssid) + return FALSE; setting_bssid = nm_setting_wireless_get_bssid (s_wifi); - if (setting_bssid && ap_bssid) { - if (!nm_utils_hwaddr_matches (ap_bssid, -1, setting_bssid, -1)) + if (setting_bssid) { + guint8 c[ETH_ALEN]; + + if ( !nm_utils_hwaddr_aton (ap_bssid, c, ETH_ALEN) + || !nm_utils_hwaddr_matches (c, ETH_ALEN, setting_bssid, -1)) return FALSE; } /* Mode */ ap_mode = nm_access_point_get_mode (ap); - g_warn_if_fail (ap_mode != NM_802_11_MODE_UNKNOWN); + if (ap_mode == NM_802_11_MODE_UNKNOWN) + return FALSE; setting_mode = nm_setting_wireless_get_mode (s_wifi); if (setting_mode && ap_mode) { if (!strcmp (setting_mode, "infrastructure") && (ap_mode != NM_802_11_MODE_INFRA)) diff --git a/libnm/nm-access-point.h b/libnm/nm-access-point.h index 142ab295..177b6a9a 100644 --- a/libnm/nm-access-point.h +++ b/libnm/nm-access-point.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-object.h> +#include "nm-object.h" G_BEGIN_DECLS diff --git a/libnm/nm-active-connection.c b/libnm/nm-active-connection.c index 6a823403..412cb3ba 100644 --- a/libnm/nm-active-connection.c +++ b/libnm/nm-active-connection.c @@ -37,6 +37,8 @@ #include "nm-ip6-config.h" #include "nm-remote-connection.h" +#include "introspection/org.freedesktop.NetworkManager.Connection.Active.h" + G_DEFINE_TYPE (NMActiveConnection, nm_active_connection, NM_TYPE_OBJECT); #define NM_ACTIVE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionPrivate)) @@ -57,6 +59,7 @@ typedef struct { NMDhcpConfig *dhcp6_config; gboolean is_vpn; NMDevice *master; + NMActiveConnectionStateReason reason; } NMActiveConnectionPrivate; enum { @@ -80,6 +83,14 @@ enum { LAST_PROP }; +enum { + STATE_CHANGED, + + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + /** * nm_active_connection_get_connection: * @connection: a #NMActiveConnection @@ -205,6 +216,24 @@ nm_active_connection_get_state (NMActiveConnection *connection) } /** + * nm_active_connection_get_state_reason: + * @connection: a #NMActiveConnection + * + * Gets the reason for active connection's state. + * + * Returns: the reason + * + * Since: 1.8 + **/ +NMActiveConnectionStateReason +nm_active_connection_get_state_reason (NMActiveConnection *connection) +{ + g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NM_ACTIVE_CONNECTION_STATE_REASON_UNKNOWN); + + return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->reason; +} + +/** * nm_active_connection_get_default: * @connection: a #NMActiveConnection * @@ -351,9 +380,38 @@ nm_active_connection_init (NMActiveConnection *connection) } static void +state_changed_proxy (NMDBusActiveConnectionProxy *proxy, + NMActiveConnectionState state, + NMActiveConnectionStateReason reason, + gpointer user_data) +{ + NMActiveConnection *connection = NM_ACTIVE_CONNECTION (user_data); + NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection); + + priv->state = state; + priv->reason = reason; + g_signal_emit (connection, signals[STATE_CHANGED], 0, state, reason); + g_object_notify (G_OBJECT (connection), NM_ACTIVE_CONNECTION_STATE); +} + +static void +constructed (GObject *object) +{ + GDBusProxy *proxy; + + proxy = _nm_object_get_proxy (NM_OBJECT (object), NM_DBUS_INTERFACE_ACTIVE_CONNECTION); + g_signal_connect (proxy, "state-changed", + G_CALLBACK (state_changed_proxy), object); + g_object_unref (proxy); + + G_OBJECT_CLASS (nm_active_connection_parent_class)->constructed (object); +} + +static void dispose (GObject *object) { NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object); + GDBusProxy *proxy; g_clear_pointer (&priv->devices, g_ptr_array_unref); @@ -364,6 +422,12 @@ dispose (GObject *object) g_clear_object (&priv->ip6_config); g_clear_object (&priv->dhcp6_config); + proxy = _nm_object_get_proxy (NM_OBJECT (object), NM_DBUS_INTERFACE_ACTIVE_CONNECTION); + if (proxy) { + g_signal_handlers_disconnect_by_data (proxy, object); + g_object_unref (proxy); + } + G_OBJECT_CLASS (nm_active_connection_parent_class)->dispose (object); } @@ -503,6 +567,7 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class) /* virtual methods */ object_class->get_property = get_property; + object_class->constructed = constructed; object_class->dispose = dispose; object_class->finalize = finalize; @@ -693,4 +758,13 @@ nm_active_connection_class_init (NMActiveConnectionClass *ap_class) NM_TYPE_DEVICE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /* signals */ + signals[STATE_CHANGED] = + g_signal_new ("state-changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + 0, NULL, NULL, NULL, + G_TYPE_NONE, 2, + G_TYPE_UINT, G_TYPE_UINT); } diff --git a/libnm/nm-active-connection.h b/libnm/nm-active-connection.h index 13e50a06..23cd7372 100644 --- a/libnm/nm-active-connection.h +++ b/libnm/nm-active-connection.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-object.h> +#include "nm-object.h" G_BEGIN_DECLS @@ -69,21 +69,23 @@ typedef struct { GType nm_active_connection_get_type (void); -NMRemoteConnection *nm_active_connection_get_connection (NMActiveConnection *connection); -const char *nm_active_connection_get_id (NMActiveConnection *connection); -const char *nm_active_connection_get_uuid (NMActiveConnection *connection); -const char *nm_active_connection_get_connection_type (NMActiveConnection *connection); -const char *nm_active_connection_get_specific_object_path (NMActiveConnection *connection); -const GPtrArray *nm_active_connection_get_devices (NMActiveConnection *connection); -NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *connection); -NMDevice *nm_active_connection_get_master (NMActiveConnection *connection); -gboolean nm_active_connection_get_default (NMActiveConnection *connection); -NMIPConfig *nm_active_connection_get_ip4_config (NMActiveConnection *connection); -NMDhcpConfig *nm_active_connection_get_dhcp4_config (NMActiveConnection *connection); -gboolean nm_active_connection_get_default6 (NMActiveConnection *connection); -NMIPConfig *nm_active_connection_get_ip6_config (NMActiveConnection *connection); -NMDhcpConfig *nm_active_connection_get_dhcp6_config (NMActiveConnection *connection); -gboolean nm_active_connection_get_vpn (NMActiveConnection *connection); +NMRemoteConnection *nm_active_connection_get_connection (NMActiveConnection *connection); +const char *nm_active_connection_get_id (NMActiveConnection *connection); +const char *nm_active_connection_get_uuid (NMActiveConnection *connection); +const char *nm_active_connection_get_connection_type (NMActiveConnection *connection); +const char *nm_active_connection_get_specific_object_path (NMActiveConnection *connection); +const GPtrArray *nm_active_connection_get_devices (NMActiveConnection *connection); +NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *connection); +NM_AVAILABLE_IN_1_8 +NMActiveConnectionStateReason nm_active_connection_get_state_reason (NMActiveConnection *connection); +NMDevice *nm_active_connection_get_master (NMActiveConnection *connection); +gboolean nm_active_connection_get_default (NMActiveConnection *connection); +NMIPConfig *nm_active_connection_get_ip4_config (NMActiveConnection *connection); +NMDhcpConfig *nm_active_connection_get_dhcp4_config (NMActiveConnection *connection); +gboolean nm_active_connection_get_default6 (NMActiveConnection *connection); +NMIPConfig *nm_active_connection_get_ip6_config (NMActiveConnection *connection); +NMDhcpConfig *nm_active_connection_get_dhcp6_config (NMActiveConnection *connection); +gboolean nm_active_connection_get_vpn (NMActiveConnection *connection); G_END_DECLS diff --git a/libnm/nm-client.c b/libnm/nm-client.c index 63eaa84c..47f1548e 100644 --- a/libnm/nm-client.c +++ b/libnm/nm-client.c @@ -22,6 +22,7 @@ #include "nm-default.h" #include <string.h> +#include <libudev.h> #include "nm-utils.h" #include "nm-client.h" @@ -45,6 +46,7 @@ #include "introspection/org.freedesktop.NetworkManager.Settings.h" #include "introspection/org.freedesktop.NetworkManager.Settings.Connection.h" #include "introspection/org.freedesktop.NetworkManager.VPN.Connection.h" +#include "introspection/org.freedesktop.NetworkManager.Connection.Active.h" #include "nm-access-point.h" #include "nm-active-connection.h" @@ -52,6 +54,7 @@ #include "nm-device-bond.h" #include "nm-device-bridge.h" #include "nm-device-bt.h" +#include "nm-device-dummy.h" #include "nm-device-ethernet.h" #include "nm-device-generic.h" #include "nm-device-infiniband.h" @@ -94,6 +97,7 @@ typedef struct { NMDnsManager *dns_manager; GDBusObjectManager *object_manager; GCancellable *new_object_manager_cancellable; + struct udev *udev; } NMClientPrivate; enum { @@ -153,15 +157,7 @@ static const GPtrArray empty = { 0, }; * * Returns: the error quark used for #NMClient errors. **/ -GQuark -nm_client_error_quark (void) -{ - static GQuark quark; - - if (G_UNLIKELY (!quark)) - quark = g_quark_from_static_string ("nm-client-error-quark"); - return quark; -} +NM_CACHED_QUARK_FCN ("nm-client-error-quark", nm_client_error_quark) /*****************************************************************************/ @@ -2015,6 +2011,8 @@ proxy_type (GDBusObjectManagerClient *manager, return NMDBUS_TYPE_DNS_MANAGER_PROXY; else if (strcmp (interface_name, NM_DBUS_INTERFACE_VPN_CONNECTION) == 0) return NMDBUS_TYPE_VPN_CONNECTION_PROXY; + else if (strcmp (interface_name, NM_DBUS_INTERFACE_ACTIVE_CONNECTION) == 0) + return NMDBUS_TYPE_ACTIVE_CONNECTION_PROXY; /* Use a generic D-Bus Proxy whenever we can. The typed GDBusProxy * subclasses actually use quite some memory, so they're better avoided. */ @@ -2022,8 +2020,9 @@ proxy_type (GDBusObjectManagerClient *manager, } static NMObject * -obj_nm_for_gdbus_object (GDBusObject *object, GDBusObjectManager *object_manager) +obj_nm_for_gdbus_object (NMClient *self, GDBusObject *object, GDBusObjectManager *object_manager) { + NMClientPrivate *priv; GList *interfaces; GList *l; GType type = G_TYPE_INVALID; @@ -2054,6 +2053,8 @@ obj_nm_for_gdbus_object (GDBusObject *object, GDBusObjectManager *object_manager type = NM_TYPE_DEVICE_BRIDGE; else if (strcmp (ifname, NM_DBUS_INTERFACE_DEVICE_BLUETOOTH) == 0) type = NM_TYPE_DEVICE_BT; + else if (strcmp (ifname, NM_DBUS_INTERFACE_DEVICE_DUMMY) == 0) + type = NM_TYPE_DEVICE_DUMMY; else if (strcmp (ifname, NM_DBUS_INTERFACE_DEVICE_WIRED) == 0) type = NM_TYPE_DEVICE_ETHERNET; else if (strcmp (ifname, NM_DBUS_INTERFACE_DEVICE_GENERIC) == 0) @@ -2113,6 +2114,12 @@ obj_nm_for_gdbus_object (GDBusObject *object, GDBusObjectManager *object_manager NM_OBJECT_DBUS_OBJECT, object, NM_OBJECT_DBUS_OBJECT_MANAGER, object_manager, NULL); + if (NM_IS_DEVICE (obj_nm)) { + priv = NM_CLIENT_GET_PRIVATE (self); + if (!priv->udev) + priv->udev = udev_new (); + _nm_device_set_udev (NM_DEVICE (obj_nm), priv->udev); + } g_object_set_qdata_full (G_OBJECT (object), _nm_object_obj_nm_quark (), obj_nm, g_object_unref); return obj_nm; @@ -2132,9 +2139,10 @@ obj_nm_inited (GObject *object, GAsyncResult *result, gpointer user_data) static void object_added (GDBusObjectManager *object_manager, GDBusObject *object, gpointer user_data) { + NMClient *client = user_data; NMObject *obj_nm; - obj_nm = obj_nm_for_gdbus_object (object, object_manager); + obj_nm = obj_nm_for_gdbus_object (client, object, object_manager); if (obj_nm) { g_async_initable_init_async (G_ASYNC_INITABLE (obj_nm), G_PRIORITY_DEFAULT, NULL, @@ -2161,7 +2169,7 @@ objects_created (NMClient *client, GDBusObjectManager *object_manager, GError ** /* First just ensure all the NMObjects for known GDBusObjects exist. */ objects = g_dbus_object_manager_get_objects (object_manager); for (iter = objects; iter; iter = iter->next) - obj_nm_for_gdbus_object (iter->data, object_manager); + obj_nm_for_gdbus_object (client, iter->data, object_manager); g_list_free_full (objects, g_object_unref); manager = g_dbus_object_manager_get_object (object_manager, NM_DBUS_PATH); @@ -2530,10 +2538,7 @@ dispose (GObject *object) { NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE (object); - if (priv->new_object_manager_cancellable) { - g_cancellable_cancel (priv->new_object_manager_cancellable); - g_clear_object (&priv->new_object_manager_cancellable); - } + nm_clear_g_cancellable (&priv->new_object_manager_cancellable); if (priv->manager) { g_signal_handlers_disconnect_by_data (priv->manager, object); @@ -2564,6 +2569,11 @@ dispose (GObject *object) } G_OBJECT_CLASS (nm_client_parent_class)->dispose (object); + + if (priv->udev) { + udev_unref (priv->udev); + priv->udev = NULL; + } } static void diff --git a/libnm/nm-client.h b/libnm/nm-client.h index 65e0bac8..5da16490 100644 --- a/libnm/nm-client.h +++ b/libnm/nm-client.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-types.h> +#include "nm-types.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-adsl.h b/libnm/nm-device-adsl.h index 113d25b1..0c922299 100644 --- a/libnm/nm-device-adsl.h +++ b/libnm/nm-device-adsl.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-bond.h b/libnm/nm-device-bond.h index 67f64280..da666b6e 100644 --- a/libnm/nm-device-bond.h +++ b/libnm/nm-device-bond.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-bridge.h b/libnm/nm-device-bridge.h index df0cb303..b860da7c 100644 --- a/libnm/nm-device-bridge.h +++ b/libnm/nm-device-bridge.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-bt.h b/libnm/nm-device-bt.h index 773cb148..8d6da684 100644 --- a/libnm/nm-device-bt.h +++ b/libnm/nm-device-bt.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-dummy.c b/libnm/nm-device-dummy.c new file mode 100644 index 00000000..f5910dc8 --- /dev/null +++ b/libnm/nm-device-dummy.c @@ -0,0 +1,80 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright 2017 Red Hat, Inc. + */ + +#include "nm-default.h" + +#include <string.h> + +#include "nm-device-dummy.h" +#include "nm-object-private.h" +#include "nm-setting-dummy.h" +#include "nm-setting-connection.h" + +G_DEFINE_TYPE (NMDeviceDummy, nm_device_dummy, NM_TYPE_DEVICE) + +#define NM_DEVICE_DUMMY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_DUMMY, NMDeviceDummyPrivate)) + +/*****************************************************************************/ + +static gboolean +connection_compatible (NMDevice *device, NMConnection *connection, GError **error) +{ + const char *iface_name; + + if (!NM_DEVICE_CLASS (nm_device_dummy_parent_class)->connection_compatible (device, connection, error)) + return FALSE; + + if (!nm_connection_is_type (connection, NM_SETTING_DUMMY_SETTING_NAME)) { + g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION, + _("The connection was not a dummy connection.")); + return FALSE; + } + + iface_name = nm_connection_get_interface_name (connection); + if (!iface_name) { + g_set_error_literal (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_INVALID_CONNECTION, + _("The connection did not specify an interface name.")); + return FALSE; + } + + return TRUE; +} + +static GType +get_setting_type (NMDevice *device) +{ + return NM_TYPE_SETTING_DUMMY; +} + +/*****************************************************************************/ + +static void +nm_device_dummy_init (NMDeviceDummy *device) +{ +} + +static void +nm_device_dummy_class_init (NMDeviceDummyClass *klass) +{ + NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); + + device_class->connection_compatible = connection_compatible; + device_class->get_setting_type = get_setting_type; +} diff --git a/libnm/nm-device-dummy.h b/libnm/nm-device-dummy.h new file mode 100644 index 00000000..85ee2bab --- /dev/null +++ b/libnm/nm-device-dummy.h @@ -0,0 +1,57 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + * Copyright 2017 Red Hat, Inc. + */ + +#ifndef __NM_DEVICE_DUMMY_H__ +#define __NM_DEVICE_DUMMY_H__ + +#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION) +#error "Only <NetworkManager.h> can be included directly." +#endif + +#include "nm-device.h" + +G_BEGIN_DECLS + +#define NM_TYPE_DEVICE_DUMMY (nm_device_dummy_get_type ()) +#define NM_DEVICE_DUMMY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_DUMMY, NMDeviceDummy)) +#define NM_DEVICE_DUMMY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_DUMMY, NMDeviceDummyClass)) +#define NM_IS_DEVICE_DUMMY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_DUMMY)) +#define NM_IS_DEVICE_DUMMY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_DUMMY)) +#define NM_DEVICE_DUMMY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_DUMMY, NMDeviceDummyClass)) + +/** + * NMDeviceDummy: + */ +struct _NMDeviceDummy { + NMDevice parent; +}; + +typedef struct { + NMDeviceClass parent; + + /*< private >*/ + gpointer padding[4]; +} NMDeviceDummyClass; + +GType nm_device_dummy_get_type (void); + +G_END_DECLS + +#endif /* __NM_DEVICE_DUMMY_H__ */ diff --git a/libnm/nm-device-ethernet.h b/libnm/nm-device-ethernet.h index 76f4fde1..86231781 100644 --- a/libnm/nm-device-ethernet.h +++ b/libnm/nm-device-ethernet.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-generic.h b/libnm/nm-device-generic.h index 2a4a1160..c37c9495 100644 --- a/libnm/nm-device-generic.h +++ b/libnm/nm-device-generic.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-infiniband.h b/libnm/nm-device-infiniband.h index 1f4ea217..38c81d9e 100644 --- a/libnm/nm-device-infiniband.h +++ b/libnm/nm-device-infiniband.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-ip-tunnel.h b/libnm/nm-device-ip-tunnel.h index 14251849..6d748d96 100644 --- a/libnm/nm-device-ip-tunnel.h +++ b/libnm/nm-device-ip-tunnel.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-macsec.h b/libnm/nm-device-macsec.h index d6d7c0ef..60f7d7f0 100644 --- a/libnm/nm-device-macsec.h +++ b/libnm/nm-device-macsec.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-macvlan.h b/libnm/nm-device-macvlan.h index aec280bd..5ccdbd2c 100644 --- a/libnm/nm-device-macvlan.h +++ b/libnm/nm-device-macvlan.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-modem.h b/libnm/nm-device-modem.h index fdf5c41f..a5af0346 100644 --- a/libnm/nm-device-modem.h +++ b/libnm/nm-device-modem.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-olpc-mesh.h b/libnm/nm-device-olpc-mesh.h index fc88beb9..5089bfd1 100644 --- a/libnm/nm-device-olpc-mesh.h +++ b/libnm/nm-device-olpc-mesh.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-team.h b/libnm/nm-device-team.h index 522e3d29..deecf072 100644 --- a/libnm/nm-device-team.h +++ b/libnm/nm-device-team.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-tun.h b/libnm/nm-device-tun.h index 71649f8f..2fea4544 100644 --- a/libnm/nm-device-tun.h +++ b/libnm/nm-device-tun.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-vlan.h b/libnm/nm-device-vlan.h index 1ee03bd5..158a89aa 100644 --- a/libnm/nm-device-vlan.h +++ b/libnm/nm-device-vlan.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-vxlan.h b/libnm/nm-device-vxlan.h index 70c7ed51..bd84f6f0 100644 --- a/libnm/nm-device-vxlan.h +++ b/libnm/nm-device-vxlan.h @@ -25,7 +25,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-wifi.h b/libnm/nm-device-wifi.h index ee0238df..8cfea1f3 100644 --- a/libnm/nm-device-wifi.h +++ b/libnm/nm-device-wifi.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device-wimax.h b/libnm/nm-device-wimax.h index 424779bd..cc3fc6e1 100644 --- a/libnm/nm-device-wimax.h +++ b/libnm/nm-device-wimax.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-device.h> +#include "nm-device.h" G_BEGIN_DECLS diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 02b5cad5..9cbdbd00 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -24,7 +24,7 @@ #include "nm-device.h" #include <string.h> -#include <gudev/gudev.h> +#include <libudev.h> #include "nm-dbus-interface.h" #include "nm-active-connection.h" @@ -40,6 +40,7 @@ #include "nm-dbus-helpers.h" #include "nm-device-tun.h" #include "nm-setting-connection.h" +#include "shared/nm-utils/nm-udev-utils.h" #include "introspection/org.freedesktop.NetworkManager.Device.h" @@ -79,7 +80,7 @@ typedef struct { NMActiveConnection *active_connection; GPtrArray *available_connections; - GUdevClient *client; + struct udev *udev; char *product, *short_product; char *vendor, *short_vendor; char *description, *bus_name; @@ -277,6 +278,7 @@ coerce_type (NMDeviceType type) case NM_DEVICE_TYPE_UNUSED1: case NM_DEVICE_TYPE_UNUSED2: case NM_DEVICE_TYPE_UNKNOWN: + case NM_DEVICE_TYPE_DUMMY: return type; } return NM_DEVICE_TYPE_UNKNOWN; @@ -291,12 +293,16 @@ dispose (GObject *object) g_clear_object (&priv->dhcp4_config); g_clear_object (&priv->ip6_config); g_clear_object (&priv->dhcp6_config); - g_clear_object (&priv->client); g_clear_object (&priv->active_connection); + udev_unref (priv->udev); + priv->udev = NULL; + g_clear_pointer (&priv->available_connections, g_ptr_array_unref); g_clear_pointer (&priv->lldp_neighbors, g_ptr_array_unref); + if (priv->proxy) + g_signal_handlers_disconnect_by_func (priv->proxy, device_state_reason_changed, object); g_clear_object (&priv->proxy); G_OBJECT_CLASS (nm_device_parent_class)->dispose (object); @@ -1287,56 +1293,19 @@ nm_device_get_available_connections (NMDevice *device) return NM_DEVICE_GET_PRIVATE (device)->available_connections; } -static inline guint8 -hex2byte (const char *hex) -{ - int a, b; - a = g_ascii_xdigit_value (*hex++); - if (a < 0) - return -1; - b = g_ascii_xdigit_value (*hex++); - if (b < 0) - return -1; - return (a << 4) | b; -} - -static char * -get_decoded_property (GUdevDevice *device, const char *property) +void +_nm_device_set_udev (NMDevice *device, struct udev *udev) { - const char *orig, *p; - char *unescaped, *n; - guint len; - - p = orig = g_udev_device_get_property (device, property); - if (!orig) - return NULL; - - len = strlen (orig); - n = unescaped = g_malloc0 (len + 1); - while (*p) { - if ((len >= 4) && (*p == '\\') && (*(p+1) == 'x')) { - *n++ = (char) hex2byte (p + 2); - p += 4; - len -= 4; - } else { - *n++ = *p++; - len--; - } - } + NMDevicePrivate *priv; - return unescaped; -} + nm_assert (NM_IS_DEVICE (device)); + nm_assert (udev); -static gboolean -ensure_udev_client (NMDevice *device) -{ - static const char *const subsys[3] = { "net", "tty", NULL }; - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); + priv = NM_DEVICE_GET_PRIVATE (device); - if (!priv->client) - priv->client = g_udev_client_new (subsys); + nm_assert (!priv->udev); - return priv->client != NULL; + priv->udev = udev_ref (udev); } static char * @@ -1345,51 +1314,37 @@ _get_udev_property (NMDevice *device, const char *db_prop) /* ID_XXX_FROM_DATABASE */ { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); - GUdevDevice *udev_device = NULL, *tmpdev, *olddev; + struct udev_device *udev_device, *tmpdev; const char *ifname; guint32 count = 0; char *enc_value = NULL, *db_value = NULL; - if (!ensure_udev_client (device)) + if (!priv->udev) return NULL; ifname = nm_device_get_iface (device); if (!ifname) return NULL; - udev_device = g_udev_client_query_by_subsystem_and_name (priv->client, "net", ifname); - if (!udev_device) - udev_device = g_udev_client_query_by_subsystem_and_name (priv->client, "tty", ifname); - if (!udev_device) - return NULL; - + udev_device = udev_device_new_from_subsystem_sysname (priv->udev, "net", ifname); + if (!udev_device) { + udev_device = udev_device_new_from_subsystem_sysname (priv->udev, "tty", ifname); + if (!udev_device) + return NULL; + } /* Walk up the chain of the device and its parents a few steps to grab * vendor and device ID information off it. */ - - /* Ref the device again because we have to unref it each iteration, - * as g_udev_device_get_parent() returns a ref-ed object. - */ - tmpdev = g_object_ref (udev_device); + tmpdev = udev_device; while ((count++ < 3) && tmpdev && !enc_value) { if (!enc_value) - enc_value = get_decoded_property (tmpdev, enc_prop); + enc_value = nm_udev_utils_property_decode_cp (udev_device_get_property_value (tmpdev, enc_prop)); if (!db_value) - db_value = g_strdup (g_udev_device_get_property (tmpdev, db_prop)); + db_value = g_strdup (udev_device_get_property_value (tmpdev, db_prop)); - olddev = tmpdev; - tmpdev = g_udev_device_get_parent (tmpdev); - g_object_unref (olddev); + tmpdev = udev_device_get_parent (tmpdev); } - - /* Unref the last device if we found what we needed before running out - * of parents. - */ - if (tmpdev) - g_object_unref (tmpdev); - - /* Balance the initial g_udev_client_query_by_subsystem_and_name() */ - g_object_unref (udev_device); + udev_device_unref (udev_device); /* Prefer the encoded value which comes directly from the device * over the hwdata database value. @@ -1694,6 +1649,8 @@ get_type_name (NMDevice *device) return _("Veth"); case NM_DEVICE_TYPE_MACSEC: return _("MACsec"); + case NM_DEVICE_TYPE_DUMMY: + return _("Dummy"); case NM_DEVICE_TYPE_GENERIC: case NM_DEVICE_TYPE_UNUSED1: case NM_DEVICE_TYPE_UNUSED2: @@ -1735,26 +1692,26 @@ static const char * get_bus_name (NMDevice *device) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device); - GUdevDevice *udevice; + struct udev_device *udevice; const char *ifname, *bus; if (priv->bus_name) goto out; - if (!ensure_udev_client (device)) + if (!priv->udev) return NULL; ifname = nm_device_get_iface (device); if (!ifname) return NULL; - udevice = g_udev_client_query_by_subsystem_and_name (priv->client, "net", ifname); - if (!udevice) - udevice = g_udev_client_query_by_subsystem_and_name (priv->client, "tty", ifname); - if (!udevice) - return NULL; - - bus = g_udev_device_get_property (udevice, "ID_BUS"); + udevice = udev_device_new_from_subsystem_sysname (priv->udev, "net", ifname); + if (!udevice) { + udevice = udev_device_new_from_subsystem_sysname (priv->udev, "tty", ifname); + if (!udevice) + return NULL; + } + bus = udev_device_get_property_value (udevice, "ID_BUS"); if (!g_strcmp0 (bus, "pci")) priv->bus_name = g_strdup (_("PCI")); else if (!g_strcmp0 (bus, "usb")) @@ -1765,6 +1722,7 @@ get_bus_name (NMDevice *device) */ priv->bus_name = g_strdup (""); } + udev_device_unref (udevice); out: if (*priv->bus_name) diff --git a/libnm/nm-device.h b/libnm/nm-device.h index 5ffeb42e..91f31b87 100644 --- a/libnm/nm-device.h +++ b/libnm/nm-device.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-object.h> +#include "nm-object.h" G_BEGIN_DECLS diff --git a/libnm/nm-dhcp-config.h b/libnm/nm-dhcp-config.h index be32992f..ef64048a 100644 --- a/libnm/nm-dhcp-config.h +++ b/libnm/nm-dhcp-config.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-object.h> +#include "nm-object.h" G_BEGIN_DECLS diff --git a/libnm/nm-dhcp4-config.h b/libnm/nm-dhcp4-config.h index 4978f848..2cbbdc9e 100644 --- a/libnm/nm-dhcp4-config.h +++ b/libnm/nm-dhcp4-config.h @@ -21,7 +21,7 @@ #ifndef __NM_DHCP4_CONFIG_H__ #define __NM_DHCP4_CONFIG_H__ -#include <nm-dhcp-config.h> +#include "nm-dhcp-config.h" G_BEGIN_DECLS diff --git a/libnm/nm-dhcp6-config.h b/libnm/nm-dhcp6-config.h index b7c7c822..2d6568e1 100644 --- a/libnm/nm-dhcp6-config.h +++ b/libnm/nm-dhcp6-config.h @@ -21,7 +21,7 @@ #ifndef __NM_DHCP6_CONFIG_H__ #define __NM_DHCP6_CONFIG_H__ -#include <nm-dhcp-config.h> +#include "nm-dhcp-config.h" G_BEGIN_DECLS diff --git a/libnm/nm-dns-manager.h b/libnm/nm-dns-manager.h index 9ed3dfbe..63989451 100644 --- a/libnm/nm-dns-manager.h +++ b/libnm/nm-dns-manager.h @@ -21,7 +21,7 @@ #ifndef __NM_DNS_MANAGER_H__ #define __NM_DNS_MANAGER_H__ -#include <nm-object.h> +#include "nm-object.h" #include "nm-client.h" G_BEGIN_DECLS diff --git a/libnm/nm-ip-config.h b/libnm/nm-ip-config.h index 38d5b454..c407c7fe 100644 --- a/libnm/nm-ip-config.h +++ b/libnm/nm-ip-config.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-object.h> +#include "nm-object.h" G_BEGIN_DECLS diff --git a/libnm/nm-ip4-config.h b/libnm/nm-ip4-config.h index 196fe09a..d99b2113 100644 --- a/libnm/nm-ip4-config.h +++ b/libnm/nm-ip4-config.h @@ -22,7 +22,7 @@ #ifndef __NM_IP4_CONFIG_H__ #define __NM_IP4_CONFIG_H__ -#include <nm-ip-config.h> +#include "nm-ip-config.h" G_BEGIN_DECLS diff --git a/libnm/nm-ip6-config.h b/libnm/nm-ip6-config.h index fa67517c..12e723b2 100644 --- a/libnm/nm-ip6-config.h +++ b/libnm/nm-ip6-config.h @@ -22,7 +22,7 @@ #ifndef __NM_IP6_CONFIG_H__ #define __NM_IP6_CONFIG_H__ -#include <nm-ip-config.h> +#include "nm-ip-config.h" G_BEGIN_DECLS diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c index 1b453bd9..d3df7337 100644 --- a/libnm/nm-manager.c +++ b/libnm/nm-manager.c @@ -1026,8 +1026,8 @@ device_ac_changed (GObject *object, GParamSpec *pspec, gpointer user_data) static void device_added (NMManager *self, NMDevice *device) { - g_signal_connect (device, "notify::" NM_DEVICE_ACTIVE_CONNECTION, - G_CALLBACK (device_ac_changed), self); + g_signal_connect_object (device, "notify::" NM_DEVICE_ACTIVE_CONNECTION, + G_CALLBACK (device_ac_changed), self, 0); } static void @@ -1047,8 +1047,8 @@ ac_devices_changed (GObject *object, GParamSpec *pspec, gpointer user_data) static void active_connection_added (NMManager *self, NMActiveConnection *ac) { - g_signal_connect (ac, "notify::" NM_ACTIVE_CONNECTION_DEVICES, - G_CALLBACK (ac_devices_changed), self); + g_signal_connect_object (ac, "notify::" NM_ACTIVE_CONNECTION_DEVICES, + G_CALLBACK (ac_devices_changed), self, 0); recheck_pending_activations (self); } @@ -1274,11 +1274,7 @@ dispose (GObject *object) NMManager *manager = NM_MANAGER (object); NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (object); - if (priv->perm_call_cancellable) { - g_cancellable_cancel (priv->perm_call_cancellable); - g_clear_object (&priv->perm_call_cancellable); - } - + nm_clear_g_cancellable (&priv->perm_call_cancellable); if (priv->devices) { g_ptr_array_unref (priv->devices); diff --git a/libnm/nm-manager.h b/libnm/nm-manager.h index 362b5f2f..7c63a333 100644 --- a/libnm/nm-manager.h +++ b/libnm/nm-manager.h @@ -22,8 +22,8 @@ #ifndef __NM_MANAGER_H__ #define __NM_MANAGER_H__ -#include <nm-object.h> -#include <nm-client.h> +#include "nm-object.h" +#include "nm-client.h" G_BEGIN_DECLS diff --git a/libnm/nm-object-private.h b/libnm/nm-object-private.h index 63c4142d..8c2f3a9c 100644 --- a/libnm/nm-object-private.h +++ b/libnm/nm-object-private.h @@ -56,4 +56,7 @@ void _nm_object_set_property (NMObject *object, GDBusProxy *_nm_object_get_proxy (NMObject *object, const char *interface); +struct udev; +void _nm_device_set_udev (NMDevice *device, struct udev *udev); + #endif /* __NM_OBJECT_PRIVATE_H__ */ diff --git a/libnm/nm-object.c b/libnm/nm-object.c index 6a47c659..95346e06 100644 --- a/libnm/nm-object.c +++ b/libnm/nm-object.c @@ -37,7 +37,7 @@ static gboolean debug = FALSE; #define dbgmsg(f,...) if (G_UNLIKELY (debug)) { g_message (f, ## __VA_ARGS__ ); } -G_DEFINE_QUARK (nm-obj-nm, _nm_object_obj_nm); +NM_CACHED_QUARK_FCN ("nm-obj-nm", _nm_object_obj_nm_quark) static void nm_object_initable_iface_init (GInitableIface *iface); static void nm_object_async_initable_iface_init (GAsyncInitableIface *iface); @@ -85,6 +85,7 @@ typedef struct { GError *reload_error; GSList *pending; /* ordered list of pending property updates. */ + GPtrArray *proxies; } NMObjectPrivate; enum { @@ -128,11 +129,16 @@ GDBusProxy * _nm_object_get_proxy (NMObject *object, const char *interface) { + NMObjectPrivate *priv; GDBusInterface *proxy; g_return_val_if_fail (NM_IS_OBJECT (object), NULL); - proxy = g_dbus_object_get_interface (NM_OBJECT_GET_PRIVATE (object)->object, interface); + priv = NM_OBJECT_GET_PRIVATE (object); + if (priv->object == NULL) + return NULL; + + proxy = g_dbus_object_get_interface (priv->object, interface); g_return_val_if_fail (proxy != NULL, NULL); return G_DBUS_PROXY (proxy); @@ -939,7 +945,7 @@ _nm_object_register_properties (NMObject *object, proxy = _nm_object_get_proxy (object, interface); g_signal_connect (proxy, "g-properties-changed", G_CALLBACK (properties_changed), object); - g_object_unref (proxy); + g_ptr_array_add (priv->proxies, proxy); instance = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); priv->property_tables = g_slist_prepend (priv->property_tables, instance); @@ -1053,7 +1059,7 @@ init_if (GDBusInterface *interface, gpointer user_data) props = g_dbus_proxy_get_cached_property_names (proxy); - for (prop = props; *prop; prop++) { + for (prop = props; prop && *prop; prop++) { val = g_dbus_proxy_get_cached_property (proxy, *prop); str = g_variant_print (val, TRUE); handle_property_changed (self, *prop, val); @@ -1188,6 +1194,7 @@ nm_object_async_initable_iface_init (GAsyncInitableIface *iface) static void nm_object_init (NMObject *object) { + NM_OBJECT_GET_PRIVATE (object)->proxies = g_ptr_array_new (); } static void @@ -1198,11 +1205,13 @@ set_property (GObject *object, guint prop_id, switch (prop_id) { case PROP_DBUS_OBJECT: - /* Construct only */ + /* construct-only */ priv->object = g_value_dup_object (value); + if (!priv->object) + g_return_if_reached (); break; case PROP_DBUS_OBJECT_MANAGER: - /* Construct only */ + /* construct-only */ priv->object_manager = g_value_dup_object (value); break; default: @@ -1240,6 +1249,7 @@ static void dispose (GObject *object) { NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object); + guint i; nm_clear_g_source (&priv->notify_id); @@ -1251,6 +1261,17 @@ dispose (GObject *object) g_clear_object (&priv->object); g_clear_object (&priv->object_manager); + if (priv->proxies) { + for (i = 0; i < priv->proxies->len; i++) { + g_signal_handlers_disconnect_by_func (priv->proxies->pdata[i], + properties_changed, + object); + g_object_unref (priv->proxies->pdata[i]); + } + g_ptr_array_free (priv->proxies, TRUE); + priv->proxies = NULL; + } + G_OBJECT_CLASS (nm_object_parent_class)->dispose (object); } diff --git a/libnm/nm-object.h b/libnm/nm-object.h index bcf47ba6..5b4580eb 100644 --- a/libnm/nm-object.h +++ b/libnm/nm-object.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-types.h> +#include "nm-types.h" G_BEGIN_DECLS diff --git a/libnm/nm-property-docs.xml b/libnm/nm-property-docs.xml index 9d58df94..7754187d 100644 --- a/libnm/nm-property-docs.xml +++ b/libnm/nm-property-docs.xml @@ -3,12 +3,39 @@ <!ENTITY quot """> ]> <nm-setting-docs> - <setting name="802-1x"> + <setting name="connection" description="General Connection Profile Settings"> + <property name="autoconnect" type="boolean" default="TRUE" description="Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection." /> + <property name="autoconnect-priority" type="int32" default="0" description="The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority." /> + <property name="autoconnect-retries" type="int32" default="-1" description="The number of times a connection should be tried when autoctivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden)." /> + <property name="autoconnect-slaves" type="NMSettingConnectionAutoconnectSlaves (int32)" description="Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." /> + <property name="gateway-ping-timeout" type="uint32" default="0" description="If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping." /> + <property name="id" type="string" description="A human readable unique identifier for the connection, like "Work Wi-Fi" or "T-Mobile 3G"." /> + <property name="interface-name" type="string" description="The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface." /> + <property name="lldp" type="int32" default="-1" description="Whether LLDP is enabled for the connection." /> + <property name="master" type="string" description="Interface name of the master device or UUID of the master connection." /> + <property name="metered" type="NMMetered (int32)" description="Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately." /> + <property name="name" type="string" default="connection" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> + <property name="permissions" type="array of string" default="[]" description="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 list. 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 present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8." /> + <property name="read-only" type="boolean" default="FALSE" description="FALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified." /> + <property name="secondaries" type="array of string" default="[]" description="List of connection UUIDs that should be activated when the base connection itself is activated. Currently only VPN connections are supported." /> + <property name="slave-type" type="string" description="Setting name of the device type of this slave's master connection (eg, "bond"), or NULL if this connection is not a slave." /> + <property name="stable-id" type="string" description="Token to generate stable IDs for the connection. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. Note that also the interface name of the activating connection and a per-host secret key is included into the address generation so that the same stable-id on different hosts/devices yields different addresses. If the value is unset, an ID unique for the connection is used. Specifing a stable-id allows multiple connections to generate the same addresses. Another use is to generate IDs at runtime via dynamic substitutions. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are "${CONNECTION}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-boot, or every time. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}/${BOOT}" to create a unique id for this connection that changes with every reboot. Note that two connections only use the same effective id if their stable-id is also identical before performing dynamic substitutions." /> + <property name="timestamp" type="uint64" default="0" description="The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved)." /> + <property name="type" type="string" description="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)." /> + <property name="uuid" type="string" description="A universally unique identifier for the connection, for example generated with libuuid. It 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 "id" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or "type" property changes. The UUID must be in the format "2815492f-7e56-435e-b2e9-246bd7cdc664" (ie, contains only hexadecimal characters and "-")." /> + <property name="zone" type="string" description="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. When updating this property on a currently activated connection, the change takes effect immediately." /> + </setting> + <setting name="802-1x" description="AIEEE 802.1x Authentication Settings"> <property name="altsubject-matches" type="array of string" default="[]" description="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." /> <property name="anonymous-identity" type="string" description="Anonymous identity string for EAP authentication methods. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP-TTLS." /> + <property name="auth-timeout" type="int32" default="0" description="A timeout for the authentication. Zero means the global default; if the global default is not set, the authentication timeout is 25 seconds." /> <property name="ca-cert" type="byte array" description="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 NUL 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." /> + <property name="ca-cert-password" type="string" description="The password used to access the CA certificate stored in "ca-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login." /> + <property name="ca-cert-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "ca-cert-password" property." /> <property name="ca-path" type="string" description="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." /> <property name="client-cert" type="byte array" description="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 NUL byte." /> + <property name="client-cert-password" type="string" description="The password used to access the client certificate stored in "client-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login." /> + <property name="client-cert-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "client-cert-password" property." /> <property name="domain-suffix-match" type="string" description="Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison." /> <property name="eap" type="array of string" default="[]" description="The allowed EAP method to be used when authenticating to the network with 802.1x. Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd", and "fast". Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations." /> <property name="identity" type="string" description="Identity string for EAP authentication methods. Often the user's user or login name." /> @@ -18,6 +45,7 @@ <property name="password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "password" property." /> <property name="password-raw" type="byte array" description="Password used for EAP authentication methods, given as a byte array to allow passwords in other encodings than UTF-8 to be used. If both the "password" property and the "password-raw" property are specified, "password" is preferred." /> <property name="password-raw-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "password-raw" property." /> + <property name="phase1-auth-flags" type="uint32" default="0" description="Specifies authentication flags to use in "phase 1" outer authentication using NMSetting8021xAuthFlags options. The invidual TLS versions can be explicitly disabled. If a certain TLS disable flag is not set, it is up to the supplicant to allow or forbid it. The TLS options map to tls_disable_tlsv1_x settings. See the wpa_supplicant documentation for more details." /> <property name="phase1-fast-provisioning" type="string" description="Enables or disables in-line provisioning of EAP-FAST credentials when FAST is specified as the EAP method in the "eap" property. Recognized 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." /> <property name="phase1-peaplabel" type="string" description="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." /> <property name="phase1-peapver" type="string" description="Forces which PEAP version is used when PEAP is set as the EAP method in the "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." /> @@ -25,22 +53,26 @@ <property name="phase2-auth" type="string" description="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 "phase 2" 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." /> <property name="phase2-autheap" type="string" description="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." /> <property name="phase2-ca-cert" type="byte array" description="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 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 NUL 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." /> + <property name="phase2-ca-cert-password" type="string" description="The password used to access the "phase2" CA certificate stored in "phase2-ca-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login." /> + <property name="phase2-ca-cert-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "phase2-ca-cert-password" property." /> <property name="phase2-ca-path" type="string" description="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." /> <property name="phase2-client-cert" type="byte array" description="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 NUL 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." /> + <property name="phase2-client-cert-password" type="string" description="The password used to access the "phase2" client certificate stored in "phase2-client-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login." /> + <property name="phase2-client-cert-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "phase2-client-cert-password" property." /> <property name="phase2-domain-suffix-match" type="string" description="Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner "phase 2" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison." /> - <property name="phase2-private-key" type="byte array" description="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 NUL 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 NUL 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." /> + <property name="phase2-private-key" type="byte array" description="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 NUL 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 ending with a terminating NUL 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." /> <property name="phase2-private-key-password" type="string" description="The password used to decrypt the "phase 2" private key specified in the "phase2-private-key" property when the private key either uses the path scheme, or is a PKCS#12 format key." /> <property name="phase2-private-key-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "phase2-private-key-password" property." /> <property name="phase2-subject-match" type="string" description="Substring to be matched against the subject of the certificate presented by the authentication server during the inner "phase 2" authentication. When unset, no verification of the authentication server certificate's subject is performed. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:phase2-domain-suffix-match." /> <property name="pin" type="string" description="PIN used for EAP authentication methods." /> <property name="pin-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "pin" property." /> - <property name="private-key" type="byte array" description="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 NUL 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 NUL 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. WARNING: "private-key" is not a "secret" property, and thus unencrypted private key data using the BLOB scheme may be readable by unprivileged users. Private keys should always be encrypted with a private key password to prevent unauthorized access to unencrypted private key data." /> + <property name="private-key" type="byte array" description="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 NUL 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 ending with a terminating NUL 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. WARNING: "private-key" is not a "secret" property, and thus unencrypted private key data using the BLOB scheme may be readable by unprivileged users. Private keys should always be encrypted with a private key password to prevent unauthorized access to unencrypted private key data." /> <property name="private-key-password" type="string" description="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." /> <property name="private-key-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "private-key-password" property." /> <property name="subject-match" type="string" description="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. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:domain-suffix-match." /> <property name="system-ca-certs" type="boolean" default="FALSE" description="When TRUE, overrides the "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. If the path provided with --system-ca-path is rather a file name (bundle of trusted CA certificates), it overrides "ca-cert" and "phase2-ca-cert" properties instead (sets ca_cert/ca_cert2 options for wpa_supplicant)." /> </setting> - <setting name="adsl"> + <setting name="adsl" description="ADSL Settings"> <property name="encapsulation" type="string" description="Encapsulation of ADSL connection. Can be "vcmux" or "llc"." /> <property name="name" type="string" default="adsl" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="password" type="string" description="Password used to authenticate with the ADSL service." /> @@ -50,16 +82,16 @@ <property name="vci" type="uint32" default="0" description="VCI of ADSL connection" /> <property name="vpi" type="uint32" default="0" description="VPI of ADSL connection" /> </setting> - <setting name="bluetooth"> + <setting name="bluetooth" description="Bluetooth Settings"> <property name="bdaddr" type="byte array" description="The Bluetooth address of the device." /> <property name="name" type="string" default="bluetooth" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="type" type="string" description="Either "dun" for Dial-Up Networking connections or "panu" for Personal Area Networking connections to devices supporting the NAP profile." /> </setting> - <setting name="bond"> + <setting name="bond" description="Bonding Settings"> <property name="name" type="string" default="bond" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="options" type="dict of string to string" default="{'mode': 'balance-rr'}" description="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])." /> </setting> - <setting name="bridge"> + <setting name="bridge" description="Bridging Settings"> <property name="ageing-time" type="uint32" default="300" description="The Ethernet MAC address aging time, in seconds." /> <property name="forward-delay" type="uint32" default="15" description="The Spanning Tree Protocol (STP) forwarding delay, in seconds." /> <property name="hello-time" type="uint32" default="2" description="The Spanning Tree Protocol (STP) hello time, in seconds." /> @@ -70,42 +102,21 @@ <property name="priority" type="uint32" default="32768" description="Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower values are "better"; the lowest priority bridge will be elected the root bridge." /> <property name="stp" type="boolean" default="TRUE" description="Controls whether Spanning Tree Protocol (STP) is enabled for this bridge." /> </setting> - <setting name="bridge-port"> + <setting name="bridge-port" description="Bridge Port Settings"> <property name="hairpin-mode" type="boolean" default="FALSE" description="Enables or disabled "hairpin mode" for the port, which allows frames to be sent back out through the port the frame was received on." /> <property name="name" type="string" default="bridge-port" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="path-cost" type="uint32" default="100" description="The Spanning Tree Protocol (STP) port cost for destinations via this port." /> <property name="priority" type="uint32" default="32" description="The Spanning Tree Protocol (STP) priority of this bridge port." /> </setting> - <setting name="cdma"> + <setting name="cdma" description="CDMA-based Mobile Broadband Settings"> + <property name="mtu" type="uint32" default="0" description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames." /> <property name="name" type="string" default="cdma" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="number" type="string" description="The number to dial to establish the connection to the CDMA-based mobile broadband network, if any. If not specified, the default number (#777) is used when required." /> <property name="password" type="string" description="The password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here." /> <property name="password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "password" property." /> <property name="username" type="string" description="The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here." /> </setting> - <setting name="connection"> - <property name="autoconnect" type="boolean" default="TRUE" description="Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection." /> - <property name="autoconnect-priority" type="int32" default="0" description="The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority." /> - <property name="autoconnect-retries" type="int32" default="-1" description="The number of times a connection should be tried when autoctivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden)." /> - <property name="autoconnect-slaves" type="NMSettingConnectionAutoconnectSlaves (int32)" description="Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." /> - <property name="gateway-ping-timeout" type="uint32" default="0" description="If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping." /> - <property name="id" type="string" description="A human readable unique identifier for the connection, like "Work Wi-Fi" or "T-Mobile 3G"." /> - <property name="interface-name" type="string" description="The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface." /> - <property name="lldp" type="int32" default="-1" description="Whether LLDP is enabled for the connection." /> - <property name="master" type="string" description="Interface name of the master device or UUID of the master connection." /> - <property name="metered" type="NMMetered (int32)" description="Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately." /> - <property name="name" type="string" default="connection" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> - <property name="permissions" type="array of string" default="[]" description="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 list. 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 present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8." /> - <property name="read-only" type="boolean" default="FALSE" description="FALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified." /> - <property name="secondaries" type="array of string" default="[]" description="List of connection UUIDs that should be activated when the base connection itself is activated. Currently only VPN connections are supported." /> - <property name="slave-type" type="string" description="Setting name of the device type of this slave's master connection (eg, "bond"), or NULL if this connection is not a slave." /> - <property name="stable-id" type="string" description="Token to generate stable IDs for the connection. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. Note that also the interface name of the activating connection and a per-host secret key is included into the address generation so that the same stable-id on different hosts/devices yields different addresses. If the value is unset, an ID unique for the connection is used. Specifing a stable-id allows multiple connections to generate the same addresses. Another use is to generate IDs at runtime via dynamic substitutions. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are "${CONNECTION}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-boot, or every time. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}/${BOOT}" to create a unique id for this connection that changes with every reboot. Note that two connections only use the same effective id if their stable-id is also identical before performing dynamic substitutions." /> - <property name="timestamp" type="uint64" default="0" description="The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved)." /> - <property name="type" type="string" description="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)." /> - <property name="uuid" type="string" description="A universally unique identifier for the connection, for example generated with libuuid. It 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 "id" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or "type" property changes. The UUID must be in the format "2815492f-7e56-435e-b2e9-246bd7cdc664" (ie, contains only hexadecimal characters and "-")." /> - <property name="zone" type="string" description="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. When updating this property on a currently activated connection, the change takes effect immediately." /> - </setting> - <setting name="dcb"> + <setting name="dcb" description="Data Center Bridging Settings"> <property name="app-fcoe-flags" type="NMSettingDcbFlags (uint32)" description="Specifies the NMSettingDcbFlags for the DCB FCoE application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)." /> <property name="app-fcoe-mode" type="string" default=""fabric"" description="The FCoE controller mode; either "fabric" (default) or "vn2vn"." /> <property name="app-fcoe-priority" type="int32" default="-1" description="The highest User Priority (0 - 7) which FCoE frames should use, or -1 for default priority. Only used when the "app-fcoe-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag." /> @@ -123,13 +134,17 @@ <property name="priority-strict-bandwidth" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group." /> <property name="priority-traffic-class" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped." /> </setting> - <setting name="generic"> + <setting name="dummy" description="Dummy Link Settings"> + <property name="name" type="string" default="dummy" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> + </setting> + <setting name="generic" description="Generic Link Settings"> <property name="name" type="string" default="generic" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> </setting> - <setting name="gsm"> + <setting name="gsm" description="GSM-based Mobile Broadband Settings"> <property name="apn" type="string" description="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." /> <property name="device-id" type="string" description="The device unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will only apply to the specified device." /> <property name="home-only" type="boolean" default="FALSE" description="When TRUE, only connections to the home network will be allowed. Connections to roaming networks will not be made." /> + <property name="mtu" type="uint32" default="0" description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames." /> <property name="name" type="string" default="gsm" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="network-id" type="string" description="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." /> <property name="number" type="string" description="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." /> @@ -141,7 +156,7 @@ <property name="sim-operator-id" type="string" description="A MCC/MNC string like "310260" or "21601" identifying the specific mobile network operator which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" and "sim-id" which contains a SIM card provisioined by the given operator." /> <property name="username" type="string" description="The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here." /> </setting> - <setting name="infiniband"> + <setting name="infiniband" description="Infiniband Settings"> <property name="mac-address" type="byte array" description="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)." /> <property name="mtu" type="uint32" default="0" description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames." /> <property name="name" type="string" default="infiniband" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> @@ -149,7 +164,7 @@ <property name="parent" type="string" description="The interface name of the parent device of this device. Normally NULL, but if the "p_key" property is set, then you must specify the base device by setting either this property or "mac-address"." /> <property name="transport-mode" type="string" description="The IP-over-InfiniBand transport mode. Either "datagram" or "connected"." /> </setting> - <setting name="ipv4"> + <setting name="ipv4" description="IPv4 Settings"> <property name="addresses" type="array of array of uint32" default="[]" description="Array of IP addresses." /> <property name="dad-timeout" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." /> <property name="dhcp-client-id" type="string" description="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." /> @@ -171,7 +186,7 @@ <property name="route-metric" type="int64" default="-1" description="The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is choosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric." /> <property name="routes" type="array of array of uint32" default="[]" description="Array of IP routes." /> </setting> - <setting name="ipv6"> + <setting name="ipv6" description="IPv6 Settings"> <property name="addr-gen-mode" type="int32" default="1" description="Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: "eui64", or "stable-privacy". If the property is set to "eui64", the addresses will be generated using the interface tokens derived from hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of "stable-privacy" enables use of cryptographically secure hash of a secret host-specific key along with the connection's stable-id and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. On D-Bus, the absence of an addr-gen-mode setting equals enabling "stable-privacy". For keyfile plugin, the absence of the setting on disk means "eui64" so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by "ip6-privacy" property and it does not affect the temporary addresses configured with this option." /> <property name="addresses" type="array of legacy IPv6 address struct" default="[]" description="Array of IP addresses." /> <property name="dad-timeout" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." /> @@ -194,7 +209,7 @@ <property name="routes" type="array of legacy IPv6 route struct" default="[]" description="Array of IP routes." /> <property name="token" type="string" description="Configure the token for draft-chown-6man-tokenised-ipv6-identifiers-02 IPv6 tokenized interface identifiers. Useful with eui64 addr-gen-mode." /> </setting> - <setting name="ip-tunnel"> + <setting name="ip-tunnel" description="IP Tunneling Settings"> <property name="encapsulation-limit" type="uint32" default="0" description="How many additional levels of encapsulation are permitted to be prepended to packets. This property applies only to IPv6 tunnels." /> <property name="flow-label" type="uint32" default="0" description="The flow label to assign to tunnel packets. This property applies only to IPv6 tunnels." /> <property name="input-key" type="string" description="The key used for tunnel input packets; the property is valid only for certain tunnel modes (GRE, IP6GRE). If empty, no key is used." /> @@ -209,7 +224,7 @@ <property name="tos" type="uint32" default="0" description="The type of service (IPv4) or traffic class (IPv6) field to be set on tunneled packets." /> <property name="ttl" type="uint32" default="0" description="The TTL to assign to tunneled packets. 0 is a special value meaning that packets inherit the TTL value." /> </setting> - <setting name="macsec"> + <setting name="macsec" description="MACSec Settings"> <property name="encrypt" type="boolean" default="TRUE" description="Whether the transmitted traffic must be encrypted." /> <property name="mka-cak" type="string" description="The pre-shared CAK (Connectivity Association Key) for MACsec Key Agreement." /> <property name="mka-cak-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "mka-cak" property." /> @@ -220,20 +235,20 @@ <property name="port" type="int32" default="1" description="The port component of the SCI (Secure Channel Identifier), between 1 and 65534." /> <property name="validation" type="int32" default="2" description="Specifies the validation mode for incoming frames." /> </setting> - <setting name="macvlan"> + <setting name="macvlan" description="MAC VLAN Settings"> <property name="mode" type="uint32" default="0" description="The macvlan mode, which specifies the communication mechanism between multiple macvlans on the same lower device." /> <property name="name" type="string" default="macvlan" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="parent" type="string" description="If given, specifies the parent interface name or parent connection UUID from which this MAC-VLAN interface should be created. If this property is not specified, the connection must contain an "802-3-ethernet" setting with a "mac-address" property." /> <property name="promiscuous" type="boolean" default="TRUE" description="Whether the interface should be put in promiscuous mode." /> <property name="tap" type="boolean" default="FALSE" description="Whether the interface should be a MACVTAP." /> </setting> - <setting name="802-11-olpc-mesh"> + <setting name="802-11-olpc-mesh" description="OLPC Wireless Mesh Settings"> <property name="channel" type="uint32" default="0" description="Channel on which the mesh network to join is located." /> <property name="dhcp-anycast-address" type="byte array" description="Anycast DHCP MAC address used when requesting an IP address via DHCP. The specific anycast address used determines which DHCP server class answers the request." /> <property name="name" type="string" default="802-11-olpc-mesh" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="ssid" type="byte array" description="SSID of the mesh network to join." /> </setting> - <setting name="ppp"> + <setting name="ppp" description="Point-to-Point Protocol Settings"> <property name="baud" type="uint32" default="0" description="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." /> <property name="crtscts" type="boolean" default="FALSE" description="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." /> <property name="lcp-echo-failure" type="uint32" default="0" description="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." /> @@ -254,21 +269,21 @@ <property name="require-mppe" type="boolean" default="FALSE" description="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." /> <property name="require-mppe-128" type="boolean" default="FALSE" description="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." /> </setting> - <setting name="pppoe"> + <setting name="pppoe" description="PPP-over-Ethernet Settings"> <property name="name" type="string" default="pppoe" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="password" type="string" description="Password used to authenticate with the PPPoE service." /> <property name="password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "password" property." /> <property name="service" type="string" description="If specified, instruct PPPoE to only initiate sessions with access concentrators that provide the specified service. 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." /> <property name="username" type="string" description="Username used to authenticate with the PPPoE service." /> </setting> - <setting name="proxy"> + <setting name="proxy" description="WWW Proxy Settings"> <property name="browser-only" type="boolean" default="FALSE" description="Whether the proxy configuration is for browser only." /> <property name="method" type="int32" default="0" description="Method for proxy configuration, Default is NM_SETTING_PROXY_METHOD_NONE (0)" /> <property name="name" type="string" default="proxy" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="pac-script" type="string" description="PAC script for the connection." /> <property name="pac-url" type="string" description="PAC URL for obtaining PAC file." /> </setting> - <setting name="serial"> + <setting name="serial" description="Serial Link Settings"> <property name="baud" type="uint32" default="57600" description="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." /> <property name="bits" type="uint32" default="8" description="Byte-width of the serial communication. The 8 in "8n1" for example." /> <property name="name" type="string" default="serial" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> @@ -276,15 +291,15 @@ <property name="send-delay" type="uint64" default="0" description="Time to delay between each byte sent to the modem, in microseconds." /> <property name="stopbits" type="uint32" default="1" description="Number of stop bits for communication on the serial port. Either 1 or 2. The 1 in "8n1" for example." /> </setting> - <setting name="team"> + <setting name="team" description="Teaming Settings"> <property name="config" type="string" description="The JSON configuration for the team network interface. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details." /> <property name="name" type="string" default="team" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> </setting> - <setting name="team-port"> + <setting name="team-port" description="Team Port Settings"> <property name="config" type="string" description="The JSON configuration for the team port. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details." /> <property name="name" type="string" default="team-port" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> </setting> - <setting name="tun"> + <setting name="tun" description="Tunnel Settings"> <property name="group" type="string" description="The group ID which will own the device. If set to NULL everyone will be able to use the device." /> <property name="mode" type="uint32" default="1" description="The operating mode of the virtual device. Allowed values are NM_SETTING_TUN_MODE_TUN (1) to create a layer 3 device and NM_SETTING_TUN_MODE_TAP (2) to create an Ethernet-like layer 2 one." /> <property name="multi-queue" type="boolean" default="FALSE" description="If the property is set to TRUE, the interface will support multiple file descriptors (queues) to parallelize packet sending or receiving. Otherwise, the interface will only support a single queue." /> @@ -293,7 +308,11 @@ <property name="pi" type="boolean" default="FALSE" description="If TRUE the interface will prepend a 4 byte header describing the physical interface to the packets." /> <property name="vnet-hdr" type="boolean" default="FALSE" description="If TRUE the IFF_VNET_HDR the tunnel packets will include a virtio network header." /> </setting> - <setting name="vlan"> + <setting name="user" description="General User Profile Settings"> + <property name="data" type="dict of string to string" default="{}" description="A dictionary of key/value pairs with user data. This data is ignored by NetworkManager and can be used at the users discretion. The keys only support a strict ascii format, but the values can be arbitrary UTF8 strings up to a certain length." /> + <property name="name" type="string" default="user" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> + </setting> + <setting name="vlan" description="VLAN Settings"> <property name="egress-priority-map" type="array of string" default="[]" description="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"." /> <property name="flags" type="NMVlanFlags (uint32)" description="One or more flags which control the behavior and features of the VLAN interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS (0x1) (reordering of output packet headers), NM_VLAN_FLAG_GVRP (0x2) (use of the GVRP protocol), and NM_VLAN_FLAG_LOOSE_BINDING (0x4) (loose binding of the interface to its master device's operating state). NM_VLAN_FLAG_MVRP (0x8) (use of the MVRP protocol). The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS, but it used to be 0. To preserve backward compatibility, the default-value in the D-Bus API continues to be 0 and a missing property on D-Bus is still considered as 0." /> <property name="id" type="uint32" default="0" description="The VLAN identifier that the interface created by this connection should be assigned. The valid range is from 0 to 4094, without the reserved id 4095." /> @@ -301,7 +320,7 @@ <property name="name" type="string" default="vlan" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="parent" type="string" description="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 an "802-3-ethernet" setting with a "mac-address" property." /> </setting> - <setting name="vpn"> + <setting name="vpn" description="VPN Settings"> <property name="data" type="dict of string to string" default="{}" description="Dictionary of key/value pairs of VPN plugin specific data. Both keys and values must be strings." /> <property name="name" type="string" default="vpn" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="persistent" type="boolean" default="FALSE" description="If the VPN service supports persistence, and this property is TRUE, the VPN will attempt to stay connected across link changes and outages, until explicitly disconnected." /> @@ -310,7 +329,7 @@ <property name="timeout" type="uint32" default="0" description="Timeout for the VPN service to establish the connection. Some services may take quite a long time to connect. Value of 0 means a default timeout, which is 60 seconds (unless overriden by vpn.timeout in configuration file). Values greater than zero mean timeout in seconds." /> <property name="user-name" type="string" description="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." /> </setting> - <setting name="vxlan"> + <setting name="vxlan" description="VXLAN Settings"> <property name="ageing" type="uint32" default="300" description="Specifies the lifetime in seconds of FDB entries learnt by the kernel." /> <property name="destination-port" type="uint32" default="8472" description="Specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint." /> <property name="id" type="uint32" default="0" description="Specifies the VXLAN Network Identifer (or VXLAN Segment Identifier) to use." /> @@ -329,12 +348,12 @@ <property name="tos" type="uint32" default="0" description="Specifies the TOS value to use in outgoing packets." /> <property name="ttl" type="uint32" default="0" description="Specifies the time-to-live value to use in outgoing packets." /> </setting> - <setting name="wimax"> + <setting name="wimax" description="WiMax Settings"> <property name="mac-address" type="byte array" description="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). Deprecated: 1" /> <property name="name" type="string" default="wimax" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="network-name" type="string" description="Network Service Provider (NSP) name of the WiMAX network this connection should use. Deprecated: 1" /> </setting> - <setting name="802-3-ethernet"> + <setting name="802-3-ethernet" description="Wired Ethernet Settings"> <property name="auto-negotiate" type="boolean" default="FALSE" description="If TRUE, enforce auto-negotiation of port speed and duplex mode. If FALSE, "speed" and "duplex" properties should be both set or link configuration will be skipped." /> <property name="cloned-mac-address" type="byte array" description="If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing. Beside explicitly specifing a MAC address, the special values "preserve", "permanent", "random" and "stable" are supported. "preserve" means not to touch the MAC address on activation. "permanent" means to use the permanent hardware address of the device. "random" creates a random MAC address on each connect. "stable" creates a hashed MAC address based on connection.stable-id and a machine dependent key. If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to "preserve" (older versions of NetworkManager may use a different default value). On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated "cloned-mac-address"." /> <property name="duplex" type="string" description="Can be specified only when "auto-negotiate" is "off". In that case, statically configures the device to use that specified duplex mode, either "half" or "full". Must be set together with the "speed" property if specified. Before specifying a duplex mode be sure your device supports it." /> @@ -351,7 +370,7 @@ <property name="wake-on-lan" type="uint32" default="1" description="The NMSettingWiredWakeOnLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRED_WAKE_ON_LAN_PHY (0x2), NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST (0x4), NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST (0x8), NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST (0x10), NM_SETTING_WIRED_WAKE_ON_LAN_ARP (0x20), NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC (0x40) or the special values NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager)." /> <property name="wake-on-lan-password" type="string" description="If specified, the password used with magic-packet-based Wake-on-LAN, represented as an Ethernet MAC address. If NULL, no password will be required." /> </setting> - <setting name="802-11-wireless"> + <setting name="802-11-wireless" description="Wi-Fi Settings"> <property name="band" type="string" description="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 Wi-Fi 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." /> <property name="bssid" type="byte array" description="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." /> <property name="channel" type="uint32" default="0" description="Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the "band" property to be set." /> @@ -370,7 +389,7 @@ <property name="ssid" type="byte array" description="SSID of the Wi-Fi network. Must be specified." /> <property name="tx-power" type="uint32" default="0" description="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." /> </setting> - <setting name="802-11-wireless-security"> + <setting name="802-11-wireless-security" description="Wi-Fi Security Settings"> <property name="auth-alg" type="string" description="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." /> <property name="group" type="array of string" default="[]" description="A list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of "wep40", "wep104", "tkip", or "ccmp"." /> <property name="key-mgmt" type="string" description="Key management used for the connection. One of "none" (WEP), "ieee8021x" (Dynamic WEP), "wpa-none" (Ad-Hoc WPA-PSK), "wpa-psk" (infrastructure WPA-PSK), or "wpa-eap" (WPA-Enterprise). This property must be set for any Wi-Fi connection that uses security." /> diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c index fe78f7b8..0f7ea58e 100644 --- a/libnm/nm-remote-connection.c +++ b/libnm/nm-remote-connection.c @@ -763,6 +763,8 @@ get_property (GObject *object, guint prop_id, static void constructed (GObject *object) { + G_OBJECT_CLASS (nm_remote_connection_parent_class)->constructed (object); + nm_connection_set_path (NM_CONNECTION (object), nm_object_get_path (NM_OBJECT (object))); } diff --git a/libnm/nm-remote-connection.h b/libnm/nm-remote-connection.h index a7235755..c04ae367 100644 --- a/libnm/nm-remote-connection.h +++ b/libnm/nm-remote-connection.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-object.h> +#include "nm-object.h" G_BEGIN_DECLS diff --git a/libnm/nm-remote-settings.h b/libnm/nm-remote-settings.h index f8eddc5b..06d3ac0a 100644 --- a/libnm/nm-remote-settings.h +++ b/libnm/nm-remote-settings.h @@ -22,7 +22,7 @@ #ifndef __NM_REMOTE_SETTINGS_H__ #define __NM_REMOTE_SETTINGS_H__ -#include <nm-object.h> +#include "nm-object.h" G_BEGIN_DECLS diff --git a/libnm/nm-secret-agent-old.h b/libnm/nm-secret-agent-old.h index 476cc2a2..4f6665d1 100644 --- a/libnm/nm-secret-agent-old.h +++ b/libnm/nm-secret-agent-old.h @@ -21,7 +21,7 @@ #ifndef __NM_SECRET_AGENT_OLD_H__ #define __NM_SECRET_AGENT_OLD_H__ -#include <nm-types.h> +#include "nm-types.h" G_BEGIN_DECLS diff --git a/libnm/nm-settings-docs-overrides.xml b/libnm/nm-settings-docs-overrides.xml index 474b7319..2b27b640 100644 --- a/libnm/nm-settings-docs-overrides.xml +++ b/libnm/nm-settings-docs-overrides.xml @@ -27,6 +27,8 @@ bridge's interface name."/> </setting> <setting name="dcb"> </setting> +<setting name="dummy"> +</setting> <setting name="generic"> </setting> <setting name="gsm"> @@ -133,6 +135,8 @@ team's interface name."/> </setting> <setting name="tun"> </setting> +<setting name="user"> +</setting> <setting name="vlan"> <property name="interface-name" variable="interface-name" format="string" values="" default="" example="" description="Deprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the diff --git a/libnm/nm-settings-docs.xml b/libnm/nm-settings-docs.xml index af8894b8..d114a0ee 100644 --- a/libnm/nm-settings-docs.xml +++ b/libnm/nm-settings-docs.xml @@ -3,12 +3,39 @@ <!ENTITY quot """> ]> <nm-setting-docs> - <setting name="802-1x"> + <setting name="connection" description="General Connection Profile Settings"> + <property name="autoconnect" type="boolean" default="TRUE" description="Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection." /> + <property name="autoconnect-priority" type="int32" default="0" description="The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority." /> + <property name="autoconnect-retries" type="int32" default="-1" description="The number of times a connection should be tried when autoctivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden)." /> + <property name="autoconnect-slaves" type="NMSettingConnectionAutoconnectSlaves (int32)" description="Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." /> + <property name="gateway-ping-timeout" type="uint32" default="0" description="If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping." /> + <property name="id" type="string" description="A human readable unique identifier for the connection, like "Work Wi-Fi" or "T-Mobile 3G"." /> + <property name="interface-name" type="string" description="The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface." /> + <property name="lldp" type="int32" default="-1" description="Whether LLDP is enabled for the connection." /> + <property name="master" type="string" description="Interface name of the master device or UUID of the master connection." /> + <property name="metered" type="NMMetered (int32)" description="Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately." /> + <property name="name" type="string" default="connection" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> + <property name="permissions" type="array of string" default="[]" description="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 list. 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 present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8." /> + <property name="read-only" type="boolean" default="FALSE" description="FALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified." /> + <property name="secondaries" type="array of string" default="[]" description="List of connection UUIDs that should be activated when the base connection itself is activated. Currently only VPN connections are supported." /> + <property name="slave-type" type="string" description="Setting name of the device type of this slave's master connection (eg, "bond"), or NULL if this connection is not a slave." /> + <property name="stable-id" type="string" description="Token to generate stable IDs for the connection. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. Note that also the interface name of the activating connection and a per-host secret key is included into the address generation so that the same stable-id on different hosts/devices yields different addresses. If the value is unset, an ID unique for the connection is used. Specifing a stable-id allows multiple connections to generate the same addresses. Another use is to generate IDs at runtime via dynamic substitutions. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are "${CONNECTION}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-boot, or every time. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}/${BOOT}" to create a unique id for this connection that changes with every reboot. Note that two connections only use the same effective id if their stable-id is also identical before performing dynamic substitutions." /> + <property name="timestamp" type="uint64" default="0" description="The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved)." /> + <property name="type" type="string" description="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)." /> + <property name="uuid" type="string" description="A universally unique identifier for the connection, for example generated with libuuid. It 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 "id" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or "type" property changes. The UUID must be in the format "2815492f-7e56-435e-b2e9-246bd7cdc664" (ie, contains only hexadecimal characters and "-")." /> + <property name="zone" type="string" description="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. When updating this property on a currently activated connection, the change takes effect immediately." /> + </setting> + <setting name="802-1x" description="AIEEE 802.1x Authentication Settings"> <property name="altsubject-matches" type="array of string" default="[]" description="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." /> <property name="anonymous-identity" type="string" description="Anonymous identity string for EAP authentication methods. Used as the unencrypted identity with EAP types that support different tunneled identity like EAP-TTLS." /> + <property name="auth-timeout" type="int32" default="0" description="A timeout for the authentication. Zero means the global default; if the global default is not set, the authentication timeout is 25 seconds." /> <property name="ca-cert" type="byte array" description="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 NUL 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." /> + <property name="ca-cert-password" type="string" description="The password used to access the CA certificate stored in "ca-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login." /> + <property name="ca-cert-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "ca-cert-password" property." /> <property name="ca-path" type="string" description="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." /> <property name="client-cert" type="byte array" description="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 NUL byte." /> + <property name="client-cert-password" type="string" description="The password used to access the client certificate stored in "client-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login." /> + <property name="client-cert-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "client-cert-password" property." /> <property name="domain-suffix-match" type="string" description="Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison." /> <property name="eap" type="array of string" default="[]" description="The allowed EAP method to be used when authenticating to the network with 802.1x. Valid methods are: "leap", "md5", "tls", "peap", "ttls", "pwd", and "fast". Each method requires different configuration using the properties of this setting; refer to wpa_supplicant documentation for the allowed combinations." /> <property name="identity" type="string" description="Identity string for EAP authentication methods. Often the user's user or login name." /> @@ -18,6 +45,7 @@ <property name="password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "password" property." /> <property name="password-raw" type="byte array" description="Password used for EAP authentication methods, given as a byte array to allow passwords in other encodings than UTF-8 to be used. If both the "password" property and the "password-raw" property are specified, "password" is preferred." /> <property name="password-raw-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "password-raw" property." /> + <property name="phase1-auth-flags" type="uint32" default="0" description="Specifies authentication flags to use in "phase 1" outer authentication using NMSetting8021xAuthFlags options. The invidual TLS versions can be explicitly disabled. If a certain TLS disable flag is not set, it is up to the supplicant to allow or forbid it. The TLS options map to tls_disable_tlsv1_x settings. See the wpa_supplicant documentation for more details." /> <property name="phase1-fast-provisioning" type="string" description="Enables or disables in-line provisioning of EAP-FAST credentials when FAST is specified as the EAP method in the "eap" property. Recognized 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." /> <property name="phase1-peaplabel" type="string" description="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." /> <property name="phase1-peapver" type="string" description="Forces which PEAP version is used when PEAP is set as the EAP method in the "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." /> @@ -25,22 +53,26 @@ <property name="phase2-auth" type="string" description="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 "phase 2" 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." /> <property name="phase2-autheap" type="string" description="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." /> <property name="phase2-ca-cert" type="byte array" description="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 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 NUL 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." /> + <property name="phase2-ca-cert-password" type="string" description="The password used to access the "phase2" CA certificate stored in "phase2-ca-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login." /> + <property name="phase2-ca-cert-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "phase2-ca-cert-password" property." /> <property name="phase2-ca-path" type="string" description="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." /> <property name="phase2-client-cert" type="byte array" description="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 NUL 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." /> + <property name="phase2-client-cert-password" type="string" description="The password used to access the "phase2" client certificate stored in "phase2-client-cert" property. Only makes sense if the certificate is stored on a PKCS#11 token that requires a login." /> + <property name="phase2-client-cert-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "phase2-client-cert-password" property." /> <property name="phase2-domain-suffix-match" type="string" description="Constraint for server domain name. If set, this FQDN is used as a suffix match requirement for dNSName element(s) of the certificate presented by the authentication server during the inner "phase 2" authentication. If a matching dNSName is found, this constraint is met. If no dNSName values are present, this constraint is matched against SubjectName CN using same suffix match comparison." /> - <property name="phase2-private-key" type="byte array" description="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 NUL 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 NUL 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." /> + <property name="phase2-private-key" type="byte array" description="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 NUL 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 ending with a terminating NUL 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." /> <property name="phase2-private-key-password" type="string" description="The password used to decrypt the "phase 2" private key specified in the "phase2-private-key" property when the private key either uses the path scheme, or is a PKCS#12 format key." /> <property name="phase2-private-key-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "phase2-private-key-password" property." /> <property name="phase2-subject-match" type="string" description="Substring to be matched against the subject of the certificate presented by the authentication server during the inner "phase 2" authentication. When unset, no verification of the authentication server certificate's subject is performed. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:phase2-domain-suffix-match." /> <property name="pin" type="string" description="PIN used for EAP authentication methods." /> <property name="pin-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "pin" property." /> - <property name="private-key" type="byte array" description="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 NUL 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 NUL 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. WARNING: "private-key" is not a "secret" property, and thus unencrypted private key data using the BLOB scheme may be readable by unprivileged users. Private keys should always be encrypted with a private key password to prevent unauthorized access to unencrypted private key data." /> + <property name="private-key" type="byte array" description="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 NUL 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 ending with a terminating NUL 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. WARNING: "private-key" is not a "secret" property, and thus unencrypted private key data using the BLOB scheme may be readable by unprivileged users. Private keys should always be encrypted with a private key password to prevent unauthorized access to unencrypted private key data." /> <property name="private-key-password" type="string" description="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." /> <property name="private-key-password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "private-key-password" property." /> <property name="subject-match" type="string" description="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. This property provides little security, if any, and its use is deprecated in favor of NMSetting8021x:domain-suffix-match." /> <property name="system-ca-certs" type="boolean" default="FALSE" description="When TRUE, overrides the "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. If the path provided with --system-ca-path is rather a file name (bundle of trusted CA certificates), it overrides "ca-cert" and "phase2-ca-cert" properties instead (sets ca_cert/ca_cert2 options for wpa_supplicant)." /> </setting> - <setting name="adsl"> + <setting name="adsl" description="ADSL Settings"> <property name="encapsulation" type="string" description="Encapsulation of ADSL connection. Can be "vcmux" or "llc"." /> <property name="name" type="string" default="adsl" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="password" type="string" description="Password used to authenticate with the ADSL service." /> @@ -50,17 +82,17 @@ <property name="vci" type="uint32" default="0" description="VCI of ADSL connection" /> <property name="vpi" type="uint32" default="0" description="VPI of ADSL connection" /> </setting> - <setting name="bluetooth"> + <setting name="bluetooth" description="Bluetooth Settings"> <property name="bdaddr" type="byte array" description="The Bluetooth address of the device." /> <property name="name" type="string" default="bluetooth" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="type" type="string" description="Either "dun" for Dial-Up Networking connections or "panu" for Personal Area Networking connections to devices supporting the NAP profile." /> </setting> - <setting name="bond"> + <setting name="bond" description="Bonding Settings"> <property name="interface-name" type="string" description="Deprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the bond's interface name." /> <property name="name" type="string" default="bond" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="options" type="dict of string to string" default="{'mode': 'balance-rr'}" description="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])." /> </setting> - <setting name="bridge"> + <setting name="bridge" description="Bridging Settings"> <property name="ageing-time" type="uint32" default="300" description="The Ethernet MAC address aging time, in seconds." /> <property name="forward-delay" type="uint32" default="15" description="The Spanning Tree Protocol (STP) forwarding delay, in seconds." /> <property name="hello-time" type="uint32" default="2" description="The Spanning Tree Protocol (STP) hello time, in seconds." /> @@ -72,42 +104,21 @@ <property name="priority" type="uint32" default="32768" description="Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower values are "better"; the lowest priority bridge will be elected the root bridge." /> <property name="stp" type="boolean" default="TRUE" description="Controls whether Spanning Tree Protocol (STP) is enabled for this bridge." /> </setting> - <setting name="bridge-port"> + <setting name="bridge-port" description="Bridge Port Settings"> <property name="hairpin-mode" type="boolean" default="FALSE" description="Enables or disabled "hairpin mode" for the port, which allows frames to be sent back out through the port the frame was received on." /> <property name="name" type="string" default="bridge-port" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="path-cost" type="uint32" default="100" description="The Spanning Tree Protocol (STP) port cost for destinations via this port." /> <property name="priority" type="uint32" default="32" description="The Spanning Tree Protocol (STP) priority of this bridge port." /> </setting> - <setting name="cdma"> + <setting name="cdma" description="CDMA-based Mobile Broadband Settings"> + <property name="mtu" type="uint32" default="0" description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames." /> <property name="name" type="string" default="cdma" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="number" type="string" description="The number to dial to establish the connection to the CDMA-based mobile broadband network, if any. If not specified, the default number (#777) is used when required." /> <property name="password" type="string" description="The password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here." /> <property name="password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "password" property." /> <property name="username" type="string" description="The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here." /> </setting> - <setting name="connection"> - <property name="autoconnect" type="boolean" default="TRUE" description="Whether or not the connection should be automatically connected by NetworkManager when the resources for the connection are available. TRUE to automatically activate the connection, FALSE to require manual intervention to activate the connection." /> - <property name="autoconnect-priority" type="int32" default="0" description="The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority." /> - <property name="autoconnect-retries" type="int32" default="-1" description="The number of times a connection should be tried when autoctivating before giving up. Zero means forever, -1 means the global default (4 times if not overridden)." /> - <property name="autoconnect-slaves" type="NMSettingConnectionAutoconnectSlaves (int32)" description="Whether or not slaves of this connection should be automatically brought up when NetworkManager activates this connection. This only has a real effect for master connections. The permitted values are: 0: leave slave connections untouched, 1: activate all the slave connections with this connection, -1: default. If -1 (default) is set, global connection.autoconnect-slaves is read to determine the real value. If it is default as well, this fallbacks to 0." /> - <property name="gateway-ping-timeout" type="uint32" default="0" description="If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping." /> - <property name="id" type="string" description="A human readable unique identifier for the connection, like "Work Wi-Fi" or "T-Mobile 3G"." /> - <property name="interface-name" type="string" description="The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface." /> - <property name="lldp" type="int32" default="-1" description="Whether LLDP is enabled for the connection." /> - <property name="master" type="string" description="Interface name of the master device or UUID of the master connection." /> - <property name="metered" type="NMMetered (int32)" description="Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately." /> - <property name="name" type="string" default="connection" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> - <property name="permissions" type="array of string" default="[]" description="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 list. 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 present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8." /> - <property name="read-only" type="boolean" default="FALSE" description="FALSE if the connection can be modified using the provided settings service's D-Bus interface with the right privileges, or TRUE if the connection is read-only and cannot be modified." /> - <property name="secondaries" type="array of string" default="[]" description="List of connection UUIDs that should be activated when the base connection itself is activated. Currently only VPN connections are supported." /> - <property name="slave-type" type="string" description="Setting name of the device type of this slave's master connection (eg, "bond"), or NULL if this connection is not a slave." /> - <property name="stable-id" type="string" description="Token to generate stable IDs for the connection. The stable-id is used for generating IPv6 stable private addresses with ipv6.addr-gen-mode=stable-privacy. It is also used to seed the generated cloned MAC address for ethernet.cloned-mac-address=stable and wifi.cloned-mac-address=stable. Note that also the interface name of the activating connection and a per-host secret key is included into the address generation so that the same stable-id on different hosts/devices yields different addresses. If the value is unset, an ID unique for the connection is used. Specifing a stable-id allows multiple connections to generate the same addresses. Another use is to generate IDs at runtime via dynamic substitutions. The '$' character is treated special to perform dynamic substitutions at runtime. Currently supported are "${CONNECTION}", "${BOOT}", "${RANDOM}". These effectively create unique IDs per-connection, per-boot, or every time. Any unrecognized patterns following '$' are treated verbatim, however are reserved for future use. You are thus advised to avoid '$' or escape it as "$$". For example, set it to "${CONNECTION}/${BOOT}" to create a unique id for this connection that changes with every reboot. Note that two connections only use the same effective id if their stable-id is also identical before performing dynamic substitutions." /> - <property name="timestamp" type="uint64" default="0" description="The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated. NetworkManager updates the connection timestamp periodically when the connection is active to ensure that an active connection has the latest timestamp. The property is only meant for reading (changes to this property will not be preserved)." /> - <property name="type" type="string" description="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)." /> - <property name="uuid" type="string" description="A universally unique identifier for the connection, for example generated with libuuid. It 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 "id" property or NMSettingIP4Config changes, but might need to be re-created when the Wi-Fi SSID, mobile broadband network provider, or "type" property changes. The UUID must be in the format "2815492f-7e56-435e-b2e9-246bd7cdc664" (ie, contains only hexadecimal characters and "-")." /> - <property name="zone" type="string" description="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. When updating this property on a currently activated connection, the change takes effect immediately." /> - </setting> - <setting name="dcb"> + <setting name="dcb" description="Data Center Bridging Settings"> <property name="app-fcoe-flags" type="NMSettingDcbFlags (uint32)" description="Specifies the NMSettingDcbFlags for the DCB FCoE application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4)." /> <property name="app-fcoe-mode" type="string" default=""fabric"" description="The FCoE controller mode; either "fabric" (default) or "vn2vn"." /> <property name="app-fcoe-priority" type="int32" default="-1" description="The highest User Priority (0 - 7) which FCoE frames should use, or -1 for default priority. Only used when the "app-fcoe-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag." /> @@ -125,13 +136,17 @@ <property name="priority-strict-bandwidth" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group." /> <property name="priority-traffic-class" type="array of uint32" default="[0, 0, 0, 0, 0, 0, 0, 0]" description="An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped." /> </setting> - <setting name="generic"> + <setting name="dummy" description="Dummy Link Settings"> + <property name="name" type="string" default="dummy" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> + </setting> + <setting name="generic" description="Generic Link Settings"> <property name="name" type="string" default="generic" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> </setting> - <setting name="gsm"> + <setting name="gsm" description="GSM-based Mobile Broadband Settings"> <property name="apn" type="string" description="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." /> <property name="device-id" type="string" description="The device unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will only apply to the specified device." /> <property name="home-only" type="boolean" default="FALSE" description="When TRUE, only connections to the home network will be allowed. Connections to roaming networks will not be made." /> + <property name="mtu" type="uint32" default="0" description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames." /> <property name="name" type="string" default="gsm" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="network-id" type="string" description="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." /> <property name="number" type="string" description="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." /> @@ -143,7 +158,7 @@ <property name="sim-operator-id" type="string" description="A MCC/MNC string like "310260" or "21601" identifying the specific mobile network operator which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" and "sim-id" which contains a SIM card provisioined by the given operator." /> <property name="username" type="string" description="The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here." /> </setting> - <setting name="infiniband"> + <setting name="infiniband" description="Infiniband Settings"> <property name="mac-address" type="byte array" description="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)." /> <property name="mtu" type="uint32" default="0" description="If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames." /> <property name="name" type="string" default="infiniband" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> @@ -151,7 +166,7 @@ <property name="parent" type="string" description="The interface name of the parent device of this device. Normally NULL, but if the "p_key" property is set, then you must specify the base device by setting either this property or "mac-address"." /> <property name="transport-mode" type="string" description="The IP-over-InfiniBand transport mode. Either "datagram" or "connected"." /> </setting> - <setting name="ipv4"> + <setting name="ipv4" description="IPv4 Settings"> <property name="address-data" type="array of vardict" description="Array of IPv4 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses." /> <property name="addresses" type="array of array of uint32" default="[]" description="Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. 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." /> <property name="dad-timeout" type="int32" default="-1" description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." /> @@ -175,7 +190,7 @@ <property name="route-metric" type="int64" default="-1" description="The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is choosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric." /> <property name="routes" type="array of array of uint32" default="[]" description="Deprecated in favor of the 'route-data' property, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'route-data'. 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. If the metric is 0, NM will choose an appropriate default metric for the device. (There is no way to explicitly specify an actual metric of 0 with this property.)" /> </setting> - <setting name="ipv6"> + <setting name="ipv6" description="IPv6 Settings"> <property name="addr-gen-mode" type="int32" default="1" description="Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: "eui64", or "stable-privacy". If the property is set to "eui64", the addresses will be generated using the interface tokens derived from hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of "stable-privacy" enables use of cryptographically secure hash of a secret host-specific key along with the connection's stable-id and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. On D-Bus, the absence of an addr-gen-mode setting equals enabling "stable-privacy". For keyfile plugin, the absence of the setting on disk means "eui64" so that the property doesn't change on upgrade from older versions. Note that this setting is distinct from the Privacy Extensions as configured by "ip6-privacy" property and it does not affect the temporary addresses configured with this option." /> <property name="address-data" type="array of vardict" description="Array of IPv6 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses." /> <property name="addresses" type="array of legacy IPv6 address struct (a(ayuay))" default="[]" description="Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. Array of IPv6 address structures. Each IPv6 address structure is composed of an IPv6 address, a prefix length (1 - 128), and an IPv6 gateway address. The gateway may be zeroed out if no gateway exists for that subnet." /> @@ -200,7 +215,7 @@ <property name="routes" type="array of legacy IPv6 route struct (a(ayuayu))" default="[]" description="Deprecated in favor of the 'route-data' property, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'route-data'. Array of IPv6 route structures. Each IPv6 route structure is composed of an IPv6 address, a prefix length (1 - 128), an IPv6 next hop address (which may be zeroed out if there is no next hop), and a metric. If the metric is 0, NM will choose an appropriate default metric for the device." /> <property name="token" type="string" description="Configure the token for draft-chown-6man-tokenised-ipv6-identifiers-02 IPv6 tokenized interface identifiers. Useful with eui64 addr-gen-mode." /> </setting> - <setting name="ip-tunnel"> + <setting name="ip-tunnel" description="IP Tunneling Settings"> <property name="encapsulation-limit" type="uint32" default="0" description="How many additional levels of encapsulation are permitted to be prepended to packets. This property applies only to IPv6 tunnels." /> <property name="flow-label" type="uint32" default="0" description="The flow label to assign to tunnel packets. This property applies only to IPv6 tunnels." /> <property name="input-key" type="string" description="The key used for tunnel input packets; the property is valid only for certain tunnel modes (GRE, IP6GRE). If empty, no key is used." /> @@ -215,7 +230,7 @@ <property name="tos" type="uint32" default="0" description="The type of service (IPv4) or traffic class (IPv6) field to be set on tunneled packets." /> <property name="ttl" type="uint32" default="0" description="The TTL to assign to tunneled packets. 0 is a special value meaning that packets inherit the TTL value." /> </setting> - <setting name="macsec"> + <setting name="macsec" description="MACSec Settings"> <property name="encrypt" type="boolean" default="TRUE" description="Whether the transmitted traffic must be encrypted." /> <property name="mka-cak" type="string" description="The pre-shared CAK (Connectivity Association Key) for MACsec Key Agreement." /> <property name="mka-cak-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "mka-cak" property." /> @@ -226,20 +241,20 @@ <property name="port" type="int32" default="1" description="The port component of the SCI (Secure Channel Identifier), between 1 and 65534." /> <property name="validation" type="int32" default="2" description="Specifies the validation mode for incoming frames." /> </setting> - <setting name="macvlan"> + <setting name="macvlan" description="MAC VLAN Settings"> <property name="mode" type="uint32" default="0" description="The macvlan mode, which specifies the communication mechanism between multiple macvlans on the same lower device." /> <property name="name" type="string" default="macvlan" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="parent" type="string" description="If given, specifies the parent interface name or parent connection UUID from which this MAC-VLAN interface should be created. If this property is not specified, the connection must contain an "802-3-ethernet" setting with a "mac-address" property." /> <property name="promiscuous" type="boolean" default="TRUE" description="Whether the interface should be put in promiscuous mode." /> <property name="tap" type="boolean" default="FALSE" description="Whether the interface should be a MACVTAP." /> </setting> - <setting name="802-11-olpc-mesh"> + <setting name="802-11-olpc-mesh" description="OLPC Wireless Mesh Settings"> <property name="channel" type="uint32" default="0" description="Channel on which the mesh network to join is located." /> <property name="dhcp-anycast-address" type="byte array" description="Anycast DHCP MAC address used when requesting an IP address via DHCP. The specific anycast address used determines which DHCP server class answers the request." /> <property name="name" type="string" default="802-11-olpc-mesh" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="ssid" type="byte array" description="SSID of the mesh network to join." /> </setting> - <setting name="ppp"> + <setting name="ppp" description="Point-to-Point Protocol Settings"> <property name="baud" type="uint32" default="0" description="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." /> <property name="crtscts" type="boolean" default="FALSE" description="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." /> <property name="lcp-echo-failure" type="uint32" default="0" description="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." /> @@ -260,21 +275,21 @@ <property name="require-mppe" type="boolean" default="FALSE" description="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." /> <property name="require-mppe-128" type="boolean" default="FALSE" description="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." /> </setting> - <setting name="pppoe"> + <setting name="pppoe" description="PPP-over-Ethernet Settings"> <property name="name" type="string" default="pppoe" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="password" type="string" description="Password used to authenticate with the PPPoE service." /> <property name="password-flags" type="NMSettingSecretFlags (uint32)" description="Flags indicating how to handle the "password" property." /> <property name="service" type="string" description="If specified, instruct PPPoE to only initiate sessions with access concentrators that provide the specified service. 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." /> <property name="username" type="string" description="Username used to authenticate with the PPPoE service." /> </setting> - <setting name="proxy"> + <setting name="proxy" description="WWW Proxy Settings"> <property name="browser-only" type="boolean" default="FALSE" description="Whether the proxy configuration is for browser only." /> <property name="method" type="int32" default="0" description="Method for proxy configuration, Default is NM_SETTING_PROXY_METHOD_NONE (0)" /> <property name="name" type="string" default="proxy" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="pac-script" type="string" description="PAC script for the connection." /> <property name="pac-url" type="string" description="PAC URL for obtaining PAC file." /> </setting> - <setting name="serial"> + <setting name="serial" description="Serial Link Settings"> <property name="baud" type="uint32" default="57600" description="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." /> <property name="bits" type="uint32" default="8" description="Byte-width of the serial communication. The 8 in "8n1" for example." /> <property name="name" type="string" default="serial" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> @@ -282,16 +297,16 @@ <property name="send-delay" type="uint64" default="0" description="Time to delay between each byte sent to the modem, in microseconds." /> <property name="stopbits" type="uint32" default="1" description="Number of stop bits for communication on the serial port. Either 1 or 2. The 1 in "8n1" for example." /> </setting> - <setting name="team"> + <setting name="team" description="Teaming Settings"> <property name="config" type="string" description="The JSON configuration for the team network interface. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details." /> <property name="interface-name" type="string" description="Deprecated in favor of connection.interface-name, but can be used for backward-compatibility with older daemons, to set the team's interface name." /> <property name="name" type="string" default="team" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> </setting> - <setting name="team-port"> + <setting name="team-port" description="Team Port Settings"> <property name="config" type="string" description="The JSON configuration for the team port. The property should contain raw JSON configuration data suitable for teamd, because the value is passed directly to teamd. If not specified, the default configuration is used. See man teamd.conf for the format details." /> <property name="name" type="string" default="team-port" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> </setting> - <setting name="tun"> + <setting name="tun" description="Tunnel Settings"> <property name="group" type="string" description="The group ID which will own the device. If set to NULL everyone will be able to use the device." /> <property name="mode" type="uint32" default="1" description="The operating mode of the virtual device. Allowed values are NM_SETTING_TUN_MODE_TUN (1) to create a layer 3 device and NM_SETTING_TUN_MODE_TAP (2) to create an Ethernet-like layer 2 one." /> <property name="multi-queue" type="boolean" default="FALSE" description="If the property is set to TRUE, the interface will support multiple file descriptors (queues) to parallelize packet sending or receiving. Otherwise, the interface will only support a single queue." /> @@ -300,7 +315,11 @@ <property name="pi" type="boolean" default="FALSE" description="If TRUE the interface will prepend a 4 byte header describing the physical interface to the packets." /> <property name="vnet-hdr" type="boolean" default="FALSE" description="If TRUE the IFF_VNET_HDR the tunnel packets will include a virtio network header." /> </setting> - <setting name="vlan"> + <setting name="user" description="General User Profile Settings"> + <property name="data" type="dict of string to string" default="{}" description="A dictionary of key/value pairs with user data. This data is ignored by NetworkManager and can be used at the users discretion. The keys only support a strict ascii format, but the values can be arbitrary UTF8 strings up to a certain length." /> + <property name="name" type="string" default="user" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> + </setting> + <setting name="vlan" description="VLAN Settings"> <property name="egress-priority-map" type="array of string" default="[]" description="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"." /> <property name="flags" type="NMVlanFlags (uint32)" description="One or more flags which control the behavior and features of the VLAN interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS (0x1) (reordering of output packet headers), NM_VLAN_FLAG_GVRP (0x2) (use of the GVRP protocol), and NM_VLAN_FLAG_LOOSE_BINDING (0x4) (loose binding of the interface to its master device's operating state). NM_VLAN_FLAG_MVRP (0x8) (use of the MVRP protocol). The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS, but it used to be 0. To preserve backward compatibility, the default-value in the D-Bus API continues to be 0 and a missing property on D-Bus is still considered as 0." /> <property name="id" type="uint32" default="0" description="The VLAN identifier that the interface created by this connection should be assigned. The valid range is from 0 to 4094, without the reserved id 4095." /> @@ -309,7 +328,7 @@ <property name="name" type="string" default="vlan" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="parent" type="string" description="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 an "802-3-ethernet" setting with a "mac-address" property." /> </setting> - <setting name="vpn"> + <setting name="vpn" description="VPN Settings"> <property name="data" type="dict of string to string" default="{}" description="Dictionary of key/value pairs of VPN plugin specific data. Both keys and values must be strings." /> <property name="name" type="string" default="vpn" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="persistent" type="boolean" default="FALSE" description="If the VPN service supports persistence, and this property is TRUE, the VPN will attempt to stay connected across link changes and outages, until explicitly disconnected." /> @@ -318,7 +337,7 @@ <property name="timeout" type="uint32" default="0" description="Timeout for the VPN service to establish the connection. Some services may take quite a long time to connect. Value of 0 means a default timeout, which is 60 seconds (unless overriden by vpn.timeout in configuration file). Values greater than zero mean timeout in seconds." /> <property name="user-name" type="string" description="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." /> </setting> - <setting name="vxlan"> + <setting name="vxlan" description="VXLAN Settings"> <property name="ageing" type="uint32" default="300" description="Specifies the lifetime in seconds of FDB entries learnt by the kernel." /> <property name="destination-port" type="uint32" default="8472" description="Specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint." /> <property name="id" type="uint32" default="0" description="Specifies the VXLAN Network Identifer (or VXLAN Segment Identifier) to use." /> @@ -337,12 +356,12 @@ <property name="tos" type="uint32" default="0" description="Specifies the TOS value to use in outgoing packets." /> <property name="ttl" type="uint32" default="0" description="Specifies the time-to-live value to use in outgoing packets." /> </setting> - <setting name="wimax"> + <setting name="wimax" description="WiMax Settings"> <property name="mac-address" type="byte array" description="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). Deprecated: 1" /> <property name="name" type="string" default="wimax" description="The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example "ppp" or "wireless" or "wired"." /> <property name="network-name" type="string" description="Network Service Provider (NSP) name of the WiMAX network this connection should use. Deprecated: 1" /> </setting> - <setting name="802-3-ethernet"> + <setting name="802-3-ethernet" description="Wired Ethernet Settings"> <property name="assigned-mac-address" type="string" description="The new field for the cloned MAC address. It can be either a hardware address in ASCII representation, or one of the special values "preserve", "permanent", "random" or "stable". This field replaces the deprecated "cloned-mac-address" on D-Bus, which can only contain explict hardware addresses. Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address"." /> <property name="auto-negotiate" type="boolean" default="FALSE" description="If TRUE, enforce auto-negotiation of port speed and duplex mode. If FALSE, "speed" and "duplex" properties should be both set or link configuration will be skipped." /> <property name="cloned-mac-address" type="byte array" description="This D-Bus field is deprecated in favor of "assigned-mac-address" which is more flexible and allows specifying special variants like "random". For libnm and nmcli, this field is called "cloned-mac-address"." /> @@ -360,7 +379,7 @@ <property name="wake-on-lan" type="uint32" default="1" description="The NMSettingWiredWakeOnLan options to enable. Not all devices support all options. May be any combination of NM_SETTING_WIRED_WAKE_ON_LAN_PHY (0x2), NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST (0x4), NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST (0x8), NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST (0x10), NM_SETTING_WIRED_WAKE_ON_LAN_ARP (0x20), NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC (0x40) or the special values NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT (0x1) (to use global settings) and NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE (0x8000) (to disable management of Wake-on-LAN in NetworkManager)." /> <property name="wake-on-lan-password" type="string" description="If specified, the password used with magic-packet-based Wake-on-LAN, represented as an Ethernet MAC address. If NULL, no password will be required." /> </setting> - <setting name="802-11-wireless"> + <setting name="802-11-wireless" description="Wi-Fi Settings"> <property name="assigned-mac-address" type="string" description="The new field for the cloned MAC address. It can be either a hardware address in ASCII representation, or one of the special values "preserve", "permanent", "random" or "stable". This field replaces the deprecated "cloned-mac-address" on D-Bus, which can only contain explict hardware addresses. Note that this property only exists in D-Bus API. libnm and nmcli continue to call this property "cloned-mac-address"." /> <property name="band" type="string" description="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 Wi-Fi 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." /> <property name="bssid" type="byte array" description="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." /> @@ -381,7 +400,7 @@ <property name="ssid" type="byte array" description="SSID of the Wi-Fi network. Must be specified." /> <property name="tx-power" type="uint32" default="0" description="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." /> </setting> - <setting name="802-11-wireless-security"> + <setting name="802-11-wireless-security" description="Wi-Fi Security Settings"> <property name="auth-alg" type="string" description="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." /> <property name="group" type="array of string" default="[]" description="A list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the list. For maximum compatibility leave this property empty. Each list element may be one of "wep40", "wep104", "tkip", or "ccmp"." /> <property name="key-mgmt" type="string" description="Key management used for the connection. One of "none" (WEP), "ieee8021x" (Dynamic WEP), "wpa-none" (Ad-Hoc WPA-PSK), "wpa-psk" (infrastructure WPA-PSK), or "wpa-eap" (WPA-Enterprise). This property must be set for any Wi-Fi connection that uses security." /> diff --git a/libnm/nm-settings-ifcfg-rh-docs.xml b/libnm/nm-settings-ifcfg-rh-docs.xml index aaf3880e..7664fc57 100644 --- a/libnm/nm-settings-ifcfg-rh-docs.xml +++ b/libnm/nm-settings-ifcfg-rh-docs.xml @@ -17,6 +17,7 @@ <property name="phase1-peapver" variable="IEEE_8021X_PEAP_VERSION(+)" format="" values="0, 1" default="" example="" description="Use to force a specific PEAP version."/> <property name="phase1-peaplabel" variable="IEEE_8021X_PEAP_FORCE_NEW_LABEL(+)" format="" values="yes, no" default="no" example="" description="Use to force the new PEAP label during key derivation."/> <property name="phase1-fast-provisioning" variable="IEEE_8021X_FAST_PROVISIONING(+)" format="" values="space-separated list of these values [allow-auth, allow-unauth]" default="" example="IEEE_8021X_FAST_PROVISIONING="allow-auth allow-unauth"" description="Enable in-line provisioning of EAP-FAST credentials."/> +<property name="phase1-auth-flags" variable="IEEE_8021X_PHASE1_AUTH_FLAGS(+)" format="" values="space-separated list of authentication flags names" default="" example="IEEE_8021X_PHASE1_AUTH_FLAGS="tls-1-0-disable tls-1-1-disable"" description="Authentication flags for the supplicant"/> <property name="phase2-auth" variable="IEEE_8021X_INNER_AUTH_METHODS(+)" format="" values=""PAP", "CHAP", "MSCHAP", "MSCHAPV2", "GTC", "OTP", "MD5" and "TLS"" default="" example="IEEE_8021X_INNER_AUTH_METHODS=PAP" description="Inner non-EAP authentication methods. IEEE_8021X_INNER_AUTH_METHODS can contain values both for 'phase2-auth' and 'phase2-autheap' properties."/> <property name="phase2-autheap" variable="IEEE_8021X_INNER_AUTH_METHODS(+)" format="" values=""EAP-MD5", "EAP-MSCHAPV2", "EAP-GTC", "EAP-OTP" and "EAP-TLS"" default="" example="IEEE_8021X_INNER_AUTH_METHODS="MSCHAPV2 EAP-TLS"" description="Inner EAP-based authentication methods. Note that @@ -41,6 +42,7 @@ lookaside file, or it can be owned by a secret agent."/> <property name="pin" variable="(none)" format="" values="" default="" example="" description="The property is not handled by ifcfg-rh plugin."/> <property name="pin-flags" variable="(none)" format="" values="" default="" example="" description="The property is not handled by ifcfg-rh plugin."/> <property name="system-ca-certs" variable="(none)" format="" values="" default="" example="" description="The property is not handled by ifcfg-rh plugin."/> +<property name="auth-timeout" variable="IEEE_8021X_AUTH_TIMEOUT(+)" format="" values="" default="0" example="" description="Timeout in seconds for the 802.1X authentication. Zero means the global default or 25."/> </setting> <setting name="adsl"> </setting> @@ -126,6 +128,8 @@ The sum of the numbers must be 100."/> "may not utilize all bandwidth", "1" means "may utilize all bandwidth"."/> <property name="priority-traffic-class" variable="DCB_PG_UP2TC" format="" values="" default="" example="DCB_PG_UP2TC=01623701" description="Priority values. String of eight trafic class values (0 - 7)."/> </setting> +<setting name="dummy"> +</setting> <setting name="generic"> </setting> <setting name="gsm"> @@ -155,7 +159,7 @@ servers, initscripts and resolver only care about the first three, usually."/> <property name="dns-search" variable="DOMAIN" format="string (space-separated domains)" values="" default="" example="" description="List of DNS search domains."/> <property name="addresses" variable="IPADDR, PREFIX, IPADDR1, PREFIX1, ..." format="" values="" default="" example="IPADDR=10.5.5.23 PREFIX=24 IPADDR1=1.1.1.2 PREFIX1=16" description="List of static IP addresses."/> <property name="gateway" variable="GATEWAY" format="" values="" default="" example="GATEWAY=10.5.5.1" description="Gateway IP address."/> -<property name="routes" variable="ADDRESS1, NETMASK1, GATEWAY1, METRIC1, ..." format="" values="" default="" example="" description="List of static routes. They are not stored in ifcfg-* file, +<property name="routes" variable="ADDRESS1, NETMASK1, GATEWAY1, METRIC1, OPTIONS1, ..." format="" values="" default="" example="" description="List of static routes. They are not stored in ifcfg-* file, but in route-* file instead."/> <property name="ignore-auto-routes" variable="PEERROUTES(+)" format="" values="" default="yes" example="" description="PEERROUTES has the opposite meaning as 'ignore-auto-routes' property."/> <property name="ignore-auto-dns" variable="PEERDNS" format="" values="" default="yes" example="" description="PEERDNS has the opposite meaning as 'ignore-auto-dns' property."/> @@ -233,6 +237,8 @@ proxy configuration, or set the PAC file via PAC_URL or PAC_SCRIPT."/> </setting> <setting name="tun"> </setting> +<setting name="user"> +</setting> <setting name="vlan"> <property name="parent" variable="DEVICE or PHYSDEV" format="" values="" default="" example="" description="Parent interface of the VLAN."/> <property name="id" variable="VLAN_ID or DEVICE" format="" values="" default="" example="" description="VLAN identifier."/> diff --git a/libnm/nm-settings-keyfile-docs.xml b/libnm/nm-settings-keyfile-docs.xml index 2b59e9a9..33f53c4c 100644 --- a/libnm/nm-settings-keyfile-docs.xml +++ b/libnm/nm-settings-keyfile-docs.xml @@ -24,6 +24,8 @@ or semicolon separated list of 6 decimal bytes (obsolete)"/> </setting> <setting name="dcb"> </setting> +<setting name="dummy"> +</setting> <setting name="generic"> </setting> <setting name="gsm"> @@ -72,6 +74,8 @@ versions of NetworkManager stored this as an integer: 69 ('E') for eve </setting> <setting name="tun"> </setting> +<setting name="user"> +</setting> <setting name="vlan"> </setting> <setting name="vpn"> diff --git a/libnm/nm-types.h b/libnm/nm-types.h index 7d224c86..84cf48f4 100644 --- a/libnm/nm-types.h +++ b/libnm/nm-types.h @@ -23,8 +23,8 @@ #include <gio/gio.h> -#include <nm-dbus-interface.h> -#include <nm-connection.h> +#include "nm-dbus-interface.h" +#include "nm-connection.h" typedef struct _NMAccessPoint NMAccessPoint; typedef struct _NMActiveConnection NMActiveConnection; @@ -34,6 +34,7 @@ typedef struct _NMDeviceAdsl NMDeviceAdsl; typedef struct _NMDeviceBond NMDeviceBond; typedef struct _NMDeviceBridge NMDeviceBridge; typedef struct _NMDeviceBt NMDeviceBt; +typedef struct _NMDeviceDummy NMDeviceDummy; typedef struct _NMDeviceEthernet NMDeviceEthernet; typedef struct _NMDeviceGeneric NMDeviceGeneric; typedef struct _NMDeviceInfiniband NMDeviceInfiniband; diff --git a/libnm/nm-vpn-connection.c b/libnm/nm-vpn-connection.c index a91a6f69..814f45f0 100644 --- a/libnm/nm-vpn-connection.c +++ b/libnm/nm-vpn-connection.c @@ -36,6 +36,8 @@ G_DEFINE_TYPE (NMVpnConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION) #define NM_VPN_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_VPN_CONNECTION, NMVpnConnectionPrivate)) +G_STATIC_ASSERT (sizeof (NMVpnConnectionStateReason) == sizeof (NMActiveConnectionStateReason)); + typedef struct { char *banner; NMVpnConnectionState vpn_state; @@ -220,6 +222,7 @@ nm_vpn_connection_class_init (NMVpnConnectionClass *connection_class) G_PARAM_STATIC_STRINGS)); /* signals */ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS signals[VPN_STATE_CHANGED] = g_signal_new ("vpn-state-changed", G_OBJECT_CLASS_TYPE (object_class), @@ -228,4 +231,5 @@ nm_vpn_connection_class_init (NMVpnConnectionClass *connection_class) NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); + G_GNUC_END_IGNORE_DEPRECATIONS } diff --git a/libnm/nm-vpn-connection.h b/libnm/nm-vpn-connection.h index 79ec90a0..d53f8e92 100644 --- a/libnm/nm-vpn-connection.h +++ b/libnm/nm-vpn-connection.h @@ -26,8 +26,8 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-active-connection.h> -#include <nm-vpn-dbus-interface.h> +#include "nm-active-connection.h" +#include "nm-vpn-dbus-interface.h" G_BEGIN_DECLS @@ -52,9 +52,19 @@ typedef struct { NMActiveConnectionClass parent; /* Signals */ + + /* NMVpnConnectionStateReason got deprecated in 1.8.0. Thus, vpn_state_changed() + * uses a deprecated type and is itself deprecated. + * + * If you use this signal slot, you are advised to cast the reason + * to the NMActiveConnectionStateReason type, which is fully compatible. + */ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + NM_DEPRECATED_IN_1_8 void (*vpn_state_changed) (NMVpnConnection *connection, NMVpnConnectionState state, NMVpnConnectionStateReason reason); + G_GNUC_END_IGNORE_DEPRECATIONS /*< private >*/ gpointer padding[4]; diff --git a/libnm/nm-vpn-editor.h b/libnm/nm-vpn-editor.h index d450bbd6..26e48662 100644 --- a/libnm/nm-vpn-editor.h +++ b/libnm/nm-vpn-editor.h @@ -28,9 +28,9 @@ #include <glib.h> #include <glib-object.h> -#include <nm-types.h> +#include "nm-types.h" -#include <nm-vpn-editor-plugin.h> +#include "nm-vpn-editor-plugin.h" G_BEGIN_DECLS diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index aff23b20..2b5922b9 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -1025,7 +1025,7 @@ set_property (GObject *object, guint prop_id, switch (prop_id) { case PROP_DBUS_SERVICE_NAME: - /* Construct-only */ + /* construct-only */ priv->dbus_service_name = g_value_dup_string (value); break; case PROP_STATE: diff --git a/libnm/nm-vpn-plugin-old.h b/libnm/nm-vpn-plugin-old.h index 50e34450..48f3fba1 100644 --- a/libnm/nm-vpn-plugin-old.h +++ b/libnm/nm-vpn-plugin-old.h @@ -23,8 +23,8 @@ #define __NM_VPN_PLUGIN_OLD_H__ #include <gio/gio.h> -#include <nm-vpn-dbus-interface.h> -#include <nm-connection.h> +#include "nm-vpn-dbus-interface.h" +#include "nm-connection.h" G_BEGIN_DECLS diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c index 0b47bf53..31e12954 100644 --- a/libnm/nm-vpn-service-plugin.c +++ b/libnm/nm-vpn-service-plugin.c @@ -1047,11 +1047,11 @@ set_property (GObject *object, guint prop_id, switch (prop_id) { case PROP_DBUS_SERVICE_NAME: - /* Construct-only */ + /* construct-only */ priv->dbus_service_name = g_value_dup_string (value); break; case PROP_DBUS_WATCH_PEER: - /* Construct-only */ + /* construct-only */ priv->dbus_watch_peer = g_value_get_boolean (value); break; case PROP_STATE: diff --git a/libnm/nm-vpn-service-plugin.h b/libnm/nm-vpn-service-plugin.h index 0b655296..329345ea 100644 --- a/libnm/nm-vpn-service-plugin.h +++ b/libnm/nm-vpn-service-plugin.h @@ -27,8 +27,8 @@ #endif #include <gio/gio.h> -#include <nm-vpn-dbus-interface.h> -#include <nm-connection.h> +#include "nm-vpn-dbus-interface.h" +#include "nm-connection.h" G_BEGIN_DECLS diff --git a/libnm/nm-wimax-nsp.h b/libnm/nm-wimax-nsp.h index e1f63400..ed399346 100644 --- a/libnm/nm-wimax-nsp.h +++ b/libnm/nm-wimax-nsp.h @@ -26,7 +26,7 @@ #error "Only <NetworkManager.h> can be included directly." #endif -#include <nm-object.h> +#include "nm-object.h" G_BEGIN_DECLS |