diff options
Diffstat (limited to 'libnm')
| -rw-r--r-- | libnm/NetworkManager.h | 3 | ||||
| -rwxr-xr-x | libnm/generate-setting-docs.py | 4 | ||||
| -rw-r--r-- | libnm/libnm.ver | 110 | ||||
| -rw-r--r-- | libnm/nm-manager.c | 2 | ||||
| -rw-r--r-- | libnm/nm-object.c | 6 | ||||
| -rw-r--r-- | libnm/nm-property-docs.xml | 26 | ||||
| -rw-r--r-- | libnm/nm-remote-connection.c | 170 | ||||
| -rw-r--r-- | libnm/nm-remote-connection.h | 13 | ||||
| -rw-r--r-- | libnm/nm-settings-docs-overrides.xml | 2 | ||||
| -rw-r--r-- | libnm/nm-settings-docs.xml | 26 | ||||
| -rw-r--r-- | libnm/nm-settings-ifcfg-rh-docs.xml | 17 | ||||
| -rw-r--r-- | libnm/nm-settings-keyfile-docs.xml | 2 |
12 files changed, 339 insertions, 42 deletions
diff --git a/libnm/NetworkManager.h b/libnm/NetworkManager.h index 27737e0e..2bdd2ed9 100644 --- a/libnm/NetworkManager.h +++ b/libnm/NetworkManager.h @@ -15,7 +15,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright 2014 Red Hat, Inc. + * Copyright 2014 - 2017 Red Hat, Inc. */ #ifndef __NETWORKMANAGER_H__ @@ -84,6 +84,7 @@ #include "nm-setting-pppoe.h" #include "nm-setting-proxy.h" #include "nm-setting-serial.h" +#include "nm-setting-tc-config.h" #include "nm-setting-team.h" #include "nm-setting-team-port.h" #include "nm-setting-tun.h" diff --git a/libnm/generate-setting-docs.py b/libnm/generate-setting-docs.py index aa0c96eb..f888ff22 100755 --- a/libnm/generate-setting-docs.py +++ b/libnm/generate-setting-docs.py @@ -14,7 +14,7 @@ # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301 USA. # -# Copyright 2009 - 2014 Red Hat, Inc. +# Copyright 2009 - 2017 Red Hat, Inc. from __future__ import print_function @@ -54,10 +54,12 @@ dbus_type_name_map = { 'ay': 'byte array', 'a{ss}': 'dict of string to string', 'a{sv}': 'vardict', + 'aa{sv}': 'array of vardict', 'aau': 'array of array of uint32', 'aay': 'array of byte array', 'a(ayuay)': 'array of legacy IPv6 address struct', 'a(ayuayu)': 'array of legacy IPv6 route struct', + 'aa{sv}': 'array of vardict', } ns_map = { diff --git a/libnm/libnm.ver b/libnm/libnm.ver index 18ff993d..7646a931 100644 --- a/libnm/libnm.ver +++ b/libnm/libnm.ver @@ -1221,3 +1221,113 @@ global: nm_setting_wireless_security_pmf_get_type; nm_setting_wireless_security_wps_method_get_type; } libnm_1_8_0; + +libnm_1_10_2 { +global: + nm_remote_connection_update2; + nm_remote_connection_update2_finish; + nm_settings_update2_flags_get_type; + nm_setting_tc_config_add_qdisc; + nm_setting_tc_config_add_tfilter; + nm_setting_tc_config_clear_qdiscs; + nm_setting_tc_config_clear_tfilters; + nm_setting_tc_config_get_num_qdiscs; + nm_setting_tc_config_get_num_tfilters; + nm_setting_tc_config_get_qdisc; + nm_setting_tc_config_get_tfilter; + nm_setting_tc_config_get_type; + nm_setting_tc_config_new; + nm_setting_tc_config_remove_qdisc; + nm_setting_tc_config_remove_qdisc_by_value; + nm_setting_tc_config_remove_tfilter; + nm_setting_tc_config_remove_tfilter_by_value; + nm_setting_team_add_link_watcher; + nm_setting_team_add_runner_tx_hash; + nm_setting_team_clear_link_watchers; + nm_setting_team_get_link_watcher; + nm_setting_team_get_mcast_rejoin_count; + nm_setting_team_get_mcast_rejoin_interval; + nm_setting_team_get_notify_peers_count; + nm_setting_team_get_notify_peers_interval; + nm_setting_team_get_num_link_watchers; + nm_setting_team_get_num_runner_tx_hash; + nm_setting_team_get_runner; + nm_setting_team_get_runner_active; + nm_setting_team_get_runner_agg_select_policy; + nm_setting_team_get_runner_fast_rate; + nm_setting_team_get_runner_hwaddr_policy; + nm_setting_team_get_runner_min_ports; + nm_setting_team_get_runner_sys_prio; + nm_setting_team_get_runner_tx_balancer; + nm_setting_team_get_runner_tx_balancer_interval; + nm_setting_team_get_runner_tx_hash; + nm_setting_team_port_add_link_watcher; + nm_setting_team_port_clear_link_watchers; + nm_setting_team_port_get_lacp_key; + nm_setting_team_port_get_lacp_prio; + nm_setting_team_port_get_link_watcher; + nm_setting_team_port_get_num_link_watchers; + nm_setting_team_port_get_prio; + nm_setting_team_port_get_queue_id; + nm_setting_team_port_get_sticky; + nm_setting_team_port_remove_link_watcher; + nm_setting_team_port_remove_link_watcher_by_value; + nm_setting_team_remove_link_watcher; + nm_setting_team_remove_link_watcher_by_value; + nm_setting_team_remove_runner_tx_hash; + nm_setting_team_remove_runner_tx_hash_by_value; + nm_tc_action_dup; + nm_tc_action_equal; + nm_tc_action_get_attribute; + nm_tc_action_get_attribute_names; + nm_tc_action_get_kind; + nm_tc_action_get_type; + nm_tc_action_new; + nm_tc_action_ref; + nm_tc_action_set_attribute; + nm_tc_action_unref; + nm_tc_qdisc_dup; + nm_tc_qdisc_equal; + nm_tc_qdisc_get_handle; + nm_tc_qdisc_get_kind; + nm_tc_qdisc_get_parent; + nm_tc_qdisc_get_type; + nm_tc_qdisc_new; + nm_tc_qdisc_ref; + nm_tc_qdisc_set_handle; + nm_tc_qdisc_unref; + nm_tc_tfilter_dup; + nm_tc_tfilter_equal; + nm_tc_tfilter_get_handle; + nm_tc_tfilter_get_kind; + nm_tc_tfilter_get_parent; + nm_tc_tfilter_get_type; + nm_tc_tfilter_new; + nm_tc_tfilter_ref; + nm_tc_tfilter_set_handle; + nm_tc_tfilter_unref; + nm_team_link_watcher_arp_ping_flags_get_type; + nm_team_link_watcher_dup; + nm_team_link_watcher_equal; + nm_team_link_watcher_get_delay_down; + nm_team_link_watcher_get_delay_up; + nm_team_link_watcher_get_flags; + nm_team_link_watcher_get_init_wait; + nm_team_link_watcher_get_interval; + nm_team_link_watcher_get_missed_max; + nm_team_link_watcher_get_name; + nm_team_link_watcher_get_source_host; + nm_team_link_watcher_get_target_host; + nm_team_link_watcher_get_type; + nm_team_link_watcher_new_arp_ping; + nm_team_link_watcher_new_ethtool; + nm_team_link_watcher_new_nsna_ping; + nm_team_link_watcher_ref; + nm_team_link_watcher_unref; + nm_utils_tc_action_from_str; + nm_utils_tc_action_to_str; + nm_utils_tc_qdisc_from_str; + nm_utils_tc_qdisc_to_str; + nm_utils_tc_tfilter_from_str; + nm_utils_tc_tfilter_to_str; +} libnm_1_10_0; diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c index e664b710..54a951a6 100644 --- a/libnm/nm-manager.c +++ b/libnm/nm-manager.c @@ -806,7 +806,7 @@ activate_info_complete (ActivateInfo *info, g_simple_async_result_set_from_error (info->simple, error); g_simple_async_result_complete (info->simple); - c_list_unlink (&info->lst); + c_list_unlink_stale (&info->lst); g_free (info->active_path); g_free (info->new_connection_path); diff --git a/libnm/nm-object.c b/libnm/nm-object.c index c344a08d..c5316880 100644 --- a/libnm/nm-object.c +++ b/libnm/nm-object.c @@ -161,7 +161,7 @@ typedef struct { static void notify_item_free (NotifyItem *item) { - c_list_unlink (&item->lst); + c_list_unlink_stale (&item->lst); g_clear_object (&item->changed); g_slice_free (NotifyItem, item); } @@ -187,7 +187,7 @@ deferred_notify_cb (gpointer data) * list we're iterating. */ c_list_link_after (&priv->notify_items, &props); - c_list_unlink_init (&priv->notify_items); + c_list_unlink (&priv->notify_items); g_object_ref (object); @@ -344,7 +344,7 @@ odata_free (gpointer data) { ObjectCreatedData *odata = data; - c_list_unlink (&odata->lst_pending); + c_list_unlink_stale (&odata->lst_pending); g_object_unref (odata->self); g_free (odata->objects); g_slice_free (ObjectCreatedData, odata); diff --git a/libnm/nm-property-docs.xml b/libnm/nm-property-docs.xml index 36f61c08..f05ba17b 100644 --- a/libnm/nm-property-docs.xml +++ b/libnm/nm-property-docs.xml @@ -320,13 +320,39 @@ <property name="send-delay" name_upper="SEND_DELAY" type="uint64" default="0" description="Time to delay between each byte sent to the modem, in microseconds." /> <property name="stopbits" name_upper="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="tc" description="Linux Traffic Contril Settings." name_upper="TC_CONFIG" > + <property name="name" name_upper="NAME" type="string" default="tc" 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="qdiscs" name_upper="QDISCS" type="array of vardict" default="[]" description="Array of TC queuening disciplines." /> + <property name="tfilters" name_upper="TFILTERS" type="array of vardict" default="[]" description="Array of TC traffic filters." /> + </setting> <setting name="team" description="Teaming Settings" name_upper="TEAM" > <property name="config" name_upper="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="link-watchers" name_upper="LINK_WATCHERS" type="array of vardict" default="[]" description="Link watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are 'ethtool', 'nsna_ping' and 'arp_ping' and it is specified in the dictionary with the key 'name'. Available keys are: ethtool: 'delay-up', 'delay-down', 'init-wait'; nsna_ping: 'init-wait', 'interval', 'missed-max', 'target-host'; arp_ping: all the ones in nsna_ping and 'source-host', 'validate-active', 'validate-incative', 'send-always'. See teamd.conf man for more details." /> + <property name="mcast-rejoin-count" name_upper="MCAST_REJOIN_COUNT" type="int32" default="0" description="Corresponds to the teamd mcast_rejoin.count." /> + <property name="mcast-rejoin-interval" name_upper="MCAST_REJOIN_INTERVAL" type="int32" default="0" description="Corresponds to the teamd mcast_rejoin.interval." /> <property name="name" name_upper="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"." /> + <property name="notify-peers-count" name_upper="NOTIFY_PEERS_COUNT" type="int32" default="0" description="Corresponds to the teamd notify_peers.count." /> + <property name="notify-peers-interval" name_upper="NOTIFY_PEERS_INTERVAL" type="int32" default="0" description="Corresponds to the teamd notify_peers.interval." /> + <property name="runner" name_upper="RUNNER" type="string" default=""roundrobin"" description="Corresponds to the teamd runner.name. Permitted values are: "roundrobin", "broadcast", "activebackup", "loadbalance", "lacp"." /> + <property name="runner-active" name_upper="RUNNER_ACTIVE" type="boolean" default="FALSE" description="Corresponds to the teamd runner.active." /> + <property name="runner-agg-select-policy" name_upper="RUNNER_AGG_SELECT_POLICY" type="string" description="Corresponds to the teamd runner.agg_select_policy." /> + <property name="runner-fast-rate" name_upper="RUNNER_FAST_RATE" type="boolean" default="FALSE" description="Corresponds to the teamd runner.fast_rate." /> + <property name="runner-hwaddr-policy" name_upper="RUNNER_HWADDR_POLICY" type="string" description="Corresponds to the teamd runner.hwaddr_policy." /> + <property name="runner-min-ports" name_upper="RUNNER_MIN_PORTS" type="int32" default="-1" description="Corresponds to the teamd runner.min_ports." /> + <property name="runner-sys-prio" name_upper="RUNNER_SYS_PRIO" type="int32" default="-1" description="Corresponds to the teamd runner.sys_prio." /> + <property name="runner-tx-balancer" name_upper="RUNNER_TX_BALANCER" type="string" description="Corresponds to the teamd runner.tx_balancer.name." /> + <property name="runner-tx-balancer-interval" name_upper="RUNNER_TX_BALANCER_INTERVAL" type="int32" default="-1" description="Corresponds to the teamd runner.tx_balancer.interval." /> + <property name="runner-tx-hash" name_upper="RUNNER_TX_HASH" type="array of string" default="[]" description="Corresponds to the teamd runner.tx_hash." /> </setting> <setting name="team-port" description="Team Port Settings" name_upper="TEAM_PORT" > <property name="config" name_upper="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="lacp-key" name_upper="LACP_KEY" type="int32" default="0" description="Corresponds to the teamd ports.PORTIFNAME.lacp_key." /> + <property name="lacp-prio" name_upper="LACP_PRIO" type="int32" default="255" description="Corresponds to the teamd ports.PORTIFNAME.lacp_prio." /> + <property name="link-watchers" name_upper="LINK_WATCHERS" type="array of vardict" default="[]" description="Link watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are 'ethtool', 'nsna_ping' and 'arp_ping' and it is specified in the dictionary with the key 'name'. Available keys are: ethtool: 'delay-up', 'delay-down', 'init-wait'; nsna_ping: 'init-wait', 'interval', 'missed-max', 'target-host'; arp_ping: all the ones in nsna_ping and 'source-host', 'validate-active', 'validate-incative', 'send-always'. See teamd.conf man for more details." /> <property name="name" name_upper="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"." /> + <property name="prio" name_upper="PRIO" type="int32" default="0" description="Corresponds to the teamd ports.PORTIFNAME.prio." /> + <property name="queue-id" name_upper="QUEUE_ID" type="int32" default="-1" description="Corresponds to the teamd ports.PORTIFNAME.queue_id. When set to -1 means the parameter is skipped from the json config." /> + <property name="sticky" name_upper="STICKY" type="boolean" default="FALSE" description="Corresponds to the teamd ports.PORTIFNAME.sticky." /> </setting> <setting name="tun" description="Tunnel Settings" name_upper="TUN" > <property name="group" name_upper="GROUP" type="string" description="The group ID which will own the device. If set to NULL everyone will be able to use the device." /> diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c index 5cd42555..25fe3529 100644 --- a/libnm/nm-remote-connection.c +++ b/libnm/nm-remote-connection.c @@ -67,6 +67,111 @@ typedef struct { /*****************************************************************************/ +static void +update2_cb (GObject *proxy, GAsyncResult *result, gpointer user_data) +{ + GSimpleAsyncResult *simple = user_data; + GError *error = NULL; + GVariant *v; + + if (nmdbus_settings_connection_call_update2_finish (NMDBUS_SETTINGS_CONNECTION (proxy), + &v, + result, + &error)) + g_simple_async_result_set_op_res_gpointer (simple, + v, + (GDestroyNotify) g_variant_unref); + else { + g_dbus_error_strip_remote_error (error); + g_simple_async_result_take_error (simple, error); + } + g_simple_async_result_complete (simple); + g_object_unref (simple); +} + +/** + * nm_remote_connection_update2: + * @connection: the #NMRemoteConnection + * @settings: (allow-none): optional connection to update the settings. + * @flags: update-flags + * @args: (allow-none): optional arguments. + * @cancellable: a #GCancellable, or %NULL + * @callback: callback to be called when the commit operation completes + * @user_data: caller-specific data passed to @callback + * + * Asynchronously calls the Update2() D-Bus method. + * + * Since: 1.10.2 + **/ +void +nm_remote_connection_update2 (NMRemoteConnection *connection, + GVariant *settings, + NMSettingsUpdate2Flags flags, + GVariant *args, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + NMRemoteConnectionPrivate *priv; + GSimpleAsyncResult *simple; + GVariantBuilder builder; + + g_return_if_fail (NM_IS_REMOTE_CONNECTION (connection)); + g_return_if_fail (!settings || g_variant_is_of_type (settings, NM_VARIANT_TYPE_CONNECTION)); + g_return_if_fail (!args || g_variant_is_of_type (args, G_VARIANT_TYPE ("a{sv}"))); + g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable)); + + priv = NM_REMOTE_CONNECTION_GET_PRIVATE (connection); + + simple = g_simple_async_result_new (G_OBJECT (connection), callback, user_data, + nm_remote_connection_update2); + + if (!settings) { + g_variant_builder_init (&builder, NM_VARIANT_TYPE_CONNECTION); + settings = g_variant_builder_end (&builder); + } + if (!args) { + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + args = g_variant_builder_end (&builder); + } + nmdbus_settings_connection_call_update2 (priv->proxy, + settings, + flags, + args, + cancellable, + update2_cb, + simple); +} + +/** + * nm_remote_connection_update2_finish: + * @connection: the #NMRemoteConnection + * @result: the result passed to the #GAsyncReadyCallback + * @error: location for a #GError, or %NULL + * + * Gets the result of a call to nm_remote_connection_commit_changes_async(). + * + * Returns: on success, a #GVariant of type "a{sv}" with the result. On failure, + * %NULL. + **/ +GVariant * +nm_remote_connection_update2_finish (NMRemoteConnection *connection, + GAsyncResult *result, + GError **error) +{ + GSimpleAsyncResult *simple; + + g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (connection), nm_remote_connection_update2), FALSE); + + simple = G_SIMPLE_ASYNC_RESULT (result); + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + else + return g_variant_ref (g_simple_async_result_get_op_res_gpointer (simple)); +} + +/*****************************************************************************/ + /** * nm_remote_connection_commit_changes: * @connection: the #NMRemoteConnection @@ -87,23 +192,25 @@ nm_remote_connection_commit_changes (NMRemoteConnection *connection, GError **error) { NMRemoteConnectionPrivate *priv; - GVariant *settings; + gs_unref_variant GVariant *result = NULL; gboolean ret; + GVariantBuilder args; g_return_val_if_fail (NM_IS_REMOTE_CONNECTION (connection), FALSE); priv = NM_REMOTE_CONNECTION_GET_PRIVATE (connection); - settings = nm_connection_to_dbus (NM_CONNECTION (connection), NM_CONNECTION_SERIALIZE_ALL); - if (save_to_disk) { - ret = nmdbus_settings_connection_call_update_sync (priv->proxy, - settings, - cancellable, error); - } else { - ret = nmdbus_settings_connection_call_update_unsaved_sync (priv->proxy, - settings, - cancellable, error); - } + g_variant_builder_init (&args, G_VARIANT_TYPE ("a{sv}")); + ret = nmdbus_settings_connection_call_update2_sync (priv->proxy, + nm_connection_to_dbus (NM_CONNECTION (connection), + NM_CONNECTION_SERIALIZE_ALL), + save_to_disk + ? NM_SETTINGS_UPDATE2_FLAG_TO_DISK + : NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY, + g_variant_builder_end (&args), + &result, + cancellable, + error); if (error && *error) g_dbus_error_strip_remote_error (*error); return ret; @@ -113,11 +220,13 @@ static void update_cb (GObject *proxy, GAsyncResult *result, gpointer user_data) { GSimpleAsyncResult *simple = user_data; - gboolean (*finish_func) (NMDBusSettingsConnection *, GAsyncResult *, GError **); GError *error = NULL; + gs_unref_variant GVariant *v = NULL; - finish_func = g_object_get_data (G_OBJECT (simple), "finish_func"); - if (finish_func (NMDBUS_SETTINGS_CONNECTION (proxy), result, &error)) + if (nmdbus_settings_connection_call_update2_finish (NMDBUS_SETTINGS_CONNECTION (proxy), + &v, + result, + &error)) g_simple_async_result_set_op_res_gboolean (simple, TRUE); else { g_dbus_error_strip_remote_error (error); @@ -149,7 +258,7 @@ nm_remote_connection_commit_changes_async (NMRemoteConnection *connection, { NMRemoteConnectionPrivate *priv; GSimpleAsyncResult *simple; - GVariant *settings; + GVariantBuilder args; g_return_if_fail (NM_IS_REMOTE_CONNECTION (connection)); @@ -158,22 +267,17 @@ nm_remote_connection_commit_changes_async (NMRemoteConnection *connection, simple = g_simple_async_result_new (G_OBJECT (connection), callback, user_data, nm_remote_connection_commit_changes_async); - settings = nm_connection_to_dbus (NM_CONNECTION (connection), NM_CONNECTION_SERIALIZE_ALL); - if (save_to_disk) { - g_object_set_data (G_OBJECT (simple), "finish_func", - nmdbus_settings_connection_call_update_finish); - nmdbus_settings_connection_call_update (priv->proxy, - settings, - cancellable, - update_cb, simple); - } else { - g_object_set_data (G_OBJECT (simple), "finish_func", - nmdbus_settings_connection_call_update_unsaved_finish); - nmdbus_settings_connection_call_update_unsaved (priv->proxy, - settings, - cancellable, - update_cb, simple); - } + g_variant_builder_init (&args, G_VARIANT_TYPE ("a{sv}")); + nmdbus_settings_connection_call_update2 (priv->proxy, + nm_connection_to_dbus (NM_CONNECTION (connection), + NM_CONNECTION_SERIALIZE_ALL), + save_to_disk + ? NM_SETTINGS_UPDATE2_FLAG_TO_DISK + : NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY, + g_variant_builder_end (&args), + cancellable, + update_cb, + simple); } /** @@ -202,6 +306,8 @@ nm_remote_connection_commit_changes_finish (NMRemoteConnection *connection, return g_simple_async_result_get_op_res_gboolean (simple); } +/*****************************************************************************/ + /** * nm_remote_connection_save: * @connection: the #NMRemoteConnection @@ -302,6 +408,8 @@ nm_remote_connection_save_finish (NMRemoteConnection *connection, return g_simple_async_result_get_op_res_gboolean (simple); } +/*****************************************************************************/ + /** * nm_remote_connection_delete: * @connection: the #NMRemoteConnection diff --git a/libnm/nm-remote-connection.h b/libnm/nm-remote-connection.h index c04ae367..9fdcae89 100644 --- a/libnm/nm-remote-connection.h +++ b/libnm/nm-remote-connection.h @@ -60,6 +60,19 @@ typedef struct { GType nm_remote_connection_get_type (void); +NM_AVAILABLE_IN_1_10_2 +void nm_remote_connection_update2 (NMRemoteConnection *connection, + GVariant *settings, + NMSettingsUpdate2Flags flags, + GVariant *args, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +NM_AVAILABLE_IN_1_10_2 +GVariant *nm_remote_connection_update2_finish (NMRemoteConnection *connection, + GAsyncResult *result, + GError **error); + gboolean nm_remote_connection_commit_changes (NMRemoteConnection *connection, gboolean save_to_disk, GCancellable *cancellable, diff --git a/libnm/nm-settings-docs-overrides.xml b/libnm/nm-settings-docs-overrides.xml index 3e4a57d0..f85b834c 100644 --- a/libnm/nm-settings-docs-overrides.xml +++ b/libnm/nm-settings-docs-overrides.xml @@ -132,6 +132,8 @@ also exist on some routes."/> <property name="parity" variable="parity" format="byte" values="" default="" example="" description="The connection parity: 69 (ASCII 'E') for even parity, 111 (ASCII 'o') for odd, 110 (ASCII 'n') for none."/> </setting> +<setting name="tc"> +</setting> <setting name="team-port"> </setting> <setting name="team"> diff --git a/libnm/nm-settings-docs.xml b/libnm/nm-settings-docs.xml index 09fde86d..8711ad27 100644 --- a/libnm/nm-settings-docs.xml +++ b/libnm/nm-settings-docs.xml @@ -326,14 +326,40 @@ <property name="send-delay" name_upper="SEND_DELAY" type="uint64" default="0" description="Time to delay between each byte sent to the modem, in microseconds." /> <property name="stopbits" name_upper="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="tc" description="Linux Traffic Contril Settings." name_upper="TC_CONFIG" > + <property name="name" name_upper="NAME" type="string" default="tc" 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="qdiscs" name_upper="QDISCS" type="array of vardict" default="[]" description="Array of TC queuening disciplines." /> + <property name="tfilters" name_upper="TFILTERS" type="array of vardict" default="[]" description="Array of TC traffic filters." /> + </setting> <setting name="team" description="Teaming Settings" name_upper="TEAM" > <property name="config" name_upper="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" name_upper="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="link-watchers" name_upper="LINK_WATCHERS" type="array of vardict" default="[]" description="Link watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are 'ethtool', 'nsna_ping' and 'arp_ping' and it is specified in the dictionary with the key 'name'. Available keys are: ethtool: 'delay-up', 'delay-down', 'init-wait'; nsna_ping: 'init-wait', 'interval', 'missed-max', 'target-host'; arp_ping: all the ones in nsna_ping and 'source-host', 'validate-active', 'validate-incative', 'send-always'. See teamd.conf man for more details." /> + <property name="mcast-rejoin-count" name_upper="MCAST_REJOIN_COUNT" type="int32" default="0" description="Corresponds to the teamd mcast_rejoin.count." /> + <property name="mcast-rejoin-interval" name_upper="MCAST_REJOIN_INTERVAL" type="int32" default="0" description="Corresponds to the teamd mcast_rejoin.interval." /> <property name="name" name_upper="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"." /> + <property name="notify-peers-count" name_upper="NOTIFY_PEERS_COUNT" type="int32" default="0" description="Corresponds to the teamd notify_peers.count." /> + <property name="notify-peers-interval" name_upper="NOTIFY_PEERS_INTERVAL" type="int32" default="0" description="Corresponds to the teamd notify_peers.interval." /> + <property name="runner" name_upper="RUNNER" type="string" default=""roundrobin"" description="Corresponds to the teamd runner.name. Permitted values are: "roundrobin", "broadcast", "activebackup", "loadbalance", "lacp"." /> + <property name="runner-active" name_upper="RUNNER_ACTIVE" type="boolean" default="FALSE" description="Corresponds to the teamd runner.active." /> + <property name="runner-agg-select-policy" name_upper="RUNNER_AGG_SELECT_POLICY" type="string" description="Corresponds to the teamd runner.agg_select_policy." /> + <property name="runner-fast-rate" name_upper="RUNNER_FAST_RATE" type="boolean" default="FALSE" description="Corresponds to the teamd runner.fast_rate." /> + <property name="runner-hwaddr-policy" name_upper="RUNNER_HWADDR_POLICY" type="string" description="Corresponds to the teamd runner.hwaddr_policy." /> + <property name="runner-min-ports" name_upper="RUNNER_MIN_PORTS" type="int32" default="-1" description="Corresponds to the teamd runner.min_ports." /> + <property name="runner-sys-prio" name_upper="RUNNER_SYS_PRIO" type="int32" default="-1" description="Corresponds to the teamd runner.sys_prio." /> + <property name="runner-tx-balancer" name_upper="RUNNER_TX_BALANCER" type="string" description="Corresponds to the teamd runner.tx_balancer.name." /> + <property name="runner-tx-balancer-interval" name_upper="RUNNER_TX_BALANCER_INTERVAL" type="int32" default="-1" description="Corresponds to the teamd runner.tx_balancer.interval." /> + <property name="runner-tx-hash" name_upper="RUNNER_TX_HASH" type="array of string" default="[]" description="Corresponds to the teamd runner.tx_hash." /> </setting> <setting name="team-port" description="Team Port Settings" name_upper="TEAM_PORT" > <property name="config" name_upper="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="lacp-key" name_upper="LACP_KEY" type="int32" default="0" description="Corresponds to the teamd ports.PORTIFNAME.lacp_key." /> + <property name="lacp-prio" name_upper="LACP_PRIO" type="int32" default="255" description="Corresponds to the teamd ports.PORTIFNAME.lacp_prio." /> + <property name="link-watchers" name_upper="LINK_WATCHERS" type="array of vardict" default="[]" description="Link watchers configuration for the connection: each link watcher is defined by a dictionary, whose keys depend upon the selected link watcher. Available link watchers are 'ethtool', 'nsna_ping' and 'arp_ping' and it is specified in the dictionary with the key 'name'. Available keys are: ethtool: 'delay-up', 'delay-down', 'init-wait'; nsna_ping: 'init-wait', 'interval', 'missed-max', 'target-host'; arp_ping: all the ones in nsna_ping and 'source-host', 'validate-active', 'validate-incative', 'send-always'. See teamd.conf man for more details." /> <property name="name" name_upper="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"." /> + <property name="prio" name_upper="PRIO" type="int32" default="0" description="Corresponds to the teamd ports.PORTIFNAME.prio." /> + <property name="queue-id" name_upper="QUEUE_ID" type="int32" default="-1" description="Corresponds to the teamd ports.PORTIFNAME.queue_id. When set to -1 means the parameter is skipped from the json config." /> + <property name="sticky" name_upper="STICKY" type="boolean" default="FALSE" description="Corresponds to the teamd ports.PORTIFNAME.sticky." /> </setting> <setting name="tun" description="Tunnel Settings" name_upper="TUN" > <property name="group" name_upper="GROUP" type="string" description="The group ID which will own the device. If set to NULL everyone will be able to use the device." /> diff --git a/libnm/nm-settings-ifcfg-rh-docs.xml b/libnm/nm-settings-ifcfg-rh-docs.xml index 7f3cf25d..4fa11864 100644 --- a/libnm/nm-settings-ifcfg-rh-docs.xml +++ b/libnm/nm-settings-ifcfg-rh-docs.xml @@ -58,9 +58,9 @@ lookaside file, or it can be owned by a secret agent."/> <property name="hairpin-mode" variable="BRIDGING_OPTS: hairpin_mode=" format="" values="" default="yes" example="" description="Hairpin mode of the bridge port."/> </setting> <setting name="bridge"> -<property name="mac-address" variable="MACADDR(+)" format="" values="" default="" example="" description="MAC address of the bridge. Note that this requires a recent +<property name="mac-address" variable="BRIDGE_MACADDR(+)" format="" values="" default="" example="" description="MAC address of the bridge. Note that this requires a recent kernel support, originally introduced in 3.15 upstream kernel) -MACADDR for bridges is an NM extension."/> +BRIDGE_MACADDR for bridges is an NM extension."/> <property name="stp" variable="STP" format="" values="" default="no" example="" description="Span tree protocol participation."/> <property name="priority" variable="BRIDGING_OPTS: priority=" format="" values="0 - 32768" default="32768" example="" description="STP priority."/> <property name="forward-delay" variable="DELAY" format="" values="2 - 30" default="15" example="" description="STP forwarding delay."/> @@ -174,6 +174,7 @@ meaning as 'never-default' property."/> <property name="route-metric" variable="IPV4_ROUTE_METRIC(+)" format="" values="" default="-1" example="" description="IPV4_ROUTE_METRIC is the default IPv4 metric for routes on this connection. If set to -1, a default metric based on the device type is used."/> <property name="route-table" variable="IPV4_ROUTE_TABLE(+)" format="" values="" default="0" example="" description="IPV4_ROUTE_TABLE enables policy-routing and sets the default routing table."/> +<property name="dns-options" variable="RES_OPTIONS(+)" format="" values="" default="" example="RES_OPTIONS=ndots:2 timeout:3" description="List of DNS options to be added to /etc/resolv.conf"/> <property name="dns-priority" variable="IPV4_DNS_PRIORITY(+)" format="" values="" default="0" example="IPV4_DNS_PRIORITY=20" description="The priority for DNS servers of this connection. Lower values have higher priority. If zero, the default value will be used (50 for VPNs, 100 for other connections). A negative value prevents DNS from other connections with greater values to be used."/> @@ -190,7 +191,7 @@ DHCP_FQDN are specified only the latter is used."/> ignore ~ IPV6INIT=no; auto ~ IPV6_AUTOCONF=yes; dhcp ~ IPV6_AUTOCONF=no and DHCPV6C=yes"/> <property name="dns" variable="DNS1, DNS2, ..." format="string" values="" default="" example="" description="List of DNS servers. NetworkManager uses the variables both for IPv4 and IPv6."/> -<property name="dns-search" variable="DOMAIN" format="string (space-separated domains)" values="" default="" example="" description="List of DNS search domains."/> +<property name="dns-search" variable="IPV6_DOMAIN" format="string (space-separated domains)" values="" default="" example="" description="List of DNS search domains."/> <property name="addresses" variable="IPV6ADDR, IPV6ADDR_SECONDARIES" format="" values="" default="" example="IPV6ADDR=ab12:9876::1 IPV6ADDR_SECONDARIES="ab12:9876::2 ab12:9876::3"" description="List of static IP addresses."/> <property name="gateway" variable="IPV6_DEFAULTGW" format="" values="" default="" example="IPV6_DEFAULTGW=abbe::1" description="Gateway IP address."/> @@ -209,6 +210,7 @@ If set to -1, a default metric based on the device type is used."/> <property name="dns-priority" variable="IPV6_DNS_PRIORITY(+)" format="" values="" default="0" example="IPV6_DNS_PRIORITY=20" description="The priority for DNS servers of this connection. Lower values have higher priority. If zero, the default value will be used (50 for VPNs, 100 for other connections). A negative value prevents DNS from other connections with greater values to be used."/> +<property name="dns-options" variable="IPV6_RES_OPTIONS(+)" format="" values="" default="" example="IPV6_RES_OPTIONS=ndots:2 timeout:3" description="List of DNS options to be added to /etc/resolv.conf"/> <property name="ip6-privacy" variable="IPV6_PRIVACY, IPV6_PRIVACY_PREFER_PUBLIC_IP(+)" format="" values="IPV6_PRIVACY: no, yes (rfc3041 or rfc4941); IPV6_PRIVACY_PREFER_PUBLIC_IP: yes, no" default="no" example="IPV6_PRIVACY=rfc3041 IPV6_PRIVACY_PREFER_PUBLIC_IP=yes" description="Configure IPv6 Privacy Extensions for SLAAC (RFC4941)."/> <property name="addr-gen-mode" variable="IPV6_ADDR_GEN_MODE" format="" values="IPV6_ADDR_GEN_MODE: eui64, stable-privacy" default="eui64" example="IPV6_ADDR_GEN_MODE=stable-privacy" description="Configure IPv6 Stable Privacy addressing for SLAAC (RFC7217)."/> @@ -241,6 +243,10 @@ proxy configuration, or set the PAC file via PAC_URL or PAC_SCRIPT."/> </setting> <setting name="serial"> </setting> +<setting name="tc"> +<property name="qdiscs" variable="QDISC1, QDISC2, ..." format="" values="" default="" example="QDISC1=ingress, QDISC2="root handle 1234: fq_codel"" description="Queueing disciplines"/> +<property name="qdiscs" variable="FILTER1, FILTER2, ..." format="" values="" default="" example="FILTER1="parent ffff: matchall action simple sdata Input", ..." description="Traffic filters"/> +</setting> <setting name="team-port"> <property name="config" variable="TEAM_PORT_CONFIG" format="" values="" default="" example="" description="Team port configuration in JSON. See man teamd.conf for details."/> </setting> @@ -320,9 +326,10 @@ separated list."/> <property name="leap-password" variable="IEEE_8021X_PASSWORD(+)" format="" values="" default="" example="" description="Password for LEAP. It can also go to "key-" lookaside file, or it can be owned by a secret agent."/> <property name="leap-password-flags" variable="IEEE_8021X_PASSWORD_FLAGS(+)" format="NMSettingSecretFlags" values="" default="" example="" description="Password flags for IEEE_8021X_PASSWORD_FLAGS."/> -<property name="wep-key-type" variable="KEY<i> or KEY_PASSPHRASE<i>(+)" format="" values="" default="" example="KEY1=s:ahoj, KEY1=0a1c45bc02, KEY_PASSPHRASE1=mysupersecretkey" description="KEY is used for "key" type (10 or 26 hexadecimal characters, +<property name="wep-key-type" variable="KEY<i> or KEY_PASSPHRASE<i>(+); KEY_TYPE(+)" format="" values="" default="" example="KEY1=s:ahoj, KEY1=0a1c45bc02, KEY_PASSPHRASE1=mysupersecretkey" description="KEY is used for "key" type (10 or 26 hexadecimal characters, or 5 or 13 character string prefixed with "s:"). KEY_PASSPHRASE is used -for WEP passphrases."/> +for WEP passphrases. KEY_TYPE specifies the key type and can be either +'key' or 'passphrase'. KEY_TYPE is redundant and can be omitted."/> <property name="wps-method" variable="WPS_METHOD" format="" values="" default="" example="WPS_METHOD=disabled, WPS_METHOD="pin pbc"" description="Used to control the WPS methods to be used Valid values are "default", "auto", "disabled", "pin" and "pbc". If omitted, whatver the AP announces is used."/> diff --git a/libnm/nm-settings-keyfile-docs.xml b/libnm/nm-settings-keyfile-docs.xml index c7f68ab4..561b0588 100644 --- a/libnm/nm-settings-keyfile-docs.xml +++ b/libnm/nm-settings-keyfile-docs.xml @@ -74,6 +74,8 @@ route2=7.7.0.0/16" description="List of IP routes."/> versions of NetworkManager stored this as an integer: 69 ('E') for even, 111 ('o') for odd, or 110 ('n') for none."/> </setting> +<setting name="tc"> +</setting> <setting name="team-port"> </setting> <setting name="team"> |