mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-23 23:40:34 +01:00
format: replace tabs for indentation in code comments
sed -i \
-e 's/^'$'\t'' \*/ */g' \
-e 's/^'$'\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t\t\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t\t\t\t\t'' \*/ */g' \
$(git ls-files -- '*.[hc]')
This commit is contained in:
parent
328fb90f3e
commit
740b092fda
395 changed files with 15939 additions and 15939 deletions
|
|
@ -487,7 +487,7 @@ found:
|
|||
if (!already_tracked) {
|
||||
if (match_by_uuid) {
|
||||
/* the profile is matched exactly (by UUID). We prepend it
|
||||
* to the list of all found profiles. */
|
||||
* to the list of all found profiles. */
|
||||
g_ptr_array_insert(result, result_inital_len, g_object_ref(connection));
|
||||
} else
|
||||
g_ptr_array_add(result, g_object_ref(connection));
|
||||
|
|
@ -521,10 +521,10 @@ nmc_find_active_connection(const GPtrArray *active_cons,
|
|||
con = nm_active_connection_get_connection(candidate);
|
||||
|
||||
/* When filter_type is NULL, compare connection ID (filter_val)
|
||||
* against all types. Otherwise, only compare against the specific
|
||||
* type. If 'path' or 'apath' filter types are specified, comparison
|
||||
* against numeric index (in addition to the whole path) is allowed.
|
||||
*/
|
||||
* against all types. Otherwise, only compare against the specific
|
||||
* type. If 'path' or 'apath' filter types are specified, comparison
|
||||
* against numeric index (in addition to the whole path) is allowed.
|
||||
*/
|
||||
if (NM_IN_STRSET(filter_type, NULL, "id")) {
|
||||
v = nm_active_connection_get_id(candidate);
|
||||
if (complete)
|
||||
|
|
@ -683,7 +683,7 @@ get_secrets_from_user(const NmcConfig *nmc_config,
|
|||
char * pwd = NULL;
|
||||
|
||||
/* First try to find the password in provided passwords file,
|
||||
* then ask user. */
|
||||
* then ask user. */
|
||||
if (pwds_hash && (pwd = g_hash_table_lookup(pwds_hash, secret->entry_id))) {
|
||||
pwd = g_strdup(pwd);
|
||||
} else {
|
||||
|
|
@ -787,7 +787,7 @@ nmc_secrets_requested(NMSecretAgentSimple *agent,
|
|||
nm_secret_agent_simple_response(agent, request_id, secrets);
|
||||
else {
|
||||
/* Unregister our secret agent on failure, so that another agent
|
||||
* may be tried */
|
||||
* may be tried */
|
||||
if (nmc->secret_agent) {
|
||||
nm_secret_agent_old_unregister(NM_SECRET_AGENT_OLD(nmc->secret_agent), NULL, NULL);
|
||||
g_clear_object(&nmc->secret_agent);
|
||||
|
|
@ -1011,8 +1011,8 @@ nmc_readline_echo(const NmcConfig *nmc_config, gboolean echo_on, const char *pro
|
|||
saved_history = history_get_history_state();
|
||||
history_set_history_state(&passwd_history);
|
||||
/* stifling history is important as it tells readline to
|
||||
* not store anything, otherwise sensitive data could be
|
||||
* leaked */
|
||||
* not store anything, otherwise sensitive data could be
|
||||
* leaked */
|
||||
stifle_history(0);
|
||||
rl_redisplay_function = nmc_secret_redisplay;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ static int
|
|||
active_connection_get_state_ord(NMActiveConnection *active)
|
||||
{
|
||||
/* returns an integer related to @active's state, that can be used for sorting
|
||||
* active connections based on their activation state. */
|
||||
* active connections based on their activation state. */
|
||||
if (!active)
|
||||
return -2;
|
||||
|
||||
|
|
@ -291,8 +291,8 @@ get_vpn_connection_type(NMConnection *connection)
|
|||
return NULL;
|
||||
|
||||
/* The service type is in form of "org.freedesktop.NetworkManager.vpnc".
|
||||
* Extract end part after last dot, e.g. "vpnc"
|
||||
*/
|
||||
* Extract end part after last dot, e.g. "vpnc"
|
||||
*/
|
||||
type = nm_setting_vpn_get_service_type(nm_connection_get_setting_vpn(connection));
|
||||
if (!type)
|
||||
return NULL;
|
||||
|
|
@ -481,11 +481,11 @@ _con_show_fcn_get_id(NMConnection *c, NMActiveConnection *ac)
|
|||
s = s_con ? nm_setting_connection_get_id(s_con) : NULL;
|
||||
if (!s && ac) {
|
||||
/* note that if we have no s_con, that usually means that the user has no permissions
|
||||
* to see the connection. We still fall to get the ID from the active-connection,
|
||||
* which exposes it despite the user having no permissions.
|
||||
*
|
||||
* That might be unexpected, because the user is shown an ID, which he later
|
||||
* is unable to resolve in other operations. */
|
||||
* to see the connection. We still fall to get the ID from the active-connection,
|
||||
* which exposes it despite the user having no permissions.
|
||||
*
|
||||
* That might be unexpected, because the user is shown an ID, which he later
|
||||
* is unable to resolve in other operations. */
|
||||
s = nm_active_connection_get_id(ac);
|
||||
}
|
||||
return s;
|
||||
|
|
@ -503,7 +503,7 @@ _con_show_fcn_get_type(NMConnection *c, NMActiveConnection *ac, NMMetaAccessorGe
|
|||
s = s_con ? nm_setting_connection_get_connection_type(s_con) : NULL;
|
||||
if (!s && ac) {
|
||||
/* see _con_show_fcn_get_id() for why we fallback to get the value
|
||||
* from @ac. */
|
||||
* from @ac. */
|
||||
s = nm_active_connection_get_connection_type(ac);
|
||||
}
|
||||
return connection_type_to_display(s, get_type);
|
||||
|
|
@ -525,16 +525,16 @@ static gconstpointer _metagen_con_show_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARG
|
|||
|
||||
if (!row_data->show_active_fields) {
|
||||
/* we are not supposed to show any fields of the active connection.
|
||||
* We only tracked the primary_active to get the coloring right.
|
||||
* From now on, there is no active connection. */
|
||||
* We only tracked the primary_active to get the coloring right.
|
||||
* From now on, there is no active connection. */
|
||||
ac = NULL;
|
||||
|
||||
/* in this mode, we expect that we are called only with connections that
|
||||
* have a [connection] setting and a UUID. Otherwise, the connection is
|
||||
* effectively invisible to the user, and should be hidden.
|
||||
*
|
||||
* But in that case, we expect that the caller pre-filtered this row out.
|
||||
* So assert(). */
|
||||
* have a [connection] setting and a UUID. Otherwise, the connection is
|
||||
* effectively invisible to the user, and should be hidden.
|
||||
*
|
||||
* But in that case, we expect that the caller pre-filtered this row out.
|
||||
* So assert(). */
|
||||
nm_assert(s_con);
|
||||
nm_assert(nm_setting_connection_get_uuid(s_con));
|
||||
}
|
||||
|
|
@ -549,7 +549,7 @@ static gconstpointer _metagen_con_show_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARG
|
|||
s = s_con ? nm_setting_connection_get_uuid(s_con) : NULL;
|
||||
if (!s && ac) {
|
||||
/* see _con_show_fcn_get_id() for why we fallback to get the value
|
||||
* from @ac. */
|
||||
* from @ac. */
|
||||
s = nm_active_connection_get_uuid(ac);
|
||||
}
|
||||
return s;
|
||||
|
|
@ -726,7 +726,7 @@ static gconstpointer _metagen_con_active_general_get_fcn(NMC_META_GENERIC_INFO_G
|
|||
return c ? nm_connection_get_path(c) : NULL;
|
||||
case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_ZONE:
|
||||
/* this is really ugly, because the zone is not a property of the active-connection,
|
||||
* but the settings-connection profile. There is no guarantee, that they agree. */
|
||||
* but the settings-connection profile. There is no guarantee, that they agree. */
|
||||
return s_con ? nm_setting_connection_get_zone(s_con) : NULL;
|
||||
case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_MASTER_PATH:
|
||||
dev = nm_active_connection_get_master(ac);
|
||||
|
|
@ -824,7 +824,7 @@ static gconstpointer _metagen_con_active_vpn_get_fcn(NMC_META_GENERIC_INFO_GET_F
|
|||
nm_assert(k);
|
||||
v = nm_setting_vpn_get_data_item(s_vpn, k);
|
||||
/* update the arr array in-place. Previously it contained
|
||||
* the constant keys, now it contains the strdup'ed output text. */
|
||||
* the constant keys, now it contains the strdup'ed output text. */
|
||||
arr2[i] = g_strdup_printf("%s = %s", k, v);
|
||||
}
|
||||
|
||||
|
|
@ -1819,8 +1819,8 @@ con_show_get_items_cmp(gconstpointer pa, gconstpointer pb, gpointer user_data)
|
|||
static const NmcSortOrder def[] = {NMC_SORT_ACTIVE, NMC_SORT_NAME, NMC_SORT_PATH};
|
||||
|
||||
/* Note: the default order does not consider whether a column is shown.
|
||||
* That means, the selection of the output fields, does not affect the
|
||||
* order (although there could be an argument that it should). */
|
||||
* That means, the selection of the output fields, does not affect the
|
||||
* order (although there could be an argument that it should). */
|
||||
order_arr = def;
|
||||
order_len = G_N_ELEMENTS(def);
|
||||
}
|
||||
|
|
@ -1900,16 +1900,16 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields
|
|||
arr = nm_client_get_connections(nmc->client);
|
||||
for (i = 0; i < arr->len; i++) {
|
||||
/* Note: libnm will not expose connection that are invisible
|
||||
* to the user but currently inactive.
|
||||
*
|
||||
* That differs from get-active-connection(). If an invisible connection
|
||||
* is active, we can get its NMActiveConnection. We can even obtain
|
||||
* the corresponding NMRemoteConnection (although, of course it has
|
||||
* no visible settings).
|
||||
*
|
||||
* I think this inconsistency is a bug in libnm. Anyway, the result is,
|
||||
* that we print invisible connections if they are active, but otherwise
|
||||
* we exclude them. */
|
||||
* to the user but currently inactive.
|
||||
*
|
||||
* That differs from get-active-connection(). If an invisible connection
|
||||
* is active, we can get its NMActiveConnection. We can even obtain
|
||||
* the corresponding NMRemoteConnection (although, of course it has
|
||||
* no visible settings).
|
||||
*
|
||||
* I think this inconsistency is a bug in libnm. Anyway, the result is,
|
||||
* that we print invisible connections if they are active, but otherwise
|
||||
* we exclude them. */
|
||||
c = arr->pdata[i];
|
||||
g_hash_table_insert(row_hash,
|
||||
c,
|
||||
|
|
@ -1923,7 +1923,7 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields
|
|||
c = nm_active_connection_get_connection(ac);
|
||||
if (!show_active_fields && !c) {
|
||||
/* the active connection has no connection, and we don't show
|
||||
* any active fields. Skip this row. */
|
||||
* any active fields. Skip this row. */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1931,11 +1931,11 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields
|
|||
|
||||
if (show_active_fields || !c) {
|
||||
/* the active connection either has no connection (in which we create a
|
||||
* connection-less row), or we are interested in showing each active
|
||||
* connection in its own row. Add a row. */
|
||||
* connection-less row), or we are interested in showing each active
|
||||
* connection in its own row. Add a row. */
|
||||
if (row_data) {
|
||||
/* we create a rowdata for this connection earlier. We drop it, because this
|
||||
* connection is tracked via the rowdata of the active connection. */
|
||||
* connection is tracked via the rowdata of the active connection. */
|
||||
g_hash_table_remove(row_hash, c);
|
||||
_metagen_con_show_row_data_destroy(row_data);
|
||||
}
|
||||
|
|
@ -1946,11 +1946,11 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields
|
|||
}
|
||||
|
||||
/* we add the active connection to the row for the referenced
|
||||
* connection. We need to group them this way, to print the proper
|
||||
* color (activated or not) based on primary_active. */
|
||||
* connection. We need to group them this way, to print the proper
|
||||
* color (activated or not) based on primary_active. */
|
||||
if (!row_data) {
|
||||
/* this is unexpected. The active connection references a connection that
|
||||
* seemingly no longer exists. It's a bug in libnm. Add a row nonetheless. */
|
||||
* seemingly no longer exists. It's a bug in libnm. Add a row nonetheless. */
|
||||
row_data = _metagen_con_show_row_data_new_for_connection(c, show_active_fields);
|
||||
g_hash_table_insert(row_hash, c, row_data);
|
||||
}
|
||||
|
|
@ -1973,11 +1973,11 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields
|
|||
s_con = nm_connection_get_setting_connection(row_data->connection);
|
||||
if (!s_con || !nm_setting_connection_get_uuid(s_con)) {
|
||||
/* we are in a mode, where we only print rows for connection.
|
||||
* For that we require that all rows are visible to the user,
|
||||
* meaning: the have a [connection] setting and a UUID.
|
||||
*
|
||||
* Otherwise, this connection is likely invisible to the user.
|
||||
* Skip it. */
|
||||
* For that we require that all rows are visible to the user,
|
||||
* meaning: the have a [connection] setting and a UUID.
|
||||
*
|
||||
* Otherwise, this connection is likely invisible to the user.
|
||||
* Skip it. */
|
||||
_metagen_con_show_row_data_destroy(row_data);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2161,11 +2161,11 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con
|
|||
fields_str = nmc->required_fields;
|
||||
|
||||
/* determine whether the user wants to see any fields that are related to active-connections
|
||||
* (e.g. the apath, the current state, or the device where the profile is active).
|
||||
*
|
||||
* If that's the case, then we will show one line for each active connection. In case
|
||||
* a profile has multiple active connections, it will be listed multiple times.
|
||||
* If that's not the case, we filter out these duplicate lines. */
|
||||
* (e.g. the apath, the current state, or the device where the profile is active).
|
||||
*
|
||||
* If that's the case, then we will show one line for each active connection. In case
|
||||
* a profile has multiple active connections, it will be listed multiple times.
|
||||
* If that's not the case, we filter out these duplicate lines. */
|
||||
selection = nm_meta_selection_create_parse_list(
|
||||
(const NMMetaAbstractInfo *const *) metagen_con_show,
|
||||
fields_str,
|
||||
|
|
@ -2219,7 +2219,7 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con
|
|||
nm_clear_g_free(&nmc->required_fields);
|
||||
|
||||
/* Before printing the connections check if we have a "--show-secret"
|
||||
* option after the connection ids */
|
||||
* option after the connection ids */
|
||||
if (!nmc->nmc_config.show_secrets && !nmc->complete) {
|
||||
int argc_cp = argc;
|
||||
const char *const *argv_cp = argv;
|
||||
|
|
@ -2276,8 +2276,8 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con
|
|||
if (!selector
|
||||
&& !nm_streq0(*argv, nm_object_get_path(NM_OBJECT(explicit_acon)))) {
|
||||
/* we matched the apath based on the last component alone (note the full D-Bus path).
|
||||
* That is how nmc_find_active_connection() works, if you pass in a selector.
|
||||
* Reject it. */
|
||||
* That is how nmc_find_active_connection() works, if you pass in a selector.
|
||||
* Reject it. */
|
||||
explicit_acon = NULL;
|
||||
}
|
||||
nm_g_object_ref(explicit_acon);
|
||||
|
|
@ -2293,10 +2293,10 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con
|
|||
}
|
||||
|
||||
/* Print connection details:
|
||||
* Usually we have both static and active connection.
|
||||
* But when a connection is private to a user, another user
|
||||
* may see only the active connection.
|
||||
*/
|
||||
* Usually we have both static and active connection.
|
||||
* But when a connection is private to a user, another user
|
||||
* may see only the active connection.
|
||||
*/
|
||||
|
||||
if (nmc->complete) {
|
||||
next_arg(nmc, &argc, &argv, NULL);
|
||||
|
|
@ -2313,7 +2313,7 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con
|
|||
break;
|
||||
explicit_acon_handled = TRUE;
|
||||
/* the user referenced an "apath". In this case, we can only have at most one connection
|
||||
* and one apath. */
|
||||
* and one apath. */
|
||||
con = NM_CONNECTION(nm_active_connection_get_connection(explicit_acon));
|
||||
} else {
|
||||
if (i_found_cons >= found_cons->len)
|
||||
|
|
@ -2353,8 +2353,8 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con
|
|||
|
||||
if (i > 0) {
|
||||
/* if there are multiple active connections, separate them with newline.
|
||||
* that is a bit odd, because we already separate connections with newlines,
|
||||
* and commonly don't separate the connection from the first active connection. */
|
||||
* that is a bit odd, because we already separate connections with newlines,
|
||||
* and commonly don't separate the connection from the first active connection. */
|
||||
g_print("\n");
|
||||
}
|
||||
|
||||
|
|
@ -2419,8 +2419,8 @@ get_default_active_connection(NmCli *nmc, NMDevice **device)
|
|||
}
|
||||
|
||||
/* Prefer the default connection if one exists, otherwise return the first
|
||||
* non-default connection.
|
||||
*/
|
||||
* non-default connection.
|
||||
*/
|
||||
if (!default_ac && non_default_ac) {
|
||||
default_ac = non_default_ac;
|
||||
*device = non_default_device;
|
||||
|
|
@ -2697,7 +2697,7 @@ progress_active_connection_cb(gpointer user_data)
|
|||
|
||||
if (ac_state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING) {
|
||||
/* If the connection is activating, the device state
|
||||
* is more interesting. */
|
||||
* is more interesting. */
|
||||
ac_devs = nm_active_connection_get_devices(active);
|
||||
device = ac_devs->len > 0 ? g_ptr_array_index(ac_devs, 0) : NULL;
|
||||
} else {
|
||||
|
|
@ -2780,10 +2780,10 @@ activate_connection_cb(GObject *client, GAsyncResult *result, gpointer user_data
|
|||
G_CALLBACK(device_state_cb),
|
||||
info);
|
||||
/* Both active_connection_state_cb () and device_state_cb () will just
|
||||
* call check_activated (info). So, just call it once directly after
|
||||
* connecting on both the signals of the objects and skip the call to
|
||||
* the callbacks.
|
||||
*/
|
||||
* call check_activated (info). So, just call it once directly after
|
||||
* connecting on both the signals of the objects and skip the call to
|
||||
* the callbacks.
|
||||
*/
|
||||
check_activated(info);
|
||||
|
||||
/* Start progress indication showing VPN states */
|
||||
|
|
@ -2923,9 +2923,9 @@ do_connection_up(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const
|
|||
int * argc_ptr;
|
||||
|
||||
/*
|
||||
* Set default timeout for connection activation.
|
||||
* Activation can take quite a long time, use 90 seconds.
|
||||
*/
|
||||
* Set default timeout for connection activation.
|
||||
* Activation can take quite a long time, use 90 seconds.
|
||||
*/
|
||||
if (nmc->timeout == -1)
|
||||
nmc->timeout = 90;
|
||||
|
||||
|
|
@ -3008,9 +3008,9 @@ do_connection_up(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const
|
|||
return;
|
||||
|
||||
/* Use nowait_flag instead of should_wait because exiting has to be postponed till
|
||||
* active_connection_state_cb() is called. That gives NM time to check our permissions
|
||||
* and we can follow activation progress.
|
||||
*/
|
||||
* active_connection_state_cb() is called. That gives NM time to check our permissions
|
||||
* and we can follow activation progress.
|
||||
*/
|
||||
nmc->nowait_flag = (nmc->timeout == 0);
|
||||
nmc->should_wait++;
|
||||
|
||||
|
|
@ -3038,7 +3038,7 @@ do_connection_up(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const
|
|||
typedef struct {
|
||||
NmCli *nmc;
|
||||
/* a list of object that is relevant for the callback. The object
|
||||
* type differs, and depends on the type of callback. */
|
||||
* type differs, and depends on the type of callback. */
|
||||
GPtrArray * obj_list;
|
||||
guint timeout_id;
|
||||
GCancellable *cancellable;
|
||||
|
|
@ -3386,7 +3386,7 @@ get_valid_settings_array(const char *con_type)
|
|||
const NMMetaSettingInfoEditor *setting_info;
|
||||
|
||||
/* No connection type yet? Return settings for a generic connection
|
||||
* (just the "connection" setting), which always makes sense. */
|
||||
* (just the "connection" setting), which always makes sense. */
|
||||
if (!con_type)
|
||||
return nm_meta_setting_info_valid_parts_default;
|
||||
|
||||
|
|
@ -3450,11 +3450,11 @@ get_valid_properties_string(const NMMetaSettingValidPartItem *const *array,
|
|||
}
|
||||
|
||||
/* If postix (so prefix is terminated by a dot), check
|
||||
* that prefix is not ambiguous */
|
||||
* that prefix is not ambiguous */
|
||||
if (postfix) {
|
||||
/* If we have a perfect match, no need to look for others
|
||||
* prefix and no check on ambiguity should be performed.
|
||||
* Moreover, erase previous matches from output string */
|
||||
* prefix and no check on ambiguity should be performed.
|
||||
* Moreover, erase previous matches from output string */
|
||||
if (nm_streq(prefix, setting_info->general->setting_name)
|
||||
|| nm_streq0(prefix, setting_info->alias)) {
|
||||
g_string_erase(str, 0, -1);
|
||||
|
|
@ -3897,7 +3897,7 @@ static gboolean
|
|||
_meta_property_needs_bond_hack(const NMMetaPropertyInfo *property_info)
|
||||
{
|
||||
/* hack: the bond property data is handled special and not generically.
|
||||
* Eventually, get rid of explicitly checking whether we handle a bond. */
|
||||
* Eventually, get rid of explicitly checking whether we handle a bond. */
|
||||
if (!property_info)
|
||||
g_return_val_if_reached(FALSE);
|
||||
return property_info->property_typ_data
|
||||
|
|
@ -4945,8 +4945,8 @@ nmc_process_connection_properties(NmCli * nmc,
|
|||
GError ** error)
|
||||
{
|
||||
/* First check if we have a slave-type, as this would mean we will not
|
||||
* have ip properties but possibly others, slave-type specific.
|
||||
*/
|
||||
* have ip properties but possibly others, slave-type specific.
|
||||
*/
|
||||
/* Go through arguments and set properties */
|
||||
do {
|
||||
const NMMetaSettingValidPartItem *const *type_settings;
|
||||
|
|
@ -5044,7 +5044,7 @@ nmc_process_connection_properties(NmCli * nmc,
|
|||
GError * local = NULL;
|
||||
|
||||
/* This seems like a <setting>.<property> (such as "connection.id" or "bond.mode"),
|
||||
* optionally prefixed with "+| or "-". */
|
||||
* optionally prefixed with "+| or "-". */
|
||||
|
||||
if (*argc == 1 && nmc->complete)
|
||||
complete_property_name(nmc, connection, modifier, option_sett, option_prop);
|
||||
|
|
@ -5595,13 +5595,13 @@ read_properties:
|
|||
if (argc && !nmc_process_connection_properties(nmc, connection, &argc, &argv, FALSE, &error)) {
|
||||
if (g_strcmp0(*argv, "--") == 0 && !seen_dash_dash) {
|
||||
/* This is for compatibility with older nmcli that required
|
||||
* options and properties to be separated with "--" */
|
||||
* options and properties to be separated with "--" */
|
||||
seen_dash_dash = TRUE;
|
||||
next_arg(nmc, &argc, &argv, NULL);
|
||||
goto read_properties;
|
||||
} else if (g_strcmp0(*argv, "save") == 0) {
|
||||
/* It would be better if "save" was a separate argument and not
|
||||
* mixed with properties, but there's not much we can do about it now. */
|
||||
* mixed with properties, but there's not much we can do about it now. */
|
||||
argc--;
|
||||
argv++;
|
||||
if (!argc) {
|
||||
|
|
@ -5634,7 +5634,7 @@ read_properties:
|
|||
questionnaire_mandatory(nmc, connection);
|
||||
|
||||
/* Traditionally, we didn't ask for these options for ethernet slaves. They don't
|
||||
* make much sense, since these are likely to be set by the master anyway. */
|
||||
* make much sense, since these are likely to be set by the master anyway. */
|
||||
if (nm_setting_connection_get_slave_type(s_con)) {
|
||||
disable_options(NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_MTU);
|
||||
disable_options(NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_MAC_ADDRESS);
|
||||
|
|
@ -5642,14 +5642,14 @@ read_properties:
|
|||
}
|
||||
|
||||
/* Connection id is special in that it's required but we don't insist
|
||||
* on getting it from the user -- we just make up something sensible. */
|
||||
* on getting it from the user -- we just make up something sensible. */
|
||||
if (!nm_setting_connection_get_id(s_con)) {
|
||||
const char *ifname = nm_setting_connection_get_interface_name(s_con);
|
||||
const char *type = nm_setting_connection_get_connection_type(s_con);
|
||||
const char *slave_type = nm_setting_connection_get_slave_type(s_con);
|
||||
|
||||
/* If only bother when there's a type, which is not guaranteed at this point.
|
||||
* Otherwise, the validation will fail anyway. */
|
||||
* Otherwise, the validation will fail anyway. */
|
||||
if (type) {
|
||||
gs_free char * try_name = NULL;
|
||||
gs_free char * default_name = NULL;
|
||||
|
|
@ -5668,16 +5668,16 @@ read_properties:
|
|||
set_default_interface_name(nmc, s_con);
|
||||
|
||||
/* Now see if there's something optional that needs to be asked for.
|
||||
* Keep asking until there's no more things to ask for. */
|
||||
* Keep asking until there's no more things to ask for. */
|
||||
do {
|
||||
/* This ensures all settings that make sense are present. */
|
||||
nm_connection_normalize(connection, NULL, NULL, NULL);
|
||||
} while (nmc->ask && questionnaire_one_optional(nmc, connection));
|
||||
|
||||
/* Mandatory settings. No good reason to check this other than guarding the user
|
||||
* from doing something that's not likely to make sense (such as missing ifname
|
||||
* on a bond/bridge/team, etc.). Added just to preserve traditional behavior, it
|
||||
* perhaps is a good idea to just remove this. */
|
||||
* from doing something that's not likely to make sense (such as missing ifname
|
||||
* on a bond/bridge/team, etc.). Added just to preserve traditional behavior, it
|
||||
* perhaps is a good idea to just remove this. */
|
||||
for (s = 0; s < _NM_META_SETTING_TYPE_NUM; s++) {
|
||||
const NMMetaPropertyInfo *const *property_infos;
|
||||
guint p;
|
||||
|
|
@ -5972,8 +5972,8 @@ gen_property_names(const char *text, int state)
|
|||
valid_settings_main = get_valid_settings_array(nmc_tab_completion.con_type);
|
||||
|
||||
/* Support autocompletion of slave-connection parameters
|
||||
* guessing the slave type from the setting name already
|
||||
* typed (or autocompleted) */
|
||||
* guessing the slave type from the setting name already
|
||||
* typed (or autocompleted) */
|
||||
if (nm_streq0(strv[0], NM_SETTING_TEAM_PORT_SETTING_NAME))
|
||||
slv_type = NM_SETTING_TEAM_SETTING_NAME;
|
||||
else if (nm_streq0(strv[0], NM_SETTING_BRIDGE_PORT_SETTING_NAME))
|
||||
|
|
@ -6768,8 +6768,8 @@ editor_main_usage(void)
|
|||
{
|
||||
g_print("------------------------------------------------------------------------------\n");
|
||||
/* TRANSLATORS: do not translate command names and keywords before ::
|
||||
* However, you should translate terms enclosed in <>.
|
||||
*/
|
||||
* However, you should translate terms enclosed in <>.
|
||||
*/
|
||||
g_print(_("---[ Main menu ]---\n"
|
||||
"goto [<setting> | <prop>] :: go to a setting or property\n"
|
||||
"remove <setting>[.<prop>] | <prop> :: remove setting or reset property value\n"
|
||||
|
|
@ -6953,8 +6953,8 @@ editor_sub_help(void)
|
|||
{
|
||||
g_print("------------------------------------------------------------------------------\n");
|
||||
/* TRANSLATORS: do not translate command names and keywords before ::
|
||||
* However, you should translate terms enclosed in <>.
|
||||
*/
|
||||
* However, you should translate terms enclosed in <>.
|
||||
*/
|
||||
g_print(_("---[ Property menu ]---\n"
|
||||
"set [<value>] :: set new value\n"
|
||||
"add [<value>] :: add new option to the property\n"
|
||||
|
|
@ -7310,9 +7310,9 @@ property_edit_submenu(NmCli * nmc,
|
|||
case NMC_EDITOR_SUB_CMD_SET:
|
||||
case NMC_EDITOR_SUB_CMD_ADD:
|
||||
/* list, arrays,...: SET replaces the whole property value
|
||||
* ADD adds the new value(s)
|
||||
* single values: : both SET and ADD sets the new value
|
||||
*/
|
||||
* ADD adds the new value(s)
|
||||
* single values: : both SET and ADD sets the new value
|
||||
*/
|
||||
if (!cmd_property_arg) {
|
||||
gs_strfreev char **to_free = NULL;
|
||||
const char *const *avals;
|
||||
|
|
@ -8266,9 +8266,9 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty
|
|||
refresh_remote_connection(&weak, &rem_con);
|
||||
|
||||
/* Replace local connection with the remote one to be sure they are equal.
|
||||
* This mitigates problems with plugins not preserving some properties or
|
||||
* adding ipv{4,6} settings when not present.
|
||||
*/
|
||||
* This mitigates problems with plugins not preserving some properties or
|
||||
* adding ipv{4,6} settings when not present.
|
||||
*/
|
||||
if (con_tmp) {
|
||||
gs_free char *s_name = NULL;
|
||||
|
||||
|
|
@ -8547,7 +8547,7 @@ editor_init_existing_connection(NMConnection *connection)
|
|||
NMSettingConnection *s_con;
|
||||
|
||||
/* FIXME: this approach of connecting handlers to do something is fundamentally
|
||||
* flawed. See the comment in nmc_setting_ip6_connect_handlers(). */
|
||||
* flawed. See the comment in nmc_setting_ip6_connect_handlers(). */
|
||||
|
||||
s_ip4 = nm_connection_get_setting_ip4_config(connection);
|
||||
s_ip6 = nm_connection_get_setting_ip6_config(connection);
|
||||
|
|
@ -8670,8 +8670,8 @@ do_connection_edit(const NMCCommand *cmd, NmCli *nmc, int argc, const char *cons
|
|||
}
|
||||
|
||||
/* Duplicate the connection and use that so that we need not
|
||||
* differentiate existing vs. new later
|
||||
*/
|
||||
* differentiate existing vs. new later
|
||||
*/
|
||||
connection = nm_simple_connection_new_clone(found_con);
|
||||
|
||||
/* Merge secrets into the connection */
|
||||
|
|
|
|||
|
|
@ -2231,9 +2231,9 @@ do_device_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const
|
|||
return;
|
||||
|
||||
/*
|
||||
* Use nowait_flag instead of should_wait, because exiting has to be postponed
|
||||
* till connect_device_cb() is called, giving NM time to check our permissions.
|
||||
*/
|
||||
* Use nowait_flag instead of should_wait, because exiting has to be postponed
|
||||
* till connect_device_cb() is called, giving NM time to check our permissions.
|
||||
*/
|
||||
nmc->nowait_flag = (nmc->timeout == 0);
|
||||
nmc->should_wait++;
|
||||
|
||||
|
|
@ -2285,8 +2285,8 @@ static void
|
|||
device_removed_cb(NMClient *client, NMDevice *device, DeviceCbInfo *info)
|
||||
{
|
||||
/* Success: device has been removed.
|
||||
* It can also happen when disconnecting a software device.
|
||||
*/
|
||||
* It can also happen when disconnecting a software device.
|
||||
*/
|
||||
if (!g_slist_find(info->queue, device))
|
||||
return;
|
||||
|
||||
|
|
@ -2767,7 +2767,7 @@ do_device_set(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *ar
|
|||
return;
|
||||
|
||||
/* when multiple properties are specified, set them in the order as they
|
||||
* are specified on the command line. */
|
||||
* are specified on the command line. */
|
||||
if (values[DEV_SET_AUTOCONNECT].idx >= 0 && values[DEV_SET_MANAGED].idx >= 0
|
||||
&& values[DEV_SET_MANAGED].idx < values[DEV_SET_AUTOCONNECT].idx) {
|
||||
nm_device_set_managed(device, values[DEV_SET_MANAGED].value);
|
||||
|
|
@ -3189,19 +3189,19 @@ wifi_list_rescan_cb(GObject *source_object, GAsyncResult *res, gpointer user_dat
|
|||
if (g_error_matches(error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_ALLOWED)) {
|
||||
if (nm_device_get_state(NM_DEVICE(wifi)) < NM_DEVICE_STATE_DISCONNECTED) {
|
||||
/* the device is either unmanaged or unavailable.
|
||||
*
|
||||
* If it's unmanaged, we don't expect any scan result and are done.
|
||||
* If it's unavailable, that usually means that we wait for wpa_supplicant
|
||||
* to start. In that case, also quit (without scan results). */
|
||||
*
|
||||
* If it's unmanaged, we don't expect any scan result and are done.
|
||||
* If it's unavailable, that usually means that we wait for wpa_supplicant
|
||||
* to start. In that case, also quit (without scan results). */
|
||||
force_finished = TRUE;
|
||||
done = TRUE;
|
||||
} else {
|
||||
/* This likely means that scanning is already in progress. There's
|
||||
* a good chance we'll get updated results soon; wait for them.
|
||||
*
|
||||
* But also, NetworkManager ratelimits (and rejects requests). That
|
||||
* means, possibly we were just ratelimited, so waiting will not lead
|
||||
* to a new scan result. Instead, repeatedly ask new scans... */
|
||||
* a good chance we'll get updated results soon; wait for them.
|
||||
*
|
||||
* But also, NetworkManager ratelimits (and rejects requests). That
|
||||
* means, possibly we were just ratelimited, so waiting will not lead
|
||||
* to a new scan result. Instead, repeatedly ask new scans... */
|
||||
nm_utils_invoke_on_timeout(1000,
|
||||
wifi_list_data->scan_cancellable,
|
||||
wifi_list_rescan_retry_cb,
|
||||
|
|
@ -3837,8 +3837,8 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *
|
|||
|
||||
if (nm_access_point_connection_valid(ap, NM_CONNECTION(avail_con))) {
|
||||
/* ap has been checked against bssid1, bssid2 and the ssid
|
||||
* and now avail_con has been checked against ap.
|
||||
*/
|
||||
* and now avail_con has been checked against ap.
|
||||
*/
|
||||
connection = g_object_ref(avail_con);
|
||||
break;
|
||||
}
|
||||
|
|
@ -3854,7 +3854,7 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *
|
|||
|
||||
if (!connection) {
|
||||
/* If there are some connection data from user, create a connection and
|
||||
* fill them into proper settings. */
|
||||
* fill them into proper settings. */
|
||||
if (con_name || private || bssid2_arr || hidden)
|
||||
connection = nm_simple_connection_new();
|
||||
|
||||
|
|
@ -3968,9 +3968,9 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *
|
|||
// implementing add/edit connections support for nmcli.
|
||||
|
||||
/* nowait_flag indicates user input. should_wait says whether quit in start().
|
||||
* We have to delay exit after add_and_activate_cb() is called, even if
|
||||
* the user doesn't want to wait, in order to give NM time to check our
|
||||
* permissions. */
|
||||
* We have to delay exit after add_and_activate_cb() is called, even if
|
||||
* the user doesn't want to wait, in order to give NM time to check our
|
||||
* permissions. */
|
||||
nmc->nowait_flag = (nmc->timeout == 0);
|
||||
nmc->should_wait++;
|
||||
|
||||
|
|
|
|||
|
|
@ -1482,7 +1482,7 @@ nmc_command_func_overview(const NMCCommand *cmd, NmCli *nmc, int argc, const cha
|
|||
color = nmc_device_state_to_color(device);
|
||||
if (ac) {
|
||||
/* TRANSLATORS: prints header line for activated device in plain `nmcli` overview output as
|
||||
* "<interface-name>: <device-state> to <connection-id>" */
|
||||
* "<interface-name>: <device-state> to <connection-id>" */
|
||||
tmp = nmc_colorize(&nmc->nmc_config,
|
||||
color,
|
||||
C_("nmcli-overview", "%s: %s to %s"),
|
||||
|
|
@ -1491,7 +1491,7 @@ nmc_command_func_overview(const NMCCommand *cmd, NmCli *nmc, int argc, const cha
|
|||
nm_active_connection_get_id(ac));
|
||||
} else {
|
||||
/* TRANSLATORS: prints header line for not active device in plain `nmcli` overview output as
|
||||
* "<interface-name>: <device-state>" */
|
||||
* "<interface-name>: <device-state>" */
|
||||
tmp = nmc_colorize(&nmc->nmc_config,
|
||||
color,
|
||||
C_("nmcli-overview", "%s: %s"),
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ complete_one(gpointer key, gpointer value, gpointer user_data)
|
|||
if ((!*last && !strchr(name, '.')) || matches(last, name)) {
|
||||
if (option != prefix) {
|
||||
/* value prefix was not a standalone argument,
|
||||
* it was part of --option=<value> argument.
|
||||
* Repeat the part leading to "=". */
|
||||
* it was part of --option=<value> argument.
|
||||
* Repeat the part leading to "=". */
|
||||
g_print("%s=", option);
|
||||
}
|
||||
g_print("%.*s%s%s\n",
|
||||
|
|
@ -201,8 +201,8 @@ complete_option_with_value(const char *option, const char *prefix, ...)
|
|||
if (!*prefix || matches(prefix, candidate)) {
|
||||
if (option != prefix) {
|
||||
/* value prefix was not a standalone argument,
|
||||
* it was part of --option=<value> argument.
|
||||
* Repeat the part leading to "=". */
|
||||
* it was part of --option=<value> argument.
|
||||
* Repeat the part leading to "=". */
|
||||
g_print("%s=", option);
|
||||
}
|
||||
g_print("%s\n", candidate);
|
||||
|
|
@ -262,13 +262,13 @@ matches_arg(NmCli *nmc, int *argc, const char *const **argv, const char *pattern
|
|||
|
||||
if (opt[1] == '-') {
|
||||
/* We know one '-' was already seen by the caller.
|
||||
* Skip it if there's a second one*/
|
||||
* Skip it if there's a second one*/
|
||||
opt++;
|
||||
}
|
||||
|
||||
if (arg) {
|
||||
/* If there's a "=" separator, replace it with NUL so that matches()
|
||||
* works and consider the part after it to be the argument's value. */
|
||||
* works and consider the part after it to be the argument's value. */
|
||||
s = strchr(opt, '=');
|
||||
if (s) {
|
||||
opt = nm_strndup_a(300, opt, s - opt, &opt_free);
|
||||
|
|
@ -284,7 +284,7 @@ matches_arg(NmCli *nmc, int *argc, const char *const **argv, const char *pattern
|
|||
*arg = g_steal_pointer(&arg_tmp);
|
||||
else {
|
||||
/* We need a value, but the option didn't contain a "=<value>" part.
|
||||
* Proceed to the next argument. */
|
||||
* Proceed to the next argument. */
|
||||
if (*argc <= 1) {
|
||||
g_string_printf(nmc->return_text,
|
||||
_("Error: missing argument for '%s' option."),
|
||||
|
|
@ -564,8 +564,8 @@ parse_color_scheme(char * palette_buffer,
|
|||
int i;
|
||||
|
||||
/* This reads through the raw color scheme file contents, identifying the
|
||||
* color names and sequences, putting in terminating NULs in place, so that
|
||||
* pointers into the buffer can readily be used as strings in the palette. */
|
||||
* color names and sequences, putting in terminating NULs in place, so that
|
||||
* pointers into the buffer can readily be used as strings in the palette. */
|
||||
while (1) {
|
||||
/* Leading whitespace. */
|
||||
while (nm_utils_is_separator(*p) || *p == '\n')
|
||||
|
|
@ -819,8 +819,8 @@ process_command_line(NmCli *nmc, int argc, char **argv_orig)
|
|||
nmc->required_fields = g_strdup(value);
|
||||
nmc->nmc_config_mutable.print_output = NMC_PRINT_TERSE;
|
||||
/* We want fixed tabular mode here, but just set the mode specified and rely on defaults:
|
||||
* in this way we allow use of "-m multiline" to swap the output mode also if placed
|
||||
* before the "-g <field>" option (-g may be still more practical and easy to remember than -t -f).
|
||||
* in this way we allow use of "-m multiline" to swap the output mode also if placed
|
||||
* before the "-g <field>" option (-g may be still more practical and easy to remember than -t -f).
|
||||
*/
|
||||
nmc->mode_specified = TRUE;
|
||||
} else if (matches_arg(nmc, &argc, &argv, "-nocheck", NULL)) {
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ ipv4_addresses_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data
|
|||
g_signal_handlers_block_by_func(object, G_CALLBACK(ipv4_method_changed_cb), NULL);
|
||||
|
||||
/* If we have some IP addresses set method to 'manual'.
|
||||
* Else if the method was 'manual', change it back to 'auto'.
|
||||
*/
|
||||
* Else if the method was 'manual', change it back to 'auto'.
|
||||
*/
|
||||
if (nm_setting_ip_config_get_num_addresses(NM_SETTING_IP_CONFIG(object))) {
|
||||
if (g_strcmp0(nm_setting_ip_config_get_method(NM_SETTING_IP_CONFIG(object)),
|
||||
NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) {
|
||||
|
|
@ -124,8 +124,8 @@ ipv6_addresses_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data
|
|||
g_signal_handlers_block_by_func(object, G_CALLBACK(ipv6_method_changed_cb), NULL);
|
||||
|
||||
/* If we have some IP addresses set method to 'manual'.
|
||||
* Else if the method was 'manual', change it back to 'auto'.
|
||||
*/
|
||||
* Else if the method was 'manual', change it back to 'auto'.
|
||||
*/
|
||||
if (nm_setting_ip_config_get_num_addresses(NM_SETTING_IP_CONFIG(object))) {
|
||||
if (g_strcmp0(nm_setting_ip_config_get_method(NM_SETTING_IP_CONFIG(object)),
|
||||
NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) {
|
||||
|
|
@ -142,24 +142,24 @@ ipv6_addresses_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data
|
|||
} else {
|
||||
answered = FALSE;
|
||||
/* FIXME: editor_init_existing_connection() and registering handlers is not the
|
||||
* right approach.
|
||||
*
|
||||
* This only happens to work because in nmcli's edit mode
|
||||
* tends to append addresses -- instead of setting them.
|
||||
* If we would change that (to behavior I'd expect), we'd get:
|
||||
*
|
||||
* nmcli> set ipv6.addresses fc01::1:5/68
|
||||
* Do you also want to set 'ipv6.method' to 'manual'? [yes]: y
|
||||
* nmcli> set ipv6.addresses fc01::1:6/68
|
||||
* Do you also want to set 'ipv6.method' to 'manual'? [yes]:
|
||||
*
|
||||
* That's because nmc_setting_set_property() calls set_fcn(). With modifier '\0'
|
||||
* (set), it would first clear all addresses before adding the address. Thereby
|
||||
* emitting multiple property changed signals.
|
||||
*
|
||||
* That can be avoided by freezing/thawing the signals, but this solution
|
||||
* here is ugly in general.
|
||||
*/
|
||||
* right approach.
|
||||
*
|
||||
* This only happens to work because in nmcli's edit mode
|
||||
* tends to append addresses -- instead of setting them.
|
||||
* If we would change that (to behavior I'd expect), we'd get:
|
||||
*
|
||||
* nmcli> set ipv6.addresses fc01::1:5/68
|
||||
* Do you also want to set 'ipv6.method' to 'manual'? [yes]: y
|
||||
* nmcli> set ipv6.addresses fc01::1:6/68
|
||||
* Do you also want to set 'ipv6.method' to 'manual'? [yes]:
|
||||
*
|
||||
* That's because nmc_setting_set_property() calls set_fcn(). With modifier '\0'
|
||||
* (set), it would first clear all addresses before adding the address. Thereby
|
||||
* emitting multiple property changed signals.
|
||||
*
|
||||
* That can be avoided by freezing/thawing the signals, but this solution
|
||||
* here is ugly in general.
|
||||
*/
|
||||
if (!g_strcmp0(nm_setting_ip_config_get_method(NM_SETTING_IP_CONFIG(object)),
|
||||
NM_SETTING_IP6_CONFIG_METHOD_MANUAL))
|
||||
g_object_set(object,
|
||||
|
|
@ -451,7 +451,7 @@ _env_get_nm_devices(const NMMetaEnvironment *environment,
|
|||
nm_assert(nmc);
|
||||
|
||||
/* the returned list is *not* NULL terminated. Need to
|
||||
* provide and honor the out_len argument. */
|
||||
* provide and honor the out_len argument. */
|
||||
nm_assert(out_len);
|
||||
|
||||
devices = nm_client_get_devices(nmc->client);
|
||||
|
|
@ -475,7 +475,7 @@ _env_get_nm_connections(const NMMetaEnvironment *environment,
|
|||
nm_assert(nmc);
|
||||
|
||||
/* the returned list is *not* NULL terminated. Need to
|
||||
* provide and honor the out_len argument. */
|
||||
* provide and honor the out_len argument. */
|
||||
nm_assert(out_len);
|
||||
|
||||
values = nm_client_get_connections(nmc->client);
|
||||
|
|
@ -587,8 +587,8 @@ nmc_setting_set_property(NMClient * client,
|
|||
if (modifier == NM_META_ACCESSOR_MODIFIER_DEL
|
||||
&& !property_info->property_type->set_supports_remove) {
|
||||
/* The property is a plain property. It does not support '-'.
|
||||
*
|
||||
* Maybe we should fail, but just return silently. */
|
||||
*
|
||||
* Maybe we should fail, but just return silently. */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -743,8 +743,8 @@ setting_details(const NmcConfig *nmc_config, NMSetting *setting, const char *one
|
|||
|
||||
if (one_prop) {
|
||||
/* hack around setting-details being called for one setting. Must prefix the
|
||||
* property name with the setting name. Later we should remove setting_details()
|
||||
* and merge it into the caller. */
|
||||
* property name with the setting name. Later we should remove setting_details()
|
||||
* and merge it into the caller. */
|
||||
fields_str = g_strdup_printf("%s.%s", nm_setting_get_name(setting), one_prop);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -264,9 +264,9 @@ nmc_parse_args(nmc_arg_t * arg_arr,
|
|||
if (strcmp(**argv, p->name) == 0) {
|
||||
if (p->found) {
|
||||
/* Don't allow repeated arguments, because the argument of the same
|
||||
* name could be used later on the line for another purpose. Assume
|
||||
* that's the case and return.
|
||||
*/
|
||||
* name could be used later on the line for another purpose. Assume
|
||||
* that's the case and return.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -347,8 +347,8 @@ void
|
|||
nmc_terminal_erase_line(void)
|
||||
{
|
||||
/* We intentionally use printf(), not g_print() here, to ensure that
|
||||
* GLib doesn't mistakenly try to convert the string.
|
||||
*/
|
||||
* GLib doesn't mistakenly try to convert the string.
|
||||
*/
|
||||
printf("\33[2K\r");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
|
@ -648,10 +648,10 @@ typedef struct _PrintDataCol {
|
|||
const struct _PrintDataCol *parent_col;
|
||||
|
||||
/* while constructing the list of columns in _output_selection_append(), we keep track
|
||||
* of the parent by index. The reason is, that at that point our columns are still
|
||||
* tracked in a GArray which is growing (hence, the pointers are changing).
|
||||
* Later, _output_selection_complete() converts the index into the actual pointer.
|
||||
*/
|
||||
* of the parent by index. The reason is, that at that point our columns are still
|
||||
* tracked in a GArray which is growing (hence, the pointers are changing).
|
||||
* Later, _output_selection_complete() converts the index into the actual pointer.
|
||||
*/
|
||||
guint _parent_idx;
|
||||
};
|
||||
const NMMetaSelectionItem *selection_item;
|
||||
|
|
@ -932,7 +932,7 @@ typedef struct {
|
|||
bool title_to_free : 1;
|
||||
|
||||
/* whether the column should be printed. If not %TRUE,
|
||||
* the column will be skipped. */
|
||||
* the column will be skipped. */
|
||||
bool to_print : 1;
|
||||
|
||||
int width;
|
||||
|
|
@ -1034,7 +1034,7 @@ _print_fill(const NmcConfig * nmc_config,
|
|||
header_cell->col = col;
|
||||
|
||||
/* by default, the entire column is skipped. That is the case,
|
||||
* unless we have a cell (below) which opts-in to be printed. */
|
||||
* unless we have a cell (below) which opts-in to be printed. */
|
||||
header_cell->to_print = FALSE;
|
||||
|
||||
header_cell->title = nm_meta_abstract_info_get_name(info, TRUE);
|
||||
|
|
@ -1096,13 +1096,13 @@ _print_fill(const NmcConfig * nmc_config,
|
|||
if ((is_default && nmc_config->overview)
|
||||
|| NM_FLAGS_HAS(text_out_flags, NM_META_ACCESSOR_GET_OUT_FLAGS_HIDE)) {
|
||||
/* don't mark the entry for display. This is to shorten the output in case
|
||||
* the property is the default value. But we only do that, if the user
|
||||
* opts in to this behavior (-overview), or of the property marks itself
|
||||
* eligible to be hidden.
|
||||
*
|
||||
* In general, only new API shall mark itself eligible to be hidden.
|
||||
* Long established properties cannot, because it would be a change
|
||||
* in behavior. */
|
||||
* the property is the default value. But we only do that, if the user
|
||||
* opts in to this behavior (-overview), or of the property marks itself
|
||||
* eligible to be hidden.
|
||||
*
|
||||
* In general, only new API shall mark itself eligible to be hidden.
|
||||
* Long established properties cannot, because it would be a change
|
||||
* in behavior. */
|
||||
} else
|
||||
header_cell->to_print = TRUE;
|
||||
|
||||
|
|
@ -1211,7 +1211,7 @@ _print_skip_column(const NmcConfig *nmc_config, const PrintDataHeaderCell *heade
|
|||
&nmc_meta_type_generic_info)
|
||||
&& selection_item->sub_selection) {
|
||||
/* in tabular form, we skip the "name" entry for sections that have sub-selections.
|
||||
* That is, for "ipv4.may-fail", but not for "ipv4". */
|
||||
* That is, for "ipv4.may-fail", but not for "ipv4". */
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1488,7 +1488,7 @@ nmc_terminal_spawn_pager(const NmcConfig *nmc_config)
|
|||
_exit(EXIT_FAILURE);
|
||||
|
||||
/* Check whether our parent died before we were able
|
||||
* to set the death signal */
|
||||
* to set the death signal */
|
||||
if (getppid() != parent_pid)
|
||||
_exit(EXIT_SUCCESS);
|
||||
|
||||
|
|
@ -1498,11 +1498,11 @@ nmc_terminal_spawn_pager(const NmcConfig *nmc_config)
|
|||
}
|
||||
|
||||
/* Debian's alternatives command for pagers is
|
||||
* called 'pager'. Note that we do not call
|
||||
* sensible-pagers here, since that is just a
|
||||
* shell script that implements a logic that
|
||||
* is similar to this one anyway, but is
|
||||
* Debian-specific. */
|
||||
* called 'pager'. Note that we do not call
|
||||
* sensible-pagers here, since that is just a
|
||||
* shell script that implements a logic that
|
||||
* is similar to this one anyway, but is
|
||||
* Debian-specific. */
|
||||
execlp("pager", "pager", NULL);
|
||||
|
||||
execlp("less", "less", NULL);
|
||||
|
|
|
|||
|
|
@ -292,8 +292,8 @@ nmc_meta_generic_get_str_i18n_null(const char *s, NMMetaAccessorGetType get_type
|
|||
{
|
||||
if (get_type == NM_META_ACCESSOR_GET_TYPE_PARSABLE) {
|
||||
/* in parsable mode, return NULL. That is useful if @s is a pretty string
|
||||
* to describe a missing value (like "(unknown)"). We don't want to print
|
||||
* that for parsable mode. */
|
||||
* to describe a missing value (like "(unknown)"). We don't want to print
|
||||
* that for parsable mode. */
|
||||
return NULL;
|
||||
}
|
||||
return nmc_meta_generic_get_str_i18n(s, get_type);
|
||||
|
|
@ -339,15 +339,15 @@ nmc_meta_generic_get_enum_with_detail(NmcMetaGenericGetEnumType get_enum_type,
|
|||
switch (get_enum_type) {
|
||||
case NMC_META_GENERIC_GET_ENUM_TYPE_PARENTHESES:
|
||||
/* note that this function will always print "$NUM ($NICK)", also in PARSABLE
|
||||
* mode. That might not be desired, but it's done for certain properties to preserve
|
||||
* previous behavior. */
|
||||
* mode. That might not be desired, but it's done for certain properties to preserve
|
||||
* previous behavior. */
|
||||
if (get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY)
|
||||
return g_strdup_printf(_("%lld (%s)"), (long long) enum_val, gettext(str_val));
|
||||
return g_strdup_printf("%lld (%s)", (long long) enum_val, str_val);
|
||||
case NMC_META_GENERIC_GET_ENUM_TYPE_DASH:
|
||||
/* note that this function will always print "$NUM ($NICK)", also in PARSABLE
|
||||
* mode. That might not be desired, but it's done for certain properties to preserve
|
||||
* previous behavior. */
|
||||
* mode. That might not be desired, but it's done for certain properties to preserve
|
||||
* previous behavior. */
|
||||
if (get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY)
|
||||
return g_strdup_printf(_("%lld - %s"), (long long) enum_val, gettext(str_val));
|
||||
return g_strdup_printf("%lld - %s", (long long) enum_val, str_val);
|
||||
|
|
|
|||
|
|
@ -138,17 +138,17 @@ static gboolean
|
|||
_wait_for_objects_iterate_until_done_idle_cb(gpointer user_data)
|
||||
{
|
||||
/* This avoids a race where:
|
||||
*
|
||||
* - we check whether there are objects to wait for.
|
||||
* - the last object to wait for gets removed (issuing g_main_loop_quit()).
|
||||
* - we run the mainloop (and missed our signal).
|
||||
*
|
||||
* It's really a missing feature of GMainLoop where the "is-running" flag is always set to
|
||||
* TRUE by g_main_loop_run(). That means, you cannot catch a g_main_loop_quit() in a race
|
||||
* free way while not iterating the loop.
|
||||
*
|
||||
* Avoid this, by checking once again after we start running the mainloop.
|
||||
*/
|
||||
*
|
||||
* - we check whether there are objects to wait for.
|
||||
* - the last object to wait for gets removed (issuing g_main_loop_quit()).
|
||||
* - we run the mainloop (and missed our signal).
|
||||
*
|
||||
* It's really a missing feature of GMainLoop where the "is-running" flag is always set to
|
||||
* TRUE by g_main_loop_run(). That means, you cannot catch a g_main_loop_quit() in a race
|
||||
* free way while not iterating the loop.
|
||||
*
|
||||
* Avoid this, by checking once again after we start running the mainloop.
|
||||
*/
|
||||
|
||||
G_LOCK(_wait_for_objects_lock);
|
||||
_wait_for_objects_maybe_quit_mainloops_with_lock();
|
||||
|
|
@ -496,7 +496,7 @@ nmcs_utils_hwaddr_normalize(const char *hwaddr, gssize len)
|
|||
hwaddr = nm_strndup_a(300, hwaddr, len, &hwaddr_clone);
|
||||
}
|
||||
/* we cannot use _nm_utils_hwaddr_aton() because that requires a delimiter.
|
||||
* Azure exposes MAC addresses without delimiter, so accept that too. */
|
||||
* Azure exposes MAC addresses without delimiter, so accept that too. */
|
||||
if (!nm_utils_hexstr2bin_full(hwaddr,
|
||||
FALSE,
|
||||
FALSE,
|
||||
|
|
@ -544,7 +544,7 @@ nmcs_utils_parse_get_full_line(GBytes *mem, const char *needle)
|
|||
|
||||
if (line != mem_data && line[-1] != '\n') {
|
||||
/* the line must be preceeded either by the begin of the data or
|
||||
* by a newline. */
|
||||
* by a newline. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -574,9 +574,9 @@ nmcs_utils_uri_build_concat_v(const char *base, const char **components, gsize n
|
|||
|
||||
if (n_components > 0 && components[0] && components[0][0] == '/') {
|
||||
/* the first component starts with a slash. We allow that, and don't add a duplicate
|
||||
* slash. Otherwise, we add a separator after base.
|
||||
*
|
||||
* We only do that for the first component. */
|
||||
* slash. Otherwise, we add a separator after base.
|
||||
*
|
||||
* We only do that for the first component. */
|
||||
} else
|
||||
nm_str_buf_append_c(&strbuf, '/');
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ _ehandle_complete(EHandleData *edata, GError *error_take)
|
|||
*get_result = (GetResult){
|
||||
.response_code = response_code,
|
||||
/* This ensures that response_data is always NUL terminated. This is an important guarantee
|
||||
* that NMHttpClient makes. */
|
||||
* that NMHttpClient makes. */
|
||||
.response_data = nm_str_buf_finalize_to_gbytes(&edata->recv_data),
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ _get_config_ips_prefix_list_cb(GObject *source, GAsyncResult *result, gpointer u
|
|||
if (line_len == 0)
|
||||
continue;
|
||||
/* Truncate the string. It's safe to do, because we own @response_data an it has an
|
||||
* extra NULL character after the buffer. */
|
||||
* extra NULL character after the buffer. */
|
||||
((char *) line)[line_len] = '\0';
|
||||
|
||||
if (line[line_len - 1] == '/')
|
||||
|
|
@ -432,7 +432,7 @@ _get_net_ifaces_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat
|
|||
continue;
|
||||
|
||||
/* Truncate the string. It's safe to do, because we own @response_data an it has an
|
||||
* extra NULL character after the buffer. */
|
||||
* extra NULL character after the buffer. */
|
||||
((char *) line)[line_len] = '\0';
|
||||
|
||||
if (line[line_len - 1] == '/' && line_len != 0)
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ again:
|
|||
base = g_atomic_pointer_get(&base_cached);
|
||||
if (G_UNLIKELY(!base)) {
|
||||
/* The base URI can be set via environment variable.
|
||||
* This is mainly for testing, it's not usually supposed to be configured.
|
||||
* Consider this private API! */
|
||||
* This is mainly for testing, it's not usually supposed to be configured.
|
||||
* Consider this private API! */
|
||||
base = g_getenv(NMCS_ENV_VARIABLE("NM_CLOUD_SETUP_EC2_HOST"));
|
||||
|
||||
if (base && base[0] && !strchr(base, '/')) {
|
||||
|
|
@ -307,7 +307,7 @@ _get_config_metadata_ready_cb(GObject *source, GAsyncResult *result, gpointer us
|
|||
}
|
||||
|
||||
/* We ignore errors. Only if we got no response at all, it's a problem.
|
||||
* Otherwise, we proceed with whatever we could fetch. */
|
||||
* Otherwise, we proceed with whatever we could fetch. */
|
||||
if (!response_parsed) {
|
||||
_get_config_task_maybe_return(
|
||||
iface_data,
|
||||
|
|
@ -438,7 +438,7 @@ _get_config_metadata_ready_check(long response_code,
|
|||
continue;
|
||||
|
||||
/* Truncate the string. It's safe to do, because we own @response_data an it has an
|
||||
* extra NUL character after the buffer. */
|
||||
* extra NUL character after the buffer. */
|
||||
((char *) cur_line)[cur_line_len] = '\0';
|
||||
|
||||
hwaddr = nmcs_utils_hwaddr_normalize(
|
||||
|
|
@ -483,9 +483,9 @@ get_config(NMCSProvider *provider, NMCSProviderGetConfigTaskData *get_config_dat
|
|||
};
|
||||
|
||||
/* First we fetch the "macs/". If the caller requested some particular
|
||||
* MAC addresses, then we poll until we see them. They might not yet be
|
||||
* around from the start...
|
||||
*/
|
||||
* MAC addresses, then we poll until we see them. They might not yet be
|
||||
* around from the start...
|
||||
*/
|
||||
nm_http_client_poll_get(nmcs_provider_get_http_client(provider),
|
||||
(uri = _ec2_uri_interfaces()),
|
||||
HTTP_TIMEOUT_MS,
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ _get_config_ips_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat
|
|||
gint64 fip_index;
|
||||
|
||||
/* Truncate the string. It's safe to do, because we own @response_data an it has an
|
||||
* extra NUL character after the buffer. */
|
||||
* extra NUL character after the buffer. */
|
||||
((char *) line)[line_len] = '\0';
|
||||
|
||||
fip_index = _nm_utils_ascii_str_to_int64(line, 10, 0, G_MAXINT64, -1);
|
||||
|
|
@ -358,7 +358,7 @@ _get_net_ifaces_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat
|
|||
continue;
|
||||
|
||||
/* Truncate the string. It's safe to do, because we own @response_data an it has an
|
||||
* extra NUL character after the buffer. */
|
||||
* extra NUL character after the buffer. */
|
||||
((char *) line)[line_len] = '\0';
|
||||
if (line[line_len - 1] == '/')
|
||||
((char *) line)[--line_len] = '\0';
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ typedef struct {
|
|||
gsize iproutes_len;
|
||||
|
||||
/* TRUE, if the configuration was requested via hwaddrs argument to
|
||||
* nmcs_provider_get_config(). */
|
||||
* nmcs_provider_get_config(). */
|
||||
bool was_requested : 1;
|
||||
|
||||
} NMCSProviderGetConfigIfaceData;
|
||||
|
|
|
|||
|
|
@ -252,8 +252,8 @@ nmc_bond_validate_mode(const char *mode, GError **error)
|
|||
NULL};
|
||||
if (nmc_string_to_uint(mode, TRUE, 0, 6, &mode_int)) {
|
||||
/* Translate bonding mode numbers to mode names:
|
||||
* https://www.kernel.org/doc/Documentation/networking/bonding.txt
|
||||
*/
|
||||
* https://www.kernel.org/doc/Documentation/networking/bonding.txt
|
||||
*/
|
||||
return valid_modes[mode_int];
|
||||
} else
|
||||
return nmc_string_is_valid(mode, valid_modes, error);
|
||||
|
|
@ -500,29 +500,29 @@ nmc_activation_get_effective_state(NMActiveConnection *active,
|
|||
if (!device || ac_reason != NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED
|
||||
|| nm_device_get_active_connection(device) != active) {
|
||||
/* (1)
|
||||
* - we have no device,
|
||||
* - or, @ac_reason is specific
|
||||
* - or, @device no longer references the current @active
|
||||
* >> we complete with @ac_reason. */
|
||||
* - we have no device,
|
||||
* - or, @ac_reason is specific
|
||||
* - or, @device no longer references the current @active
|
||||
* >> we complete with @ac_reason. */
|
||||
*reason = gettext(nm_active_connection_state_reason_to_string(ac_reason));
|
||||
} else if (dev_state <= NM_DEVICE_STATE_DISCONNECTED
|
||||
|| dev_state >= NM_DEVICE_STATE_FAILED) {
|
||||
/* (2)
|
||||
* - not (1)
|
||||
* - and, the device is no longer in an activated state,
|
||||
* >> we complete with @dev_reason. */
|
||||
* - not (1)
|
||||
* - and, the device is no longer in an activated state,
|
||||
* >> we complete with @dev_reason. */
|
||||
*reason = gettext(nmc_device_reason_to_string(dev_reason));
|
||||
} else {
|
||||
/* (3)
|
||||
* we wait for the device go disconnect. We will get a better
|
||||
* failure reason from the device (2). */
|
||||
* we wait for the device go disconnect. We will get a better
|
||||
* failure reason from the device (2). */
|
||||
return NM_ACTIVE_CONNECTION_STATE_UNKNOWN;
|
||||
}
|
||||
break;
|
||||
case NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
|
||||
/* activating master connection does not automatically activate any slaves, so their
|
||||
* active connection state will not progress beyond ACTIVATING state.
|
||||
* Monitor the device instead. */
|
||||
* active connection state will not progress beyond ACTIVATING state.
|
||||
* Monitor the device instead. */
|
||||
if (device
|
||||
&& (NM_IS_DEVICE_BOND(device) || NM_IS_DEVICE_TEAM(device)
|
||||
|| NM_IS_DEVICE_BRIDGE(device))
|
||||
|
|
@ -844,8 +844,8 @@ nmc_utils_parse_passwd_file(char * contents /* will be modified */,
|
|||
|
||||
if (nm_streq(l_setting, "vpn") && NM_STR_HAS_PREFIX(l_prop, "secret.")) {
|
||||
/* in 1.12.0, we wrongly required the VPN secrets to be named
|
||||
* "vpn.secret". It should be "vpn.secrets". Work around it
|
||||
* (rh#1628833). */
|
||||
* "vpn.secret". It should be "vpn.secrets". Work around it
|
||||
* (rh#1628833). */
|
||||
l_hash_key = g_strdup_printf("vpn.secrets.%s", &l_prop[NM_STRLEN("secret.")]);
|
||||
} else
|
||||
l_hash_key = g_strdup_printf("%s.%s", l_setting, l_prop);
|
||||
|
|
@ -866,8 +866,8 @@ nmc_utils_parse_passwd_file(char * contents /* will be modified */,
|
|||
|
||||
if (!g_utf8_validate(l_hash_val, -1, NULL)) {
|
||||
/* In some cases it might make sense to support binary secrets (like the WPA-PSK which has no
|
||||
* defined encoding. However, all API that follows can only handle UTF-8, and no mechanism
|
||||
* to escape the secrets. Reject non-UTF-8 early. */
|
||||
* defined encoding. However, all API that follows can only handle UTF-8, and no mechanism
|
||||
* to escape the secrets. Reject non-UTF-8 early. */
|
||||
NM_SET_OUT(out_error_line, contents_line);
|
||||
nm_utils_error_set(error, NM_UTILS_ERROR_UNKNOWN, _("secret is not UTF-8"));
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ nm_meta_abstract_info_complete(const NMMetaAbstractInfo * abstract_info,
|
|||
return values;
|
||||
|
||||
/* for convenience, we allow the complete_fcn() implementations to
|
||||
* ignore "text". We filter out invalid matches here. */
|
||||
* ignore "text". We filter out invalid matches here. */
|
||||
|
||||
text_len = strlen(text);
|
||||
|
||||
|
|
@ -403,8 +403,8 @@ _output_selection_pack(const NMMetaAbstractInfo *const *fields_array, GArray *ar
|
|||
len = array ? array->len : 0;
|
||||
|
||||
/* re-organize the collected output data in one buffer that can be freed using
|
||||
* g_free(). This makes allocation more complicated, but saves us from special
|
||||
* handling for free. */
|
||||
* g_free(). This makes allocation more complicated, but saves us from special
|
||||
* handling for free. */
|
||||
result = g_malloc0(sizeof(NMMetaSelectionResultList) + (len * sizeof(NMMetaSelectionItem))
|
||||
+ (str ? str->len : 0));
|
||||
*((guint *) &result->num) = len;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ static GType
|
|||
_gtype_property_get_gtype(GType gtype, const char *property_name)
|
||||
{
|
||||
/* given @gtype, a type for a GObject, lookup the property @property_name
|
||||
* and return its value_type. */
|
||||
* and return its value_type. */
|
||||
if (G_TYPE_IS_CLASSED(gtype)) {
|
||||
GParamSpec * param_spec;
|
||||
nm_auto_unref_gtypeclass GTypeClass *gtypeclass = g_type_class_ref(gtype);
|
||||
|
|
@ -178,8 +178,8 @@ _value_strsplit(const char *value, ValueStrsplitMode split_mode, gsize *out_len)
|
|||
gs_free const char **strv = NULL;
|
||||
|
||||
/* FIXME: some modes should support backslash escaping.
|
||||
* In particular, to distinguish from _value_str_as_index_list(), which
|
||||
* does not accept '\\'. */
|
||||
* In particular, to distinguish from _value_str_as_index_list(), which
|
||||
* does not accept '\\'. */
|
||||
|
||||
/* note that all modes remove empty tokens (",", "a,,b", ",,"). */
|
||||
switch (split_mode) {
|
||||
|
|
@ -213,7 +213,7 @@ _value_strsplit_assert_unsplitable(const char *str)
|
|||
gsize j, l;
|
||||
|
||||
/* Assert that we cannot split the token and that it
|
||||
* has no unescaped delimiters. */
|
||||
* has no unescaped delimiters. */
|
||||
|
||||
strv_test = _value_strsplit(str, VALUE_STRSPLIT_MODE_ESCAPED_TOKENS, NULL);
|
||||
nm_assert(NM_PTRARRAY_LEN(strv_test) == 1);
|
||||
|
|
@ -378,7 +378,7 @@ _parse_ip_route(int family, const char *str, GError **error)
|
|||
while (
|
||||
g_hash_table_iter_next(&iter, (gpointer *) &iter_key, (gpointer *) &iter_value)) {
|
||||
/* need to sink the reference, because nm_utils_parse_variant_attributes() returns
|
||||
* floating refs. */
|
||||
* floating refs. */
|
||||
g_variant_ref_sink(iter_value);
|
||||
|
||||
if (!nm_ip_route_attribute_validate(iter_key, iter_value, family, NULL, error)) {
|
||||
|
|
@ -850,7 +850,7 @@ _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info,
|
|||
g_object_get_property(G_OBJECT(setting), property_info->property_name, &val);
|
||||
|
||||
/* Currently, only one particular property asks us to "handle_emptyunset".
|
||||
* So, don't implement it (yet) for the other types, where it's unneeded. */
|
||||
* So, don't implement it (yet) for the other types, where it's unneeded. */
|
||||
nm_assert(!handle_emptyunset || (gtype_prop == G_TYPE_STRV && !glib_handles_str_transform));
|
||||
|
||||
if (gtype_prop == G_TYPE_STRING) {
|
||||
|
|
@ -859,7 +859,7 @@ _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info,
|
|||
if (property_info->property_typ_data
|
||||
&& property_info->property_typ_data->subtype.gobject_string.handle_emptyunset) {
|
||||
/* This string property can both be empty and NULL. We need to
|
||||
* signal them differently. */
|
||||
* signal them differently. */
|
||||
cstr = g_value_get_string(&val);
|
||||
nm_assert((!!is_default) == (cstr == NULL));
|
||||
RETURN_STR_EMPTYUNSET(get_type, is_default, NULL);
|
||||
|
|
@ -1188,7 +1188,7 @@ static gconstpointer _get_fcn_gobject_enum(ARGS_GET_FCN)
|
|||
}
|
||||
|
||||
/* the gobject_enum.value_infos are currently ignored for the getter. They
|
||||
* only declare additional aliases for the setter. */
|
||||
* only declare additional aliases for the setter. */
|
||||
|
||||
if (property_info->property_typ_data)
|
||||
value_infos = property_info->property_typ_data->subtype.gobject_enum.value_infos_get;
|
||||
|
|
@ -1226,14 +1226,14 @@ static gboolean _set_fcn_gobject_string(ARGS_SET_FCN)
|
|||
if (property_info->property_typ_data->subtype.gobject_string.handle_emptyunset) {
|
||||
if (value && value[0] && NM_STRCHAR_ALL(value, ch, ch == ' ')) {
|
||||
/* this string property can both be %NULL and empty. To express that, we coerce
|
||||
* a value of all whitespaces to dropping the first whitespace. That means,
|
||||
* " " gives "", " " gives " ", and so on.
|
||||
*
|
||||
* This way the user can set the string value to "" (meaning NULL) and to
|
||||
* " " (meaning ""), and any other string.
|
||||
*
|
||||
* This is and non-obvious escaping mechanism. But out of all the possible
|
||||
* solutions, it seems the most sensible one. */
|
||||
* a value of all whitespaces to dropping the first whitespace. That means,
|
||||
* " " gives "", " " gives " ", and so on.
|
||||
*
|
||||
* This way the user can set the string value to "" (meaning NULL) and to
|
||||
* " " (meaning ""), and any other string.
|
||||
*
|
||||
* This is and non-obvious escaping mechanism. But out of all the possible
|
||||
* solutions, it seems the most sensible one. */
|
||||
value++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1666,7 +1666,7 @@ static const char *const *_values_fcn_gobject_enum(ARGS_VALUES_FCN)
|
|||
}
|
||||
|
||||
/* the gobject_enum.value_infos are currently ignored for the list of
|
||||
* values. They only declare additional (hidden) aliases for the setter. */
|
||||
* values. They only declare additional (hidden) aliases for the setter. */
|
||||
|
||||
v = nm_utils_strv_make_deep_copied(nm_utils_enum_get_values(gtype, min, max));
|
||||
return (const char *const *) (*out_to_free = v);
|
||||
|
|
@ -1927,7 +1927,7 @@ static gboolean _set_fcn_multilist(ARGS_SET_FCN)
|
|||
else if (property_info->property_typ_data->subtype.multilist.clear_emptyunset_fcn
|
||||
&& _is_default(property_info, setting)) {
|
||||
/* the property is already the default. But we hav here a '+' / '-' modifier, so
|
||||
* that always makes it non-default (empty) first. */
|
||||
* that always makes it non-default (empty) first. */
|
||||
_multilist_clear_property(property_info, setting, TRUE);
|
||||
}
|
||||
|
||||
|
|
@ -2143,7 +2143,7 @@ static const char *const *_complete_fcn_vpn_service_type(ARGS_COMPLETE_FCN)
|
|||
|
||||
if (!text || !*text) {
|
||||
/* If the prompt text is empty or contains no '.',
|
||||
* filter out full names. */
|
||||
* filter out full names. */
|
||||
for (i = 0, j = 0; values[i]; i++) {
|
||||
if (strchr(values[i], '.')) {
|
||||
g_free(values[i]);
|
||||
|
|
@ -2439,20 +2439,20 @@ _nm_meta_setting_bond_add_option(NMSetting * setting,
|
|||
if ((val2 = nm_setting_bond_get_option_by_name(s_bond, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE))
|
||||
&& !nm_streq(val2, value)) {
|
||||
/* "active_slave" option is deprecated and an alias for "primary". When
|
||||
* setting "primary" to a different value, remove the deprecated "active_slave"
|
||||
* setting.
|
||||
*
|
||||
* If we wouldn't do this, then the profile would work as requested, but ignoring
|
||||
* the (redundant, differing) "active_slave" option. That is confusing, thus clean
|
||||
* it up. */
|
||||
* setting "primary" to a different value, remove the deprecated "active_slave"
|
||||
* setting.
|
||||
*
|
||||
* If we wouldn't do this, then the profile would work as requested, but ignoring
|
||||
* the (redundant, differing) "active_slave" option. That is confusing, thus clean
|
||||
* it up. */
|
||||
nm_setting_bond_remove_option(s_bond, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE);
|
||||
}
|
||||
} else if (nm_streq(name, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE)) {
|
||||
if ((val2 = nm_setting_bond_get_option_by_name(s_bond, NM_SETTING_BOND_OPTION_PRIMARY))
|
||||
&& !nm_streq(val2, value)) {
|
||||
/* "active_slave" is a deprecated alias for "primary". NetworkManager will ignore
|
||||
* "active_slave" if "primary" is set, we thus need to coerce the primary option
|
||||
* too. */
|
||||
* "active_slave" if "primary" is set, we thus need to coerce the primary option
|
||||
* too. */
|
||||
nm_setting_bond_add_option(s_bond, NM_SETTING_BOND_OPTION_PRIMARY, value);
|
||||
}
|
||||
}
|
||||
|
|
@ -2526,12 +2526,12 @@ static gboolean _set_fcn_connection_type(ARGS_SET_FCN)
|
|||
|
||||
if (nm_setting_connection_get_uuid(NM_SETTING_CONNECTION(setting))) {
|
||||
/* Don't allow setting type unless the connection is brand new.
|
||||
* Just because it's a bad idea and the user wouldn't probably want that.
|
||||
* No technical reason, really.
|
||||
* Also, using uuid to see if the connection is brand new is a bit
|
||||
* hacky: we can not see if the type is already set, because
|
||||
* nmc_setting_set_property() is called only after the property
|
||||
* we're setting (type) has been removed. */
|
||||
* Just because it's a bad idea and the user wouldn't probably want that.
|
||||
* No technical reason, really.
|
||||
* Also, using uuid to see if the connection is brand new is a bit
|
||||
* hacky: we can not see if the type is already set, because
|
||||
* nmc_setting_set_property() is called only after the property
|
||||
* we're setting (type) has been removed. */
|
||||
g_set_error(error, 1, 0, _("Can not change the connection type"));
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -2661,7 +2661,7 @@ static const char *const *_complete_fcn_connection_master(ARGS_COMPLETE_FCN)
|
|||
|
||||
if ((!text || !*text) && operation_context && operation_context->connection) {
|
||||
/* if we have no text yet, initially only complete for matching
|
||||
* slave-type. */
|
||||
* slave-type. */
|
||||
s_con = nm_connection_get_setting_connection(operation_context->connection);
|
||||
if (s_con)
|
||||
expected_type = nm_setting_connection_get_slave_type(s_con);
|
||||
|
|
@ -3339,16 +3339,16 @@ static gboolean _set_fcn_objlist(ARGS_SET_FCN)
|
|||
|
||||
for (i = 0; i < nstrv; i++) {
|
||||
/* FIXME: there is the problem here that set_fcn() might succeed on the first item
|
||||
* (modifying it), and fail to parse the second one.
|
||||
*
|
||||
* Optimally, we would first parse all input strings before starting the
|
||||
* modify the setting. The setting should only be modified if (and only if)
|
||||
* the entire operation succeeds to set all items.
|
||||
*
|
||||
* Currently, in interactive mode this leads to odd behavior.
|
||||
*
|
||||
* This does not only affect objlist.set_fcn() or _pt_objlist properties.
|
||||
* E.g. we also call _gobject_property_reset() before validating the input. */
|
||||
* (modifying it), and fail to parse the second one.
|
||||
*
|
||||
* Optimally, we would first parse all input strings before starting the
|
||||
* modify the setting. The setting should only be modified if (and only if)
|
||||
* the entire operation succeeds to set all items.
|
||||
*
|
||||
* Currently, in interactive mode this leads to odd behavior.
|
||||
*
|
||||
* This does not only affect objlist.set_fcn() or _pt_objlist properties.
|
||||
* E.g. we also call _gobject_property_reset() before validating the input. */
|
||||
if (!property_info->property_typ_data->subtype.objlist
|
||||
.set_fcn(setting, !_SET_FCN_DO_REMOVE(modifier, value), strv[i], error))
|
||||
return FALSE;
|
||||
|
|
@ -3395,8 +3395,8 @@ static gboolean _set_fcn_ip_config_gateway(ARGS_SET_FCN)
|
|||
}
|
||||
|
||||
/* Since commit c1907a218a6b6bfe8175eb6ed87a523aaabc69ae, having a gateway and never-default=yes
|
||||
* will be normalized away. That means, when we set a gateway, we also want to unset never-default,
|
||||
* otherwise the operation gets silently reverted. */
|
||||
* will be normalized away. That means, when we set a gateway, we also want to unset never-default,
|
||||
* otherwise the operation gets silently reverted. */
|
||||
g_object_set(setting,
|
||||
property_info->property_name,
|
||||
value,
|
||||
|
|
@ -3467,11 +3467,11 @@ _objlist_set_fcn_ip_config_routing_rules(NMSetting * setting,
|
|||
return FALSE;
|
||||
|
||||
/* also for @do_add, we first always search whether such a rule already exist
|
||||
* and remove the first occurrence.
|
||||
*
|
||||
* The effect is, that we don't add multiple times the same rule,
|
||||
* and that if the rule already exists, it gets moved to the end (append).
|
||||
*/
|
||||
* and remove the first occurrence.
|
||||
*
|
||||
* The effect is, that we don't add multiple times the same rule,
|
||||
* and that if the rule already exists, it gets moved to the end (append).
|
||||
*/
|
||||
n = nm_setting_ip_config_get_num_routing_rules(s_ip);
|
||||
for (i = 0; i < n; i++) {
|
||||
NMIPRoutingRule *rr;
|
||||
|
|
@ -4529,7 +4529,7 @@ static const NMMetaPropertyType _pt_objlist = {
|
|||
|
||||
#define MTU_GET_FCN(type, func) \
|
||||
/* macro that returns @func as const (guint32(*)(NMSetting*)) type, but checks
|
||||
* that the actual type is (guint32(*)(type *)). */ \
|
||||
* that the actual type is (guint32(*)(type *)). */ \
|
||||
((guint32 (*) (NMSetting *)) ((sizeof (func == ((guint32 (*) (type *)) func))) ? func : func) )
|
||||
|
||||
#define TEAM_DESCRIBE_MESSAGE \
|
||||
|
|
|
|||
|
|
@ -159,8 +159,8 @@ typedef enum {
|
|||
NM_META_ACCESSOR_GET_OUT_FLAGS_STRV = (1LL << 0),
|
||||
|
||||
/* the property allows to be hidden, if and only if, it's value is set to the
|
||||
* default. This should only be set by new properties, to preserve behavior
|
||||
* of old properties, which were always printed. */
|
||||
* default. This should only be set by new properties, to preserve behavior
|
||||
* of old properties, which were always printed. */
|
||||
NM_META_ACCESSOR_GET_OUT_FLAGS_HIDE = (1LL << 1),
|
||||
} NMMetaAccessorGetOutFlags;
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ struct _NMMetaPropertyType {
|
|||
char *** out_to_free);
|
||||
|
||||
/* Whether set_fcn() supports the '-' modifier. That is, whether the property
|
||||
* is a list type. */
|
||||
* is a list type. */
|
||||
bool set_supports_remove : 1;
|
||||
};
|
||||
|
||||
|
|
@ -280,8 +280,8 @@ struct _NMMetaPropertyTypData {
|
|||
void (*clear_all_fcn)(NMSetting *setting);
|
||||
|
||||
/* some multilist properties distinguish between an empty list and
|
||||
* and unset. If this function pointer is set, certain behaviors come
|
||||
* into action to handle that. */
|
||||
* and unset. If this function pointer is set, certain behaviors come
|
||||
* into action to handle that. */
|
||||
void (*clear_emptyunset_fcn)(NMSetting *setting,
|
||||
gboolean is_set /* or else set default */);
|
||||
|
||||
|
|
@ -417,15 +417,15 @@ struct _NMMetaSettingInfoEditor {
|
|||
guint properties_num;
|
||||
|
||||
/* a NMConnection has a main type (connection.type), which is a
|
||||
* main NMSetting instance. Depending on the type, a connection
|
||||
* may have a list of other allowed settings.
|
||||
*
|
||||
* For example, a connection of type "vlan" may have settings
|
||||
* of type "connection", "vlan", and "wired".
|
||||
*
|
||||
* Some setting types a not a main type (NMSettingProxy). They
|
||||
* don't have valid_settings but are usually referenced by other
|
||||
* settings to be valid for them. */
|
||||
* main NMSetting instance. Depending on the type, a connection
|
||||
* may have a list of other allowed settings.
|
||||
*
|
||||
* For example, a connection of type "vlan" may have settings
|
||||
* of type "connection", "vlan", and "wired".
|
||||
*
|
||||
* Some setting types a not a main type (NMSettingProxy). They
|
||||
* don't have valid_settings but are usually referenced by other
|
||||
* settings to be valid for them. */
|
||||
const NMMetaSettingValidPartItem *const *valid_parts;
|
||||
|
||||
void (*setting_init_fcn)(const NMMetaSettingInfoEditor *setting_info,
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ choose_identity(GVariant *identities)
|
|||
const char * user;
|
||||
|
||||
/* Choose identity. First try current user, then root, and else
|
||||
* take the first one we find. */
|
||||
* take the first one we find. */
|
||||
|
||||
user = getenv("USER");
|
||||
|
||||
|
|
@ -428,10 +428,10 @@ io_watch_have_data(int fd, GIOCondition condition, gpointer user_data)
|
|||
}
|
||||
|
||||
/* Either an error or EOF happened. The data we parsed so far was not relevant.
|
||||
* Regardless of what we still have unprocessed in the receive buffers, we are done.
|
||||
*
|
||||
* We would expect that the other side completed with SUCCESS or FAILURE. Apparently
|
||||
* it didn't. If we had any good request, we assume success. */
|
||||
* Regardless of what we still have unprocessed in the receive buffers, we are done.
|
||||
*
|
||||
* We would expect that the other side completed with SUCCESS or FAILURE. Apparently
|
||||
* it didn't. If we had any good request, we assume success. */
|
||||
auth_result = request->request_any_response;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -263,9 +263,9 @@ add_8021x_secrets(RequestData *request, GPtrArray *secrets)
|
|||
|
||||
if (NM_IN_STRSET(eap_method, "md5", "leap", "ttls", "peap")) {
|
||||
/* TTLS and PEAP are actually much more complicated, but this complication
|
||||
* is not visible here since we only care about phase2 authentication
|
||||
* (and don't even care of which one)
|
||||
*/
|
||||
* is not visible here since we only care about phase2 authentication
|
||||
* (and don't even care of which one)
|
||||
*/
|
||||
secret = _secret_real_new_plain(NM_SECRET_AGENT_SECRET_TYPE_PROPERTY,
|
||||
_("Username"),
|
||||
NM_SETTING(s_8021x),
|
||||
|
|
@ -612,8 +612,8 @@ _auth_dialog_exited(GPid pid, int status, gpointer user_data)
|
|||
|
||||
out:
|
||||
/* Try to fall back to the hardwired VPN support if the auth dialog fails.
|
||||
* We may eventually get rid of the whole hardwired secrets handling at some point,
|
||||
* when the auth helpers are goode enough.. */
|
||||
* We may eventually get rid of the whole hardwired secrets handling at some point,
|
||||
* when the auth helpers are goode enough.. */
|
||||
if (error && add_vpn_secrets(request, secrets, &message)) {
|
||||
g_clear_error(&error);
|
||||
if (!message) {
|
||||
|
|
@ -660,7 +660,7 @@ _auth_dialog_read_done(GObject *source_object, GAsyncResult *res, gpointer user_
|
|||
break;
|
||||
case 0:
|
||||
/* Done reading. Let's wait for the auth dialog to exit so that we're able to collect the status.
|
||||
* Remember we can be cancelled in between. */
|
||||
* Remember we can be cancelled in between. */
|
||||
data->child_watch_id = g_child_watch_add(data->auth_dialog_pid, _auth_dialog_exited, data);
|
||||
data->cancellable = g_object_ref(data->request->cancellable);
|
||||
data->cancellable_id =
|
||||
|
|
@ -688,7 +688,7 @@ _auth_dialog_write_done(GObject *source_object, GAsyncResult *res, gpointer user
|
|||
_nm_unused gs_free char *auth_dialog_request_free = user_data;
|
||||
|
||||
/* We don't care about write errors. If there are any problems, the
|
||||
* reader shall notice. */
|
||||
* reader shall notice. */
|
||||
g_output_stream_write_finish(auth_dialog_out, res, NULL);
|
||||
g_output_stream_close(auth_dialog_out, NULL, NULL);
|
||||
}
|
||||
|
|
@ -1214,7 +1214,7 @@ cancel_get_secrets(NMSecretAgentOld *agent, const char *connection_path, const c
|
|||
request = g_hash_table_lookup(priv->requests, &request_id);
|
||||
if (!request) {
|
||||
/* this is really a bug of the caller (or us?). We cannot invoke a callback,
|
||||
* hence the caller cannot cleanup the request. */
|
||||
* hence the caller cannot cleanup the request. */
|
||||
g_return_if_reached();
|
||||
}
|
||||
|
||||
|
|
@ -1266,9 +1266,9 @@ nm_secret_agent_simple_enable(NMSecretAgentSimple *self, const char *path)
|
|||
gs_free char * path_full = NULL;
|
||||
|
||||
/* The path is only used to match a request_id with the current
|
||||
* connection. Since the request_id is "${CONNECTION_PATH}/${SETTING}",
|
||||
* add a trailing '/' to the path to match the full connection path.
|
||||
*/
|
||||
* connection. Since the request_id is "${CONNECTION_PATH}/${SETTING}",
|
||||
* add a trailing '/' to the path to match the full connection path.
|
||||
*/
|
||||
path_full = path ? g_strdup_printf("%s/", path) : NULL;
|
||||
|
||||
if (!nm_streq0(path_full, priv->path)) {
|
||||
|
|
@ -1365,27 +1365,27 @@ nm_secret_agent_simple_class_init(NMSecretAgentSimpleClass *klass)
|
|||
agent_class->delete_secrets = delete_secrets;
|
||||
|
||||
/**
|
||||
* NMSecretAgentSimple::request-secrets:
|
||||
* @agent: the #NMSecretAgentSimple
|
||||
* @request_id: request ID, to eventually pass to
|
||||
* nm_secret_agent_simple_response().
|
||||
* @title: a title for the password dialog
|
||||
* @prompt: a prompt message for the password dialog
|
||||
* @secrets: (element-type #NMSecretAgentSimpleSecret): array of secrets
|
||||
* being requested.
|
||||
*
|
||||
* Emitted when the agent requires secrets from the user.
|
||||
*
|
||||
* The application should ask user for the secrets. For example,
|
||||
* nmtui should create a password dialog (#NmtPasswordDialog)
|
||||
* with the given title and prompt, and an entry for each
|
||||
* element of @secrets. If any of the secrets already have a
|
||||
* <literal>value</literal> filled in, the corresponding entry
|
||||
* should be initialized to that value.
|
||||
*
|
||||
* When the dialog is complete, the app must call
|
||||
* nm_secret_agent_simple_response() with the results.
|
||||
*/
|
||||
* NMSecretAgentSimple::request-secrets:
|
||||
* @agent: the #NMSecretAgentSimple
|
||||
* @request_id: request ID, to eventually pass to
|
||||
* nm_secret_agent_simple_response().
|
||||
* @title: a title for the password dialog
|
||||
* @prompt: a prompt message for the password dialog
|
||||
* @secrets: (element-type #NMSecretAgentSimpleSecret): array of secrets
|
||||
* being requested.
|
||||
*
|
||||
* Emitted when the agent requires secrets from the user.
|
||||
*
|
||||
* The application should ask user for the secrets. For example,
|
||||
* nmtui should create a password dialog (#NmtPasswordDialog)
|
||||
* with the given title and prompt, and an entry for each
|
||||
* element of @secrets. If any of the secrets already have a
|
||||
* <literal>value</literal> filled in, the corresponding entry
|
||||
* should be initialized to that value.
|
||||
*
|
||||
* When the dialog is complete, the app must call
|
||||
* nm_secret_agent_simple_response() with the results.
|
||||
*/
|
||||
signals[REQUEST_SECRETS] = g_signal_new(NM_SECRET_AGENT_SIMPLE_REQUEST_SECRETS,
|
||||
G_TYPE_FROM_CLASS(klass),
|
||||
0,
|
||||
|
|
|
|||
|
|
@ -231,11 +231,11 @@ nm_vpn_openconnect_authenticate_helper(const char *host,
|
|||
return FALSE;
|
||||
|
||||
/* Parse output and set cookie, gateway and gwcert
|
||||
* output example:
|
||||
* COOKIE='loremipsum'
|
||||
* HOST='1.2.3.4'
|
||||
* FINGERPRINT='sha1:32bac90cf09a722e10ecc1942c67fe2ac8c21e2e'
|
||||
*/
|
||||
* output example:
|
||||
* COOKIE='loremipsum'
|
||||
* HOST='1.2.3.4'
|
||||
* FINGERPRINT='sha1:32bac90cf09a722e10ecc1942c67fe2ac8c21e2e'
|
||||
*/
|
||||
output_v = nm_utils_strsplit_set_with_empty(output, "\r\n");
|
||||
for (iter = output_v; iter && *iter; iter++) {
|
||||
char *s_mutable = (char *) *iter;
|
||||
|
|
@ -288,9 +288,9 @@ _line_match(char *line, const char *key, gsize key_len, const char **out_key, ch
|
|||
nm_assert(out_value && !*out_value);
|
||||
|
||||
/* Note that `wg-quick` (linux.bash) does case-insensitive comparison (shopt -s nocasematch).
|
||||
* `wg setconf` does case-insensitive comparison too (with strncasecmp, which is locale dependent).
|
||||
*
|
||||
* We do a case-insensitive comparison of the key, however in a locale-independent manner. */
|
||||
* `wg setconf` does case-insensitive comparison too (with strncasecmp, which is locale dependent).
|
||||
*
|
||||
* We do a case-insensitive comparison of the key, however in a locale-independent manner. */
|
||||
|
||||
if (g_ascii_strncasecmp(line, key, key_len) != 0)
|
||||
return FALSE;
|
||||
|
|
@ -366,9 +366,9 @@ nm_vpn_wireguard_import(const char *filename, GError **error)
|
|||
g_return_val_if_fail(!error || !*error, NULL);
|
||||
|
||||
/* contrary to "wg-quick", we never interpret the filename as "/etc/wireguard/$INTERFACE.conf".
|
||||
* If the filename has no '/', it is interpreted as relative to the current working directory.
|
||||
* However, we do require a suitable filename suffix and that the name corresponds to the interface
|
||||
* name. */
|
||||
* If the filename has no '/', it is interpreted as relative to the current working directory.
|
||||
* However, we do require a suitable filename suffix and that the name corresponds to the interface
|
||||
* name. */
|
||||
cstr = strrchr(filename, '/');
|
||||
cstr = cstr ? &cstr[1] : filename;
|
||||
if (NM_STR_HAS_SUFFIX(cstr, ".conf")) {
|
||||
|
|
@ -401,14 +401,14 @@ nm_vpn_wireguard_import(const char *filename, GError **error)
|
|||
return NULL;
|
||||
|
||||
/* We interpret the file like `wg-quick up` and `wg setconf` do.
|
||||
*
|
||||
* Of course the WireGuard scripts do something fundamentlly different. They
|
||||
* perform actions to configure the WireGuard link in kernel, add routes and
|
||||
* addresses, and call resolvconf. It all happens at the time when the script
|
||||
* run.
|
||||
*
|
||||
* This code here instead generates a NetworkManager connection profile so that
|
||||
* NetworkManager will apply a similar configuration when later activating the profile. */
|
||||
*
|
||||
* Of course the WireGuard scripts do something fundamentlly different. They
|
||||
* perform actions to configure the WireGuard link in kernel, add routes and
|
||||
* addresses, and call resolvconf. It all happens at the time when the script
|
||||
* run.
|
||||
*
|
||||
* This code here instead generates a NetworkManager connection profile so that
|
||||
* NetworkManager will apply a similar configuration when later activating the profile. */
|
||||
|
||||
#define _TABLE_AUTO ((gint64) -1)
|
||||
#define _TABLE_OFF ((gint64) -2)
|
||||
|
|
@ -433,14 +433,14 @@ nm_vpn_wireguard_import(const char *filename, GError **error)
|
|||
(line_remainder++)[0] = '\0';
|
||||
|
||||
/* Drop all spaces and truncate at first '#'.
|
||||
* See wg's config_read_line().
|
||||
*
|
||||
* Note that wg-quick doesn't do that.
|
||||
*
|
||||
* Neither `wg setconf` nor `wg-quick` does a strict parsing.
|
||||
* We don't either. Just try to interpret the file (mostly) the same as
|
||||
* they would.
|
||||
*/
|
||||
* See wg's config_read_line().
|
||||
*
|
||||
* Note that wg-quick doesn't do that.
|
||||
*
|
||||
* Neither `wg setconf` nor `wg-quick` does a strict parsing.
|
||||
* We don't either. Just try to interpret the file (mostly) the same as
|
||||
* they would.
|
||||
*/
|
||||
{
|
||||
gsize l, n;
|
||||
|
||||
|
|
@ -448,7 +448,7 @@ nm_vpn_wireguard_import(const char *filename, GError **error)
|
|||
for (l = 0; (ch = line[l]); l++) {
|
||||
if (g_ascii_isspace(ch)) {
|
||||
/* wg-setconf strips all whitespace before parsing the content. That means,
|
||||
* *[I nterface]" will be accepted. We do that too. */
|
||||
* *[I nterface]" will be accepted. We do that too. */
|
||||
continue;
|
||||
}
|
||||
if (ch == '#')
|
||||
|
|
@ -524,8 +524,8 @@ nm_vpn_wireguard_import(const char *filename, GError **error)
|
|||
goto fail_invalid_value;
|
||||
|
||||
/* wg-quick accepts the "MTU" value, but it also fetches routes to
|
||||
* autodetect it. NetworkManager won't do that, we can only configure
|
||||
* an explicit MTU or no autodetection will be performed. */
|
||||
* autodetect it. NetworkManager won't do that, we can only configure
|
||||
* an explicit MTU or no autodetection will be performed. */
|
||||
data_mtu = i64;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -562,7 +562,7 @@ nm_vpn_wireguard_import(const char *filename, GError **error)
|
|||
data_table = _TABLE_OFF;
|
||||
else {
|
||||
/* we don't support table names from /etc/iproute2/rt_tables
|
||||
* But we accept hex like `ip route add` would. */
|
||||
* But we accept hex like `ip route add` would. */
|
||||
i64 = _nm_utils_ascii_str_to_int64(value, 0, 0, G_MAXINT32, -1);
|
||||
if (i64 == -1)
|
||||
goto fail_invalid_value;
|
||||
|
|
@ -581,7 +581,7 @@ nm_vpn_wireguard_import(const char *filename, GError **error)
|
|||
|
||||
if (line_match(line, "SaveConfig", &matched_key, &value)) {
|
||||
/* we ignore the setting, but enforce that it's either true or false (like
|
||||
* wg-quick. */
|
||||
* wg-quick. */
|
||||
if (!NM_IN_STRSET(value, "true", "false"))
|
||||
goto fail_invalid_value;
|
||||
continue;
|
||||
|
|
@ -589,7 +589,7 @@ nm_vpn_wireguard_import(const char *filename, GError **error)
|
|||
|
||||
if (line_match(line, "ListenPort", &matched_key, &value)) {
|
||||
/* we don't use getaddrinfo(), unlike `wg setconf`. Just interpret
|
||||
* the port as plain decimal number. */
|
||||
* the port as plain decimal number. */
|
||||
i64 = _nm_utils_ascii_str_to_int64(value, 10, 0, 0xFFFF, -1);
|
||||
if (i64 == -1)
|
||||
goto fail_invalid_value;
|
||||
|
|
@ -748,10 +748,10 @@ fail_invalid_secret:
|
|||
|
||||
if (data_dns && !data_addr) {
|
||||
/* When specifying "DNS", we also require an "Address" for the same address
|
||||
* family. That is because a NMSettingIPConfig cannot have @method_disabled
|
||||
* and DNS settings at the same time.
|
||||
*
|
||||
* We don't have addresses. Silently ignore the DNS setting. */
|
||||
* family. That is because a NMSettingIPConfig cannot have @method_disabled
|
||||
* and DNS settings at the same time.
|
||||
*
|
||||
* We don't have addresses. Silently ignore the DNS setting. */
|
||||
data_dns = NULL;
|
||||
data_dns_search2 = NULL;
|
||||
}
|
||||
|
|
@ -762,8 +762,8 @@ fail_invalid_secret:
|
|||
NULL);
|
||||
|
||||
/* For WireGuard profiles, always set dns-priority to a negative value,
|
||||
* so that DNS servers on other profiles get ignored. This is also what
|
||||
* wg-quick does, by calling `resolvconf -x`. */
|
||||
* so that DNS servers on other profiles get ignored. This is also what
|
||||
* wg-quick does, by calling `resolvconf -x`. */
|
||||
g_object_set(s_ip, NM_SETTING_IP_CONFIG_DNS_PRIORITY, (int) -50, NULL);
|
||||
|
||||
if (data_addr) {
|
||||
|
|
@ -775,7 +775,7 @@ fail_invalid_secret:
|
|||
nm_setting_ip_config_add_dns(s_ip, data_dns->pdata[i]);
|
||||
|
||||
/* Of the wg-quick doesn't specify a search domain, assume the user
|
||||
* wants to use the domain server for all searches. */
|
||||
* wants to use the domain server for all searches. */
|
||||
if (!data_dns_search2)
|
||||
nm_setting_ip_config_add_dns_search(s_ip, "~");
|
||||
}
|
||||
|
|
@ -786,20 +786,20 @@ fail_invalid_secret:
|
|||
|
||||
if (data_table == _TABLE_AUTO) {
|
||||
/* in the "auto" setting, wg-quick adds peer-routes automatically to the main
|
||||
* table. NetworkManager will do that too, but there are differences:
|
||||
*
|
||||
* - NetworkManager (contrary to wg-quick) does not check whether the peer-route is necessary.
|
||||
* It will always add a route for each allowed-ips range, even if there is already another
|
||||
* route that would ensure packets to the endpoint are routed via the WireGuard interface.
|
||||
* If you don't want that, disable "wireguard.peer-routes", and add the necessary routes
|
||||
* yourself to "ipv4.routes" and "ipv6.routes".
|
||||
*
|
||||
* - With "auto", wg-quick also configures policy routing to handle default-routes (/0) to
|
||||
* avoid routing loops.
|
||||
* The imported connection profile will have wireguard.ip4-auto-default-route and
|
||||
* wireguard.ip6-auto-default-route set to "default". It will thus configure wg-quick's
|
||||
* policy routing if the profile has any AllowedIPs ranges with /0.
|
||||
*/
|
||||
* table. NetworkManager will do that too, but there are differences:
|
||||
*
|
||||
* - NetworkManager (contrary to wg-quick) does not check whether the peer-route is necessary.
|
||||
* It will always add a route for each allowed-ips range, even if there is already another
|
||||
* route that would ensure packets to the endpoint are routed via the WireGuard interface.
|
||||
* If you don't want that, disable "wireguard.peer-routes", and add the necessary routes
|
||||
* yourself to "ipv4.routes" and "ipv6.routes".
|
||||
*
|
||||
* - With "auto", wg-quick also configures policy routing to handle default-routes (/0) to
|
||||
* avoid routing loops.
|
||||
* The imported connection profile will have wireguard.ip4-auto-default-route and
|
||||
* wireguard.ip6-auto-default-route set to "default". It will thus configure wg-quick's
|
||||
* policy routing if the profile has any AllowedIPs ranges with /0.
|
||||
*/
|
||||
} else if (data_table == _TABLE_OFF) {
|
||||
if (is_v4) {
|
||||
g_object_set(s_wg, NM_SETTING_WIREGUARD_PEER_ROUTES, FALSE, NULL);
|
||||
|
|
|
|||
|
|
@ -203,11 +203,11 @@ nmt_newt_button_class_init(NmtNewtButtonClass *button_class)
|
|||
/* signals */
|
||||
|
||||
/**
|
||||
* NmtNewtButton::clicked:
|
||||
* @button: the #NmtNewtButton
|
||||
*
|
||||
* Emitted when the button is clicked.
|
||||
*/
|
||||
* NmtNewtButton::clicked:
|
||||
* @button: the #NmtNewtButton
|
||||
*
|
||||
* Emitted when the button is clicked.
|
||||
*/
|
||||
signals[CLICKED] = g_signal_new("clicked",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
@ -221,10 +221,10 @@ nmt_newt_button_class_init(NmtNewtButtonClass *button_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtNewtButton:label:
|
||||
*
|
||||
* The button's label
|
||||
*/
|
||||
* NmtNewtButton:label:
|
||||
*
|
||||
* The button's label
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_LABEL,
|
||||
|
|
|
|||
|
|
@ -195,19 +195,19 @@ nmt_newt_checkbox_class_init(NmtNewtCheckboxClass *checkbox_class)
|
|||
component_class->build_component = nmt_newt_checkbox_build_component;
|
||||
|
||||
/**
|
||||
* NmtNewtCheckbox:label:
|
||||
*
|
||||
* The checkbox's label
|
||||
*/
|
||||
* NmtNewtCheckbox:label:
|
||||
*
|
||||
* The checkbox's label
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_LABEL,
|
||||
g_param_spec_string("label", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtCheckbox:active:
|
||||
*
|
||||
* The checkbox's checked state
|
||||
*/
|
||||
* NmtNewtCheckbox:active:
|
||||
*
|
||||
* The checkbox's checked state
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ACTIVE,
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ nmt_newt_component_size_allocate(NmtNewtWidget *widget, int x, int y, int width,
|
|||
newtGrid grid;
|
||||
|
||||
/* You can't directly place a newtComponent, so we create a newtGrid,
|
||||
* position the component within that, and then place the grid.
|
||||
*/
|
||||
* position the component within that, and then place the grid.
|
||||
*/
|
||||
grid = newtCreateGrid(1, 1);
|
||||
newtGridSetField(grid,
|
||||
0,
|
||||
|
|
@ -267,21 +267,21 @@ nmt_newt_component_class_init(NmtNewtComponentClass *component_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtNewtComponent:component:
|
||||
*
|
||||
* The component's #newtComponent
|
||||
*/
|
||||
* NmtNewtComponent:component:
|
||||
*
|
||||
* The component's #newtComponent
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_COMPONENT,
|
||||
g_param_spec_pointer("component", "", "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtComponent:sensitive:
|
||||
*
|
||||
* Whether the component is sensitive. Insensitive components will
|
||||
* be skipped over in the keyboard tab chain, and may be displayed
|
||||
* differently.
|
||||
*/
|
||||
* NmtNewtComponent:sensitive:
|
||||
*
|
||||
* Whether the component is sensitive. Insensitive components will
|
||||
* be skipped over in the keyboard tab chain, and may be displayed
|
||||
* differently.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_SENSITIVE,
|
||||
|
|
|
|||
|
|
@ -196,12 +196,12 @@ nmt_newt_entry_numeric_class_init(NmtNewtEntryNumericClass *entry_class)
|
|||
object_class->get_property = nmt_newt_entry_numeric_get_property;
|
||||
|
||||
/**
|
||||
* NmtNewtEntryNumeric:minimum:
|
||||
*
|
||||
* The minimum #NmtNewtWidget:valid value for the entry. If this
|
||||
* is non-negative, then the entry will not allow negative numbers
|
||||
* to be entered.
|
||||
*/
|
||||
* NmtNewtEntryNumeric:minimum:
|
||||
*
|
||||
* The minimum #NmtNewtWidget:valid value for the entry. If this
|
||||
* is non-negative, then the entry will not allow negative numbers
|
||||
* to be entered.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_MINIMUM,
|
||||
|
|
@ -213,10 +213,10 @@ nmt_newt_entry_numeric_class_init(NmtNewtEntryNumericClass *entry_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtEntryNumeric:maximum:
|
||||
*
|
||||
* The maximum #NmtNewtWidget:valid value for the entry.
|
||||
*/
|
||||
* NmtNewtEntryNumeric:maximum:
|
||||
*
|
||||
* The maximum #NmtNewtWidget:valid value for the entry.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_MAXIMUM,
|
||||
|
|
@ -228,11 +228,11 @@ nmt_newt_entry_numeric_class_init(NmtNewtEntryNumericClass *entry_class)
|
|||
G_MAXINT64,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtEntryNumeric:optional:
|
||||
*
|
||||
* If %TRUE, allow empty string to indicate some default value.
|
||||
* It means the property is optional and can be left at the default
|
||||
*/
|
||||
* NmtNewtEntryNumeric:optional:
|
||||
*
|
||||
* If %TRUE, allow empty string to indicate some default value.
|
||||
* It means the property is optional and can be left at the default
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_OPTIONAL,
|
||||
|
|
|
|||
|
|
@ -457,28 +457,28 @@ nmt_newt_entry_class_init(NmtNewtEntryClass *entry_class)
|
|||
component_class->build_component = nmt_newt_entry_build_component;
|
||||
|
||||
/**
|
||||
* NmtNewtEntry:text
|
||||
*
|
||||
* The entry's text
|
||||
*/
|
||||
* NmtNewtEntry:text
|
||||
*
|
||||
* The entry's text
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_TEXT,
|
||||
g_param_spec_string("text", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtEntry:width
|
||||
*
|
||||
* The entry's width in characters
|
||||
*/
|
||||
* NmtNewtEntry:width
|
||||
*
|
||||
* The entry's width in characters
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_WIDTH,
|
||||
g_param_spec_int("width", "", "", -1, 80, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtEntry:flags
|
||||
*
|
||||
* The entry's #NmtNewtEntryFlags
|
||||
*/
|
||||
* NmtNewtEntry:flags
|
||||
*
|
||||
* The entry's #NmtNewtEntryFlags
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FLAGS,
|
||||
|
|
@ -490,11 +490,11 @@ nmt_newt_entry_class_init(NmtNewtEntryClass *entry_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtEntry:password
|
||||
*
|
||||
* %TRUE if #NmtNewtEntry:flags contains %NMT_NEWT_ENTRY_PASSWORD,
|
||||
* %FALSE if not.
|
||||
*/
|
||||
* NmtNewtEntry:password
|
||||
*
|
||||
* %TRUE if #NmtNewtEntry:flags contains %NMT_NEWT_ENTRY_PASSWORD,
|
||||
* %FALSE if not.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_PASSWORD,
|
||||
|
|
|
|||
|
|
@ -281,8 +281,8 @@ nmt_newt_form_iterate(NmtNewtForm *form)
|
|||
|
||||
if (es.reason == NEWT_EXIT_COMPONENT) {
|
||||
/* The user hit Return/Space on a component; update the form focus
|
||||
* to point that component, and activate it.
|
||||
*/
|
||||
* to point that component, and activate it.
|
||||
*/
|
||||
focus = nmt_newt_widget_find_component(priv->content, es.u.co);
|
||||
if (focus) {
|
||||
nmt_newt_form_set_focus(form, focus);
|
||||
|
|
@ -572,11 +572,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
/* signals */
|
||||
|
||||
/**
|
||||
* NmtNewtForm::quit:
|
||||
* @form: the #NmtNewtForm
|
||||
*
|
||||
* Emitted when the form quits.
|
||||
*/
|
||||
* NmtNewtForm::quit:
|
||||
* @form: the #NmtNewtForm
|
||||
*
|
||||
* Emitted when the form quits.
|
||||
*/
|
||||
signals[QUIT] = g_signal_new("quit",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
@ -588,11 +588,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
0);
|
||||
|
||||
/**
|
||||
* NmtNewtForm:title:
|
||||
*
|
||||
* The form's title. If non-%NULL, this will be displayed above
|
||||
* the form in its border.
|
||||
*/
|
||||
* NmtNewtForm:title:
|
||||
*
|
||||
* The form's title. If non-%NULL, this will be displayed above
|
||||
* the form in its border.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_TITLE,
|
||||
|
|
@ -602,11 +602,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:fullscreen:
|
||||
*
|
||||
* If %TRUE, the form will fill the entire "screen" (ie, terminal
|
||||
* window).
|
||||
*/
|
||||
* NmtNewtForm:fullscreen:
|
||||
*
|
||||
* If %TRUE, the form will fill the entire "screen" (ie, terminal
|
||||
* window).
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FULLSCREEN,
|
||||
|
|
@ -616,11 +616,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
FALSE,
|
||||
G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:fullscreen-vertical:
|
||||
*
|
||||
* If %TRUE, the form will fill the entire "screen" (ie, terminal
|
||||
* window) vertically, but not necessarily horizontally.
|
||||
*/
|
||||
* NmtNewtForm:fullscreen-vertical:
|
||||
*
|
||||
* If %TRUE, the form will fill the entire "screen" (ie, terminal
|
||||
* window) vertically, but not necessarily horizontally.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FULLSCREEN_VERTICAL,
|
||||
|
|
@ -630,11 +630,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
FALSE,
|
||||
G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:fullscreen-horizontal:
|
||||
*
|
||||
* If %TRUE, the form will fill the entire "screen" (ie, terminal
|
||||
* window) horizontally, but not necessarily vertically.
|
||||
*/
|
||||
* NmtNewtForm:fullscreen-horizontal:
|
||||
*
|
||||
* If %TRUE, the form will fill the entire "screen" (ie, terminal
|
||||
* window) horizontally, but not necessarily vertically.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FULLSCREEN_HORIZONTAL,
|
||||
|
|
@ -644,11 +644,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
FALSE,
|
||||
G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:x:
|
||||
*
|
||||
* The form's x coordinate. By default, the form will be centered
|
||||
* on the screen.
|
||||
*/
|
||||
* NmtNewtForm:x:
|
||||
*
|
||||
* The form's x coordinate. By default, the form will be centered
|
||||
* on the screen.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_X,
|
||||
|
|
@ -660,11 +660,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:y:
|
||||
*
|
||||
* The form's y coordinate. By default, the form will be centered
|
||||
* on the screen.
|
||||
*/
|
||||
* NmtNewtForm:y:
|
||||
*
|
||||
* The form's y coordinate. By default, the form will be centered
|
||||
* on the screen.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_Y,
|
||||
|
|
@ -676,11 +676,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:width:
|
||||
*
|
||||
* The form's width. By default, this will be determined by the
|
||||
* width of the form's content.
|
||||
*/
|
||||
* NmtNewtForm:width:
|
||||
*
|
||||
* The form's width. By default, this will be determined by the
|
||||
* width of the form's content.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_WIDTH,
|
||||
|
|
@ -692,11 +692,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:height:
|
||||
*
|
||||
* The form's height. By default, this will be determined by the
|
||||
* height of the form's content.
|
||||
*/
|
||||
* NmtNewtForm:height:
|
||||
*
|
||||
* The form's height. By default, this will be determined by the
|
||||
* height of the form's content.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_HEIGHT,
|
||||
|
|
@ -708,10 +708,10 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:padding:
|
||||
*
|
||||
* The padding between the form's content and its border.
|
||||
*/
|
||||
* NmtNewtForm:padding:
|
||||
*
|
||||
* The padding between the form's content and its border.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_PADDING,
|
||||
|
|
@ -723,11 +723,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class)
|
|||
1,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
|
||||
/**
|
||||
* NmtNewtForm:escape-exits:
|
||||
*
|
||||
* If %TRUE, then hitting the Escape key will cause the form to
|
||||
* exit.
|
||||
*/
|
||||
* NmtNewtForm:escape-exits:
|
||||
*
|
||||
* If %TRUE, then hitting the Escape key will cause the form to
|
||||
* exit.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ESCAPE_EXITS,
|
||||
|
|
|
|||
|
|
@ -265,19 +265,19 @@ nmt_newt_label_class_init(NmtNewtLabelClass *label_class)
|
|||
component_class->build_component = nmt_newt_label_build_component;
|
||||
|
||||
/**
|
||||
* NmtNewtLabel:text:
|
||||
*
|
||||
* The label's text
|
||||
*/
|
||||
* NmtNewtLabel:text:
|
||||
*
|
||||
* The label's text
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_TEXT,
|
||||
g_param_spec_string("text", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtLabel:style:
|
||||
*
|
||||
* The label's #NmtNewtLabelStyle
|
||||
*/
|
||||
* NmtNewtLabel:style:
|
||||
*
|
||||
* The label's #NmtNewtLabelStyle
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_STYLE,
|
||||
g_param_spec_int("style",
|
||||
|
|
@ -288,10 +288,10 @@ nmt_newt_label_class_init(NmtNewtLabelClass *label_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtLabel:highlight:
|
||||
*
|
||||
* Whether the label is highlighted.
|
||||
*/
|
||||
* NmtNewtLabel:highlight:
|
||||
*
|
||||
* Whether the label is highlighted.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_HIGHLIGHT,
|
||||
|
|
|
|||
|
|
@ -450,10 +450,10 @@ nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtNewtListbox:height:
|
||||
*
|
||||
* The listbox's height, or -1 if it has no fixed height.
|
||||
*/
|
||||
* NmtNewtListbox:height:
|
||||
*
|
||||
* The listbox's height, or -1 if it has no fixed height.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_HEIGHT,
|
||||
g_param_spec_int("height",
|
||||
|
|
@ -464,10 +464,10 @@ nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class)
|
|||
-1,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtListbox:flags:
|
||||
*
|
||||
* The listbox's #NmtNewtListboxFlags.
|
||||
*/
|
||||
* NmtNewtListbox:flags:
|
||||
*
|
||||
* The listbox's #NmtNewtListboxFlags.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FLAGS,
|
||||
|
|
@ -479,10 +479,10 @@ nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtListbox:active:
|
||||
*
|
||||
* The currently-selected row.
|
||||
*/
|
||||
* NmtNewtListbox:active:
|
||||
*
|
||||
* The currently-selected row.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_ACTIVE,
|
||||
g_param_spec_int("active",
|
||||
|
|
@ -493,20 +493,20 @@ nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtListbox:active-key:
|
||||
*
|
||||
* The key of the currently-selected row.
|
||||
*/
|
||||
* NmtNewtListbox:active-key:
|
||||
*
|
||||
* The key of the currently-selected row.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ACTIVE_KEY,
|
||||
g_param_spec_pointer("active-key", "", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtListbox:skip-null-keys:
|
||||
*
|
||||
* If %TRUE, rows with %NULL key values will be skipped over when
|
||||
* navigating the list with the arrow keys.
|
||||
*/
|
||||
* NmtNewtListbox:skip-null-keys:
|
||||
*
|
||||
* If %TRUE, rows with %NULL key values will be skipped over when
|
||||
* navigating the list with the arrow keys.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_SKIP_NULL_KEYS,
|
||||
|
|
|
|||
|
|
@ -140,14 +140,14 @@ nmt_newt_popup_activated(NmtNewtWidget *widget)
|
|||
&button_x,
|
||||
&button_y);
|
||||
/* (window_x + button_x) is the screen X coordinate of the newtComponent. A
|
||||
* newtButton labelled "Foo" is rendered as " <Foo>" (with a preceding
|
||||
* space), so the "F" is at (window_x + button_x + 2). We've added 1 column
|
||||
* of padding to the left of the listbox, so we need to position the popup
|
||||
* at (window_x + button_x + 1) in order for its text to be aligned with the
|
||||
* button's text. (The x and y coordinates given to NmtNewtForm are the
|
||||
* coordinates of the top left of the window content, ignoring the border
|
||||
* graphics.)
|
||||
*/
|
||||
* newtButton labelled "Foo" is rendered as " <Foo>" (with a preceding
|
||||
* space), so the "F" is at (window_x + button_x + 2). We've added 1 column
|
||||
* of padding to the left of the listbox, so we need to position the popup
|
||||
* at (window_x + button_x + 1) in order for its text to be aligned with the
|
||||
* button's text. (The x and y coordinates given to NmtNewtForm are the
|
||||
* coordinates of the top left of the window content, ignoring the border
|
||||
* graphics.)
|
||||
*/
|
||||
window_x += button_x + 1;
|
||||
window_y += button_y - priv->active;
|
||||
|
||||
|
|
@ -316,10 +316,10 @@ nmt_newt_popup_class_init(NmtNewtPopupClass *popup_class)
|
|||
component_class->build_component = nmt_newt_popup_build_component;
|
||||
|
||||
/**
|
||||
* NmtNewtPopup:active:
|
||||
*
|
||||
* The index of the currently-active entry.
|
||||
*/
|
||||
* NmtNewtPopup:active:
|
||||
*
|
||||
* The index of the currently-active entry.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_ACTIVE,
|
||||
g_param_spec_uint("active",
|
||||
|
|
@ -330,10 +330,10 @@ nmt_newt_popup_class_init(NmtNewtPopupClass *popup_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtPopup:active-id:
|
||||
*
|
||||
* The textual ID of the currently-active entry.
|
||||
*/
|
||||
* NmtNewtPopup:active-id:
|
||||
*
|
||||
* The textual ID of the currently-active entry.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ACTIVE_ID,
|
||||
|
|
|
|||
|
|
@ -262,10 +262,10 @@ adjust_border_for_allocation(NmtNewtSectionPrivate *priv, int height)
|
|||
int i;
|
||||
|
||||
/* We have to use a series of one-line labels rather than a multi-line
|
||||
* textbox, because newt will hide any component that's partially offscreen,
|
||||
* but we want the on-screen portion of the border to show even if part of
|
||||
* it is offscreen.
|
||||
*/
|
||||
* textbox, because newt will hide any component that's partially offscreen,
|
||||
* but we want the on-screen portion of the border to show even if part of
|
||||
* it is offscreen.
|
||||
*/
|
||||
|
||||
if (height == 1) {
|
||||
nmt_newt_widget_set_visible(priv->border_closed_label, TRUE);
|
||||
|
|
@ -379,10 +379,10 @@ nmt_newt_section_class_init(NmtNewtSectionClass *section_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtNewtSection:show-border:
|
||||
*
|
||||
* %TRUE if the section should show a border along the left side.
|
||||
*/
|
||||
* NmtNewtSection:show-border:
|
||||
*
|
||||
* %TRUE if the section should show a border along the left side.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_SHOW_BORDER,
|
||||
|
|
@ -393,11 +393,11 @@ nmt_newt_section_class_init(NmtNewtSectionClass *section_class)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* NmtNewtSection:open:
|
||||
*
|
||||
* %TRUE if the section is open (ie, its body is visible), %FALSE
|
||||
* if not.
|
||||
*/
|
||||
* NmtNewtSection:open:
|
||||
*
|
||||
* %TRUE if the section is open (ie, its body is visible), %FALSE
|
||||
* if not.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_OPEN,
|
||||
|
|
|
|||
|
|
@ -97,9 +97,9 @@ nmt_newt_stack_size_request(NmtNewtWidget *widget, int *width, int *height)
|
|||
}
|
||||
|
||||
/* We size-request all pages so that embedded NmtPageGrids will
|
||||
* participate in their size-grouping (so that switching pages
|
||||
* won't result in the column widths changing).
|
||||
*/
|
||||
* participate in their size-grouping (so that switching pages
|
||||
* won't result in the column widths changing).
|
||||
*/
|
||||
for (i = 0; i < priv->children->len; i++) {
|
||||
nmt_newt_widget_size_request(priv->children->pdata[i], &child_width, &child_height);
|
||||
if (i == priv->active) {
|
||||
|
|
@ -312,10 +312,10 @@ nmt_newt_stack_class_init(NmtNewtStackClass *stack_class)
|
|||
container_class->child_validity_changed = nmt_newt_stack_child_validity_changed;
|
||||
|
||||
/**
|
||||
* NmtNewtStack:active:
|
||||
*
|
||||
* The index of the active page
|
||||
*/
|
||||
* NmtNewtStack:active:
|
||||
*
|
||||
* The index of the active page
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_ACTIVE,
|
||||
g_param_spec_uint("active",
|
||||
|
|
@ -326,10 +326,10 @@ nmt_newt_stack_class_init(NmtNewtStackClass *stack_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtStack:active-id:
|
||||
*
|
||||
* The ID of the active page
|
||||
*/
|
||||
* NmtNewtStack:active-id:
|
||||
*
|
||||
* The ID of the active page
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ACTIVE_ID,
|
||||
|
|
|
|||
|
|
@ -237,19 +237,19 @@ nmt_newt_textbox_class_init(NmtNewtTextboxClass *textbox_class)
|
|||
component_class->build_component = nmt_newt_textbox_build_component;
|
||||
|
||||
/**
|
||||
* NmtNewtTextbox:text:
|
||||
*
|
||||
* The textbox's text
|
||||
*/
|
||||
* NmtNewtTextbox:text:
|
||||
*
|
||||
* The textbox's text
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_TEXT,
|
||||
g_param_spec_string("text", "", "", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtTextbox:flags:
|
||||
*
|
||||
* The textbox's flags
|
||||
*/
|
||||
* NmtNewtTextbox:flags:
|
||||
*
|
||||
* The textbox's flags
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FLAGS,
|
||||
|
|
@ -261,11 +261,11 @@ nmt_newt_textbox_class_init(NmtNewtTextboxClass *textbox_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtTextbox:wrap-width:
|
||||
*
|
||||
* The width in characters at which the textbox's text
|
||||
* will wrap, or 0 if it does not wrap.
|
||||
*/
|
||||
* NmtNewtTextbox:wrap-width:
|
||||
*
|
||||
* The width in characters at which the textbox's text
|
||||
* will wrap, or 0 if it does not wrap.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_WRAP_WIDTH,
|
||||
|
|
|
|||
|
|
@ -185,28 +185,28 @@ nmt_newt_toggle_button_class_init(NmtNewtToggleButtonClass *button_class)
|
|||
widget_class->activated = nmt_newt_toggle_button_activated;
|
||||
|
||||
/**
|
||||
* NmtNewtToggleButton:on-label:
|
||||
*
|
||||
* The label the button displays when it is "on".
|
||||
*/
|
||||
* NmtNewtToggleButton:on-label:
|
||||
*
|
||||
* The label the button displays when it is "on".
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ON_LABEL,
|
||||
g_param_spec_string("on-label", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtToggleButton:off-label:
|
||||
*
|
||||
* The label the button displays when it is "off".
|
||||
*/
|
||||
* NmtNewtToggleButton:off-label:
|
||||
*
|
||||
* The label the button displays when it is "off".
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_OFF_LABEL,
|
||||
g_param_spec_string("off-label", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtToggleButton:active:
|
||||
*
|
||||
* Whether the button is currently "on" (%TRUE) or "off" (%FALSE)
|
||||
*/
|
||||
* NmtNewtToggleButton:active:
|
||||
*
|
||||
* Whether the button is currently "on" (%TRUE) or "off" (%FALSE)
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ACTIVE,
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ nmt_newt_dialog_g_log_handler(const char * log_domain,
|
|||
message);
|
||||
|
||||
/* newtWinMessage() wraps the window too narrowly by default, so
|
||||
* we don't want to use that. But we intentionally avoid using any
|
||||
* NmtNewt classes, to avoid possible error recursion.
|
||||
*/
|
||||
* we don't want to use that. But we intentionally avoid using any
|
||||
* NmtNewt classes, to avoid possible error recursion.
|
||||
*/
|
||||
|
||||
newtGetScreenSize(&screen_width, &screen_height);
|
||||
text = newtTextboxReflowed(-1, -1, full_message, MAX(70, screen_width - 10), 0, 0, 0);
|
||||
|
|
|
|||
|
|
@ -557,13 +557,13 @@ nmt_newt_widget_class_init(NmtNewtWidgetClass *widget_class)
|
|||
/* signals */
|
||||
|
||||
/**
|
||||
* NmtNewtWidget::needs-rebuild:
|
||||
* @widget: the #NmtNewtWidget
|
||||
*
|
||||
* Emitted when nmt_newt_widget_need_rebuild() is called on @widget
|
||||
* or any of its children. This signal propagates up the container
|
||||
* hierarchy, eventually reaching the top-level #NmtNewtForm.
|
||||
*/
|
||||
* NmtNewtWidget::needs-rebuild:
|
||||
* @widget: the #NmtNewtWidget
|
||||
*
|
||||
* Emitted when nmt_newt_widget_need_rebuild() is called on @widget
|
||||
* or any of its children. This signal propagates up the container
|
||||
* hierarchy, eventually reaching the top-level #NmtNewtForm.
|
||||
*/
|
||||
signals[NEEDS_REBUILD] = g_signal_new("needs-rebuild",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
@ -575,11 +575,11 @@ nmt_newt_widget_class_init(NmtNewtWidgetClass *widget_class)
|
|||
0);
|
||||
|
||||
/**
|
||||
* NmtNewtWidget::activated:
|
||||
* @widget: the #NmtNewtWidget
|
||||
*
|
||||
* Emitted when the widget's #newtComponent is activated.
|
||||
*/
|
||||
* NmtNewtWidget::activated:
|
||||
* @widget: the #NmtNewtWidget
|
||||
*
|
||||
* Emitted when the widget's #newtComponent is activated.
|
||||
*/
|
||||
signals[ACTIVATED] = g_signal_new("activated",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
@ -593,10 +593,10 @@ nmt_newt_widget_class_init(NmtNewtWidgetClass *widget_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtNewtWidget:parent:
|
||||
*
|
||||
* The widget's parent widget, or %NULL if it has no parent.
|
||||
*/
|
||||
* NmtNewtWidget:parent:
|
||||
*
|
||||
* The widget's parent widget, or %NULL if it has no parent.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_PARENT,
|
||||
g_param_spec_object("parent",
|
||||
|
|
@ -605,32 +605,32 @@ nmt_newt_widget_class_init(NmtNewtWidgetClass *widget_class)
|
|||
NMT_TYPE_NEWT_WIDGET,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtWidget:visible:
|
||||
*
|
||||
* Whether the widget is visible. Invisible widgets do not get
|
||||
* realized or sized.
|
||||
*/
|
||||
* NmtNewtWidget:visible:
|
||||
*
|
||||
* Whether the widget is visible. Invisible widgets do not get
|
||||
* realized or sized.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_VISIBLE,
|
||||
g_param_spec_boolean("visible", "", "", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtWidget:valid:
|
||||
*
|
||||
* Whether the widget's content is considered valid. Components
|
||||
* determine their own validity. A container, by default, is
|
||||
* considered valid if all of its children are valid.
|
||||
*/
|
||||
* NmtNewtWidget:valid:
|
||||
*
|
||||
* Whether the widget's content is considered valid. Components
|
||||
* determine their own validity. A container, by default, is
|
||||
* considered valid if all of its children are valid.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_VALID,
|
||||
g_param_spec_boolean("valid", "", "", TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtNewtWidget:exit-on-activate:
|
||||
*
|
||||
* If %TRUE, the widget will call nmt_newt_form_quit() on its form
|
||||
* when it is activated.
|
||||
*/
|
||||
* NmtNewtWidget:exit-on-activate:
|
||||
*
|
||||
* If %TRUE, the widget will call nmt_newt_form_quit() on its form
|
||||
* when it is activated.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_EXIT_ON_ACTIVATE,
|
||||
|
|
|
|||
|
|
@ -1069,8 +1069,8 @@ vlan_settings_changed(GObject *object, GParamSpec *pspec, gpointer user_data)
|
|||
return;
|
||||
|
||||
/* If the id in INTERFACE_NAME changed, and ID is either unset, or was previously
|
||||
* in sync with INTERFACE_NAME, then update ID.
|
||||
*/
|
||||
* in sync with INTERFACE_NAME, then update ID.
|
||||
*/
|
||||
if (id != ifname_id && (id == binding->last_ifname_id || id == 0)) {
|
||||
binding->updating = TRUE;
|
||||
g_object_set(G_OBJECT(binding->s_vlan), NM_SETTING_VLAN_ID, ifname_id, NULL);
|
||||
|
|
@ -1078,8 +1078,8 @@ vlan_settings_changed(GObject *object, GParamSpec *pspec, gpointer user_data)
|
|||
}
|
||||
|
||||
/* If the PARENT in INTERFACE_NAME changed, and PARENT is either unset, or was
|
||||
* previously in sync with INTERFACE_NAME, then update PARENT.
|
||||
*/
|
||||
* previously in sync with INTERFACE_NAME, then update PARENT.
|
||||
*/
|
||||
if (g_strcmp0(parent, ifname_parent) != 0
|
||||
&& (g_strcmp0(parent, binding->last_ifname_parent) == 0 || !parent || !*parent)) {
|
||||
binding->updating = TRUE;
|
||||
|
|
|
|||
|
|
@ -237,10 +237,10 @@ nmt_address_list_class_init(NmtAddressListClass *list_class)
|
|||
widget_list_class->remove_clicked = nmt_address_list_remove_clicked;
|
||||
|
||||
/**
|
||||
* NmtAddressList:list-type:
|
||||
*
|
||||
* The type of address the list holds.
|
||||
*/
|
||||
* NmtAddressList:list-type:
|
||||
*
|
||||
* The type of address the list holds.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_LIST_TYPE,
|
||||
|
|
@ -252,10 +252,10 @@ nmt_address_list_class_init(NmtAddressListClass *list_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtAddressList:strings:
|
||||
*
|
||||
* The strings in the list's entries.
|
||||
*/
|
||||
* NmtAddressList:strings:
|
||||
*
|
||||
* The strings in the list's entries.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_STRINGS,
|
||||
g_param_spec_boxed("strings",
|
||||
|
|
|
|||
|
|
@ -157,8 +157,8 @@ sort_connections(gconstpointer a, gconstpointer b)
|
|||
}
|
||||
|
||||
/* If one is an NMConnection and the other is an NMAccessPoint, the
|
||||
* connection comes first.
|
||||
*/
|
||||
* connection comes first.
|
||||
*/
|
||||
if (nmta->conn)
|
||||
return -1;
|
||||
else if (nmtb->conn)
|
||||
|
|
|
|||
|
|
@ -491,10 +491,10 @@ nmt_device_entry_class_init(NmtDeviceEntryClass *deventry_class)
|
|||
object_class->finalize = nmt_device_entry_finalize;
|
||||
|
||||
/**
|
||||
* NmtDeviceEntry:label:
|
||||
*
|
||||
* The entry's label
|
||||
*/
|
||||
* NmtDeviceEntry:label:
|
||||
*
|
||||
* The entry's label
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_LABEL,
|
||||
|
|
@ -504,21 +504,21 @@ nmt_device_entry_class_init(NmtDeviceEntryClass *deventry_class)
|
|||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtDeviceEntry:width:
|
||||
*
|
||||
* The entry's width in characters
|
||||
*/
|
||||
* NmtDeviceEntry:width:
|
||||
*
|
||||
* The entry's width in characters
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_WIDTH,
|
||||
g_param_spec_int("width", "", "", -1, 80, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtDeviceEntry:hardware-type:
|
||||
*
|
||||
* The type of #NMDevice to limit the entry to, or %G_TYPE_NONE
|
||||
* if the entry is for a virtual device and should not accept
|
||||
* hardware addresses.
|
||||
*/
|
||||
* NmtDeviceEntry:hardware-type:
|
||||
*
|
||||
* The type of #NMDevice to limit the entry to, or %G_TYPE_NONE
|
||||
* if the entry is for a virtual device and should not accept
|
||||
* hardware addresses.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_HARDWARE_TYPE,
|
||||
g_param_spec_gtype("hardware-type",
|
||||
|
|
@ -527,10 +527,10 @@ nmt_device_entry_class_init(NmtDeviceEntryClass *deventry_class)
|
|||
G_TYPE_NONE,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtDeviceEntry:interface-name:
|
||||
*
|
||||
* The interface name of the device identified by the entry.
|
||||
*/
|
||||
* NmtDeviceEntry:interface-name:
|
||||
*
|
||||
* The interface name of the device identified by the entry.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_INTERFACE_NAME,
|
||||
|
|
@ -540,10 +540,10 @@ nmt_device_entry_class_init(NmtDeviceEntryClass *deventry_class)
|
|||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtDeviceEntry:mac-address:
|
||||
*
|
||||
* The hardware address of the device identified by the entry.
|
||||
*/
|
||||
* NmtDeviceEntry:mac-address:
|
||||
*
|
||||
* The hardware address of the device identified by the entry.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_MAC_ADDRESS,
|
||||
|
|
|
|||
|
|
@ -428,11 +428,11 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
/* signals */
|
||||
|
||||
/**
|
||||
* NmtEditConnectionList::add-connection:
|
||||
* @list: the #NmtEditConnectionList
|
||||
*
|
||||
* Emitted when the user clicks the list's "Add" button.
|
||||
*/
|
||||
* NmtEditConnectionList::add-connection:
|
||||
* @list: the #NmtEditConnectionList
|
||||
*
|
||||
* Emitted when the user clicks the list's "Add" button.
|
||||
*/
|
||||
signals[ADD_CONNECTION] =
|
||||
g_signal_new("add-connection",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
|
|
@ -445,13 +445,13 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
0);
|
||||
|
||||
/**
|
||||
* NmtEditConnectionList::edit-connection:
|
||||
* @list: the #NmtEditConnectionList
|
||||
* @connection: the connection to edit
|
||||
*
|
||||
* Emitted when the user clicks the list's "Edit" button, or
|
||||
* hits "Return" on the listbox.
|
||||
*/
|
||||
* NmtEditConnectionList::edit-connection:
|
||||
* @list: the #NmtEditConnectionList
|
||||
* @connection: the connection to edit
|
||||
*
|
||||
* Emitted when the user clicks the list's "Edit" button, or
|
||||
* hits "Return" on the listbox.
|
||||
*/
|
||||
signals[EDIT_CONNECTION] =
|
||||
g_signal_new("edit-connection",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
|
|
@ -465,12 +465,12 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
NM_TYPE_CONNECTION);
|
||||
|
||||
/**
|
||||
* NmtEditConnectionList::remove-connection:
|
||||
* @list: the #NmtEditConnectionList
|
||||
* @connection: the connection to remove
|
||||
*
|
||||
* Emitted when the user clicks the list's "Delete" button.
|
||||
*/
|
||||
* NmtEditConnectionList::remove-connection:
|
||||
* @list: the #NmtEditConnectionList
|
||||
* @connection: the connection to remove
|
||||
*
|
||||
* Emitted when the user clicks the list's "Delete" button.
|
||||
*/
|
||||
signals[REMOVE_CONNECTION] =
|
||||
g_signal_new("remove-connection",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
|
|
@ -486,12 +486,12 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtEditConnectionList:grouped:
|
||||
*
|
||||
* If %TRUE, connections should be grouped by type, with headers
|
||||
* indicating the types (as in the main connection list). If %FALSE,
|
||||
* they will not be grouped (as in slave connection lists).
|
||||
*/
|
||||
* NmtEditConnectionList:grouped:
|
||||
*
|
||||
* If %TRUE, connections should be grouped by type, with headers
|
||||
* indicating the types (as in the main connection list). If %FALSE,
|
||||
* they will not be grouped (as in slave connection lists).
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_GROUPED,
|
||||
|
|
@ -502,21 +502,21 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* NmtEditConnectionListFilter:
|
||||
* @list: the #NmtEditConnectionList
|
||||
* @connection: an #NMConnection
|
||||
* @user_data: the user data
|
||||
*
|
||||
* Decides whether @connection should be displayed in @list.
|
||||
*
|
||||
* Returns: %TRUE or %FALSE
|
||||
*/
|
||||
* NmtEditConnectionListFilter:
|
||||
* @list: the #NmtEditConnectionList
|
||||
* @connection: an #NMConnection
|
||||
* @user_data: the user data
|
||||
*
|
||||
* Decides whether @connection should be displayed in @list.
|
||||
*
|
||||
* Returns: %TRUE or %FALSE
|
||||
*/
|
||||
/**
|
||||
* NmtEditConnectionList:connection-filter:
|
||||
*
|
||||
* A callback function for filtering which connections appear in
|
||||
* the list.
|
||||
*/
|
||||
* NmtEditConnectionList:connection-filter:
|
||||
*
|
||||
* A callback function for filtering which connections appear in
|
||||
* the list.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_CONNECTION_FILTER,
|
||||
|
|
@ -525,10 +525,10 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
"",
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtEditConnectionList:connection-filter-data:
|
||||
*
|
||||
* Data for the #NmtEditConnectionList:connection-filter.
|
||||
*/
|
||||
* NmtEditConnectionList:connection-filter-data:
|
||||
*
|
||||
* Data for the #NmtEditConnectionList:connection-filter.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_CONNECTION_FILTER_DATA,
|
||||
|
|
@ -538,11 +538,11 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* NmtEditConnectionList:extra-widget:
|
||||
*
|
||||
* An extra button widget to display at the bottom of the button
|
||||
* box.
|
||||
*/
|
||||
* NmtEditConnectionList:extra-widget:
|
||||
*
|
||||
* An extra button widget to display at the bottom of the button
|
||||
* box.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_EXTRA_WIDGET,
|
||||
|
|
@ -553,12 +553,12 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* NmtEditConnectionList:connections:
|
||||
*
|
||||
* The list of connections in the widget.
|
||||
*
|
||||
* Element-Type: #NMConnection
|
||||
*/
|
||||
* NmtEditConnectionList:connections:
|
||||
*
|
||||
* The list of connections in the widget.
|
||||
*
|
||||
* Element-Type: #NMConnection
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_CONNECTIONS,
|
||||
g_param_spec_boxed("connections",
|
||||
|
|
@ -568,10 +568,10 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class)
|
|||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* NmtEditConnectionList:num-connections:
|
||||
*
|
||||
* The number of connections in the widget.
|
||||
*/
|
||||
* NmtEditConnectionList:num-connections:
|
||||
*
|
||||
* The number of connections in the widget.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_NUM_CONNECTIONS,
|
||||
g_param_spec_int("num-connections",
|
||||
|
|
|
|||
|
|
@ -160,10 +160,10 @@ nmt_editor_page_class_init(NmtEditorPageClass *page_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtEditorPage:connection:
|
||||
*
|
||||
* The page's #NMConnection.
|
||||
*/
|
||||
* NmtEditorPage:connection:
|
||||
*
|
||||
* The page's #NMConnection.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_CONNECTION,
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ rebuild_header(NmtEditorSection *section)
|
|||
NmtEditorSectionPrivate *priv = NMT_EDITOR_SECTION_GET_PRIVATE(section);
|
||||
|
||||
/* Removing any widget in an NmtEditorGrid removes its whole row, so we can
|
||||
* remove the existing title/widget/toggle by asking to remove toggle.
|
||||
*/
|
||||
* remove the existing title/widget/toggle by asking to remove toggle.
|
||||
*/
|
||||
nmt_newt_container_remove(NMT_NEWT_CONTAINER(priv->header), priv->toggle);
|
||||
|
||||
nmt_editor_grid_append(priv->header, priv->title, priv->header_widget, priv->toggle);
|
||||
|
|
@ -222,10 +222,10 @@ nmt_editor_section_class_init(NmtEditorSectionClass *section_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtEditorSection:title:
|
||||
*
|
||||
* The section's title.
|
||||
*/
|
||||
* NmtEditorSection:title:
|
||||
*
|
||||
* The section's title.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_TITLE,
|
||||
|
|
@ -236,10 +236,10 @@ nmt_editor_section_class_init(NmtEditorSectionClass *section_class)
|
|||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* NmtEditorSection:show-by-default:
|
||||
*
|
||||
* Whether the section should be expanded by default.
|
||||
*/
|
||||
* NmtEditorSection:show-by-default:
|
||||
*
|
||||
* Whether the section should be expanded by default.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_SHOW_BY_DEFAULT,
|
||||
|
|
@ -250,11 +250,11 @@ nmt_editor_section_class_init(NmtEditorSectionClass *section_class)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* NmtEditorSection:header-widget:
|
||||
*
|
||||
* The widget (if any) that appears between the section title and its toggle
|
||||
* button.
|
||||
*/
|
||||
* NmtEditorSection:header-widget:
|
||||
*
|
||||
* The widget (if any) that appears between the section title and its toggle
|
||||
* button.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_HEADER_WIDGET,
|
||||
|
|
|
|||
|
|
@ -166,8 +166,8 @@ save_connection_and_exit(NmtNewtButton *button, gpointer user_data)
|
|||
}
|
||||
|
||||
/* Clear secrets so they don't lay around in memory; they'll get
|
||||
* requested again anyway next time the connection is edited.
|
||||
*/
|
||||
* requested again anyway next time the connection is edited.
|
||||
*/
|
||||
nm_connection_clear_secrets(priv->orig_connection);
|
||||
} else {
|
||||
nm_client_add_connection_async(nm_client,
|
||||
|
|
@ -334,8 +334,8 @@ nmt_editor_constructed(GObject *object)
|
|||
hardware_type = priv->type_data->device_type;
|
||||
|
||||
/* For connections involving multiple network devices, clarify which one
|
||||
* NMSettingConnection:interface-name refers to.
|
||||
*/
|
||||
* NMSettingConnection:interface-name refers to.
|
||||
*/
|
||||
if (nm_connection_is_type(priv->edit_connection, NM_SETTING_PPPOE_SETTING_NAME))
|
||||
deventry_label = _("Ethernet device");
|
||||
else
|
||||
|
|
@ -507,10 +507,10 @@ nmt_editor_class_init(NmtEditorClass *entry_class)
|
|||
object_class->finalize = nmt_editor_finalize;
|
||||
|
||||
/**
|
||||
* NmtEditor:connection:
|
||||
*
|
||||
* The connection being edited.
|
||||
*/
|
||||
* NmtEditor:connection:
|
||||
*
|
||||
* The connection being edited.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_CONNECTION,
|
||||
|
|
@ -520,10 +520,10 @@ nmt_editor_class_init(NmtEditorClass *entry_class)
|
|||
NM_TYPE_CONNECTION,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtEditor:type-data:
|
||||
*
|
||||
* The #NmEditorConnectionTypeData for #NmtEditor:connection.
|
||||
*/
|
||||
* NmtEditor:type-data:
|
||||
*
|
||||
* The #NmEditorConnectionTypeData for #NmtEditor:connection.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_TYPE_DATA,
|
||||
|
|
|
|||
|
|
@ -175,10 +175,10 @@ nmt_ip_entry_class_init(NmtIPEntryClass *entry_class)
|
|||
object_class->get_property = nmt_ip_entry_get_property;
|
||||
|
||||
/**
|
||||
* NmtIPEntry:family:
|
||||
*
|
||||
* The address family. Eg, %AF_INET
|
||||
*/
|
||||
* NmtIPEntry:family:
|
||||
*
|
||||
* The address family. Eg, %AF_INET
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FAMILY,
|
||||
|
|
@ -190,11 +190,11 @@ nmt_ip_entry_class_init(NmtIPEntryClass *entry_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtIPEntry:prefix:
|
||||
*
|
||||
* If %TRUE, the entry accepts address/prefix combinations. If
|
||||
* %FALSE it accepts just addresses.
|
||||
*/
|
||||
* NmtIPEntry:prefix:
|
||||
*
|
||||
* If %TRUE, the entry accepts address/prefix combinations. If
|
||||
* %FALSE it accepts just addresses.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_PREFIX,
|
||||
|
|
@ -204,12 +204,12 @@ nmt_ip_entry_class_init(NmtIPEntryClass *entry_class)
|
|||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtIPEntry:optional:
|
||||
*
|
||||
* If %TRUE, the entry will be #NmtNewtWidget:valid when it is
|
||||
* empty. If %FALSE, it will only be valid when it contains a
|
||||
* valid address or address/prefix.
|
||||
*/
|
||||
* NmtIPEntry:optional:
|
||||
*
|
||||
* If %TRUE, the entry will be #NmtNewtWidget:valid when it is
|
||||
* empty. If %FALSE, it will only be valid when it contains a
|
||||
* valid address or address/prefix.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_OPTIONAL,
|
||||
|
|
|
|||
|
|
@ -110,8 +110,8 @@ mac_validator(NmtNewtEntry *entry, const char *text, gpointer user_data)
|
|||
g_free(fixed);
|
||||
|
||||
/* FIXME: NmtNewtEntry doesn't correctly deal with us calling set_text()
|
||||
* from inside the validator.
|
||||
*/
|
||||
* from inside the validator.
|
||||
*/
|
||||
nmt_newt_widget_needs_rebuild(NMT_NEWT_WIDGET(entry));
|
||||
}
|
||||
|
||||
|
|
@ -193,11 +193,11 @@ nmt_mac_entry_class_init(NmtMacEntryClass *entry_class)
|
|||
object_class->get_property = nmt_mac_entry_get_property;
|
||||
|
||||
/**
|
||||
* NmtMacEntry:mac-length:
|
||||
*
|
||||
* The length in bytes of the hardware address type the entry
|
||||
* accepts: either %ETH_ALEN or %INFINIBAND_ALEN.
|
||||
*/
|
||||
* NmtMacEntry:mac-length:
|
||||
*
|
||||
* The length in bytes of the hardware address type the entry
|
||||
* accepts: either %ETH_ALEN or %INFINIBAND_ALEN.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_MAC_LENGTH,
|
||||
g_param_spec_int("mac-length",
|
||||
|
|
@ -208,11 +208,11 @@ nmt_mac_entry_class_init(NmtMacEntryClass *entry_class)
|
|||
ETH_ALEN,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtMacEntry:mac-address:
|
||||
*
|
||||
* The MAC address, as a string (as with the various #NMSetting
|
||||
* "mac-address" properties).
|
||||
*/
|
||||
* NmtMacEntry:mac-address:
|
||||
*
|
||||
* The MAC address, as a string (as with the various #NMSetting
|
||||
* "mac-address" properties).
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_MAC_ADDRESS,
|
||||
|
|
@ -222,11 +222,11 @@ nmt_mac_entry_class_init(NmtMacEntryClass *entry_class)
|
|||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtMacEntry:entry-type:
|
||||
*
|
||||
* The type of the #NmtMacEntry. Can be either used for plain
|
||||
* MAC addresses or for the extended format for cloned MAC addresses.
|
||||
*/
|
||||
* NmtMacEntry:entry-type:
|
||||
*
|
||||
* The type of the #NmtMacEntry. Can be either used for plain
|
||||
* MAC addresses or for the extended format for cloned MAC addresses.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ENTRY_TYPE,
|
||||
|
|
|
|||
|
|
@ -160,10 +160,10 @@ nmt_mtu_entry_class_init(NmtMtuEntryClass *entry_class)
|
|||
object_class->get_property = nmt_mtu_entry_get_property;
|
||||
|
||||
/**
|
||||
* NmtMtuEntry:mtu:
|
||||
*
|
||||
* The contents of the entry, as a number.
|
||||
*/
|
||||
* NmtMtuEntry:mtu:
|
||||
*
|
||||
* The contents of the entry, as a number.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_MTU,
|
||||
g_param_spec_int("mtu",
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ typedef struct {
|
|||
NmtSlaveList *slaves;
|
||||
|
||||
/* Note: when adding new options to the UI also ensure they are
|
||||
* initialized in bond_connection_setup_func()
|
||||
*/
|
||||
* initialized in bond_connection_setup_func()
|
||||
*/
|
||||
NmtNewtPopup * mode;
|
||||
NmtNewtEntry * primary;
|
||||
NmtNewtPopup * monitoring;
|
||||
|
|
|
|||
|
|
@ -172,9 +172,9 @@ nmt_page_wifi_constructed(GObject *object)
|
|||
s_wsec = nm_connection_get_setting_wireless_security(conn);
|
||||
if (!s_wsec) {
|
||||
/* It makes things simpler if we always have a
|
||||
* NMSettingWirelessSecurity; we'll hold a ref on one, and add
|
||||
* it to and remove it from the connection as needed.
|
||||
*/
|
||||
* NMSettingWirelessSecurity; we'll hold a ref on one, and add
|
||||
* it to and remove it from the connection as needed.
|
||||
*/
|
||||
s_wsec = NM_SETTING_WIRELESS_SECURITY(nm_setting_wireless_security_new());
|
||||
}
|
||||
priv->s_wsec = g_object_ref_sink(s_wsec);
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ maybe_save_input_and_exit(NmtNewtWidget *widget, gpointer dialog)
|
|||
int i;
|
||||
|
||||
/* This gets invoked when the user types Return in the final entry,
|
||||
* but the form may not be fully valid in that case.
|
||||
*/
|
||||
* but the form may not be fully valid in that case.
|
||||
*/
|
||||
if (!nmt_newt_widget_get_valid(priv->secret_grid))
|
||||
return;
|
||||
|
||||
|
|
@ -245,10 +245,10 @@ nmt_password_dialog_class_init(NmtPasswordDialogClass *dialog_class)
|
|||
object_class->finalize = nmt_password_dialog_finalize;
|
||||
|
||||
/**
|
||||
* NmtPasswordDialog:request-id:
|
||||
*
|
||||
* The request ID from the #NMSecretAgentSimple
|
||||
*/
|
||||
* NmtPasswordDialog:request-id:
|
||||
*
|
||||
* The request ID from the #NMSecretAgentSimple
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_REQUEST_ID,
|
||||
|
|
@ -258,10 +258,10 @@ nmt_password_dialog_class_init(NmtPasswordDialogClass *dialog_class)
|
|||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtPasswordDialog:prompt:
|
||||
*
|
||||
* The prompt text.
|
||||
*/
|
||||
* NmtPasswordDialog:prompt:
|
||||
*
|
||||
* The prompt text.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_PROMPT,
|
||||
|
|
@ -271,12 +271,12 @@ nmt_password_dialog_class_init(NmtPasswordDialogClass *dialog_class)
|
|||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtPasswordDialog:secrets:
|
||||
*
|
||||
* The array of request secrets
|
||||
*
|
||||
* Element-Type: #NMSecretAgentSimpleSecret.
|
||||
*/
|
||||
* NmtPasswordDialog:secrets:
|
||||
*
|
||||
* The array of request secrets
|
||||
*
|
||||
* Element-Type: #NMSecretAgentSimpleSecret.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_SECRETS,
|
||||
|
|
|
|||
|
|
@ -246,19 +246,19 @@ nmt_password_fields_class_init(NmtPasswordFieldsClass *entry_class)
|
|||
object_class->finalize = nmt_password_fields_finalize;
|
||||
|
||||
/**
|
||||
* NmtPasswordFields:width:
|
||||
*
|
||||
* The width in characters of the password entry
|
||||
*/
|
||||
* NmtPasswordFields:width:
|
||||
*
|
||||
* The width in characters of the password entry
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_WIDTH,
|
||||
g_param_spec_int("width", "", "", -1, 80, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtPasswordFields:extras:
|
||||
*
|
||||
* The extra widgets to show
|
||||
*/
|
||||
* NmtPasswordFields:extras:
|
||||
*
|
||||
* The extra widgets to show
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_EXTRAS,
|
||||
|
|
@ -270,19 +270,19 @@ nmt_password_fields_class_init(NmtPasswordFieldsClass *entry_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtPasswordFields:password:
|
||||
*
|
||||
* The entered password.
|
||||
*/
|
||||
* NmtPasswordFields:password:
|
||||
*
|
||||
* The entered password.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_PASSWORD,
|
||||
g_param_spec_string("password", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtPasswordFields:always-ask:
|
||||
*
|
||||
* The current state of the "Always ask" checkbox.
|
||||
*/
|
||||
* NmtPasswordFields:always-ask:
|
||||
*
|
||||
* The current state of the "Always ask" checkbox.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_ALWAYS_ASK,
|
||||
|
|
@ -292,10 +292,10 @@ nmt_password_fields_class_init(NmtPasswordFieldsClass *entry_class)
|
|||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtPasswordFields:show-password:
|
||||
*
|
||||
* The current state of the "Show password" checkbox.
|
||||
*/
|
||||
* NmtPasswordFields:show-password:
|
||||
*
|
||||
* The current state of the "Show password" checkbox.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_SHOW_PASSWORD,
|
||||
|
|
|
|||
|
|
@ -170,11 +170,11 @@ nmt_route_editor_class_init(NmtRouteEditorClass *entry_class)
|
|||
object_class->finalize = nmt_route_editor_finalize;
|
||||
|
||||
/**
|
||||
* NmtRouteEditor:setting:
|
||||
*
|
||||
* The #NMSettingIP4Config or #NMSettingIP6Config whose routes are
|
||||
* being edited.
|
||||
*/
|
||||
* NmtRouteEditor:setting:
|
||||
*
|
||||
* The #NMSettingIP4Config or #NMSettingIP6Config whose routes are
|
||||
* being edited.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_SETTING,
|
||||
|
|
|
|||
|
|
@ -227,10 +227,10 @@ nmt_route_entry_class_init(NmtRouteEntryClass *entry_class)
|
|||
widget_class->get_focus_component = nmt_route_entry_get_focus_component;
|
||||
|
||||
/**
|
||||
* NmtRouteEntry:family:
|
||||
*
|
||||
* The address family of the route, eg, %AF_INET
|
||||
*/
|
||||
* NmtRouteEntry:family:
|
||||
*
|
||||
* The address family of the route, eg, %AF_INET
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FAMILY,
|
||||
|
|
@ -242,10 +242,10 @@ nmt_route_entry_class_init(NmtRouteEntryClass *entry_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtRouteEntry:ip-entry-width:
|
||||
*
|
||||
* The width in characters of the IP address entries
|
||||
*/
|
||||
* NmtRouteEntry:ip-entry-width:
|
||||
*
|
||||
* The width in characters of the IP address entries
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_IP_ENTRY_WIDTH,
|
||||
|
|
@ -257,10 +257,10 @@ nmt_route_entry_class_init(NmtRouteEntryClass *entry_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtRouteEntry:metric-entry-width:
|
||||
*
|
||||
* The width in characters of the metric entry
|
||||
*/
|
||||
* NmtRouteEntry:metric-entry-width:
|
||||
*
|
||||
* The width in characters of the metric entry
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_METRIC_ENTRY_WIDTH,
|
||||
|
|
@ -272,10 +272,10 @@ nmt_route_entry_class_init(NmtRouteEntryClass *entry_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtRouteEntry:route:
|
||||
*
|
||||
* The contents of the entries, as an #NMIPRoute.
|
||||
*/
|
||||
* NmtRouteEntry:route:
|
||||
*
|
||||
* The contents of the entries, as an #NMIPRoute.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_ROUTE,
|
||||
g_param_spec_boxed("route",
|
||||
|
|
|
|||
|
|
@ -272,10 +272,10 @@ nmt_route_table_class_init(NmtRouteTableClass *table_class)
|
|||
object_class->finalize = nmt_route_table_finalize;
|
||||
|
||||
/**
|
||||
* NmtRouteTable:family:
|
||||
*
|
||||
* The network address family of the routes, eg %AF_INET
|
||||
*/
|
||||
* NmtRouteTable:family:
|
||||
*
|
||||
* The network address family of the routes, eg %AF_INET
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_FAMILY,
|
||||
|
|
@ -287,13 +287,13 @@ nmt_route_table_class_init(NmtRouteTableClass *table_class)
|
|||
-1,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtRouteTable:routes:
|
||||
*
|
||||
* The array of routes, suitable for binding to #NMSettingIP4Config:routes
|
||||
* or #NMSettingIP6Config:routes.
|
||||
*
|
||||
* Element-type: NMIPRoute
|
||||
*/
|
||||
* NmtRouteTable:routes:
|
||||
*
|
||||
* The array of routes, suitable for binding to #NMSettingIP4Config:routes
|
||||
* or #NMSettingIP6Config:routes.
|
||||
*
|
||||
* Element-type: NMIPRoute
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_ROUTES,
|
||||
g_param_spec_boxed("routes",
|
||||
|
|
|
|||
|
|
@ -208,10 +208,10 @@ nmt_slave_list_class_init(NmtSlaveListClass *list_class)
|
|||
connection_list_class->remove_connection = nmt_slave_list_remove_connection;
|
||||
|
||||
/**
|
||||
* NmtSlaveList:master:
|
||||
*
|
||||
* The master #NMConnection whose slaves are being displayed.
|
||||
*/
|
||||
* NmtSlaveList:master:
|
||||
*
|
||||
* The master #NMConnection whose slaves are being displayed.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_MASTER,
|
||||
|
|
@ -221,16 +221,16 @@ nmt_slave_list_class_init(NmtSlaveListClass *list_class)
|
|||
NM_TYPE_CONNECTION,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtSlaveList:type-filter:
|
||||
*
|
||||
* If non-%NULL, this will be used to limit the connection types
|
||||
* that are available when the user clicks on the "Add" button to
|
||||
* add a new slave. If the filter filters the list down to only a
|
||||
* single connection type, then the user will not be presented
|
||||
* with a connection-type dialog, and will instead be immediately
|
||||
* taken to an editor window for the new slave after clicking
|
||||
* "Add".
|
||||
*/
|
||||
* NmtSlaveList:type-filter:
|
||||
*
|
||||
* If non-%NULL, this will be used to limit the connection types
|
||||
* that are available when the user clicks on the "Add" button to
|
||||
* add a new slave. If the filter filters the list down to only a
|
||||
* single connection type, then the user will not be presented
|
||||
* with a connection-type dialog, and will instead be immediately
|
||||
* taken to an editor window for the new slave after clicking
|
||||
* "Add".
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_TYPE_FILTER,
|
||||
|
|
@ -239,10 +239,10 @@ nmt_slave_list_class_init(NmtSlaveListClass *list_class)
|
|||
"",
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtSlaveList:type-filter-data:
|
||||
*
|
||||
* User data passed to #NmtSlaveList:type-filter
|
||||
*/
|
||||
* NmtSlaveList:type-filter-data:
|
||||
*
|
||||
* User data passed to #NmtSlaveList:type-filter
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_TYPE_FILTER_DATA,
|
||||
|
|
|
|||
|
|
@ -381,16 +381,16 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class)
|
|||
/* signals */
|
||||
|
||||
/**
|
||||
* NmtNewtWidget::add-clicked:
|
||||
* @list: the #NmtNewtWidgetList
|
||||
*
|
||||
* Emitted when the user clicks the "Add" button. The caller can
|
||||
* decide whether or not to add a new widget, and call
|
||||
* nmt_widget_list_set_length() with the new length if so.
|
||||
*
|
||||
* FIXME: the "Add" button should be insensitive if it's
|
||||
* not going to work.
|
||||
*/
|
||||
* NmtNewtWidget::add-clicked:
|
||||
* @list: the #NmtNewtWidgetList
|
||||
*
|
||||
* Emitted when the user clicks the "Add" button. The caller can
|
||||
* decide whether or not to add a new widget, and call
|
||||
* nmt_widget_list_set_length() with the new length if so.
|
||||
*
|
||||
* FIXME: the "Add" button should be insensitive if it's
|
||||
* not going to work.
|
||||
*/
|
||||
signals[ADD_CLICKED] = g_signal_new("add-clicked",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
@ -401,17 +401,17 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class)
|
|||
G_TYPE_NONE,
|
||||
0);
|
||||
/**
|
||||
* NmtNewtWidget::remove-clicked:
|
||||
* @list: the #NmtNewtWidgetList
|
||||
* @n: the widget being removed
|
||||
*
|
||||
* Emitted when the user clicks one of the "Remove" buttons. The
|
||||
* caller can decide whether or not to remove the widget, and
|
||||
* call nmt_widget_list_set_length() with the new length if so.
|
||||
*
|
||||
* FIXME: the "Remove" button should be insensitive if it's not
|
||||
* going to work.
|
||||
*/
|
||||
* NmtNewtWidget::remove-clicked:
|
||||
* @list: the #NmtNewtWidgetList
|
||||
* @n: the widget being removed
|
||||
*
|
||||
* Emitted when the user clicks one of the "Remove" buttons. The
|
||||
* caller can decide whether or not to remove the widget, and
|
||||
* call nmt_widget_list_set_length() with the new length if so.
|
||||
*
|
||||
* FIXME: the "Remove" button should be insensitive if it's not
|
||||
* going to work.
|
||||
*/
|
||||
signals[REMOVE_CLICKED] = g_signal_new("remove-clicked",
|
||||
G_OBJECT_CLASS_TYPE(object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
@ -426,10 +426,10 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class)
|
|||
/* properties */
|
||||
|
||||
/**
|
||||
* NmtWidgetList:create-callback:
|
||||
*
|
||||
* Callback called to create a new widget.
|
||||
*/
|
||||
* NmtWidgetList:create-callback:
|
||||
*
|
||||
* Callback called to create a new widget.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_CREATE_CALLBACK,
|
||||
|
|
@ -438,29 +438,29 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class)
|
|||
"",
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtWidgetList:user-data:
|
||||
*
|
||||
* User data for #NmtWidgetList:create-callback
|
||||
*/
|
||||
* NmtWidgetList:user-data:
|
||||
*
|
||||
* User data for #NmtWidgetList:create-callback
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_USER_DATA,
|
||||
g_param_spec_pointer("user-data", "", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtWidgetList:destroy-notify:
|
||||
*
|
||||
* #GDestroyNotify for #NmtWidgetList:user-data
|
||||
*/
|
||||
* NmtWidgetList:destroy-notify:
|
||||
*
|
||||
* #GDestroyNotify for #NmtWidgetList:user-data
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_DESTROY_NOTIFY,
|
||||
g_param_spec_pointer("destroy-notify", "", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtWidgetList:length:
|
||||
*
|
||||
* The length of the widget list; changing this value will add or
|
||||
* remove widgets from the list.
|
||||
*/
|
||||
* NmtWidgetList:length:
|
||||
*
|
||||
* The length of the widget list; changing this value will add or
|
||||
* remove widgets from the list.
|
||||
*/
|
||||
g_object_class_install_property(object_class,
|
||||
PROP_LENGTH,
|
||||
g_param_spec_int("length",
|
||||
|
|
@ -471,11 +471,11 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class)
|
|||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* NmtWidgetList:empty-widget:
|
||||
*
|
||||
* If non-%NULL, this widget will be displayed when there are
|
||||
* no "real" widgets in the list.
|
||||
*/
|
||||
* NmtWidgetList:empty-widget:
|
||||
*
|
||||
* If non-%NULL, this widget will be displayed when there are
|
||||
* no "real" widgets in the list.
|
||||
*/
|
||||
g_object_class_install_property(
|
||||
object_class,
|
||||
PROP_EMPTY_WIDGET,
|
||||
|
|
|
|||
|
|
@ -259,10 +259,10 @@ activate_connection(NMConnection *connection, NMDevice *device, NMObject *specif
|
|||
specific_object_path = specific_object ? nm_object_get_path(specific_object) : NULL;
|
||||
|
||||
/* There's no way to cancel an nm_client_activate_connection() /
|
||||
* nm_client_add_and_activate_connection() call, so we always let them
|
||||
* complete, even if the user hits Esc; they shouldn't normally take long
|
||||
* to complete anyway.
|
||||
*/
|
||||
* nm_client_add_and_activate_connection() call, so we always let them
|
||||
* complete, even if the user hits Esc; they shouldn't normally take long
|
||||
* to complete anyway.
|
||||
*/
|
||||
|
||||
nmt_sync_op_init(&op);
|
||||
if (connection) {
|
||||
|
|
@ -306,8 +306,8 @@ activate_connection(NMConnection *connection, NMDevice *device, NMObject *specif
|
|||
}
|
||||
|
||||
/* Now wait for the connection to actually reach the ACTIVATED state,
|
||||
* allowing the user to cancel if it takes too long.
|
||||
*/
|
||||
* allowing the user to cancel if it takes too long.
|
||||
*/
|
||||
nmt_sync_op_init(&op);
|
||||
info.active = ac;
|
||||
info.device = device;
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ construct_ip_items(GPtrArray *items, int addr_family, GVariant *ip_config, const
|
|||
}
|
||||
if (nroutes > 0 || addr_family == AF_INET) {
|
||||
/* we also set IP4_NUM_ROUTES=0, but don't do so for addresses and IPv6 routes.
|
||||
* Historic reasons. */
|
||||
* Historic reasons. */
|
||||
_items_add_printf(items, "%sIP%c_NUM_ROUTES=%u", prefix, four_or_six, nroutes);
|
||||
}
|
||||
}
|
||||
|
|
@ -375,25 +375,25 @@ construct_device_dhcp_items(GPtrArray *items, int addr_family, GVariant *dhcp_co
|
|||
g_variant_get_string(val, NULL));
|
||||
|
||||
/* MS Azure sends the server endpoint in the dhcp private
|
||||
* option 245. cloud-init searches the Azure server endpoint
|
||||
* value looking for the standard dhclient label used for
|
||||
* that option, which is "unknown_245".
|
||||
* The 11-dhclient script shipped with Fedora and RHEL dhcp
|
||||
* package converts our dispatcher environment vars to the
|
||||
* dhclient ones (new_<some_option>) and calls dhclient hook
|
||||
* scripts.
|
||||
* Let's make cloud-init happy and let's duplicate the dhcp
|
||||
* option 245 with the legacy name of the default dhclient
|
||||
* label also when using the internal client.
|
||||
* Note however that the dhclient plugin will have unknown_
|
||||
* labels represented as ascii string when possible, falling
|
||||
* back to hex string otherwise.
|
||||
* private_ labels instead are always in hex string format.
|
||||
* This shouldn't affect the MS Azure server endpoint value,
|
||||
* as it usually belongs to the 240.0.0.0/4 network and so
|
||||
* is always represented as an hex string. Moreover, cloudinit
|
||||
* code checks just for an hex value in unknown_245.
|
||||
*/
|
||||
* option 245. cloud-init searches the Azure server endpoint
|
||||
* value looking for the standard dhclient label used for
|
||||
* that option, which is "unknown_245".
|
||||
* The 11-dhclient script shipped with Fedora and RHEL dhcp
|
||||
* package converts our dispatcher environment vars to the
|
||||
* dhclient ones (new_<some_option>) and calls dhclient hook
|
||||
* scripts.
|
||||
* Let's make cloud-init happy and let's duplicate the dhcp
|
||||
* option 245 with the legacy name of the default dhclient
|
||||
* label also when using the internal client.
|
||||
* Note however that the dhclient plugin will have unknown_
|
||||
* labels represented as ascii string when possible, falling
|
||||
* back to hex string otherwise.
|
||||
* private_ labels instead are always in hex string format.
|
||||
* This shouldn't affect the MS Azure server endpoint value,
|
||||
* as it usually belongs to the 240.0.0.0/4 network and so
|
||||
* is always represented as an hex string. Moreover, cloudinit
|
||||
* code checks just for an hex value in unknown_245.
|
||||
*/
|
||||
if (addr_family == AF_INET) {
|
||||
if (nm_streq(key, "private_245"))
|
||||
private_245_val = g_variant_ref(val);
|
||||
|
|
@ -469,8 +469,8 @@ nm_dispatcher_utils_construct_envp(const char * action,
|
|||
_items_add_key(items, NULL, "CONNECTION_FILENAME", filename);
|
||||
|
||||
/* Canonicalize the VPN interface name; "" is used when passing it through
|
||||
* D-Bus so make sure that's fixed up here.
|
||||
*/
|
||||
* D-Bus so make sure that's fixed up here.
|
||||
*/
|
||||
if (vpn_ip_iface && !vpn_ip_iface[0])
|
||||
vpn_ip_iface = NULL;
|
||||
|
||||
|
|
@ -553,10 +553,10 @@ nm_dispatcher_utils_construct_envp(const char * action,
|
|||
}
|
||||
|
||||
/* Backwards compat: 'iface' is set in this order:
|
||||
* 1) VPN interface name
|
||||
* 2) Device IP interface name
|
||||
* 3) Device interface anme
|
||||
*/
|
||||
* 1) VPN interface name
|
||||
* 2) Device IP interface name
|
||||
* 3) Device interface anme
|
||||
*/
|
||||
if (vpn_ip_iface)
|
||||
*out_iface = g_strdup(vpn_ip_iface);
|
||||
else if (ip_iface)
|
||||
|
|
@ -566,8 +566,8 @@ nm_dispatcher_utils_construct_envp(const char * action,
|
|||
|
||||
done:
|
||||
/* The connectivity_state value will only be meaningful for 'connectivity-change' events
|
||||
* (otherwise it will be "UNKNOWN"), so we only set the environment variable in those cases.
|
||||
*/
|
||||
* (otherwise it will be "UNKNOWN"), so we only set the environment variable in those cases.
|
||||
*/
|
||||
if (!NM_IN_STRSET(connectivity_state, NULL, "UNKNOWN"))
|
||||
_items_add_key(items, NULL, "CONNECTIVITY_STATE", connectivity_state);
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ struct Request {
|
|||
{ \
|
||||
if (FALSE) { \
|
||||
/* g_message() alone does not warn about invalid format. Add a dummy printf() statement to
|
||||
* get a compiler warning about wrong format. */ \
|
||||
* get a compiler warning about wrong format. */ \
|
||||
printf(__VA_ARGS__); \
|
||||
} \
|
||||
print_cmd(__VA_ARGS__); \
|
||||
|
|
@ -226,8 +226,8 @@ next_request(Request *request)
|
|||
}
|
||||
} else {
|
||||
/* when calling next_request() without explicit @request, we always
|
||||
* forcefully clear @current_request. That one is certainly
|
||||
* handled already. */
|
||||
* forcefully clear @current_request. That one is certainly
|
||||
* handled already. */
|
||||
gl.current_request = NULL;
|
||||
|
||||
request = g_queue_pop_head(gl.requests_waiting);
|
||||
|
|
@ -302,7 +302,7 @@ complete_script(ScriptInfo *script)
|
|||
|
||||
if (wait) {
|
||||
/* for "wait" scripts, try to schedule the next blocking script.
|
||||
* If that is successful, return (as we must wait for its completion). */
|
||||
* If that is successful, return (as we must wait for its completion). */
|
||||
if (dispatch_one_script(request))
|
||||
return;
|
||||
}
|
||||
|
|
@ -310,16 +310,16 @@ complete_script(ScriptInfo *script)
|
|||
nm_assert(!wait || gl.current_request == request);
|
||||
|
||||
/* Try to complete the request. @request will be possibly free'd,
|
||||
* making @script and @request a dangling pointer. */
|
||||
* making @script and @request a dangling pointer. */
|
||||
complete_request(request);
|
||||
|
||||
if (!wait) {
|
||||
/* this was a "no-wait" script. We either completed the request,
|
||||
* or there is nothing to do. Especially, there is no need to
|
||||
* queue the next_request() -- because no-wait scripts don't block
|
||||
* requests. However, if this was the last "no-wait" script and
|
||||
* there are "wait" scripts ready to run, launch them.
|
||||
*/
|
||||
* or there is nothing to do. Especially, there is no need to
|
||||
* queue the next_request() -- because no-wait scripts don't block
|
||||
* requests. However, if this was the last "no-wait" script and
|
||||
* there are "wait" scripts ready to run, launch them.
|
||||
*/
|
||||
if (gl.current_request == request && gl.current_request->num_scripts_nowait == 0) {
|
||||
if (dispatch_one_script(gl.current_request))
|
||||
return;
|
||||
|
|
@ -329,14 +329,14 @@ complete_script(ScriptInfo *script)
|
|||
return;
|
||||
} else {
|
||||
/* if the script is a "wait" script, we already tried above to
|
||||
* dispatch the next script. As we didn't do that, it means we
|
||||
* just completed the last script of @request and we can continue
|
||||
* with the next request...
|
||||
*
|
||||
* Also, it cannot be that there is another request currently being
|
||||
* processed because only requests with "wait" scripts can become
|
||||
* @current_request. As there can only be one "wait" script running
|
||||
* at any time, it means complete_request() above completed @request. */
|
||||
* dispatch the next script. As we didn't do that, it means we
|
||||
* just completed the last script of @request and we can continue
|
||||
* with the next request...
|
||||
*
|
||||
* Also, it cannot be that there is another request currently being
|
||||
* processed because only requests with "wait" scripts can become
|
||||
* @current_request. As there can only be one "wait" script running
|
||||
* at any time, it means complete_request() above completed @request. */
|
||||
nm_assert(!gl.current_request);
|
||||
}
|
||||
|
||||
|
|
@ -347,12 +347,12 @@ complete_script(ScriptInfo *script)
|
|||
return;
|
||||
|
||||
/* Try to complete the request. It will be either completed
|
||||
* now, or when all pending "no-wait" scripts return. */
|
||||
* now, or when all pending "no-wait" scripts return. */
|
||||
complete_request(request);
|
||||
|
||||
/* We can immediately start next_request(), because our current
|
||||
* @request has obviously no more "wait" scripts either.
|
||||
* Repeat... */
|
||||
* @request has obviously no more "wait" scripts either.
|
||||
* Repeat... */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -501,7 +501,7 @@ script_dispatch(ScriptInfo *script)
|
|||
script->dispatched = TRUE;
|
||||
|
||||
/* Only for "hostname" action we coerce the interface name to "none". We don't
|
||||
* do so for "connectivity-check" action. */
|
||||
* do so for "connectivity-check" action. */
|
||||
|
||||
argv[0] = script->script;
|
||||
argv[1] = request->iface ?: (nm_streq(request->action, NMD_ACTION_HOSTNAME) ? "none" : "");
|
||||
|
|
@ -808,34 +808,34 @@ _method_call_action(GDBusMethodInvocation *invocation, GVariant *parameters)
|
|||
|
||||
if (num_nowait < request->scripts->len) {
|
||||
/* The request has at least one wait script.
|
||||
* Try next_request() to schedule the request for
|
||||
* execution. This either enqueues the request or
|
||||
* sets it as gl.current_request. */
|
||||
* Try next_request() to schedule the request for
|
||||
* execution. This either enqueues the request or
|
||||
* sets it as gl.current_request. */
|
||||
if (next_request(request)) {
|
||||
/* @request is now @current_request. Go ahead and
|
||||
* schedule the first wait script. */
|
||||
* schedule the first wait script. */
|
||||
if (!dispatch_one_script(request)) {
|
||||
/* If that fails, we might be already finished with the
|
||||
* request. Try complete_request(). */
|
||||
* request. Try complete_request(). */
|
||||
complete_request(request);
|
||||
|
||||
if (next_request(NULL)) {
|
||||
/* As @request was successfully scheduled as next_request(), there is no
|
||||
* other request in queue that can be scheduled afterwards. Assert against
|
||||
* that, but call next_request() to clear current_request. */
|
||||
* other request in queue that can be scheduled afterwards. Assert against
|
||||
* that, but call next_request() to clear current_request. */
|
||||
g_assert_not_reached();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* The request contains only no-wait scripts. Try to complete
|
||||
* the request right away (we might have failed to schedule any
|
||||
* of the scripts). It will be either completed now, or later
|
||||
* when the pending scripts return.
|
||||
* We don't enqueue it to gl.requests_waiting.
|
||||
* There is no need to handle next_request(), because @request is
|
||||
* not the current request anyway and does not interfere with requests
|
||||
* that have any "wait" scripts. */
|
||||
* the request right away (we might have failed to schedule any
|
||||
* of the scripts). It will be either completed now, or later
|
||||
* when the pending scripts return.
|
||||
* We don't enqueue it to gl.requests_waiting.
|
||||
* There is no need to handle next_request(), because @request is
|
||||
* not the current request anyway and does not interfere with requests
|
||||
* that have any "wait" scripts. */
|
||||
complete_request(request);
|
||||
}
|
||||
}
|
||||
|
|
@ -1017,9 +1017,9 @@ main(int argc, char **argv)
|
|||
if (gl.debug) {
|
||||
if (!g_getenv("G_MESSAGES_DEBUG")) {
|
||||
/* we log our regular messages using g_debug() and g_info().
|
||||
* When we redirect glib logging to syslog, there is no problem.
|
||||
* But in "debug" mode, glib will no print these messages unless
|
||||
* we set G_MESSAGES_DEBUG. */
|
||||
* When we redirect glib logging to syslog, there is no problem.
|
||||
* But in "debug" mode, glib will no print these messages unless
|
||||
* we set G_MESSAGES_DEBUG. */
|
||||
g_setenv("G_MESSAGES_DEBUG", "all", TRUE);
|
||||
}
|
||||
} else
|
||||
|
|
@ -1067,16 +1067,16 @@ done:
|
|||
|
||||
if (gl.num_requests_pending > 0) {
|
||||
/* this only happens when we quit due to SIGTERM (not due to the idle timer).
|
||||
*
|
||||
* Log a warning about pending scripts.
|
||||
*
|
||||
* Maybe we should notify NetworkManager that these scripts are left in an unknown state.
|
||||
* But this is either a bug of a dispatcher script (not terminating in time).
|
||||
*
|
||||
* FIXME(shutdown): Also, currently NetworkManager behaves wrongly on shutdown.
|
||||
* Note that systemd would not terminate NetworkManager-dispatcher before NetworkManager.
|
||||
* It's NetworkManager's responsibility to keep running long enough so that all requests
|
||||
* can complete (with a watchdog timer, and a warning that user provided scripts hang). */
|
||||
*
|
||||
* Log a warning about pending scripts.
|
||||
*
|
||||
* Maybe we should notify NetworkManager that these scripts are left in an unknown state.
|
||||
* But this is either a bug of a dispatcher script (not terminating in time).
|
||||
*
|
||||
* FIXME(shutdown): Also, currently NetworkManager behaves wrongly on shutdown.
|
||||
* Note that systemd would not terminate NetworkManager-dispatcher before NetworkManager.
|
||||
* It's NetworkManager's responsibility to keep running long enough so that all requests
|
||||
* can complete (with a watchdog timer, and a warning that user provided scripts hang). */
|
||||
_LOG_X_W("exiting but there are still %u requests pending", gl.num_requests_pending);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -216,8 +216,8 @@ parse_ip4(GKeyFile *kf, GVariant **out_props, const char *section, GError **erro
|
|||
|
||||
/* search domains */
|
||||
/* Use char** for domains. (DBUS_TYPE_G_ARRAY_OF_STRING of NMIP4Config
|
||||
* becomes G_TYPE_STRV when sending the value over D-Bus)
|
||||
*/
|
||||
* becomes G_TYPE_STRV when sending the value over D-Bus)
|
||||
*/
|
||||
tmp = g_key_file_get_string(kf, section, "domains", error);
|
||||
if (tmp == NULL)
|
||||
return FALSE;
|
||||
|
|
@ -588,7 +588,7 @@ static void
|
|||
test_connectivity_changed(void)
|
||||
{
|
||||
/* These tests will check that the CONNECTIVITY_STATE environment
|
||||
* variable is only defined for known states, such as 'full'. */
|
||||
* variable is only defined for known states, such as 'full'. */
|
||||
test_generic("dispatcher-connectivity-unknown", NULL);
|
||||
test_generic("dispatcher-connectivity-full", NULL);
|
||||
}
|
||||
|
|
@ -597,8 +597,8 @@ static void
|
|||
test_up_empty_vpn_iface(void)
|
||||
{
|
||||
/* Test that an empty VPN iface variable, like is passed through D-Bus
|
||||
* from NM, is ignored by the dispatcher environment construction code.
|
||||
*/
|
||||
* from NM, is ignored by the dispatcher environment construction code.
|
||||
*/
|
||||
test_generic("dispatcher-up", "");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,10 +91,10 @@ add_connection(GDBusProxy *proxy, const char *con_name)
|
|||
&setting_builder);
|
||||
|
||||
/* Call AddConnection with the connection dictionary as argument.
|
||||
* (g_variant_new() will consume the floating GVariant returned from
|
||||
* &connection_builder, and g_dbus_proxy_call_sync() will consume the
|
||||
* floating variant returned from g_variant_new(), so no cleanup is needed.
|
||||
*/
|
||||
* (g_variant_new() will consume the floating GVariant returned from
|
||||
* &connection_builder, and g_dbus_proxy_call_sync() will consume the
|
||||
* floating variant returned from g_variant_new(), so no cleanup is needed.
|
||||
*/
|
||||
ret = g_dbus_proxy_call_sync(proxy,
|
||||
"AddConnection",
|
||||
g_variant_new("(a{sa{sv}})", &connection_builder),
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ added_cb(GObject *client, GAsyncResult *result, gpointer user_data)
|
|||
GError * error = NULL;
|
||||
|
||||
/* NM responded to our request; either handle the resulting error or
|
||||
* print out the object path of the connection we just added.
|
||||
*/
|
||||
* print out the object path of the connection we just added.
|
||||
*/
|
||||
remote = nm_client_add_connection_finish(NM_CLIENT(client), result, &error);
|
||||
|
||||
if (error) {
|
||||
|
|
@ -79,8 +79,8 @@ add_connection(NMClient *client, GMainLoop *loop, const char *con_name)
|
|||
nm_connection_add_setting(connection, NM_SETTING(s_ip4));
|
||||
|
||||
/* Ask the settings service to add the new connection; we'll quit the
|
||||
* mainloop and exit when the callback is called.
|
||||
*/
|
||||
* mainloop and exit when the callback is called.
|
||||
*/
|
||||
nm_client_add_connection_async(client, connection, TRUE, NULL, added_cb, loop);
|
||||
g_object_unref(connection);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,10 +130,10 @@ get_active_connection_details(const char *obj_path)
|
|||
GError * error = NULL;
|
||||
|
||||
/* This function gets the backing Connection object that describes the
|
||||
* network configuration that the ActiveConnection object is actually using.
|
||||
* The ActiveConnection object contains the mapping between the configuration
|
||||
* and the actual network interfaces that are using that configuration.
|
||||
*/
|
||||
* network configuration that the ActiveConnection object is actually using.
|
||||
* The ActiveConnection object contains the mapping between the configuration
|
||||
* and the actual network interfaces that are using that configuration.
|
||||
*/
|
||||
|
||||
/* Create a D-Bus object proxy for the active connection object's properties */
|
||||
props_proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
|
||||
|
|
@ -241,8 +241,8 @@ main(int argc, char *argv[])
|
|||
GDBusProxy *props_proxy;
|
||||
|
||||
/* Create a D-Bus proxy to get the object properties from the NM Manager
|
||||
* object. NM_DBUS_* defines are from nm-dbus-interface.h.
|
||||
*/
|
||||
* object. NM_DBUS_* defines are from nm-dbus-interface.h.
|
||||
*/
|
||||
props_proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
|
||||
G_DBUS_PROXY_FLAGS_NONE,
|
||||
NULL,
|
||||
|
|
|
|||
|
|
@ -281,9 +281,9 @@ validate_permissions_type(GVariant *variant, GError **error)
|
|||
gboolean valid = TRUE;
|
||||
|
||||
/* Ensure the connection::permissions item (if present) is the correct
|
||||
* type, otherwise the g_object_set() will throw a warning and ignore the
|
||||
* error, leaving us with no permissions.
|
||||
*/
|
||||
* type, otherwise the g_object_set() will throw a warning and ignore the
|
||||
* error, leaving us with no permissions.
|
||||
*/
|
||||
s_con = g_variant_lookup_value(variant,
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_VARIANT_TYPE_SETTING);
|
||||
|
|
@ -414,20 +414,20 @@ _nm_connection_replace_settings(NMConnection * connection,
|
|||
changed = (settings != NULL);
|
||||
|
||||
/* Note: @settings might be empty in which case the connection
|
||||
* has no NMSetting instances... which is fine, just something
|
||||
* to be aware of. */
|
||||
* has no NMSetting instances... which is fine, just something
|
||||
* to be aware of. */
|
||||
for (s = settings; s; s = s->next)
|
||||
_nm_connection_add_setting(connection, s->data);
|
||||
|
||||
g_slist_free(settings);
|
||||
|
||||
/* If verification/normalization fails, the original connection
|
||||
* is already lost. From an API point of view, it would be nicer
|
||||
* not to touch the input argument if we fail at the end.
|
||||
* However, that would require creating a temporary connection
|
||||
* to validate it first. As none of the caller cares about the
|
||||
* state of the @connection when normalization fails, just do it
|
||||
* this way. */
|
||||
* is already lost. From an API point of view, it would be nicer
|
||||
* not to touch the input argument if we fail at the end.
|
||||
* However, that would require creating a temporary connection
|
||||
* to validate it first. As none of the caller cares about the
|
||||
* state of the @connection when normalization fails, just do it
|
||||
* this way. */
|
||||
if (NM_FLAGS_HAS(parse_flags, NM_SETTING_PARSE_FLAGS_NORMALIZE))
|
||||
success = nm_connection_normalize(connection, NULL, NULL, error);
|
||||
else
|
||||
|
|
@ -481,14 +481,14 @@ nm_connection_replace_settings_from_connection(NMConnection *connection,
|
|||
g_return_if_fail(NM_IS_CONNECTION(new_connection));
|
||||
|
||||
/* When 'connection' and 'new_connection' are the same object simply return
|
||||
* in order not to destroy 'connection'.
|
||||
*/
|
||||
* in order not to destroy 'connection'.
|
||||
*/
|
||||
if (connection == new_connection)
|
||||
return;
|
||||
|
||||
/* No need to validate permissions like nm_connection_replace_settings()
|
||||
* since we're dealing with an NMConnection which has already done that.
|
||||
*/
|
||||
* since we're dealing with an NMConnection which has already done that.
|
||||
*/
|
||||
|
||||
priv = NM_CONNECTION_GET_PRIVATE(connection);
|
||||
new_priv = NM_CONNECTION_GET_PRIVATE(new_connection);
|
||||
|
|
@ -759,7 +759,7 @@ _nm_connection_detect_bluetooth_type(NMConnection *self)
|
|||
}
|
||||
|
||||
/* NULL means the connection is not a bluetooth type, or it needs
|
||||
* no normalization, as the type is set explicitly. */
|
||||
* no normalization, as the type is set explicitly. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -969,8 +969,8 @@ _normalize_ip_config(NMConnection *self, GHashTable *parameters)
|
|||
}
|
||||
|
||||
/* If no IP6 setting was specified, then assume that means IP6 config is
|
||||
* allowed to fail.
|
||||
*/
|
||||
* allowed to fail.
|
||||
*/
|
||||
setting = nm_setting_ip6_config_new();
|
||||
|
||||
g_object_set(setting,
|
||||
|
|
@ -1431,12 +1431,12 @@ _nm_connection_verify(NMConnection *connection, GError **error)
|
|||
nm_assert(NM_IS_SETTING_CONNECTION(settings[i]) == (i == 0));
|
||||
|
||||
/* verify all settings. We stop if we find the first non-normalizable
|
||||
* @NM_SETTING_VERIFY_ERROR. If we find normalizable errors we continue
|
||||
* but remember the error to return it to the user.
|
||||
* @NM_SETTING_VERIFY_NORMALIZABLE_ERROR has a higher priority then
|
||||
* @NM_SETTING_VERIFY_NORMALIZABLE, so, if we encounter such an error type,
|
||||
* we remember it instead (to return it as output).
|
||||
**/
|
||||
* @NM_SETTING_VERIFY_ERROR. If we find normalizable errors we continue
|
||||
* but remember the error to return it to the user.
|
||||
* @NM_SETTING_VERIFY_NORMALIZABLE_ERROR has a higher priority then
|
||||
* @NM_SETTING_VERIFY_NORMALIZABLE, so, if we encounter such an error type,
|
||||
* we remember it instead (to return it as output).
|
||||
**/
|
||||
verify_result = _nm_setting_verify(settings[i], connection, &verify_error);
|
||||
if (verify_result == NM_SETTING_VERIFY_NORMALIZABLE
|
||||
|| verify_result == NM_SETTING_VERIFY_NORMALIZABLE_ERROR) {
|
||||
|
|
@ -1475,7 +1475,7 @@ _nm_connection_verify(NMConnection *connection, GError **error)
|
|||
g_prefix_error(&normalizable_error, "%s: ", NM_SETTING_IP4_CONFIG_SETTING_NAME);
|
||||
|
||||
/* having a master without IP config was not a verify() error, accept
|
||||
* it for backward compatibility. */
|
||||
* it for backward compatibility. */
|
||||
normalizable_error_type = NM_SETTING_VERIFY_NORMALIZABLE;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1500,7 +1500,7 @@ _nm_connection_verify(NMConnection *connection, GError **error)
|
|||
g_prefix_error(&normalizable_error, "%s: ", NM_SETTING_IP6_CONFIG_SETTING_NAME);
|
||||
|
||||
/* having a master without IP config was not a verify() error, accept
|
||||
* it for backward compatibility. */
|
||||
* it for backward compatibility. */
|
||||
normalizable_error_type = NM_SETTING_VERIFY_NORMALIZABLE;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1525,7 +1525,7 @@ _nm_connection_verify(NMConnection *connection, GError **error)
|
|||
g_prefix_error(&normalizable_error, "%s: ", NM_SETTING_PROXY_SETTING_NAME);
|
||||
|
||||
/* having a master without proxy config was not a verify() error, accept
|
||||
* it for backward compatibility. */
|
||||
* it for backward compatibility. */
|
||||
normalizable_error_type = NM_SETTING_VERIFY_NORMALIZABLE;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1590,15 +1590,15 @@ _connection_normalize(NMConnection *connection,
|
|||
|
||||
#if NM_MORE_ASSERTS > 10
|
||||
/* only call this _nm_connection_verify() confirms that the connection
|
||||
* requires normalization and is normalizable. */
|
||||
* requires normalization and is normalizable. */
|
||||
nm_assert(NM_IN_SET(_nm_connection_verify(connection, NULL),
|
||||
NM_SETTING_VERIFY_NORMALIZABLE,
|
||||
NM_SETTING_VERIFY_NORMALIZABLE_ERROR));
|
||||
#endif
|
||||
|
||||
/* Try to perform all kind of normalizations on the settings to fix it.
|
||||
* We only do this, after verifying that the connection contains no un-normalizable
|
||||
* errors, because in that case we rather fail without touching the settings. */
|
||||
* We only do this, after verifying that the connection contains no un-normalizable
|
||||
* errors, because in that case we rather fail without touching the settings. */
|
||||
|
||||
was_modified = FALSE;
|
||||
|
||||
|
|
@ -1633,8 +1633,8 @@ _connection_normalize(NMConnection *connection,
|
|||
|
||||
if (success != NM_SETTING_VERIFY_SUCCESS) {
|
||||
/* we would expect, that after normalization, the connection can be verified.
|
||||
* Also treat NM_SETTING_VERIFY_NORMALIZABLE as failure, because there is something
|
||||
* odd going on. */
|
||||
* Also treat NM_SETTING_VERIFY_NORMALIZABLE as failure, because there is something
|
||||
* odd going on. */
|
||||
if (error && !*error) {
|
||||
g_set_error_literal(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
|
|
@ -1755,7 +1755,7 @@ _nm_connection_ensure_normalized(NMConnection * connection,
|
|||
if (!allow_modify) {
|
||||
if (!out_connection_clone) {
|
||||
/* even NM_SETTING_VERIFY_NORMALIZABLE is treated as an error. We could normalize,
|
||||
* but are not allowed to (and no out argument is provided for cloning). */
|
||||
* but are not allowed to (and no out argument is provided for cloning). */
|
||||
g_propagate_error(error, g_steal_pointer(&local));
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1899,8 +1899,8 @@ nm_connection_update_secrets(NMConnection *connection,
|
|||
setting_dict = g_variant_lookup_value(secrets, setting_name, NM_VARIANT_TYPE_SETTING);
|
||||
if (!setting_dict) {
|
||||
/* The connection dictionary didn't contain any secrets for
|
||||
* @setting_name; just return success.
|
||||
*/
|
||||
* @setting_name; just return success.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -2133,18 +2133,18 @@ _nm_connection_for_each_secret(NMConnection * self,
|
|||
const char * setting_name;
|
||||
|
||||
/* This function, given a dict of dicts representing new secrets of
|
||||
* an NMConnection, walks through each toplevel dict (which represents a
|
||||
* NMSetting), and for each setting, walks through that setting dict's
|
||||
* properties. For each property that's a secret, it will check that
|
||||
* secret's flags in the backing NMConnection object, and call a supplied
|
||||
* callback.
|
||||
*
|
||||
* The one complexity is that the VPN setting's 'secrets' property is
|
||||
* *also* a dict (since the key/value pairs are arbitrary and known
|
||||
* only to the VPN plugin itself). That means we have three levels of
|
||||
* dicts that we potentially have to traverse here. The differences
|
||||
* are handled by the virtual for_each_secret() function.
|
||||
*/
|
||||
* an NMConnection, walks through each toplevel dict (which represents a
|
||||
* NMSetting), and for each setting, walks through that setting dict's
|
||||
* properties. For each property that's a secret, it will check that
|
||||
* secret's flags in the backing NMConnection object, and call a supplied
|
||||
* callback.
|
||||
*
|
||||
* The one complexity is that the VPN setting's 'secrets' property is
|
||||
* *also* a dict (since the key/value pairs are arbitrary and known
|
||||
* only to the VPN plugin itself). That means we have three levels of
|
||||
* dicts that we potentially have to traverse here. The differences
|
||||
* are handled by the virtual for_each_secret() function.
|
||||
*/
|
||||
|
||||
g_return_val_if_fail(callback, NULL);
|
||||
|
||||
|
|
@ -2520,13 +2520,13 @@ _nm_connection_get_multi_connect(NMConnection *connection)
|
|||
const NMConnectionMultiConnect DEFAULT = NM_CONNECTION_MULTI_CONNECT_SINGLE;
|
||||
|
||||
/* connection.multi_connect property cannot be specified via regular
|
||||
* connection defaults in NetworkManager.conf, because those are per-device,
|
||||
* and we need to determine the multi_connect independent of a particular
|
||||
* device.
|
||||
*
|
||||
* There is however still a default-value, so theoretically, the default
|
||||
* value could be specified in NetworkManager.conf. Just not as [connection*]
|
||||
* and indepdented of a device. */
|
||||
* connection defaults in NetworkManager.conf, because those are per-device,
|
||||
* and we need to determine the multi_connect independent of a particular
|
||||
* device.
|
||||
*
|
||||
* There is however still a default-value, so theoretically, the default
|
||||
* value could be specified in NetworkManager.conf. Just not as [connection*]
|
||||
* and indepdented of a device. */
|
||||
|
||||
s_con = nm_connection_get_setting_connection(connection);
|
||||
if (!s_con)
|
||||
|
|
@ -3333,14 +3333,14 @@ static void
|
|||
nm_connection_default_init(NMConnectionInterface *iface)
|
||||
{
|
||||
/**
|
||||
* NMConnection::secrets-updated:
|
||||
* @connection: the object on which the signal is emitted
|
||||
* @setting_name: the setting name of the #NMSetting for which secrets were
|
||||
* updated
|
||||
*
|
||||
* The ::secrets-updated signal is emitted when the secrets of a setting
|
||||
* have been changed.
|
||||
*/
|
||||
* NMConnection::secrets-updated:
|
||||
* @connection: the object on which the signal is emitted
|
||||
* @setting_name: the setting name of the #NMSetting for which secrets were
|
||||
* updated
|
||||
*
|
||||
* The ::secrets-updated signal is emitted when the secrets of a setting
|
||||
* have been changed.
|
||||
*/
|
||||
signals[SECRETS_UPDATED] = g_signal_new(NM_CONNECTION_SECRETS_UPDATED,
|
||||
NM_TYPE_CONNECTION,
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
@ -3353,12 +3353,12 @@ nm_connection_default_init(NMConnectionInterface *iface)
|
|||
G_TYPE_STRING);
|
||||
|
||||
/**
|
||||
* NMConnection::secrets-cleared:
|
||||
* @connection: the object on which the signal is emitted
|
||||
*
|
||||
* The ::secrets-cleared signal is emitted when the secrets of a connection
|
||||
* are cleared.
|
||||
*/
|
||||
* NMConnection::secrets-cleared:
|
||||
* @connection: the object on which the signal is emitted
|
||||
*
|
||||
* The ::secrets-cleared signal is emitted when the secrets of a connection
|
||||
* are cleared.
|
||||
*/
|
||||
signals[SECRETS_CLEARED] = g_signal_new(NM_CONNECTION_SECRETS_CLEARED,
|
||||
NM_TYPE_CONNECTION,
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
@ -3370,13 +3370,13 @@ nm_connection_default_init(NMConnectionInterface *iface)
|
|||
0);
|
||||
|
||||
/**
|
||||
* NMConnection::changed:
|
||||
* @connection: the object on which the signal is emitted
|
||||
*
|
||||
* The ::changed signal is emitted when any property of any property
|
||||
* (including secrets) of any setting of the connection is modified,
|
||||
* or when settings are added or removed.
|
||||
*/
|
||||
* NMConnection::changed:
|
||||
* @connection: the object on which the signal is emitted
|
||||
*
|
||||
* The ::changed signal is emitted when any property of any property
|
||||
* (including secrets) of any setting of the connection is modified,
|
||||
* or when settings are added or removed.
|
||||
*/
|
||||
signals[CHANGED] = g_signal_new(NM_CONNECTION_CHANGED,
|
||||
NM_TYPE_CONNECTION,
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
|
|
|
|||
|
|
@ -248,17 +248,17 @@ GVariant *nm_connection_to_dbus_full(NMConnection * con
|
|||
|
||||
typedef enum {
|
||||
/* whether the connection has any secrets.
|
||||
*
|
||||
* @arg may be %NULL or a pointer to a gboolean for the result. The return
|
||||
* value of _nm_connection_aggregate() is likewise the boolean result. */
|
||||
*
|
||||
* @arg may be %NULL or a pointer to a gboolean for the result. The return
|
||||
* value of _nm_connection_aggregate() is likewise the boolean result. */
|
||||
NM_CONNECTION_AGGREGATE_ANY_SECRETS,
|
||||
|
||||
/* whether the connection has any secret with flags NM_SETTING_SECRET_FLAG_NONE.
|
||||
* Note that this only cares about the flags, not whether the secret is actually
|
||||
* present.
|
||||
*
|
||||
* @arg may be %NULL or a pointer to a gboolean for the result. The return
|
||||
* value of _nm_connection_aggregate() is likewise the boolean result. */
|
||||
* Note that this only cares about the flags, not whether the secret is actually
|
||||
* present.
|
||||
*
|
||||
* @arg may be %NULL or a pointer to a gboolean for the result. The return
|
||||
* value of _nm_connection_aggregate() is likewise the boolean result. */
|
||||
NM_CONNECTION_AGGREGATE_ANY_SYSTEM_SECRET_FLAGS,
|
||||
} NMConnectionAggregateType;
|
||||
|
||||
|
|
@ -724,7 +724,7 @@ typedef struct {
|
|||
NMSettInfoPropMissingFromDBusFcn missing_from_dbus_fcn;
|
||||
|
||||
/* Simpler variants of @to_dbus_fcn/@from_dbus_fcn that operate solely
|
||||
* on the GValue value of the GObject property. */
|
||||
* on the GValue value of the GObject property. */
|
||||
NMSettInfoPropGPropToDBusFcn gprop_to_dbus_fcn;
|
||||
NMSettInfoPropGPropFromDBusFcn gprop_from_dbus_fcn;
|
||||
} NMSettInfoPropertType;
|
||||
|
|
@ -745,16 +745,16 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/* if set, then this setting class has no own fields. Instead, its
|
||||
* data is entirely based on gendata. Meaning: it tracks all data
|
||||
* as native GVariants.
|
||||
* It might have some GObject properties, but these are merely accessors
|
||||
* to the underlying gendata.
|
||||
*
|
||||
* Note, that at the moment there are few hooks, to customize the behavior
|
||||
* of the setting further. They are currently unneeded. This is desired,
|
||||
* but could be added when there is a good reason.
|
||||
*
|
||||
* However, a few hooks there are... see NMSettInfoSettGendata. */
|
||||
* data is entirely based on gendata. Meaning: it tracks all data
|
||||
* as native GVariants.
|
||||
* It might have some GObject properties, but these are merely accessors
|
||||
* to the underlying gendata.
|
||||
*
|
||||
* Note, that at the moment there are few hooks, to customize the behavior
|
||||
* of the setting further. They are currently unneeded. This is desired,
|
||||
* but could be added when there is a good reason.
|
||||
*
|
||||
* However, a few hooks there are... see NMSettInfoSettGendata. */
|
||||
const NMSettInfoSettGendata *gendata_info;
|
||||
} NMSettInfoSettDetail;
|
||||
|
||||
|
|
@ -765,15 +765,15 @@ struct _NMSettInfoSetting {
|
|||
const NMSettInfoProperty *property_infos;
|
||||
|
||||
/* the @property_infos list is sorted by property name. For some uses we need
|
||||
* a different sort order. If @property_infos_sorted is set, this is the order
|
||||
* instead. It is used for:
|
||||
*
|
||||
* - nm_setting_enumerate_values()
|
||||
* - keyfile writer adding keys to the group.
|
||||
*
|
||||
* Note that currently only NMSettingConnection implements here a sort order
|
||||
* that differs from alphabetical sort of the property names.
|
||||
*/
|
||||
* a different sort order. If @property_infos_sorted is set, this is the order
|
||||
* instead. It is used for:
|
||||
*
|
||||
* - nm_setting_enumerate_values()
|
||||
* - keyfile writer adding keys to the group.
|
||||
*
|
||||
* Note that currently only NMSettingConnection implements here a sort order
|
||||
* that differs from alphabetical sort of the property names.
|
||||
*/
|
||||
const NMSettInfoProperty *const *property_infos_sorted;
|
||||
|
||||
guint property_infos_len;
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ _nmtst_crypto_decrypt(NMCryptoCipherType cipher,
|
|||
}
|
||||
|
||||
/* Validate tail padding; last byte is the padding size, and all pad bytes
|
||||
* should contain the padding size.
|
||||
*/
|
||||
* should contain the padding size.
|
||||
*/
|
||||
for (pad_i = 1; pad_i <= pad_len; ++pad_i) {
|
||||
if (output.bin[data_len - pad_i] != pad_len) {
|
||||
g_set_error(error,
|
||||
|
|
@ -215,8 +215,8 @@ _nmtst_crypto_encrypt(NMCryptoCipherType cipher,
|
|||
}
|
||||
|
||||
/* If data_len % ivlen == 0, then we add another complete block
|
||||
* onto the end so that the decrypter knows there's padding.
|
||||
*/
|
||||
* onto the end so that the decrypter knows there's padding.
|
||||
*/
|
||||
pad_len = iv_len - (data_len % iv_len);
|
||||
|
||||
padded_buf.len = data_len + pad_len;
|
||||
|
|
@ -386,11 +386,11 @@ _nm_crypto_verify_pkcs8(const guint8 *data,
|
|||
if (err < 0) {
|
||||
if (err == GNUTLS_E_UNKNOWN_CIPHER_TYPE) {
|
||||
/* HACK: gnutls < 3.5.4 doesn't support all the cipher types that openssl
|
||||
* can use with PKCS#8, so if we encounter one, we have to assume
|
||||
* the given password works. gnutls needs to unsuckify, apparently.
|
||||
* Specifically, by default openssl uses pbeWithMD5AndDES-CBC
|
||||
* which gnutls does not support.
|
||||
*/
|
||||
* can use with PKCS#8, so if we encounter one, we have to assume
|
||||
* the given password works. gnutls needs to unsuckify, apparently.
|
||||
* Specifically, by default openssl uses pbeWithMD5AndDES-CBC
|
||||
* which gnutls does not support.
|
||||
*/
|
||||
} else {
|
||||
g_set_error(error,
|
||||
NM_CRYPTO_ERROR,
|
||||
|
|
|
|||
|
|
@ -223,8 +223,8 @@ _nmtst_crypto_decrypt(NMCryptoCipherType cipher,
|
|||
}
|
||||
|
||||
/* Validate tail padding; last byte is the padding size, and all pad bytes
|
||||
* should contain the padding size.
|
||||
*/
|
||||
* should contain the padding size.
|
||||
*/
|
||||
for (i = pad_len; i > 0; i--) {
|
||||
if (output.bin[data_len - i] != pad_len) {
|
||||
g_set_error(error,
|
||||
|
|
@ -329,8 +329,8 @@ _nmtst_crypto_encrypt(NMCryptoCipherType cipher,
|
|||
}
|
||||
|
||||
/* If data->len % ivlen == 0, then we add another complete block
|
||||
* onto the end so that the decrypter knows there's padding.
|
||||
*/
|
||||
* onto the end so that the decrypter knows there's padding.
|
||||
*/
|
||||
pad_len = iv_len - (data_len % iv_len);
|
||||
|
||||
padded_buf.len = data_len + pad_len;
|
||||
|
|
@ -419,8 +419,8 @@ _nm_crypto_verify_pkcs12(const guint8 *data, gsize data_len, const char *passwor
|
|||
return FALSE;
|
||||
|
||||
/* PKCS#12 passwords are apparently UCS2 BIG ENDIAN, and NSS doesn't do
|
||||
* any conversions for us.
|
||||
*/
|
||||
* any conversions for us.
|
||||
*/
|
||||
if (password && *password) {
|
||||
nm_auto_clear_secret_ptr NMSecretPtr ucs2_password = {0};
|
||||
|
||||
|
|
@ -522,9 +522,9 @@ _nm_crypto_verify_pkcs8(const guint8 *data,
|
|||
return FALSE;
|
||||
|
||||
/* NSS apparently doesn't do PKCS#8 natively, but you have to put the
|
||||
* PKCS#8 key into a PKCS#12 file and import that?? So until we figure
|
||||
* all that out, we can only assume the password is valid.
|
||||
*/
|
||||
* PKCS#8 key into a PKCS#12 file and import that?? So until we figure
|
||||
* all that out, we can only assume the password is valid.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ _nmtst_convert_iv(const char *src, gsize *out_len, GError **error)
|
|||
c = g_malloc(num + 1);
|
||||
|
||||
/* defensively add trailing NUL. This function returns binary data,
|
||||
* do not assume it's NUL terminated. */
|
||||
* do not assume it's NUL terminated. */
|
||||
c[num] = '\0';
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
|
|
@ -1034,11 +1034,11 @@ nmtst_crypto_rsa_key_encrypt(const guint8 *data,
|
|||
return NULL;
|
||||
|
||||
/* What follows is not the most efficient way to construct the pem
|
||||
* file line-by-line. At least, it makes sure, that the data will be cleared
|
||||
* again and not left around in memory.
|
||||
*
|
||||
* If this would not be test code, we should improve the implementation
|
||||
* to avoid some of the copying. */
|
||||
* file line-by-line. At least, it makes sure, that the data will be cleared
|
||||
* again and not left around in memory.
|
||||
*
|
||||
* If this would not be test code, we should improve the implementation
|
||||
* to avoid some of the copying. */
|
||||
pem = g_ptr_array_new_with_free_func((GDestroyNotify) nm_free_secret);
|
||||
|
||||
g_ptr_array_add(pem, g_strdup("-----BEGIN RSA PRIVATE KEY-----\n"));
|
||||
|
|
|
|||
|
|
@ -173,8 +173,8 @@ _nm_dbus_typecheck_response(GVariant *response, const GVariantType *reply_type,
|
|||
return TRUE;
|
||||
|
||||
/* This is the same error code that g_dbus_connection_call() returns if
|
||||
* @reply_type doesn't match.
|
||||
*/
|
||||
* @reply_type doesn't match.
|
||||
*/
|
||||
g_set_error(error,
|
||||
G_IO_ERROR,
|
||||
G_IO_ERROR_INVALID_ARGUMENT,
|
||||
|
|
|
|||
|
|
@ -500,23 +500,23 @@ _keyfile_key_encode(const char *name, char **out_to_free)
|
|||
nm_assert(out_to_free && !*out_to_free);
|
||||
|
||||
/* See g_key_file_is_key_name().
|
||||
*
|
||||
* GKeyFile allows all UTF-8 characters (even non-well formed sequences),
|
||||
* except:
|
||||
* - no empty keys
|
||||
* - no leading/trailing ' '
|
||||
* - no '=', '[', ']'
|
||||
*
|
||||
* We do something more strict here. All non-ASCII characters, all non-printable
|
||||
* characters, and all invalid characters are escaped with "\\XX".
|
||||
*
|
||||
* We don't escape \\, unless it is followed by two hex digits.
|
||||
*/
|
||||
*
|
||||
* GKeyFile allows all UTF-8 characters (even non-well formed sequences),
|
||||
* except:
|
||||
* - no empty keys
|
||||
* - no leading/trailing ' '
|
||||
* - no '=', '[', ']'
|
||||
*
|
||||
* We do something more strict here. All non-ASCII characters, all non-printable
|
||||
* characters, and all invalid characters are escaped with "\\XX".
|
||||
*
|
||||
* We don't escape \\, unless it is followed by two hex digits.
|
||||
*/
|
||||
|
||||
if (!name[0]) {
|
||||
/* empty keys are backslash encoded. Note that usually
|
||||
* \\00 is not a valid encode, the only exception is the empty
|
||||
* word. */
|
||||
* \\00 is not a valid encode, the only exception is the empty
|
||||
* word. */
|
||||
return "\\00";
|
||||
}
|
||||
|
||||
|
|
@ -646,10 +646,10 @@ nm_keyfile_key_encode(const char *name, char **out_to_free)
|
|||
|
||||
name2 = _keyfile_key_decode(key, &to_free2);
|
||||
/* name2, the result of encode()+decode() is identical to name.
|
||||
* That is because
|
||||
* - encode() is a injective function.
|
||||
* - decode() is a surjective function, however for output
|
||||
* values of encode() is behaves injective too. */
|
||||
* That is because
|
||||
* - encode() is a injective function.
|
||||
* - decode() is a surjective function, however for output
|
||||
* values of encode() is behaves injective too. */
|
||||
nm_assert(nm_streq0(name2, name));
|
||||
}
|
||||
#endif
|
||||
|
|
@ -671,10 +671,10 @@ nm_keyfile_key_decode(const char *key, char **out_to_free)
|
|||
|
||||
key2 = _keyfile_key_encode(name, &to_free2);
|
||||
/* key2, the result of decode+encode may not be identical
|
||||
* to the original key. That is, decode() is a surjective
|
||||
* function mapping different keys to the same name.
|
||||
* However, decode() behaves injective for input that
|
||||
* are valid output of encode(). */
|
||||
* to the original key. That is, decode() is a surjective
|
||||
* function mapping different keys to the same name.
|
||||
* However, decode() behaves injective for input that
|
||||
* are valid output of encode(). */
|
||||
nm_assert(key2);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -328,13 +328,13 @@ build_route(KeyfileReaderInfo *info,
|
|||
if (gateway_str && gateway_str[0]) {
|
||||
if (!nm_utils_ipaddr_is_valid(family, gateway_str)) {
|
||||
/* Try workaround for routes written by broken keyfile writer.
|
||||
* Due to bug bgo#719851, an older version of writer would have
|
||||
* written "a:b:c:d::/plen,metric" if the gateway was ::, instead
|
||||
* of "a:b:c:d::/plen,,metric" or "a:b:c:d::/plen,::,metric"
|
||||
* Try workaround by interpreting gateway_str as metric to accept such
|
||||
* invalid routes. This broken syntax should not be not officially
|
||||
* supported.
|
||||
**/
|
||||
* Due to bug bgo#719851, an older version of writer would have
|
||||
* written "a:b:c:d::/plen,metric" if the gateway was ::, instead
|
||||
* of "a:b:c:d::/plen,,metric" or "a:b:c:d::/plen,::,metric"
|
||||
* Try workaround by interpreting gateway_str as metric to accept such
|
||||
* invalid routes. This broken syntax should not be not officially
|
||||
* supported.
|
||||
**/
|
||||
if (family == AF_INET6 && !metric_str
|
||||
&& get_one_int(NULL, NULL, NULL, gateway_str, G_MAXUINT32, &u32)) {
|
||||
metric = u32;
|
||||
|
|
@ -448,10 +448,10 @@ openconnect_fix_secret_flags(NMSetting *setting)
|
|||
NMSettingSecretFlags flags;
|
||||
|
||||
/* Huge hack. There were some openconnect changes that needed to happen
|
||||
* pretty late, too late to get into distros. Migration has already
|
||||
* happened for many people, and their secret flags are wrong. But we
|
||||
* don't want to require re-migration, so we have to fix it up here. Ugh.
|
||||
*/
|
||||
* pretty late, too late to get into distros. Migration has already
|
||||
* happened for many people, and their secret flags are wrong. But we
|
||||
* don't want to require re-migration, so we have to fix it up here. Ugh.
|
||||
*/
|
||||
|
||||
if (!NM_IS_SETTING_VPN(setting))
|
||||
return;
|
||||
|
|
@ -728,9 +728,9 @@ static gboolean
|
|||
_build_list_data_is_shadowed(const BuildListData *build_list, gsize build_list_len, gsize idx)
|
||||
{
|
||||
/* the keyfile contains duplicate keys, which are both returned
|
||||
* by g_key_file_get_keys() (WHY??).
|
||||
*
|
||||
* Skip the earlier one. */
|
||||
* by g_key_file_get_keys() (WHY??).
|
||||
*
|
||||
* Skip the earlier one. */
|
||||
return idx + 1 < build_list_len && build_list[idx].key_idx == build_list[idx + 1].key_idx
|
||||
&& build_list[idx].key_type == build_list[idx + 1].key_type
|
||||
&& nm_streq(build_list[idx].s_key, build_list[idx + 1].s_key);
|
||||
|
|
@ -758,7 +758,7 @@ _build_list_match_key_w_name_impl(const char *key,
|
|||
}
|
||||
|
||||
/* if base_name is followed by a zero, then it must be
|
||||
* only a zero, nothing else. */
|
||||
* only a zero, nothing else. */
|
||||
if (key[0] == '0') {
|
||||
if (key[1] != '\0')
|
||||
return FALSE;
|
||||
|
|
@ -1232,20 +1232,20 @@ get_bytes(KeyfileReaderInfo *info,
|
|||
GBytes * result;
|
||||
|
||||
/* New format: just a string
|
||||
* Old format: integer list; e.g. 11;25;38;
|
||||
*/
|
||||
* Old format: integer list; e.g. 11;25;38;
|
||||
*/
|
||||
tmp_string = nm_keyfile_plugin_kf_get_string(info->keyfile, setting_name, key, NULL);
|
||||
if (!tmp_string)
|
||||
return NULL;
|
||||
|
||||
/* if the string is empty, we return an empty GBytes array.
|
||||
* Note that for NM_SETTING_802_1X_PASSWORD_RAW both %NULL and
|
||||
* an empty GBytes are valid, and shall be destinguished. */
|
||||
* Note that for NM_SETTING_802_1X_PASSWORD_RAW both %NULL and
|
||||
* an empty GBytes are valid, and shall be destinguished. */
|
||||
if (!tmp_string[0]) {
|
||||
/* note that even if @zero_terminate is TRUE, we return an empty
|
||||
* byte-array. The reason is that zero_terminate is there to terminate
|
||||
* *valid* strings. It's not there to terminated invalid (empty) strings.
|
||||
*/
|
||||
* byte-array. The reason is that zero_terminate is there to terminate
|
||||
* *valid* strings. It's not there to terminated invalid (empty) strings.
|
||||
*/
|
||||
return g_bytes_new_static("", 0);
|
||||
}
|
||||
|
||||
|
|
@ -1314,20 +1314,20 @@ get_bytes(KeyfileReaderInfo *info,
|
|||
#undef DIGIT
|
||||
|
||||
/* Old format; list of ints. We already did a strict validation of the
|
||||
* string format before. We expect that this conversion cannot fail. */
|
||||
* string format before. We expect that this conversion cannot fail. */
|
||||
if (d > 0) {
|
||||
/* note that @zero_terminate does not add a terminating '\0' to
|
||||
* binary data as an integer list. If the bytes are expressed as
|
||||
* an integer list, all potential NUL characters are supposed to
|
||||
* be included there explicitly.
|
||||
*
|
||||
* However, in the spirit of defensive programming, we do append a
|
||||
* NUL character to the buffer, although this character is hidden
|
||||
* and only a mitigation for bugs. */
|
||||
* binary data as an integer list. If the bytes are expressed as
|
||||
* an integer list, all potential NUL characters are supposed to
|
||||
* be included there explicitly.
|
||||
*
|
||||
* However, in the spirit of defensive programming, we do append a
|
||||
* NUL character to the buffer, although this character is hidden
|
||||
* and only a mitigation for bugs. */
|
||||
|
||||
if (d + 10 < bin->len) {
|
||||
/* hm, too much unused memory. Copy the memory to a suitable
|
||||
* sized buffer. */
|
||||
* sized buffer. */
|
||||
return nm_secret_copy_to_gbytes(bin->bin, d);
|
||||
}
|
||||
|
||||
|
|
@ -1447,7 +1447,7 @@ nm_keyfile_detect_unqualified_path_scheme(const char * base_dir,
|
|||
/* If there's a trailing zero tell g_utf8_validate() to validate until the zero */
|
||||
if (data[data_len - 1] == '\0') {
|
||||
/* setting it to -1, would mean we accept data to contain NUL characters before the
|
||||
* end. Don't accept any NUL in [0 .. data_len-1[ . */
|
||||
* end. Don't accept any NUL in [0 .. data_len-1[ . */
|
||||
validate_len = data_len - 1;
|
||||
} else
|
||||
validate_len = data_len;
|
||||
|
|
@ -1455,14 +1455,14 @@ nm_keyfile_detect_unqualified_path_scheme(const char * base_dir,
|
|||
return NULL;
|
||||
|
||||
/* Might be a bare path without the file:// prefix; in that case
|
||||
* if it's an absolute path, use that, otherwise treat it as a
|
||||
* relative path to the current directory.
|
||||
*/
|
||||
* if it's an absolute path, use that, otherwise treat it as a
|
||||
* relative path to the current directory.
|
||||
*/
|
||||
|
||||
path = get_cert_path(base_dir, (const guint8 *) data, data_len);
|
||||
|
||||
/* FIXME(keyfile-parse-in-memory): it is wrong that keyfile reader makes decisions based on
|
||||
* the file systems content. The serialization/parsing should be entirely in-memory. */
|
||||
* the file systems content. The serialization/parsing should be entirely in-memory. */
|
||||
if (!memchr(data, '/', data_len) && !has_cert_ext(path)) {
|
||||
if (!consider_exists)
|
||||
return NULL;
|
||||
|
|
@ -1473,10 +1473,10 @@ nm_keyfile_detect_unqualified_path_scheme(const char * base_dir,
|
|||
exists = g_file_test(path, G_FILE_TEST_EXISTS);
|
||||
|
||||
/* Construct the proper value as required for the PATH scheme.
|
||||
*
|
||||
* When returning TRUE, we must also be sure that @data_len does not look like
|
||||
* the deprecated format of list of integers. With this implementation that is the
|
||||
* case, as long as @consider_exists is FALSE. */
|
||||
*
|
||||
* When returning TRUE, we must also be sure that @data_len does not look like
|
||||
* the deprecated format of list of integers. With this implementation that is the
|
||||
* case, as long as @consider_exists is FALSE. */
|
||||
path_len = strlen(path);
|
||||
pathuri_len = (NM_STRLEN(NM_KEYFILE_CERT_SCHEME_PREFIX_PATH) + 1) + path_len;
|
||||
pathuri = g_new(char, pathuri_len);
|
||||
|
|
@ -1542,7 +1542,7 @@ cert_parser(KeyfileReaderInfo *info, NMSetting *setting, const char *key)
|
|||
|
||||
if (path2[0] != '/') {
|
||||
/* we want to read absolute paths because we use keyfile as exchange
|
||||
* between different processes which might not have the same cwd. */
|
||||
* between different processes which might not have the same cwd. */
|
||||
path2_free = get_cert_path(info->base_dir,
|
||||
(const guint8 *) path2,
|
||||
bin_len - NM_STRLEN(NM_KEYFILE_CERT_SCHEME_PREFIX_PATH) - 1);
|
||||
|
|
@ -1550,9 +1550,9 @@ cert_parser(KeyfileReaderInfo *info, NMSetting *setting, const char *key)
|
|||
}
|
||||
|
||||
/* FIXME(keyfile-parse-in-memory): keyfile reader must not access the file system and
|
||||
* (in a first step) only operate in memory-only. If the presence of files should be checked,
|
||||
* then by invoking a callback (and possibly keyfile settings plugin would
|
||||
* collect the file names to be checked and check them later). */
|
||||
* (in a first step) only operate in memory-only. If the presence of files should be checked,
|
||||
* then by invoking a callback (and possibly keyfile settings plugin would
|
||||
* collect the file names to be checked and check them later). */
|
||||
if (!g_file_test(path2, G_FILE_TEST_EXISTS)) {
|
||||
handle_warn(info,
|
||||
key,
|
||||
|
|
@ -1590,7 +1590,7 @@ cert_parser(KeyfileReaderInfo *info, NMSetting *setting, const char *key)
|
|||
gs_unref_bytes GBytes *val = NULL;
|
||||
|
||||
/* Let's be strict here. We expect valid base64, no funny stuff!!
|
||||
* We didn't write such invalid data ourselfes and refuse to read it as blob. */
|
||||
* We didn't write such invalid data ourselfes and refuse to read it as blob. */
|
||||
if ((valid_base64 = (cdata_len % 4 == 0))) {
|
||||
for (i = 0; i < cdata_len; i++) {
|
||||
char c = cdata[i];
|
||||
|
|
@ -1624,8 +1624,8 @@ cert_parser(KeyfileReaderInfo *info, NMSetting *setting, const char *key)
|
|||
if (nm_setting_802_1x_check_cert_scheme(bin_decoded, bin_decoded_len, NULL)
|
||||
!= NM_SETTING_802_1X_CK_SCHEME_BLOB) {
|
||||
/* The blob probably starts with "file://". Setting the cert data will confuse NMSetting8021x.
|
||||
* In fact this is a limitation of NMSetting8021x which does not support setting blobs that start
|
||||
* with file://. Just warn and return TRUE to signal that we ~handled~ the setting. */
|
||||
* In fact this is a limitation of NMSetting8021x which does not support setting blobs that start
|
||||
* with file://. Just warn and return TRUE to signal that we ~handled~ the setting. */
|
||||
handle_warn(info,
|
||||
key,
|
||||
key,
|
||||
|
|
@ -1664,9 +1664,9 @@ cert_parser(KeyfileReaderInfo *info, NMSetting *setting, const char *key)
|
|||
if (nm_setting_802_1x_check_cert_scheme(bin, bin_len, NULL)
|
||||
!= NM_SETTING_802_1X_CK_SCHEME_BLOB) {
|
||||
/* The blob probably starts with "file://" but contains invalid characters for a path.
|
||||
* Setting the cert data will confuse NMSetting8021x.
|
||||
* In fact, NMSetting8021x does not support setting such binary data, so just warn and
|
||||
* continue. */
|
||||
* Setting the cert data will confuse NMSetting8021x.
|
||||
* In fact, NMSetting8021x does not support setting such binary data, so just warn and
|
||||
* continue. */
|
||||
handle_warn(info,
|
||||
key,
|
||||
key,
|
||||
|
|
@ -1693,17 +1693,17 @@ _parity_from_char(int ch)
|
|||
check = 1;
|
||||
|
||||
/* In older versions, parity was G_TYPE_CHAR/gint8, and the character
|
||||
* value was stored as integer.
|
||||
* For example parity=69 equals parity=E, meaning NM_SETTING_SERIAL_PARITY_EVEN.
|
||||
*
|
||||
* That means, certain values are reserved. Assert that these numbers
|
||||
* are not reused when we extend NMSettingSerialParity enum.
|
||||
* Actually, since NM_SETTING_SERIAL_PARITY is g_param_spec_enum(),
|
||||
* we anyway cannot extend the enum without breaking API...
|
||||
*
|
||||
* [1] commit "a91e60902e libnm-core: make NMSettingSerial:parity an enum"
|
||||
* [2] https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a91e60902eabae1de93d61323dae6ac894b5d40f
|
||||
*/
|
||||
* value was stored as integer.
|
||||
* For example parity=69 equals parity=E, meaning NM_SETTING_SERIAL_PARITY_EVEN.
|
||||
*
|
||||
* That means, certain values are reserved. Assert that these numbers
|
||||
* are not reused when we extend NMSettingSerialParity enum.
|
||||
* Actually, since NM_SETTING_SERIAL_PARITY is g_param_spec_enum(),
|
||||
* we anyway cannot extend the enum without breaking API...
|
||||
*
|
||||
* [1] commit "a91e60902e libnm-core: make NMSettingSerial:parity an enum"
|
||||
* [2] https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a91e60902eabae1de93d61323dae6ac894b5d40f
|
||||
*/
|
||||
g_assert(G_IS_ENUM_CLASS(klass));
|
||||
for (i = 0; i < klass->n_values; i++) {
|
||||
const GEnumValue *v = &klass->values[i];
|
||||
|
|
@ -1741,9 +1741,9 @@ parity_parser(KeyfileReaderInfo *info, NMSetting *setting, const char *key)
|
|||
gint64 i64;
|
||||
|
||||
/* Keyfile traditionally stored this as the ASCII value for 'E', 'o', or 'n'.
|
||||
* We now accept either that or the (case-insensitive) character itself (but
|
||||
* still always write it the old way, for backward compatibility).
|
||||
*/
|
||||
* We now accept either that or the (case-insensitive) character itself (but
|
||||
* still always write it the old way, for backward compatibility).
|
||||
*/
|
||||
tmp_str = nm_keyfile_plugin_kf_get_value(info->keyfile, setting_name, key, &err);
|
||||
if (err)
|
||||
goto out_err;
|
||||
|
|
@ -1759,8 +1759,8 @@ parity_parser(KeyfileReaderInfo *info, NMSetting *setting, const char *key)
|
|||
if (i64 != G_MININT64 && errno == 0) {
|
||||
if ((parity = _parity_from_char(i64)) >= 0) {
|
||||
/* another oddity: the string is a valid number. However, if the numeric values
|
||||
* is one of the supported ASCII codes, accept it (like 69 for 'E').
|
||||
*/
|
||||
* is one of the supported ASCII codes, accept it (like 69 for 'E').
|
||||
*/
|
||||
goto parity_good;
|
||||
}
|
||||
|
||||
|
|
@ -2102,10 +2102,10 @@ write_ip_values(GKeyFile * file,
|
|||
nm_str_buf_append_printf(&output, "%s/%u", addr, plen);
|
||||
if (metric != -1 || gw) {
|
||||
/* Older versions of the plugin do not support the form
|
||||
* "a.b.c.d/plen,,metric", so, we always have to write the
|
||||
* gateway, even if there isn't one.
|
||||
* The current version supports reading of the above form.
|
||||
*/
|
||||
* "a.b.c.d/plen,,metric", so, we always have to write the
|
||||
* gateway, even if there isn't one.
|
||||
* The current version supports reading of the above form.
|
||||
*/
|
||||
if (!gw) {
|
||||
if (addr_family == AF_INET)
|
||||
gw = "0.0.0.0";
|
||||
|
|
@ -2370,9 +2370,9 @@ write_hash_of_string(GKeyFile *file, NMSetting *setting, const char *key, const
|
|||
property = keys[i];
|
||||
|
||||
/* Handle VPN secrets specially; they are nested in the property's hash;
|
||||
* we don't want to write them if the secret is not saved, not required,
|
||||
* or owned by a user's secret agent.
|
||||
*/
|
||||
* we don't want to write them if the secret is not saved, not required,
|
||||
* or owned by a user's secret agent.
|
||||
*/
|
||||
if (vpn_secrets) {
|
||||
NMSettingSecretFlags secret_flags = NM_SETTING_SECRET_FLAG_NONE;
|
||||
|
||||
|
|
@ -2413,8 +2413,8 @@ ssid_writer(KeyfileWriterInfo *info, NMSetting *setting, const char *key, const
|
|||
}
|
||||
|
||||
/* Check whether each byte is printable. If not, we have to use an
|
||||
* integer list, otherwise we can just use a string.
|
||||
*/
|
||||
* integer list, otherwise we can just use a string.
|
||||
*/
|
||||
for (i = 0; i < ssid_len; i++) {
|
||||
const char c = ssid_data[i];
|
||||
|
||||
|
|
@ -2433,7 +2433,7 @@ ssid_writer(KeyfileWriterInfo *info, NMSetting *setting, const char *key, const
|
|||
ssid = g_strndup((char *) ssid_data, ssid_len);
|
||||
else {
|
||||
/* Escape semicolons with backslashes to make strings
|
||||
* containing ';', such as '16;17;' unambiguous */
|
||||
* containing ';', such as '16;17;' unambiguous */
|
||||
gsize j = 0;
|
||||
|
||||
ssid = g_malloc(ssid_len + semicolons + 1);
|
||||
|
|
@ -2497,8 +2497,8 @@ cert_writer_default(NMConnection * connection,
|
|||
g_assert(path);
|
||||
|
||||
/* If the path is relative, make it an absolute path.
|
||||
* Relative paths make a keyfile not easily usable in another
|
||||
* context. */
|
||||
* Relative paths make a keyfile not easily usable in another
|
||||
* context. */
|
||||
if (path[0] && path[0] != '/') {
|
||||
base_dir = g_get_current_dir();
|
||||
path_free = g_strconcat(base_dir, "/", path, NULL);
|
||||
|
|
@ -2507,8 +2507,8 @@ cert_writer_default(NMConnection * connection,
|
|||
base_dir = g_path_get_dirname(path);
|
||||
|
||||
/* path cannot start with "file://" or "data:;base64,", because it is an absolute path.
|
||||
* Still, make sure that a prefix-less path will be recognized. This can happen
|
||||
* for example if the path is longer then 500 chars. */
|
||||
* Still, make sure that a prefix-less path will be recognized. This can happen
|
||||
* for example if the path is longer then 500 chars. */
|
||||
tmp = nm_keyfile_detect_unqualified_path_scheme(base_dir, path, -1, FALSE, NULL);
|
||||
if (tmp)
|
||||
nm_clear_g_free(&tmp);
|
||||
|
|
@ -2518,7 +2518,7 @@ cert_writer_default(NMConnection * connection,
|
|||
}
|
||||
|
||||
/* Path contains at least a '/', hence it cannot be recognized as the old
|
||||
* binary format consisting of a list of integers. */
|
||||
* binary format consisting of a list of integers. */
|
||||
|
||||
nm_keyfile_plugin_kf_set_string(file, setting_name, vtable->setting_key, path);
|
||||
} else if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) {
|
||||
|
|
@ -2543,11 +2543,11 @@ cert_writer_default(NMConnection * connection,
|
|||
vtable->uri_func(setting));
|
||||
} else {
|
||||
/* scheme_func() returns UNKNOWN in all other cases. The only valid case
|
||||
* where a scheme is allowed to be UNKNOWN, is unsetting the value. In this
|
||||
* case, we don't expect the writer to be called, because the default value
|
||||
* will not be serialized.
|
||||
* The only other reason for the scheme to be UNKNOWN is an invalid cert.
|
||||
* But our connection verifies, so that cannot happen either. */
|
||||
* where a scheme is allowed to be UNKNOWN, is unsetting the value. In this
|
||||
* case, we don't expect the writer to be called, because the default value
|
||||
* will not be serialized.
|
||||
* The only other reason for the scheme to be UNKNOWN is an invalid cert.
|
||||
* But our connection verifies, so that cannot happen either. */
|
||||
g_return_if_reached();
|
||||
}
|
||||
}
|
||||
|
|
@ -2631,8 +2631,8 @@ struct _ParseInfoProperty {
|
|||
bool has_parser_full : 1;
|
||||
|
||||
/* usually, we skip to write values that have their
|
||||
* default value. By setting this flag to TRUE, also
|
||||
* default values are written. */
|
||||
* default value. By setting this flag to TRUE, also
|
||||
* default values are written. */
|
||||
bool writer_persist_default : 1;
|
||||
};
|
||||
|
||||
|
|
@ -3021,10 +3021,10 @@ read_one_setting_value(KeyfileReaderInfo * info,
|
|||
== G_PARAM_WRITABLE);
|
||||
|
||||
/* Check for the exact key in the GKeyFile if required. Most setting
|
||||
* properties map 1:1 to a key in the GKeyFile, but for those properties
|
||||
* like IP addresses and routes where more than one value is actually
|
||||
* encoded by the setting property, this won't be true.
|
||||
*/
|
||||
* properties map 1:1 to a key in the GKeyFile, but for those properties
|
||||
* like IP addresses and routes where more than one value is actually
|
||||
* encoded by the setting property, this won't be true.
|
||||
*/
|
||||
if ((!pip || !pip->parser_no_check_key)
|
||||
&& !nm_keyfile_plugin_kf_has_key(keyfile, setting_info->setting_name, key, &err)) {
|
||||
/* Key doesn't exist or an error occurred, thus nothing to do. */
|
||||
|
|
@ -3262,17 +3262,17 @@ _read_setting(KeyfileReaderInfo *info)
|
|||
GVariant * variant;
|
||||
|
||||
/* a GKeyFile can return duplicate keys, there is just no API to make sense
|
||||
* of them. Skip them. */
|
||||
* of them. Skip them. */
|
||||
if (k + 1 < n_keys && nm_streq(key, keys[k + 1]))
|
||||
continue;
|
||||
|
||||
/* currently, the API is very simple. The setting class just returns
|
||||
* the desired variant type, and keyfile reader will try to parse
|
||||
* it accordingly. Note, that this does currently not allow, that
|
||||
* a particular key can contain different variant types, nor is it
|
||||
* very flexible in general.
|
||||
*
|
||||
* We add flexibility when we need it. Keep it simple for now. */
|
||||
* the desired variant type, and keyfile reader will try to parse
|
||||
* it accordingly. Note, that this does currently not allow, that
|
||||
* a particular key can contain different variant types, nor is it
|
||||
* very flexible in general.
|
||||
*
|
||||
* We add flexibility when we need it. Keep it simple for now. */
|
||||
variant_type =
|
||||
sett_info->detail.gendata_info->get_variant_type(sett_info, key, &local);
|
||||
if (!variant_type) {
|
||||
|
|
@ -3365,7 +3365,7 @@ _read_setting_wireguard_peer(KeyfileReaderInfo *info)
|
|||
if (!nm_utils_base64secret_normalize(cstr, NM_WIREGUARD_PUBLIC_KEY_LEN, &str)
|
||||
|| !nm_streq0(str, cstr)) {
|
||||
/* the group name must be identical to the normalized(!) key, so that it
|
||||
* is uniquely identified. */
|
||||
* is uniquely identified. */
|
||||
handle_warn(info,
|
||||
NULL,
|
||||
NM_SETTING_WIREGUARD_PEERS,
|
||||
|
|
@ -3518,7 +3518,7 @@ _read_setting_vpn_secrets(KeyfileReaderInfo *info)
|
|||
s_vpn = nm_connection_get_setting_vpn(info->connection);
|
||||
if (!s_vpn) {
|
||||
/* if we don't also have a [vpn] section (which must be parsed earlier),
|
||||
* we don't do anything. */
|
||||
* we don't do anything. */
|
||||
nm_assert(!g_key_file_has_group(info->keyfile, "vpn"));
|
||||
return;
|
||||
}
|
||||
|
|
@ -3654,8 +3654,8 @@ nm_keyfile_read(GKeyFile * keyfile,
|
|||
}
|
||||
|
||||
/* Make sure that we have 'interface-name' even if it was specified in the
|
||||
* "wrong" (ie, deprecated) group.
|
||||
*/
|
||||
* "wrong" (ie, deprecated) group.
|
||||
*/
|
||||
if (!nm_setting_connection_get_interface_name(s_con)
|
||||
&& nm_setting_connection_get_connection_type(s_con)) {
|
||||
gs_free char *interface_name = NULL;
|
||||
|
|
@ -3708,13 +3708,13 @@ write_setting_value(KeyfileWriterInfo * info,
|
|||
if (!pip) {
|
||||
if (!setting_info) {
|
||||
/* the setting type is unknown. That is highly unexpected
|
||||
* (and as this is currently only called from NetworkManager
|
||||
* daemon, not possible).
|
||||
*
|
||||
* Still, handle it gracefully, because later keyfile writer will become
|
||||
* public API of libnm, where @setting is (untrusted) user input.
|
||||
*
|
||||
* Gracefully here just means: ignore the setting. */
|
||||
* (and as this is currently only called from NetworkManager
|
||||
* daemon, not possible).
|
||||
*
|
||||
* Still, handle it gracefully, because later keyfile writer will become
|
||||
* public API of libnm, where @setting is (untrusted) user input.
|
||||
*
|
||||
* Gracefully here just means: ignore the setting. */
|
||||
return;
|
||||
}
|
||||
if (!property_info->param_spec)
|
||||
|
|
@ -3733,10 +3733,10 @@ write_setting_value(KeyfileWriterInfo * info,
|
|||
nm_assert(property_info->param_spec);
|
||||
|
||||
/* Don't write secrets that are owned by user secret agents or aren't
|
||||
* supposed to be saved. VPN secrets are handled specially though since
|
||||
* the secret flags there are in a third-level hash in the 'secrets'
|
||||
* property.
|
||||
*/
|
||||
* supposed to be saved. VPN secrets are handled specially though since
|
||||
* the secret flags there are in a third-level hash in the 'secrets'
|
||||
* property.
|
||||
*/
|
||||
if ((property_info->param_spec->flags & NM_SETTING_PARAM_SECRET)
|
||||
&& !NM_IS_SETTING_VPN(setting)) {
|
||||
NMSettingSecretFlags secret_flags = NM_SETTING_SECRET_FLAG_NONE;
|
||||
|
|
@ -3885,9 +3885,9 @@ _write_setting_wireguard(NMSetting *setting, KeyfileWriterInfo *info)
|
|||
}
|
||||
|
||||
/* usually, we don't persist the secret-flags 0 (because they are the default).
|
||||
* For WireGuard peers, the default secret-flags for preshared-key are 4 (not-required).
|
||||
* So, in this case behave differently: a missing preshared-key-flag setting means
|
||||
* "not-required". */
|
||||
* For WireGuard peers, the default secret-flags for preshared-key are 4 (not-required).
|
||||
* So, in this case behave differently: a missing preshared-key-flag setting means
|
||||
* "not-required". */
|
||||
if (secret_flags != NM_SETTING_SECRET_FLAG_NOT_REQUIRED) {
|
||||
g_key_file_set_int64(info->keyfile,
|
||||
group,
|
||||
|
|
@ -3998,9 +3998,9 @@ nm_keyfile_write(NMConnection * connection,
|
|||
(guint64) g_variant_get_uint32(v));
|
||||
} else {
|
||||
/* BUG: The variant type is not implemented. Since the connection
|
||||
* verifies, this can only mean we either wrongly didn't reject
|
||||
* the connection as invalid, or we didn't properly implement the
|
||||
* variant type. */
|
||||
* verifies, this can only mean we either wrongly didn't reject
|
||||
* the connection as invalid, or we didn't properly implement the
|
||||
* variant type. */
|
||||
nm_assert_not_reached();
|
||||
continue;
|
||||
}
|
||||
|
|
@ -4023,7 +4023,7 @@ nm_keyfile_write(NMConnection * connection,
|
|||
/* we have a section for the setting. Nothing to do. */
|
||||
} else {
|
||||
/* ensure the group is present. There is no API for that, so add and remove
|
||||
* a dummy key. */
|
||||
* a dummy key. */
|
||||
g_key_file_set_value(info.keyfile, setting_alias ?: setting_name, ".X", "1");
|
||||
g_key_file_remove_key(info.keyfile, setting_alias ?: setting_name, ".X", NULL);
|
||||
}
|
||||
|
|
@ -4090,8 +4090,8 @@ nm_keyfile_utils_ignore_filename(const char *filename, gboolean require_extensio
|
|||
|
||||
if (!base[0]) {
|
||||
/* this check above with strrchr() also rejects "/some/path/with/trailing/slash/",
|
||||
* but that is fine, because such a path would name a directory, and we are not
|
||||
* interested in directories. */
|
||||
* but that is fine, because such a path would name a directory, and we are not
|
||||
* interested in directories. */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -4113,9 +4113,9 @@ nm_keyfile_utils_ignore_filename(const char *filename, gboolean require_extensio
|
|||
return TRUE;
|
||||
|
||||
/* Ignore temporary files
|
||||
*
|
||||
* This check is also important to ignore .nmload files (see
|
||||
* %NM_KEYFILE_PATH_SUFFIX_NMMETA). */
|
||||
*
|
||||
* This check is also important to ignore .nmload files (see
|
||||
* %NM_KEYFILE_PATH_SUFFIX_NMMETA). */
|
||||
if (check_mkstemp_suffix(base))
|
||||
return TRUE;
|
||||
|
||||
|
|
@ -4131,9 +4131,9 @@ char *
|
|||
nm_keyfile_utils_create_filename(const char *name, gboolean with_extension)
|
||||
{
|
||||
/* keyfile used to escape with '*', do not change that behavior.
|
||||
*
|
||||
* But for newly added escapings, use '_' instead.
|
||||
* Also, @with_extension is new-style. */
|
||||
*
|
||||
* But for newly added escapings, use '_' instead.
|
||||
* Also, @with_extension is new-style. */
|
||||
const char ESCAPE_CHAR = with_extension ? '_' : '*';
|
||||
const char ESCAPE_CHAR2 = '_';
|
||||
NMStrBuf str;
|
||||
|
|
@ -4156,7 +4156,7 @@ nm_keyfile_utils_create_filename(const char *name, gboolean with_extension)
|
|||
}
|
||||
|
||||
/* nm_keyfile_utils_create_filename() must avoid anything that ignore_filename() would reject.
|
||||
* We can escape here more aggressively then what we would read back. */
|
||||
* We can escape here more aggressively then what we would read back. */
|
||||
if (p[0] == '.')
|
||||
p[0] = ESCAPE_CHAR2;
|
||||
if (p[str.len - 1] == '~')
|
||||
|
|
@ -4241,8 +4241,8 @@ _nm_keyfile_handler_data_warn_get_message(const NMKeyfileHandlerData *handler_da
|
|||
|
||||
if (!handler_data->warn.message) {
|
||||
/* we cast the const away. @handler_data is const w.r.t. visible mutations
|
||||
* from POV of the user. Internally, we construct the message in
|
||||
* a lazy manner. It's like a mutable field in C++. */
|
||||
* from POV of the user. Internally, we construct the message in
|
||||
* a lazy manner. It's like a mutable field in C++. */
|
||||
NM_PRAGMA_WARNING_DISABLE("-Wformat-nonliteral")
|
||||
((NMKeyfileHandlerData *) handler_data)->warn.message =
|
||||
g_strdup_vprintf(handler_data->warn.fmt,
|
||||
|
|
|
|||
|
|
@ -360,12 +360,12 @@ constructed(GObject *object)
|
|||
return;
|
||||
case NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS:
|
||||
/* Ensure pid and uid to be representable as int32.
|
||||
* DBUS treats them as uint32, polkit library as int. */
|
||||
* DBUS treats them as uint32, polkit library as int. */
|
||||
if (priv->unix_process.pid > MIN(G_MAXINT, G_MAXINT32))
|
||||
break;
|
||||
if (priv->unix_process.uid > MIN(G_MAXINT, G_MAXINT32)) {
|
||||
/* for uid==-1, libpolkit-gobject-1 detects the user based on the process id.
|
||||
* Don't bother and require the user id as parameter. */
|
||||
* Don't bother and require the user id as parameter. */
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -374,17 +374,17 @@ constructed(GObject *object)
|
|||
|
||||
if (!priv->unix_process.start_time) {
|
||||
/* Is the process already gone? Then fail creation of the auth subject
|
||||
* by clearing the type. */
|
||||
* by clearing the type. */
|
||||
if (kill(priv->unix_process.pid, 0) != 0)
|
||||
_clear_private(self);
|
||||
|
||||
/* Otherwise, although we didn't detect a start_time, the process is still around.
|
||||
* That could be due to procfs mounted with hidepid. So just accept the request.
|
||||
*
|
||||
* Polkit on the other side, will accept 0 and try to lookup /proc/$PID/stat
|
||||
* itself (and if it fails to do so, assume a start-time of 0 and proceed).
|
||||
* The only combination that would fail here, is when NM is able to read the
|
||||
* start-time, but polkit is not. */
|
||||
* That could be due to procfs mounted with hidepid. So just accept the request.
|
||||
*
|
||||
* Polkit on the other side, will accept 0 and try to lookup /proc/$PID/stat
|
||||
* itself (and if it fails to do so, assume a start-time of 0 and proceed).
|
||||
* The only combination that would fail here, is when NM is able to read the
|
||||
* start-time, but polkit is not. */
|
||||
}
|
||||
return;
|
||||
case NM_AUTH_SUBJECT_TYPE_UNIX_SESSION:
|
||||
|
|
|
|||
|
|
@ -218,8 +218,8 @@ _ASSERT_data(void)
|
|||
d = nm_ethtool_data[id];
|
||||
if (i > 0) {
|
||||
/* since we assert that all optnames are sorted strictly monotonically increasing,
|
||||
* it also follows that there are no duplicates in the _by_name.
|
||||
* It also follows, that all names in nm_ethtool_data are unique. */
|
||||
* it also follows that there are no duplicates in the _by_name.
|
||||
* It also follows, that all names in nm_ethtool_data are unique. */
|
||||
if (strcmp(nm_ethtool_data[_by_name[i - 1]]->optname, d->optname) >= 0) {
|
||||
g_error("nm_ethtool_data is not sorted asciibetically: %u/%s should be after %u/%s",
|
||||
i - 1,
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
|
||||
if (nm_utils_is_uuid(priv->parent)) {
|
||||
/* If we have an NMSettingConnection:master with slave-type="6lowpan",
|
||||
* then it must be the same UUID.
|
||||
*/
|
||||
* then it must be the same UUID.
|
||||
*/
|
||||
if (s_con) {
|
||||
const char *master = NULL, *slave_type = NULL;
|
||||
|
||||
|
|
@ -208,13 +208,13 @@ nm_setting_6lowpan_class_init(NMSetting6LowpanClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSetting6Lowpan:parent:
|
||||
*
|
||||
* If given, specifies the parent interface name or parent connection UUID
|
||||
* from which this 6LowPAN interface should be created.
|
||||
*
|
||||
* Since: 1.14
|
||||
**/
|
||||
* NMSetting6Lowpan:parent:
|
||||
*
|
||||
* If given, specifies the parent interface name or parent connection UUID
|
||||
* from which this 6LowPAN interface should be created.
|
||||
*
|
||||
* Since: 1.14
|
||||
**/
|
||||
obj_properties[PROP_PARENT] = g_param_spec_string(
|
||||
NM_SETTING_6LOWPAN_PARENT,
|
||||
"",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -349,10 +349,10 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
|||
setting_class->need_secrets = need_secrets;
|
||||
|
||||
/**
|
||||
* NMSettingAdsl:username:
|
||||
*
|
||||
* Username used to authenticate with the ADSL service.
|
||||
**/
|
||||
* NMSettingAdsl:username:
|
||||
*
|
||||
* Username used to authenticate with the ADSL service.
|
||||
**/
|
||||
obj_properties[PROP_USERNAME] = g_param_spec_string(NM_SETTING_ADSL_USERNAME,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -360,10 +360,10 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingAdsl:password:
|
||||
*
|
||||
* Password used to authenticate with the ADSL service.
|
||||
**/
|
||||
* NMSettingAdsl:password:
|
||||
*
|
||||
* Password used to authenticate with the ADSL service.
|
||||
**/
|
||||
obj_properties[PROP_PASSWORD] =
|
||||
g_param_spec_string(NM_SETTING_ADSL_PASSWORD,
|
||||
"",
|
||||
|
|
@ -372,10 +372,10 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingAdsl:password-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingAdsl:password property.
|
||||
**/
|
||||
* NMSettingAdsl:password-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingAdsl:password property.
|
||||
**/
|
||||
obj_properties[PROP_PASSWORD_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_ADSL_PASSWORD_FLAGS,
|
||||
"",
|
||||
|
|
@ -385,10 +385,10 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingAdsl:protocol:
|
||||
*
|
||||
* ADSL connection protocol. Can be "pppoa", "pppoe" or "ipoatm".
|
||||
**/
|
||||
* NMSettingAdsl:protocol:
|
||||
*
|
||||
* ADSL connection protocol. Can be "pppoa", "pppoe" or "ipoatm".
|
||||
**/
|
||||
obj_properties[PROP_PROTOCOL] = g_param_spec_string(NM_SETTING_ADSL_PROTOCOL,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -396,10 +396,10 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingAdsl:encapsulation:
|
||||
*
|
||||
* Encapsulation of ADSL connection. Can be "vcmux" or "llc".
|
||||
**/
|
||||
* NMSettingAdsl:encapsulation:
|
||||
*
|
||||
* Encapsulation of ADSL connection. Can be "vcmux" or "llc".
|
||||
**/
|
||||
obj_properties[PROP_ENCAPSULATION] =
|
||||
g_param_spec_string(NM_SETTING_ADSL_ENCAPSULATION,
|
||||
"",
|
||||
|
|
@ -408,10 +408,10 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingAdsl:vpi:
|
||||
*
|
||||
* VPI of ADSL connection
|
||||
**/
|
||||
* NMSettingAdsl:vpi:
|
||||
*
|
||||
* VPI of ADSL connection
|
||||
**/
|
||||
obj_properties[PROP_VPI] = g_param_spec_uint(NM_SETTING_ADSL_VPI,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -421,10 +421,10 @@ nm_setting_adsl_class_init(NMSettingAdslClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingAdsl:vci:
|
||||
*
|
||||
* VCI of ADSL connection
|
||||
**/
|
||||
* NMSettingAdsl:vci:
|
||||
*
|
||||
* VCI of ADSL connection
|
||||
**/
|
||||
obj_properties[PROP_VCI] = g_param_spec_uint(NM_SETTING_ADSL_VCI,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -142,9 +142,9 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
|
||||
if (!gsm && !cdma) {
|
||||
/* We can't return MISSING_SETTING here, because we don't know
|
||||
* whether to prefix the message with NM_SETTING_GSM_SETTING_NAME or
|
||||
* NM_SETTING_CDMA_SETTING_NAME.
|
||||
*/
|
||||
* whether to prefix the message with NM_SETTING_GSM_SETTING_NAME or
|
||||
* NM_SETTING_CDMA_SETTING_NAME.
|
||||
*/
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_SETTING,
|
||||
|
|
@ -157,8 +157,8 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
}
|
||||
}
|
||||
/* PANU doesn't need a 'type' setting since no further configuration
|
||||
* is required at the interface level.
|
||||
*/
|
||||
* is required at the interface level.
|
||||
*/
|
||||
|
||||
/* NAP mode needs a bridge setting, and a bridge needs a name. */
|
||||
if (nm_streq(type, NM_SETTING_BLUETOOTH_TYPE_NAP)) {
|
||||
|
|
@ -296,10 +296,10 @@ nm_setting_bluetooth_class_init(NMSettingBluetoothClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingBluetooth:bdaddr:
|
||||
*
|
||||
* The Bluetooth address of the device.
|
||||
**/
|
||||
* NMSettingBluetooth:bdaddr:
|
||||
*
|
||||
* The Bluetooth address of the device.
|
||||
**/
|
||||
obj_properties[PROP_BDADDR] = g_param_spec_string(
|
||||
NM_SETTING_BLUETOOTH_BDADDR,
|
||||
"",
|
||||
|
|
@ -311,11 +311,11 @@ nm_setting_bluetooth_class_init(NMSettingBluetoothClass *klass)
|
|||
&nm_sett_info_propert_type_mac_address);
|
||||
|
||||
/**
|
||||
* NMSettingBluetooth:type:
|
||||
*
|
||||
* Either "dun" for Dial-Up Networking connections or "panu" for Personal
|
||||
* Area Networking connections to devices supporting the NAP profile.
|
||||
**/
|
||||
* NMSettingBluetooth:type:
|
||||
*
|
||||
* Either "dun" for Dial-Up Networking connections or "panu" for Personal
|
||||
* Area Networking connections to devices supporting the NAP profile.
|
||||
**/
|
||||
obj_properties[PROP_TYPE] = g_param_spec_string(NM_SETTING_BLUETOOTH_TYPE,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ _bond_get_option_normalized(NMSettingBond *self, const char *option, gboolean ge
|
|||
|
||||
if (mode == NM_BOND_MODE_UNKNOWN) {
|
||||
/* the mode is unknown, consequently, there is no normalized/default
|
||||
* value either. */
|
||||
* value either. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ _bond_get_option_normalized(NMSettingBond *self, const char *option, gboolean ge
|
|||
int miimon;
|
||||
|
||||
/* if arp_interval is explicitly set and miimon is not, then disable miimon
|
||||
* (and related updelay and downdelay) as recommended by the kernel docs */
|
||||
* (and related updelay and downdelay) as recommended by the kernel docs */
|
||||
miimon =
|
||||
_nm_utils_ascii_str_to_int64(_bond_get_option(self, NM_SETTING_BOND_OPTION_MIIMON),
|
||||
10,
|
||||
|
|
@ -317,7 +317,7 @@ _bond_get_option_normalized(NMSettingBond *self, const char *option, gboolean ge
|
|||
value = _bond_get_option(self, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA);
|
||||
} else if (NM_IN_STRSET(option, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE)) {
|
||||
/* "active_slave" is deprecated, and an alias for "primary". The property
|
||||
* itself always normalizes to %NULL. */
|
||||
* itself always normalizes to %NULL. */
|
||||
value = NULL;
|
||||
} else if (NM_IN_STRSET(option, NM_SETTING_BOND_OPTION_PRIMARY)) {
|
||||
/* "active_slave" is deprecated, and an alias for "primary". */
|
||||
|
|
@ -798,14 +798,14 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
num_unsol_na = _atoi(_bond_get_option_or_default(self, NM_SETTING_BOND_OPTION_NUM_UNSOL_NA));
|
||||
|
||||
/* Option restrictions:
|
||||
*
|
||||
* arp_interval conflicts [ alb, tlb ]
|
||||
* arp_interval needs arp_ip_target
|
||||
* arp_validate does not work with [ BOND_MODE_8023AD, BOND_MODE_TLB, BOND_MODE_ALB ]
|
||||
* downdelay needs miimon
|
||||
* updelay needs miimon
|
||||
* primary needs [ active-backup, tlb, alb ]
|
||||
*/
|
||||
*
|
||||
* arp_interval conflicts [ alb, tlb ]
|
||||
* arp_interval needs arp_ip_target
|
||||
* arp_validate does not work with [ BOND_MODE_8023AD, BOND_MODE_TLB, BOND_MODE_ALB ]
|
||||
* downdelay needs miimon
|
||||
* updelay needs miimon
|
||||
* primary needs [ active-backup, tlb, alb ]
|
||||
*/
|
||||
|
||||
/* Verify bond mode */
|
||||
mode_str = _bond_get_option(self, NM_SETTING_BOND_OPTION_MODE);
|
||||
|
|
@ -913,8 +913,8 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
}
|
||||
|
||||
/* arp_ip_target can only be used with arp_interval, and must
|
||||
* contain a comma-separated list of IPv4 addresses.
|
||||
*/
|
||||
* contain a comma-separated list of IPv4 addresses.
|
||||
*/
|
||||
arp_ip_target = _bond_get_option(self, NM_SETTING_BOND_OPTION_ARP_IP_TARGET);
|
||||
if (arp_interval > 0) {
|
||||
if (!arp_ip_target) {
|
||||
|
|
@ -1017,10 +1017,10 @@ options_equal_asym(NMSettingBond *s_bond, NMSettingBond *s_bond2, NMSettingCompa
|
|||
while (g_hash_table_iter_next(&iter, (gpointer *) &key, (gpointer *) &value)) {
|
||||
if (NM_FLAGS_HAS(flags, NM_SETTING_COMPARE_FLAG_INFERRABLE)) {
|
||||
/* when doing an inferrable match, the active-slave should be ignored
|
||||
* as it might be differ from the setting in the connection.
|
||||
*
|
||||
* Also, the fail_over_mac setting can change, see for example
|
||||
* https://bugzilla.redhat.com/show_bug.cgi?id=1375558#c8 */
|
||||
* as it might be differ from the setting in the connection.
|
||||
*
|
||||
* Also, the fail_over_mac setting can change, see for example
|
||||
* https://bugzilla.redhat.com/show_bug.cgi?id=1375558#c8 */
|
||||
if (NM_IN_STRSET(key, "fail_over_mac", "active_slave"))
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1143,19 +1143,19 @@ nm_setting_bond_class_init(NMSettingBondClass *klass)
|
|||
setting_class->compare_property = compare_property;
|
||||
|
||||
/**
|
||||
* NMSettingBond:options: (type GHashTable(utf8,utf8)):
|
||||
*
|
||||
* 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]).
|
||||
**/
|
||||
* NMSettingBond:options: (type GHashTable(utf8,utf8)):
|
||||
*
|
||||
* 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]).
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: options
|
||||
* variable: BONDING_OPTS
|
||||
* description: Bonding options.
|
||||
* example: BONDING_OPTS="miimon=100 mode=broadcast"
|
||||
* ---end---
|
||||
*/
|
||||
* property: options
|
||||
* variable: BONDING_OPTS
|
||||
* description: Bonding options.
|
||||
* example: BONDING_OPTS="miimon=100 mode=broadcast"
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_OPTIONS] = g_param_spec_boxed(
|
||||
NM_SETTING_BOND_OPTIONS,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -482,18 +482,18 @@ nm_setting_bridge_port_class_init(NMSettingBridgePortClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingBridgePort:priority:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) priority of this bridge port.
|
||||
**/
|
||||
* NMSettingBridgePort:priority:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) priority of this bridge port.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority
|
||||
* variable: BRIDGING_OPTS: priority=
|
||||
* values: 0 - 63
|
||||
* default: 32
|
||||
* description: STP priority.
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority
|
||||
* variable: BRIDGING_OPTS: priority=
|
||||
* values: 0 - 63
|
||||
* default: 32
|
||||
* description: STP priority.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_PORT_PRIORITY,
|
||||
"",
|
||||
|
|
@ -504,19 +504,19 @@ nm_setting_bridge_port_class_init(NMSettingBridgePortClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridgePort:path-cost:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) port cost for destinations via this
|
||||
* port.
|
||||
**/
|
||||
* NMSettingBridgePort:path-cost:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) port cost for destinations via this
|
||||
* port.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: path-cost
|
||||
* variable: BRIDGING_OPTS: path_cost=
|
||||
* values: 1 - 65535
|
||||
* default: 100
|
||||
* description: STP cost.
|
||||
* ---end---
|
||||
*/
|
||||
* property: path-cost
|
||||
* variable: BRIDGING_OPTS: path_cost=
|
||||
* values: 1 - 65535
|
||||
* default: 100
|
||||
* description: STP cost.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PATH_COST] = g_param_spec_uint(NM_SETTING_BRIDGE_PORT_PATH_COST,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -526,18 +526,18 @@ nm_setting_bridge_port_class_init(NMSettingBridgePortClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridgePort:hairpin-mode:
|
||||
*
|
||||
* Enables or disables "hairpin mode" for the port, which allows frames to
|
||||
* be sent back out through the port the frame was received on.
|
||||
**/
|
||||
* NMSettingBridgePort:hairpin-mode:
|
||||
*
|
||||
* Enables or disables "hairpin mode" for the port, which allows frames to
|
||||
* be sent back out through the port the frame was received on.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: hairpin-mode
|
||||
* variable: BRIDGING_OPTS: hairpin_mode=
|
||||
* default: yes
|
||||
* description: Hairpin mode of the bridge port.
|
||||
* ---end---
|
||||
*/
|
||||
* property: hairpin-mode
|
||||
* variable: BRIDGING_OPTS: hairpin_mode=
|
||||
* default: yes
|
||||
* description: Hairpin mode of the bridge port.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_HAIRPIN_MODE] = g_param_spec_boolean(
|
||||
NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE,
|
||||
"",
|
||||
|
|
@ -546,30 +546,30 @@ nm_setting_bridge_port_class_init(NMSettingBridgePortClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridgePort:vlans: (type GPtrArray(NMBridgeVlan))
|
||||
*
|
||||
* Array of bridge VLAN objects. In addition to the VLANs
|
||||
* specified here, the port will also have the default-pvid
|
||||
* VLAN configured on the bridge by the bridge.vlan-default-pvid
|
||||
* property.
|
||||
*
|
||||
* In nmcli the VLAN list can be specified with the following
|
||||
* syntax:
|
||||
*
|
||||
* $vid [pvid] [untagged] [, $vid [pvid] [untagged]]...
|
||||
*
|
||||
* where $vid is either a single id between 1 and 4094 or a
|
||||
* range, represented as a couple of ids separated by a dash.
|
||||
*
|
||||
* Since: 1.18
|
||||
**/
|
||||
* NMSettingBridgePort:vlans: (type GPtrArray(NMBridgeVlan))
|
||||
*
|
||||
* Array of bridge VLAN objects. In addition to the VLANs
|
||||
* specified here, the port will also have the default-pvid
|
||||
* VLAN configured on the bridge by the bridge.vlan-default-pvid
|
||||
* property.
|
||||
*
|
||||
* In nmcli the VLAN list can be specified with the following
|
||||
* syntax:
|
||||
*
|
||||
* $vid [pvid] [untagged] [, $vid [pvid] [untagged]]...
|
||||
*
|
||||
* where $vid is either a single id between 1 and 4094 or a
|
||||
* range, represented as a couple of ids separated by a dash.
|
||||
*
|
||||
* Since: 1.18
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: vlans
|
||||
* variable: BRIDGE_PORT_VLANS
|
||||
* description: List of VLANs on the bridge port
|
||||
* example: BRIDGE_PORT_VLANS="1 pvid untagged,20,300-400 untagged"
|
||||
* ---end---
|
||||
*/
|
||||
* property: vlans
|
||||
* variable: BRIDGE_PORT_VLANS
|
||||
* description: List of VLANs on the bridge port
|
||||
* example: BRIDGE_PORT_VLANS="1 pvid untagged,20,300-400 untagged"
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_VLANS] = g_param_spec_boxed(NM_SETTING_BRIDGE_PORT_VLANS,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -266,9 +266,9 @@ gboolean
|
|||
nm_bridge_vlan_get_vid_range(const NMBridgeVlan *vlan, guint16 *vid_start, guint16 *vid_end)
|
||||
{
|
||||
/* with LTO and optimization, the compiler complains that the
|
||||
* output variables are not initialized. In practice, the function
|
||||
* only sets the output on success. But make the compiler happy.
|
||||
*/
|
||||
* output variables are not initialized. In practice, the function
|
||||
* only sets the output on success. But make the compiler happy.
|
||||
*/
|
||||
NM_SET_OUT(vid_start, 0);
|
||||
NM_SET_OUT(vid_end, 0);
|
||||
|
||||
|
|
@ -431,8 +431,8 @@ nm_bridge_vlan_to_str(const NMBridgeVlan *vlan, GError **error)
|
|||
g_return_val_if_fail(!error || !*error, NULL);
|
||||
|
||||
/* The function never fails at the moment, but it might in the
|
||||
* future if more parameters are added to the object that could
|
||||
* make it invalid. */
|
||||
* future if more parameters are added to the object that could
|
||||
* make it invalid. */
|
||||
|
||||
nm_str_buf_init(&string, NM_UTILS_GET_NEXT_REALLOC_SIZE_32, FALSE);
|
||||
|
||||
|
|
@ -1610,35 +1610,35 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingBridge:mac-address:
|
||||
*
|
||||
* If specified, the MAC address of bridge. When creating a new bridge, this
|
||||
* MAC address will be set.
|
||||
*
|
||||
* If this field is left unspecified, the "ethernet.cloned-mac-address" is
|
||||
* referred instead to generate the initial MAC address. Note that setting
|
||||
* "ethernet.cloned-mac-address" anyway overwrites the MAC address of
|
||||
* the bridge later while activating the bridge. Hence, this property
|
||||
* is deprecated.
|
||||
*
|
||||
* Deprecated: 1.12: Use the ethernet.cloned-mac-address property instead.
|
||||
**/
|
||||
* NMSettingBridge:mac-address:
|
||||
*
|
||||
* If specified, the MAC address of bridge. When creating a new bridge, this
|
||||
* MAC address will be set.
|
||||
*
|
||||
* If this field is left unspecified, the "ethernet.cloned-mac-address" is
|
||||
* referred instead to generate the initial MAC address. Note that setting
|
||||
* "ethernet.cloned-mac-address" anyway overwrites the MAC address of
|
||||
* the bridge later while activating the bridge. Hence, this property
|
||||
* is deprecated.
|
||||
*
|
||||
* Deprecated: 1.12: Use the ethernet.cloned-mac-address property instead.
|
||||
**/
|
||||
/* ---keyfile---
|
||||
* property: mac-address
|
||||
* format: usual hex-digits-and-colons notation
|
||||
* description: MAC address in traditional hex-digits-and-colons notation,
|
||||
* or semicolon separated list of 6 decimal bytes (obsolete)
|
||||
* example: mac-address=00:22:68:12:79:A2
|
||||
* mac-address=0;34;104;18;121;162;
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: mac-address
|
||||
* variable: BRIDGE_MACADDR(+)
|
||||
* description: MAC address of the bridge. Note that this requires a recent
|
||||
* kernel support, originally introduced in 3.15 upstream kernel)
|
||||
* BRIDGE_MACADDR for bridges is an NM extension.
|
||||
* ---end---
|
||||
*/
|
||||
* property: mac-address
|
||||
* format: usual hex-digits-and-colons notation
|
||||
* description: MAC address in traditional hex-digits-and-colons notation,
|
||||
* or semicolon separated list of 6 decimal bytes (obsolete)
|
||||
* example: mac-address=00:22:68:12:79:A2
|
||||
* mac-address=0;34;104;18;121;162;
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: mac-address
|
||||
* variable: BRIDGE_MACADDR(+)
|
||||
* description: MAC address of the bridge. Note that this requires a recent
|
||||
* kernel support, originally introduced in 3.15 upstream kernel)
|
||||
* BRIDGE_MACADDR for bridges is an NM extension.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_MAC_ADDRESS] = g_param_spec_string(
|
||||
NM_SETTING_BRIDGE_MAC_ADDRESS,
|
||||
"",
|
||||
|
|
@ -1650,17 +1650,17 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
&nm_sett_info_propert_type_mac_address);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:stp:
|
||||
*
|
||||
* Controls whether Spanning Tree Protocol (STP) is enabled for this bridge.
|
||||
**/
|
||||
* NMSettingBridge:stp:
|
||||
*
|
||||
* Controls whether Spanning Tree Protocol (STP) is enabled for this bridge.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: stp
|
||||
* variable: STP
|
||||
* default: no
|
||||
* description: Span tree protocol participation.
|
||||
* ---end---
|
||||
*/
|
||||
* property: stp
|
||||
* variable: STP
|
||||
* default: no
|
||||
* description: Span tree protocol participation.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_STP] = g_param_spec_boolean(NM_SETTING_BRIDGE_STP,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -1669,20 +1669,20 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:priority:
|
||||
*
|
||||
* Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower
|
||||
* values are "better"; the lowest priority bridge will be elected the root
|
||||
* bridge.
|
||||
**/
|
||||
* NMSettingBridge:priority:
|
||||
*
|
||||
* Sets the Spanning Tree Protocol (STP) priority for this bridge. Lower
|
||||
* values are "better"; the lowest priority bridge will be elected the root
|
||||
* bridge.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority
|
||||
* variable: BRIDGING_OPTS: priority=
|
||||
* values: 0 - 32768
|
||||
* default: 32768
|
||||
* description: STP priority.
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority
|
||||
* variable: BRIDGING_OPTS: priority=
|
||||
* values: 0 - 32768
|
||||
* default: 32768
|
||||
* description: STP priority.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_PRIORITY,
|
||||
"",
|
||||
|
|
@ -1693,18 +1693,18 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:forward-delay:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) forwarding delay, in seconds.
|
||||
**/
|
||||
* NMSettingBridge:forward-delay:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) forwarding delay, in seconds.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: forward-delay
|
||||
* variable: DELAY
|
||||
* values: 2 - 30
|
||||
* default: 15
|
||||
* description: STP forwarding delay.
|
||||
* ---end---
|
||||
*/
|
||||
* property: forward-delay
|
||||
* variable: DELAY
|
||||
* values: 2 - 30
|
||||
* default: 15
|
||||
* description: STP forwarding delay.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_FORWARD_DELAY] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_FORWARD_DELAY,
|
||||
"",
|
||||
|
|
@ -1715,18 +1715,18 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:hello-time:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) hello time, in seconds.
|
||||
**/
|
||||
* NMSettingBridge:hello-time:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) hello time, in seconds.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: hello-time
|
||||
* variable: BRIDGING_OPTS: hello_time=
|
||||
* values: 1 - 10
|
||||
* default: 2
|
||||
* description: STP hello time.
|
||||
* ---end---
|
||||
*/
|
||||
* property: hello-time
|
||||
* variable: BRIDGING_OPTS: hello_time=
|
||||
* values: 1 - 10
|
||||
* default: 2
|
||||
* description: STP hello time.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_HELLO_TIME] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_HELLO_TIME,
|
||||
"",
|
||||
|
|
@ -1737,18 +1737,18 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:max-age:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) maximum message age, in seconds.
|
||||
**/
|
||||
* NMSettingBridge:max-age:
|
||||
*
|
||||
* The Spanning Tree Protocol (STP) maximum message age, in seconds.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: max-age
|
||||
* variable: BRIDGING_OPTS: max_age=
|
||||
* values: 6 - 40
|
||||
* default: 20
|
||||
* description: STP maximum message age.
|
||||
* ---end---
|
||||
*/
|
||||
* property: max-age
|
||||
* variable: BRIDGING_OPTS: max_age=
|
||||
* values: 6 - 40
|
||||
* default: 20
|
||||
* description: STP maximum message age.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_MAX_AGE] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_MAX_AGE,
|
||||
"",
|
||||
|
|
@ -1759,18 +1759,18 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:ageing-time:
|
||||
*
|
||||
* The Ethernet MAC address aging time, in seconds.
|
||||
**/
|
||||
* NMSettingBridge:ageing-time:
|
||||
*
|
||||
* The Ethernet MAC address aging time, in seconds.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: ageing-time
|
||||
* variable: BRIDGING_OPTS: ageing_time=
|
||||
* values: 0 - 1000000
|
||||
* default: 300
|
||||
* description: Ethernet MAC ageing time.
|
||||
* ---end---
|
||||
*/
|
||||
* property: ageing-time
|
||||
* variable: BRIDGING_OPTS: ageing_time=
|
||||
* values: 0 - 1000000
|
||||
* default: 300
|
||||
* description: Ethernet MAC ageing time.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_AGEING_TIME] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_AGEING_TIME,
|
||||
"",
|
||||
|
|
@ -1781,17 +1781,17 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:group-forward-mask:
|
||||
*
|
||||
* A mask of group addresses to forward. Usually, group addresses in
|
||||
* the range from 01:80:C2:00:00:00 to 01:80:C2:00:00:0F are not
|
||||
* forwarded according to standards. This property is a mask of 16 bits,
|
||||
* each corresponding to a group address in that range that must be
|
||||
* forwarded. The mask can't have bits 0, 1 or 2 set because they are
|
||||
* used for STP, MAC pause frames and LACP.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingBridge:group-forward-mask:
|
||||
*
|
||||
* A mask of group addresses to forward. Usually, group addresses in
|
||||
* the range from 01:80:C2:00:00:00 to 01:80:C2:00:00:0F are not
|
||||
* forwarded according to standards. This property is a mask of 16 bits,
|
||||
* each corresponding to a group address in that range that must be
|
||||
* forwarded. The mask can't have bits 0, 1 or 2 set because they are
|
||||
* used for STP, MAC pause frames and LACP.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_GROUP_FORWARD_MASK] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_GROUP_FORWARD_MASK,
|
||||
"",
|
||||
|
|
@ -1802,23 +1802,23 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-snooping:
|
||||
*
|
||||
* Controls whether IGMP snooping is enabled for this bridge.
|
||||
* Note that if snooping was automatically disabled due to hash collisions,
|
||||
* the system may refuse to enable the feature until the collisions are
|
||||
* resolved.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingBridge:multicast-snooping:
|
||||
*
|
||||
* Controls whether IGMP snooping is enabled for this bridge.
|
||||
* Note that if snooping was automatically disabled due to hash collisions,
|
||||
* the system may refuse to enable the feature until the collisions are
|
||||
* resolved.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-snooping
|
||||
* variable: BRIDGING_OPTS: multicast_snooping=
|
||||
* values: 0 or 1
|
||||
* default: 1
|
||||
* description: IGMP snooping support.
|
||||
* ---end---
|
||||
*/
|
||||
* property: multicast-snooping
|
||||
* variable: BRIDGING_OPTS: multicast_snooping=
|
||||
* values: 0 or 1
|
||||
* default: 1
|
||||
* description: IGMP snooping support.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_SNOOPING] = g_param_spec_boolean(
|
||||
NM_SETTING_BRIDGE_MULTICAST_SNOOPING,
|
||||
"",
|
||||
|
|
@ -1827,20 +1827,20 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:vlan-filtering:
|
||||
*
|
||||
* Control whether VLAN filtering is enabled on the bridge.
|
||||
*
|
||||
* Since: 1.18
|
||||
**/
|
||||
* NMSettingBridge:vlan-filtering:
|
||||
*
|
||||
* Control whether VLAN filtering is enabled on the bridge.
|
||||
*
|
||||
* Since: 1.18
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: vlan-filtering
|
||||
* variable: BRIDGING_OPTS: vlan_filtering=
|
||||
* values: 0 or 1
|
||||
* default: 0
|
||||
* description: VLAN filtering support.
|
||||
* ---end---
|
||||
*/
|
||||
* property: vlan-filtering
|
||||
* variable: BRIDGING_OPTS: vlan_filtering=
|
||||
* values: 0 or 1
|
||||
* default: 0
|
||||
* description: VLAN filtering support.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_VLAN_FILTERING] = g_param_spec_boolean(
|
||||
NM_SETTING_BRIDGE_VLAN_FILTERING,
|
||||
"",
|
||||
|
|
@ -1849,21 +1849,21 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:vlan-default-pvid:
|
||||
*
|
||||
* The default PVID for the ports of the bridge, that is the VLAN id
|
||||
* assigned to incoming untagged frames.
|
||||
*
|
||||
* Since: 1.18
|
||||
**/
|
||||
* NMSettingBridge:vlan-default-pvid:
|
||||
*
|
||||
* The default PVID for the ports of the bridge, that is the VLAN id
|
||||
* assigned to incoming untagged frames.
|
||||
*
|
||||
* Since: 1.18
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: vlan-default-pvid
|
||||
* variable: BRIDGING_OPTS: default_pvid=
|
||||
* values: 0 - 4094
|
||||
* default: 1
|
||||
* description: default VLAN PVID.
|
||||
* ---end---
|
||||
*/
|
||||
* property: vlan-default-pvid
|
||||
* variable: BRIDGING_OPTS: default_pvid=
|
||||
* values: 0 - 4094
|
||||
* default: 1
|
||||
* description: default VLAN PVID.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_VLAN_DEFAULT_PVID] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_VLAN_DEFAULT_PVID,
|
||||
"",
|
||||
|
|
@ -1874,29 +1874,29 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:vlans: (type GPtrArray(NMBridgeVlan))
|
||||
*
|
||||
* Array of bridge VLAN objects. In addition to the VLANs
|
||||
* specified here, the bridge will also have the default-pvid
|
||||
* VLAN configured by the bridge.vlan-default-pvid property.
|
||||
*
|
||||
* In nmcli the VLAN list can be specified with the following
|
||||
* syntax:
|
||||
*
|
||||
* $vid [pvid] [untagged] [, $vid [pvid] [untagged]]...
|
||||
*
|
||||
* where $vid is either a single id between 1 and 4094 or a
|
||||
* range, represented as a couple of ids separated by a dash.
|
||||
*
|
||||
* Since: 1.18
|
||||
**/
|
||||
* NMSettingBridge:vlans: (type GPtrArray(NMBridgeVlan))
|
||||
*
|
||||
* Array of bridge VLAN objects. In addition to the VLANs
|
||||
* specified here, the bridge will also have the default-pvid
|
||||
* VLAN configured by the bridge.vlan-default-pvid property.
|
||||
*
|
||||
* In nmcli the VLAN list can be specified with the following
|
||||
* syntax:
|
||||
*
|
||||
* $vid [pvid] [untagged] [, $vid [pvid] [untagged]]...
|
||||
*
|
||||
* where $vid is either a single id between 1 and 4094 or a
|
||||
* range, represented as a couple of ids separated by a dash.
|
||||
*
|
||||
* Since: 1.18
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: vlans
|
||||
* variable: BRIDGE_VLANS
|
||||
* description: List of VLANs on the bridge
|
||||
* example: BRIDGE_VLANS="1 pvid untagged,20,300-400 untagged"
|
||||
* ---end---
|
||||
*/
|
||||
* property: vlans
|
||||
* variable: BRIDGE_VLANS
|
||||
* description: List of VLANs on the bridge
|
||||
* example: BRIDGE_VLANS="1 pvid untagged,20,300-400 untagged"
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_VLANS] = g_param_spec_boxed(NM_SETTING_BRIDGE_VLANS,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -1908,35 +1908,35 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
&nm_sett_info_propert_type_bridge_vlans);
|
||||
|
||||
/* ---dbus---
|
||||
* property: interface-name
|
||||
* format: string
|
||||
* description: Deprecated in favor of connection.interface-name, but can
|
||||
* be used for backward-compatibility with older daemons, to set the
|
||||
* bridge's interface name.
|
||||
* ---end---
|
||||
*/
|
||||
* property: interface-name
|
||||
* format: string
|
||||
* description: Deprecated in favor of connection.interface-name, but can
|
||||
* be used for backward-compatibility with older daemons, to set the
|
||||
* bridge's interface name.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_dbus(properties_override,
|
||||
"interface-name",
|
||||
&nm_sett_info_propert_type_deprecated_interface_name);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:group-address:
|
||||
*
|
||||
* If specified, The MAC address of the multicast group this bridge uses for STP.
|
||||
*
|
||||
* The address must be a link-local address in standard Ethernet MAC address format,
|
||||
* ie an address of the form 01:80:C2:00:00:0X, with X in [0, 4..F].
|
||||
* If not specified the default value is 01:80:C2:00:00:00.
|
||||
*
|
||||
* Since: 1.24
|
||||
**/
|
||||
* NMSettingBridge:group-address:
|
||||
*
|
||||
* If specified, The MAC address of the multicast group this bridge uses for STP.
|
||||
*
|
||||
* The address must be a link-local address in standard Ethernet MAC address format,
|
||||
* ie an address of the form 01:80:C2:00:00:0X, with X in [0, 4..F].
|
||||
* If not specified the default value is 01:80:C2:00:00:00.
|
||||
*
|
||||
* Since: 1.24
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: group-address
|
||||
* variable: BRIDGING_OPTS: group_address=
|
||||
* description: STP group address.
|
||||
* example: BRIDGING_OPTS="group_address=01:80:C2:00:00:0A"
|
||||
* ---end---
|
||||
*/
|
||||
* property: group-address
|
||||
* variable: BRIDGING_OPTS: group_address=
|
||||
* description: STP group address.
|
||||
* example: BRIDGING_OPTS="group_address=01:80:C2:00:00:0A"
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_GROUP_ADDRESS] = g_param_spec_string(
|
||||
NM_SETTING_BRIDGE_GROUP_ADDRESS,
|
||||
"",
|
||||
|
|
@ -1948,24 +1948,24 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
&nm_sett_info_propert_type_mac_address);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:vlan-protocol:
|
||||
*
|
||||
* If specified, the protocol used for VLAN filtering.
|
||||
*
|
||||
* Supported values are: '802.1Q', '802.1ad'.
|
||||
* If not specified the default value is '802.1Q'.
|
||||
*
|
||||
* Since: 1.24
|
||||
**/
|
||||
* NMSettingBridge:vlan-protocol:
|
||||
*
|
||||
* If specified, the protocol used for VLAN filtering.
|
||||
*
|
||||
* Supported values are: '802.1Q', '802.1ad'.
|
||||
* If not specified the default value is '802.1Q'.
|
||||
*
|
||||
* Since: 1.24
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: vlan-protocol
|
||||
* variable: BRIDGING_OPTS: vlan_protocol=
|
||||
* description: VLAN filtering protocol.
|
||||
* example: BRIDGING_OPTS="vlan_protocol=802.1Q"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
* property: vlan-protocol
|
||||
* variable: BRIDGING_OPTS: vlan_protocol=
|
||||
* description: VLAN filtering protocol.
|
||||
* example: BRIDGING_OPTS="vlan_protocol=802.1Q"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
obj_properties[PROP_VLAN_PROTOCOL] = g_param_spec_string(
|
||||
NM_SETTING_BRIDGE_VLAN_PROTOCOL,
|
||||
"",
|
||||
|
|
@ -1974,19 +1974,19 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:vlan-stats-enabled:
|
||||
*
|
||||
* Controls whether per-VLAN stats accounting is enabled.
|
||||
**/
|
||||
* NMSettingBridge:vlan-stats-enabled:
|
||||
*
|
||||
* Controls whether per-VLAN stats accounting is enabled.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: vlan-stats-enabled
|
||||
* variable: BRIDGING_OPTS: vlan_stats_enabled=
|
||||
* default: 0
|
||||
* example: BRIDGING_OPTS="vlan_stats_enabled=1"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
* property: vlan-stats-enabled
|
||||
* variable: BRIDGING_OPTS: vlan_stats_enabled=
|
||||
* default: 0
|
||||
* example: BRIDGING_OPTS="vlan_stats_enabled=1"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
obj_properties[PROP_VLAN_STATS_ENABLED] = g_param_spec_boolean(
|
||||
NM_SETTING_BRIDGE_VLAN_STATS_ENABLED,
|
||||
"",
|
||||
|
|
@ -1995,25 +1995,25 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-router:
|
||||
*
|
||||
* Sets bridge's multicast router. Multicast-snooping must be enabled
|
||||
* for this option to work.
|
||||
*
|
||||
* Supported values are: 'auto', 'disabled', 'enabled' to which kernel
|
||||
* assigns the numbers 1, 0, and 2, respectively.
|
||||
* If not specified the default value is 'auto' (1).
|
||||
**/
|
||||
* NMSettingBridge:multicast-router:
|
||||
*
|
||||
* Sets bridge's multicast router. Multicast-snooping must be enabled
|
||||
* for this option to work.
|
||||
*
|
||||
* Supported values are: 'auto', 'disabled', 'enabled' to which kernel
|
||||
* assigns the numbers 1, 0, and 2, respectively.
|
||||
* If not specified the default value is 'auto' (1).
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-router
|
||||
* variable: BRIDGING_OPTS: multicast_router=
|
||||
* values: auto, enabled, disabled
|
||||
* default: auto
|
||||
* example: BRIDGING_OPTS="multicast_router=enabled"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
* property: multicast-router
|
||||
* variable: BRIDGING_OPTS: multicast_router=
|
||||
* values: auto, enabled, disabled
|
||||
* default: auto
|
||||
* example: BRIDGING_OPTS="multicast_router=enabled"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_ROUTER] = g_param_spec_string(
|
||||
NM_SETTING_BRIDGE_MULTICAST_ROUTER,
|
||||
"",
|
||||
|
|
@ -2022,21 +2022,21 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-query-use-ifaddr:
|
||||
*
|
||||
* If enabled the bridge's own IP address is used as
|
||||
* the source address for IGMP queries otherwise
|
||||
* the default of 0.0.0.0 is used.
|
||||
**/
|
||||
* NMSettingBridge:multicast-query-use-ifaddr:
|
||||
*
|
||||
* If enabled the bridge's own IP address is used as
|
||||
* the source address for IGMP queries otherwise
|
||||
* the default of 0.0.0.0 is used.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-query-use-ifaddr
|
||||
* variable: BRIDGING_OPTS: multicast_query_use_ifaddr=
|
||||
* default: 0
|
||||
* example: BRIDGING_OPTS="multicast_query-use_ifaddr=1"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
* property: multicast-query-use-ifaddr
|
||||
* variable: BRIDGING_OPTS: multicast_query_use_ifaddr=
|
||||
* default: 0
|
||||
* example: BRIDGING_OPTS="multicast_query-use_ifaddr=1"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_QUERY_USE_IFADDR] = g_param_spec_boolean(
|
||||
NM_SETTING_BRIDGE_MULTICAST_QUERY_USE_IFADDR,
|
||||
"",
|
||||
|
|
@ -2045,20 +2045,20 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-querier:
|
||||
*
|
||||
* Enable or disable sending of multicast queries by the bridge.
|
||||
* If not specified the option is disabled.
|
||||
**/
|
||||
* NMSettingBridge:multicast-querier:
|
||||
*
|
||||
* Enable or disable sending of multicast queries by the bridge.
|
||||
* If not specified the option is disabled.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-querier
|
||||
* variable: BRIDGING_OPTS: multicast_querier=
|
||||
* default: 0
|
||||
* example: BRIDGING_OPTS="multicast_querier=1"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
* property: multicast-querier
|
||||
* variable: BRIDGING_OPTS: multicast_querier=
|
||||
* default: 0
|
||||
* example: BRIDGING_OPTS="multicast_querier=1"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_QUERIER] = g_param_spec_boolean(
|
||||
NM_SETTING_BRIDGE_MULTICAST_QUERIER,
|
||||
"",
|
||||
|
|
@ -2067,19 +2067,19 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-hash-max:
|
||||
*
|
||||
* Set maximum size of multicast hash table (value must be a power of 2).
|
||||
**/
|
||||
* NMSettingBridge:multicast-hash-max:
|
||||
*
|
||||
* Set maximum size of multicast hash table (value must be a power of 2).
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-hash-max
|
||||
* variable: BRIDGING_OPTS: multicast_hash_max=
|
||||
* default: 4096
|
||||
* example: BRIDGING_OPTS="multicast_hash_max=8192"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-hash-max
|
||||
* variable: BRIDGING_OPTS: multicast_hash_max=
|
||||
* default: 4096
|
||||
* example: BRIDGING_OPTS="multicast_hash_max=8192"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_HASH_MAX] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_MULTICAST_HASH_MAX,
|
||||
"",
|
||||
|
|
@ -2090,21 +2090,21 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-last-member-count:
|
||||
*
|
||||
* Set the number of queries the bridge will send before
|
||||
* stopping forwarding a multicast group after a "leave"
|
||||
* message has been received.
|
||||
**/
|
||||
* NMSettingBridge:multicast-last-member-count:
|
||||
*
|
||||
* Set the number of queries the bridge will send before
|
||||
* stopping forwarding a multicast group after a "leave"
|
||||
* message has been received.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-last-member-count
|
||||
* variable: BRIDGING_OPTS: multicast_last_member_count=
|
||||
* default: 2
|
||||
* example: BRIDGING_OPTS="multicast_last_member_count=4"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-last-member-count
|
||||
* variable: BRIDGING_OPTS: multicast_last_member_count=
|
||||
* default: 2
|
||||
* example: BRIDGING_OPTS="multicast_last_member_count=4"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_LAST_MEMBER_COUNT] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_MULTICAST_LAST_MEMBER_COUNT,
|
||||
"",
|
||||
|
|
@ -2115,20 +2115,20 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-last-member-interval:
|
||||
*
|
||||
* Set interval (in deciseconds) between queries to find remaining
|
||||
* members of a group, after a "leave" message is received.
|
||||
**/
|
||||
* NMSettingBridge:multicast-last-member-interval:
|
||||
*
|
||||
* Set interval (in deciseconds) between queries to find remaining
|
||||
* members of a group, after a "leave" message is received.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-last-member-interval
|
||||
* variable: BRIDGING_OPTS: multicast_last_member_interval=
|
||||
* default: 100
|
||||
* example: BRIDGING_OPTS="multicast_last_member_interval=200"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-last-member-interval
|
||||
* variable: BRIDGING_OPTS: multicast_last_member_interval=
|
||||
* default: 100
|
||||
* example: BRIDGING_OPTS="multicast_last_member_interval=200"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_LAST_MEMBER_INTERVAL] = g_param_spec_uint64(
|
||||
NM_SETTING_BRIDGE_MULTICAST_LAST_MEMBER_INTERVAL,
|
||||
"",
|
||||
|
|
@ -2139,21 +2139,21 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-membership-interval:
|
||||
*
|
||||
* Set delay (in deciseconds) after which the bridge will
|
||||
* leave a group, if no membership reports for this
|
||||
* group are received.
|
||||
**/
|
||||
* NMSettingBridge:multicast-membership-interval:
|
||||
*
|
||||
* Set delay (in deciseconds) after which the bridge will
|
||||
* leave a group, if no membership reports for this
|
||||
* group are received.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-membership-interval
|
||||
* variable: BRIDGING_OPTS: multicast_membership_interval=
|
||||
* default: 26000
|
||||
* example: BRIDGING_OPTS="multicast_membership_interval=16000"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-membership-interval
|
||||
* variable: BRIDGING_OPTS: multicast_membership_interval=
|
||||
* default: 26000
|
||||
* example: BRIDGING_OPTS="multicast_membership_interval=16000"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_MEMBERSHIP_INTERVAL] = g_param_spec_uint64(
|
||||
NM_SETTING_BRIDGE_MULTICAST_MEMBERSHIP_INTERVAL,
|
||||
"",
|
||||
|
|
@ -2164,20 +2164,20 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-querier-interval:
|
||||
*
|
||||
* If no queries are seen after this delay (in deciseconds) has passed,
|
||||
* the bridge will start to send its own queries.
|
||||
**/
|
||||
* NMSettingBridge:multicast-querier-interval:
|
||||
*
|
||||
* If no queries are seen after this delay (in deciseconds) has passed,
|
||||
* the bridge will start to send its own queries.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-querier-interval
|
||||
* variable: BRIDGING_OPTS: multicast_querier_interval=
|
||||
* default: 25500
|
||||
* example: BRIDGING_OPTS="multicast_querier_interval=20000"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-querier-interval
|
||||
* variable: BRIDGING_OPTS: multicast_querier_interval=
|
||||
* default: 25500
|
||||
* example: BRIDGING_OPTS="multicast_querier_interval=20000"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_QUERIER_INTERVAL] = g_param_spec_uint64(
|
||||
NM_SETTING_BRIDGE_MULTICAST_QUERIER_INTERVAL,
|
||||
"",
|
||||
|
|
@ -2188,20 +2188,20 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-query-interval:
|
||||
*
|
||||
* Interval (in deciseconds) between queries sent
|
||||
* by the bridge after the end of the startup phase.
|
||||
**/
|
||||
* NMSettingBridge:multicast-query-interval:
|
||||
*
|
||||
* Interval (in deciseconds) between queries sent
|
||||
* by the bridge after the end of the startup phase.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-query-interval
|
||||
* variable: BRIDGING_OPTS: multicast_query_interval=
|
||||
* default: 12500
|
||||
* example: BRIDGING_OPTS="multicast_query_interval=22500"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-query-interval
|
||||
* variable: BRIDGING_OPTS: multicast_query_interval=
|
||||
* default: 12500
|
||||
* example: BRIDGING_OPTS="multicast_query_interval=22500"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_QUERY_INTERVAL] = g_param_spec_uint64(
|
||||
NM_SETTING_BRIDGE_MULTICAST_QUERY_INTERVAL,
|
||||
"",
|
||||
|
|
@ -2212,20 +2212,20 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-query-response-interval:
|
||||
*
|
||||
* Set the Max Response Time/Max Response Delay
|
||||
* (in deciseconds) for IGMP/MLD queries sent by the bridge.
|
||||
**/
|
||||
* NMSettingBridge:multicast-query-response-interval:
|
||||
*
|
||||
* Set the Max Response Time/Max Response Delay
|
||||
* (in deciseconds) for IGMP/MLD queries sent by the bridge.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-query-response-interval
|
||||
* variable: BRIDGING_OPTS: multicast_query_response_interval=
|
||||
* default: 1000
|
||||
* example: BRIDGING_OPTS="multicast_query_response_interval=2000"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-query-response-interval
|
||||
* variable: BRIDGING_OPTS: multicast_query_response_interval=
|
||||
* default: 1000
|
||||
* example: BRIDGING_OPTS="multicast_query_response_interval=2000"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_QUERY_RESPONSE_INTERVAL] = g_param_spec_uint64(
|
||||
NM_SETTING_BRIDGE_MULTICAST_QUERY_RESPONSE_INTERVAL,
|
||||
"",
|
||||
|
|
@ -2236,19 +2236,19 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-startup-query-count:
|
||||
*
|
||||
* Set the number of IGMP queries to send during startup phase.
|
||||
**/
|
||||
* NMSettingBridge:multicast-startup-query-count:
|
||||
*
|
||||
* Set the number of IGMP queries to send during startup phase.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-startup-query-count
|
||||
* variable: BRIDGING_OPTS: multicast_startup_query_count=
|
||||
* default: 2
|
||||
* example: BRIDGING_OPTS="multicast_startup_query_count=4"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-startup-query-count
|
||||
* variable: BRIDGING_OPTS: multicast_startup_query_count=
|
||||
* default: 2
|
||||
* example: BRIDGING_OPTS="multicast_startup_query_count=4"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_STARTUP_QUERY_COUNT] =
|
||||
g_param_spec_uint(NM_SETTING_BRIDGE_MULTICAST_STARTUP_QUERY_COUNT,
|
||||
"",
|
||||
|
|
@ -2259,20 +2259,20 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingBridge:multicast-startup-query-interval:
|
||||
*
|
||||
* Sets the time (in deciseconds) between queries sent out
|
||||
* at startup to determine membership information.
|
||||
**/
|
||||
* NMSettingBridge:multicast-startup-query-interval:
|
||||
*
|
||||
* Sets the time (in deciseconds) between queries sent out
|
||||
* at startup to determine membership information.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: multicast-startup-query-interval
|
||||
* variable: BRIDGING_OPTS: multicast_startup_query_interval=
|
||||
* default: 3125
|
||||
* example: BRIDGING_OPTS="multicast_startup_query_interval=4000"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
* property: multicast-startup-query-interval
|
||||
* variable: BRIDGING_OPTS: multicast_startup_query_interval=
|
||||
* default: 3125
|
||||
* example: BRIDGING_OPTS="multicast_startup_query_interval=4000"
|
||||
* ---end---
|
||||
*
|
||||
* Since: 1.26
|
||||
*/
|
||||
obj_properties[PROP_MULTICAST_STARTUP_QUERY_INTERVAL] = g_param_spec_uint64(
|
||||
NM_SETTING_BRIDGE_MULTICAST_STARTUP_QUERY_INTERVAL,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -283,12 +283,12 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
|
|||
setting_class->need_secrets = need_secrets;
|
||||
|
||||
/**
|
||||
* NMSettingCdma:number:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingCdma:number:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_NUMBER] = g_param_spec_string(NM_SETTING_CDMA_NUMBER,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -296,12 +296,12 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingCdma:username:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingCdma:username:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_USERNAME] = g_param_spec_string(NM_SETTING_CDMA_USERNAME,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -309,12 +309,12 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingCdma:password:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingCdma:password:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_PASSWORD] =
|
||||
g_param_spec_string(NM_SETTING_CDMA_PASSWORD,
|
||||
"",
|
||||
|
|
@ -323,10 +323,10 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingCdma:password-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingCdma:password property.
|
||||
**/
|
||||
* NMSettingCdma:password-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingCdma:password property.
|
||||
**/
|
||||
obj_properties[PROP_PASSWORD_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_CDMA_PASSWORD_FLAGS,
|
||||
"",
|
||||
|
|
@ -336,13 +336,13 @@ nm_setting_cdma_class_init(NMSettingCdmaClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingCdma:mtu:
|
||||
*
|
||||
* If non-zero, only transmit packets of the specified size or smaller,
|
||||
* breaking larger packets up into multiple frames.
|
||||
*
|
||||
* Since: 1.8
|
||||
**/
|
||||
* NMSettingCdma:mtu:
|
||||
*
|
||||
* If non-zero, only transmit packets of the specified size or smaller,
|
||||
* breaking larger packets up into multiple frames.
|
||||
*
|
||||
* Since: 1.8
|
||||
**/
|
||||
obj_properties[PROP_MTU] = g_param_spec_uint(NM_SETTING_CDMA_MTU,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -545,8 +545,8 @@ check_uint_array(const guint * array,
|
|||
}
|
||||
} else {
|
||||
/* If the feature is disabled, sum must equal 0%, which was checked
|
||||
* by the for() loop above.
|
||||
*/
|
||||
* by the for() loop above.
|
||||
*/
|
||||
g_assert_cmpint(sum, ==, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -922,20 +922,20 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingDcb:app-fcoe-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for the DCB FCoE application. Flags may
|
||||
* be any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
* NMSettingDcb:app-fcoe-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for the DCB FCoE application. Flags may
|
||||
* be any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: app-fcoe-flags
|
||||
* variable: DCB_APP_FCOE_ENABLE, DCB_APP_FCOE_ADVERTISE, DCB_APP_FCOE_WILLING
|
||||
* description: FCOE flags.
|
||||
* default: no
|
||||
* example: DCB_APP_FCOE_ENABLE=yes DCB_APP_FCOE_ADVERTISE=yes
|
||||
* ---end---
|
||||
*/
|
||||
* property: app-fcoe-flags
|
||||
* variable: DCB_APP_FCOE_ENABLE, DCB_APP_FCOE_ADVERTISE, DCB_APP_FCOE_WILLING
|
||||
* description: FCOE flags.
|
||||
* default: no
|
||||
* example: DCB_APP_FCOE_ENABLE=yes DCB_APP_FCOE_ADVERTISE=yes
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_APP_FCOE_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_DCB_APP_FCOE_FLAGS,
|
||||
"",
|
||||
|
|
@ -945,19 +945,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:app-fcoe-priority:
|
||||
*
|
||||
* The highest User Priority (0 - 7) which FCoE frames should use, or -1 for
|
||||
* default priority. Only used when the #NMSettingDcb:app-fcoe-flags
|
||||
* property includes the %NM_SETTING_DCB_FLAG_ENABLE flag.
|
||||
**/
|
||||
* NMSettingDcb:app-fcoe-priority:
|
||||
*
|
||||
* The highest User Priority (0 - 7) which FCoE frames should use, or -1 for
|
||||
* default priority. Only used when the #NMSettingDcb:app-fcoe-flags
|
||||
* property includes the %NM_SETTING_DCB_FLAG_ENABLE flag.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: app-fcoe-priority
|
||||
* variable: DCB_APP_FCOE_PRIORITY
|
||||
* values: 0 - 7
|
||||
* description: Priority of FCoE frames.
|
||||
* ---end---
|
||||
*/
|
||||
* property: app-fcoe-priority
|
||||
* variable: DCB_APP_FCOE_PRIORITY
|
||||
* values: 0 - 7
|
||||
* description: Priority of FCoE frames.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_APP_FCOE_PRIORITY] =
|
||||
g_param_spec_int(NM_SETTING_DCB_APP_FCOE_PRIORITY,
|
||||
"",
|
||||
|
|
@ -968,19 +968,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:app-fcoe-mode:
|
||||
*
|
||||
* The FCoE controller mode; either %NM_SETTING_DCB_FCOE_MODE_FABRIC
|
||||
* (default) or %NM_SETTING_DCB_FCOE_MODE_VN2VN.
|
||||
**/
|
||||
* NMSettingDcb:app-fcoe-mode:
|
||||
*
|
||||
* The FCoE controller mode; either %NM_SETTING_DCB_FCOE_MODE_FABRIC
|
||||
* (default) or %NM_SETTING_DCB_FCOE_MODE_VN2VN.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: app-fcoe-mode
|
||||
* variable: DCB_APP_FCOE_MODE
|
||||
* values: fabric, vn2vn
|
||||
* default: fabric
|
||||
* description: FCoE controller mode.
|
||||
* ---end---
|
||||
*/
|
||||
* property: app-fcoe-mode
|
||||
* variable: DCB_APP_FCOE_MODE
|
||||
* values: fabric, vn2vn
|
||||
* default: fabric
|
||||
* description: FCoE controller mode.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_APP_FCOE_MODE] =
|
||||
g_param_spec_string(NM_SETTING_DCB_APP_FCOE_MODE,
|
||||
"",
|
||||
|
|
@ -989,19 +989,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:app-iscsi-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for the DCB iSCSI application. Flags
|
||||
* may be any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
* NMSettingDcb:app-iscsi-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for the DCB iSCSI application. Flags
|
||||
* may be any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: app-iscsi-flags
|
||||
* variable: DCB_APP_ISCSI_ENABLE, DCB_APP_ISCSI_ADVERTISE, DCB_APP_ISCSI_WILLING
|
||||
* default: no
|
||||
* description: iSCSI flags.
|
||||
* ---end---
|
||||
*/
|
||||
* property: app-iscsi-flags
|
||||
* variable: DCB_APP_ISCSI_ENABLE, DCB_APP_ISCSI_ADVERTISE, DCB_APP_ISCSI_WILLING
|
||||
* default: no
|
||||
* description: iSCSI flags.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_APP_ISCSI_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_DCB_APP_ISCSI_FLAGS,
|
||||
"",
|
||||
|
|
@ -1011,19 +1011,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:app-iscsi-priority:
|
||||
*
|
||||
* The highest User Priority (0 - 7) which iSCSI frames should use, or -1
|
||||
* for default priority. Only used when the #NMSettingDcb:app-iscsi-flags
|
||||
* property includes the %NM_SETTING_DCB_FLAG_ENABLE flag.
|
||||
**/
|
||||
* NMSettingDcb:app-iscsi-priority:
|
||||
*
|
||||
* The highest User Priority (0 - 7) which iSCSI frames should use, or -1
|
||||
* for default priority. Only used when the #NMSettingDcb:app-iscsi-flags
|
||||
* property includes the %NM_SETTING_DCB_FLAG_ENABLE flag.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: app-iscsi-priority
|
||||
* variable: DCB_APP_ISCSI_PRIORITY
|
||||
* values: 0 - 7
|
||||
* description: Priority of iSCSI frames.
|
||||
* ---end---
|
||||
*/
|
||||
* property: app-iscsi-priority
|
||||
* variable: DCB_APP_ISCSI_PRIORITY
|
||||
* values: 0 - 7
|
||||
* description: Priority of iSCSI frames.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_APP_ISCSI_PRIORITY] =
|
||||
g_param_spec_int(NM_SETTING_DCB_APP_ISCSI_PRIORITY,
|
||||
"",
|
||||
|
|
@ -1034,19 +1034,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:app-fip-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for the DCB FIP application. Flags may
|
||||
* be any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
* NMSettingDcb:app-fip-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for the DCB FIP application. Flags may
|
||||
* be any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: app-fip-flags
|
||||
* variable: DCB_APP_FIP_ENABLE, DCB_APP_FIP_ADVERTISE, DCB_APP_FIP_WILLING
|
||||
* default: no
|
||||
* description: FIP flags.
|
||||
* ---end---
|
||||
*/
|
||||
* property: app-fip-flags
|
||||
* variable: DCB_APP_FIP_ENABLE, DCB_APP_FIP_ADVERTISE, DCB_APP_FIP_WILLING
|
||||
* default: no
|
||||
* description: FIP flags.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_APP_FIP_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_DCB_APP_FIP_FLAGS,
|
||||
"",
|
||||
|
|
@ -1056,19 +1056,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:app-fip-priority:
|
||||
*
|
||||
* The highest User Priority (0 - 7) which FIP frames should use, or -1 for
|
||||
* default priority. Only used when the #NMSettingDcb:app-fip-flags
|
||||
* property includes the %NM_SETTING_DCB_FLAG_ENABLE flag.
|
||||
**/
|
||||
* NMSettingDcb:app-fip-priority:
|
||||
*
|
||||
* The highest User Priority (0 - 7) which FIP frames should use, or -1 for
|
||||
* default priority. Only used when the #NMSettingDcb:app-fip-flags
|
||||
* property includes the %NM_SETTING_DCB_FLAG_ENABLE flag.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: app-fip-priority
|
||||
* variable: DCB_APP_FIP_PRIORITY
|
||||
* values: 0 - 7
|
||||
* description: Priority of FIP frames.
|
||||
* ---end---
|
||||
*/
|
||||
* property: app-fip-priority
|
||||
* variable: DCB_APP_FIP_PRIORITY
|
||||
* values: 0 - 7
|
||||
* description: Priority of FIP frames.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_APP_FIP_PRIORITY] =
|
||||
g_param_spec_int(NM_SETTING_DCB_APP_FIP_PRIORITY,
|
||||
"",
|
||||
|
|
@ -1079,19 +1079,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:priority-flow-control-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for DCB Priority Flow Control (PFC).
|
||||
* Flags may be any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
* NMSettingDcb:priority-flow-control-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for DCB Priority Flow Control (PFC).
|
||||
* Flags may be any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority-flow-control-flags
|
||||
* variable: DCB_PFC_ENABLE, DCB_PFC_ADVERTISE, DCB_PFC_WILLING
|
||||
* default: no
|
||||
* description: Priority flow control flags.
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority-flow-control-flags
|
||||
* variable: DCB_PFC_ENABLE, DCB_PFC_ADVERTISE, DCB_PFC_WILLING
|
||||
* default: no
|
||||
* description: Priority flow control flags.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PFC_FLAGS] = g_param_spec_flags(NM_SETTING_DCB_PRIORITY_FLOW_CONTROL_FLAGS,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -1100,20 +1100,20 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:priority-flow-control: (type GArray(gboolean))
|
||||
*
|
||||
* 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 corresponding
|
||||
* priority should transmit priority pause.
|
||||
**/
|
||||
* NMSettingDcb:priority-flow-control: (type GArray(gboolean))
|
||||
*
|
||||
* 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 corresponding
|
||||
* priority should transmit priority pause.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority-flow-control
|
||||
* variable: DCB_PFC_UP
|
||||
* description: Priority flow control values. String of 8 "0" and "1", where "0".
|
||||
* means "do not transmit priority pause", "1" means "transmit pause".
|
||||
* example: DCB_PFC_UP=01101110
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority-flow-control
|
||||
* variable: DCB_PFC_UP
|
||||
* description: Priority flow control values. String of 8 "0" and "1", where "0".
|
||||
* means "do not transmit priority pause", "1" means "transmit pause".
|
||||
* example: DCB_PFC_UP=01101110
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY_FLOW_CONTROL] =
|
||||
g_param_spec_boxed(NM_SETTING_DCB_PRIORITY_FLOW_CONTROL,
|
||||
"",
|
||||
|
|
@ -1125,19 +1125,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
&nm_sett_info_propert_type_dcb_au);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:priority-group-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for DCB Priority Groups. Flags may be
|
||||
* any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
* NMSettingDcb:priority-group-flags:
|
||||
*
|
||||
* Specifies the #NMSettingDcbFlags for DCB Priority Groups. Flags may be
|
||||
* any combination of %NM_SETTING_DCB_FLAG_ENABLE,
|
||||
* %NM_SETTING_DCB_FLAG_ADVERTISE, and %NM_SETTING_DCB_FLAG_WILLING.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority-group-flags
|
||||
* variable: DCB_PG_ENABLE, DCB_PG_ADVERTISE, DCB_PG_WILLING
|
||||
* default: no
|
||||
* description: Priority groups flags.
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority-group-flags
|
||||
* variable: DCB_PG_ENABLE, DCB_PG_ADVERTISE, DCB_PG_WILLING
|
||||
* default: no
|
||||
* description: Priority groups flags.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY_GROUP_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_DCB_PRIORITY_GROUP_FLAGS,
|
||||
"",
|
||||
|
|
@ -1147,20 +1147,20 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:priority-group-id: (type GArray(guint))
|
||||
*
|
||||
* An array of 8 uint values, where the array index corresponds to the User
|
||||
* Priority (0 - 7) and the value indicates the Priority Group ID. Allowed
|
||||
* Priority Group ID values are 0 - 7 or 15 for the unrestricted group.
|
||||
**/
|
||||
* NMSettingDcb:priority-group-id: (type GArray(guint))
|
||||
*
|
||||
* An array of 8 uint values, where the array index corresponds to the User
|
||||
* Priority (0 - 7) and the value indicates the Priority Group ID. Allowed
|
||||
* Priority Group ID values are 0 - 7 or 15 for the unrestricted group.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority-group-id
|
||||
* variable: DCB_PG_ID
|
||||
* description: Priority groups values. String of eight priorities (0 - 7) or "f"
|
||||
* (unrestricted).
|
||||
* example: DCB_PG_ID=1205f173
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority-group-id
|
||||
* variable: DCB_PG_ID
|
||||
* description: Priority groups values. String of eight priorities (0 - 7) or "f"
|
||||
* (unrestricted).
|
||||
* example: DCB_PG_ID=1205f173
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY_GROUP_ID] =
|
||||
g_param_spec_boxed(NM_SETTING_DCB_PRIORITY_GROUP_ID,
|
||||
"",
|
||||
|
|
@ -1172,20 +1172,20 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
&nm_sett_info_propert_type_dcb_au);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:priority-group-bandwidth: (type GArray(guint))
|
||||
*
|
||||
* An array of 8 uint values, where the array index corresponds to the
|
||||
* Priority Group ID (0 - 7) and the value indicates the percentage of link
|
||||
* bandwidth allocated to that group. Allowed values are 0 - 100, and the
|
||||
* sum of all values must total 100 percents.
|
||||
**/
|
||||
* NMSettingDcb:priority-group-bandwidth: (type GArray(guint))
|
||||
*
|
||||
* An array of 8 uint values, where the array index corresponds to the
|
||||
* Priority Group ID (0 - 7) and the value indicates the percentage of link
|
||||
* bandwidth allocated to that group. Allowed values are 0 - 100, and the
|
||||
* sum of all values must total 100 percents.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority-group-bandwidth
|
||||
* variable: DCB_PG_PCT
|
||||
* description: Priority groups values. Eight bandwidths (in percent), separated with commas.
|
||||
* example: DCB_PG_PCT=10,5,10,15,10,10,10,30
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority-group-bandwidth
|
||||
* variable: DCB_PG_PCT
|
||||
* description: Priority groups values. Eight bandwidths (in percent), separated with commas.
|
||||
* example: DCB_PG_PCT=10,5,10,15,10,10,10,30
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY_GROUP_BANDWIDTH] =
|
||||
g_param_spec_boxed(NM_SETTING_DCB_PRIORITY_GROUP_BANDWIDTH,
|
||||
"",
|
||||
|
|
@ -1197,22 +1197,22 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
&nm_sett_info_propert_type_dcb_au);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:priority-bandwidth: (type GArray(guint))
|
||||
*
|
||||
* An array of 8 uint values, where the array index corresponds to the User
|
||||
* Priority (0 - 7) and the value indicates the percentage of bandwidth of
|
||||
* the priority's assigned group that the priority may use. The sum of all
|
||||
* percentages for priorities which belong to the same group must total 100
|
||||
* percents.
|
||||
**/
|
||||
* NMSettingDcb:priority-bandwidth: (type GArray(guint))
|
||||
*
|
||||
* An array of 8 uint values, where the array index corresponds to the User
|
||||
* Priority (0 - 7) and the value indicates the percentage of bandwidth of
|
||||
* the priority's assigned group that the priority may use. The sum of all
|
||||
* percentages for priorities which belong to the same group must total 100
|
||||
* percents.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority-bandwidth
|
||||
* variable: DCB_PG_UPPCT
|
||||
* description: Priority values. Eight bandwidths (in percent), separated with commas.
|
||||
* The sum of the numbers must be 100.
|
||||
* example: DCB_PG_UPPCT=7,13,10,10,15,15,10,20
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority-bandwidth
|
||||
* variable: DCB_PG_UPPCT
|
||||
* description: Priority values. Eight bandwidths (in percent), separated with commas.
|
||||
* The sum of the numbers must be 100.
|
||||
* example: DCB_PG_UPPCT=7,13,10,10,15,15,10,20
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY_BANDWIDTH] =
|
||||
g_param_spec_boxed(NM_SETTING_DCB_PRIORITY_BANDWIDTH,
|
||||
"",
|
||||
|
|
@ -1224,20 +1224,20 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
&nm_sett_info_propert_type_dcb_au);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:priority-strict-bandwidth: (type GArray(gboolean))
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingDcb:priority-strict-bandwidth: (type GArray(gboolean))
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority-strict-bandwidth
|
||||
* variable: DCB_PG_STRICT
|
||||
* description: Priority values. String of eight "0" or "1", where "0" means
|
||||
* "may not utilize all bandwidth", "1" means "may utilize all bandwidth".
|
||||
* example: DCB_PG_STRICT=01101110
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority-strict-bandwidth
|
||||
* variable: DCB_PG_STRICT
|
||||
* description: Priority values. String of eight "0" or "1", where "0" means
|
||||
* "may not utilize all bandwidth", "1" means "may utilize all bandwidth".
|
||||
* example: DCB_PG_STRICT=01101110
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY_STRICT_BANDWIDTH] =
|
||||
g_param_spec_boxed(NM_SETTING_DCB_PRIORITY_STRICT_BANDWIDTH,
|
||||
"",
|
||||
|
|
@ -1249,19 +1249,19 @@ nm_setting_dcb_class_init(NMSettingDcbClass *klass)
|
|||
&nm_sett_info_propert_type_dcb_au);
|
||||
|
||||
/**
|
||||
* NMSettingDcb:priority-traffic-class: (type GArray(guint))
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingDcb:priority-traffic-class: (type GArray(guint))
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: priority-traffic-class
|
||||
* variable: DCB_PG_UP2TC
|
||||
* description: Priority values. String of eight traffic class values (0 - 7).
|
||||
* example: DCB_PG_UP2TC=01623701
|
||||
* ---end---
|
||||
*/
|
||||
* property: priority-traffic-class
|
||||
* variable: DCB_PG_UP2TC
|
||||
* description: Priority values. String of eight traffic class values (0 - 7).
|
||||
* example: DCB_PG_UP2TC=01623701
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PRIORITY_TRAFFIC_CLASS] =
|
||||
g_param_spec_boxed(NM_SETTING_DCB_PRIORITY_TRAFFIC_CLASS,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -299,23 +299,23 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
}
|
||||
|
||||
/* APNs roughly follow the same rules as DNS domain names. Allowed
|
||||
* characters are a-z, 0-9, . and -. GSM 03.03 Section 9.1 states:
|
||||
*
|
||||
* The syntax of the APN shall follow the Name Syntax defined in
|
||||
* RFC 2181 [14] and RFC 1035 [15]. The APN consists of one or
|
||||
* more labels. Each label is coded as one octet length field
|
||||
* followed by that number of octets coded as 8 bit ASCII characters.
|
||||
* Following RFC 1035 [15] the labels should consist only of the
|
||||
* alphabetic characters (A-Z and a-z), digits (0-9) and the
|
||||
* dash (-). The case of alphabetic characters is not significant.
|
||||
*
|
||||
* A dot (.) is commonly used to separate parts of the APN, and
|
||||
* apparently the underscore (_) is used as well. RFC 2181 indicates
|
||||
* that no restrictions of any kind are placed on DNS labels, and thus
|
||||
* it would appear that none are placed on APNs either, but many modems
|
||||
* and networks will fail to accept APNs that include odd characters
|
||||
* like space ( ) and such.
|
||||
*/
|
||||
* characters are a-z, 0-9, . and -. GSM 03.03 Section 9.1 states:
|
||||
*
|
||||
* The syntax of the APN shall follow the Name Syntax defined in
|
||||
* RFC 2181 [14] and RFC 1035 [15]. The APN consists of one or
|
||||
* more labels. Each label is coded as one octet length field
|
||||
* followed by that number of octets coded as 8 bit ASCII characters.
|
||||
* Following RFC 1035 [15] the labels should consist only of the
|
||||
* alphabetic characters (A-Z and a-z), digits (0-9) and the
|
||||
* dash (-). The case of alphabetic characters is not significant.
|
||||
*
|
||||
* A dot (.) is commonly used to separate parts of the APN, and
|
||||
* apparently the underscore (_) is used as well. RFC 2181 indicates
|
||||
* that no restrictions of any kind are placed on DNS labels, and thus
|
||||
* it would appear that none are placed on APNs either, but many modems
|
||||
* and networks will fail to accept APNs that include odd characters
|
||||
* like space ( ) and such.
|
||||
*/
|
||||
for (i = 0; i < apn_len; i++) {
|
||||
if (!g_ascii_isalnum(priv->apn[i]) && (priv->apn[i] != '.') && (priv->apn[i] != '_')
|
||||
&& (priv->apn[i] != '-')) {
|
||||
|
|
@ -643,14 +643,14 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
setting_class->need_secrets = need_secrets;
|
||||
|
||||
/**
|
||||
* NMSettingGsm:auto-config:
|
||||
*
|
||||
* When %TRUE, the settings such as APN, username, or password will
|
||||
* default to values that match the network the modem will register
|
||||
* to in the Mobile Broadband Provider database.
|
||||
*
|
||||
* Since: 1.22
|
||||
**/
|
||||
* NMSettingGsm:auto-config:
|
||||
*
|
||||
* When %TRUE, the settings such as APN, username, or password will
|
||||
* default to values that match the network the modem will register
|
||||
* to in the Mobile Broadband Provider database.
|
||||
*
|
||||
* Since: 1.22
|
||||
**/
|
||||
obj_properties[PROP_AUTO_CONFIG] =
|
||||
g_param_spec_boolean(NM_SETTING_GSM_AUTO_CONFIG,
|
||||
"",
|
||||
|
|
@ -659,13 +659,13 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:number:
|
||||
*
|
||||
* Legacy setting that used to help establishing PPP data sessions for
|
||||
* GSM-based modems.
|
||||
*
|
||||
* Deprecated: 1.16: User-provided values for this setting are no longer used.
|
||||
**/
|
||||
* NMSettingGsm:number:
|
||||
*
|
||||
* Legacy setting that used to help establishing PPP data sessions for
|
||||
* GSM-based modems.
|
||||
*
|
||||
* Deprecated: 1.16: User-provided values for this setting are no longer used.
|
||||
**/
|
||||
obj_properties[PROP_NUMBER] = g_param_spec_string(NM_SETTING_GSM_NUMBER,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -673,12 +673,12 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:username:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingGsm:username:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_USERNAME] = g_param_spec_string(NM_SETTING_GSM_USERNAME,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -686,12 +686,12 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:password:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingGsm:password:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_PASSWORD] =
|
||||
g_param_spec_string(NM_SETTING_GSM_PASSWORD,
|
||||
"",
|
||||
|
|
@ -700,10 +700,10 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:password-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingGsm:password property.
|
||||
**/
|
||||
* NMSettingGsm:password-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingGsm:password property.
|
||||
**/
|
||||
obj_properties[PROP_PASSWORD_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_GSM_PASSWORD_FLAGS,
|
||||
"",
|
||||
|
|
@ -713,16 +713,16 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:apn:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingGsm:apn:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_APN] = g_param_spec_string(NM_SETTING_GSM_APN,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -730,14 +730,14 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:network-id:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingGsm:network-id:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_NETWORK_ID] =
|
||||
g_param_spec_string(NM_SETTING_GSM_NETWORK_ID,
|
||||
"",
|
||||
|
|
@ -746,12 +746,12 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:pin:
|
||||
*
|
||||
* If the SIM is locked with a PIN it must be unlocked before any other
|
||||
* operations are requested. Specify the PIN here to allow operation of the
|
||||
* device.
|
||||
**/
|
||||
* NMSettingGsm:pin:
|
||||
*
|
||||
* If the SIM is locked with a PIN it must be unlocked before any other
|
||||
* operations are requested. Specify the PIN here to allow operation of the
|
||||
* device.
|
||||
**/
|
||||
obj_properties[PROP_PIN] =
|
||||
g_param_spec_string(NM_SETTING_GSM_PIN,
|
||||
"",
|
||||
|
|
@ -760,10 +760,10 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:pin-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingGsm:pin property.
|
||||
**/
|
||||
* NMSettingGsm:pin-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingGsm:pin property.
|
||||
**/
|
||||
obj_properties[PROP_PIN_FLAGS] = g_param_spec_flags(NM_SETTING_GSM_PIN_FLAGS,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -772,11 +772,11 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:home-only:
|
||||
*
|
||||
* When %TRUE, only connections to the home network will be allowed.
|
||||
* Connections to roaming networks will not be made.
|
||||
**/
|
||||
* NMSettingGsm:home-only:
|
||||
*
|
||||
* When %TRUE, only connections to the home network will be allowed.
|
||||
* Connections to roaming networks will not be made.
|
||||
**/
|
||||
obj_properties[PROP_HOME_ONLY] =
|
||||
g_param_spec_boolean(NM_SETTING_GSM_HOME_ONLY,
|
||||
"",
|
||||
|
|
@ -785,14 +785,14 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:device-id:
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingGsm:device-id:
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_DEVICE_ID] =
|
||||
g_param_spec_string(NM_SETTING_GSM_DEVICE_ID,
|
||||
"",
|
||||
|
|
@ -801,15 +801,15 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:sim-id:
|
||||
*
|
||||
* The SIM card unique identifier (as given by the WWAN management service)
|
||||
* which this connection applies to. If given, the connection will apply
|
||||
* to any device also allowed by #NMSettingGsm:device-id which contains a
|
||||
* SIM card matching the given identifier.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingGsm:sim-id:
|
||||
*
|
||||
* The SIM card unique identifier (as given by the WWAN management service)
|
||||
* which this connection applies to. If given, the connection will apply
|
||||
* to any device also allowed by #NMSettingGsm:device-id which contains a
|
||||
* SIM card matching the given identifier.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_SIM_ID] = g_param_spec_string(NM_SETTING_GSM_SIM_ID,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -817,16 +817,16 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:sim-operator-id:
|
||||
*
|
||||
* 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
|
||||
* #NMSettingGsm:device-id and #NMSettingGsm:sim-id which contains a SIM
|
||||
* card provisioned by the given operator.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingGsm:sim-operator-id:
|
||||
*
|
||||
* 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
|
||||
* #NMSettingGsm:device-id and #NMSettingGsm:sim-id which contains a SIM
|
||||
* card provisioned by the given operator.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_SIM_OPERATOR_ID] =
|
||||
g_param_spec_string(NM_SETTING_GSM_SIM_OPERATOR_ID,
|
||||
"",
|
||||
|
|
@ -835,13 +835,13 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingGsm:mtu:
|
||||
*
|
||||
* If non-zero, only transmit packets of the specified size or smaller,
|
||||
* breaking larger packets up into multiple frames.
|
||||
*
|
||||
* Since: 1.8
|
||||
**/
|
||||
* NMSettingGsm:mtu:
|
||||
*
|
||||
* If non-zero, only transmit packets of the specified size or smaller,
|
||||
* breaking larger packets up into multiple frames.
|
||||
*
|
||||
* Since: 1.8
|
||||
**/
|
||||
obj_properties[PROP_MTU] = g_param_spec_uint(NM_SETTING_GSM_MTU,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -225,8 +225,8 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
|
||||
if (strcmp(interface_name, priv->virtual_iface_name) != 0) {
|
||||
/* We don't support renaming software infiniband devices. Later we might, but
|
||||
* for now just reject such connections.
|
||||
**/
|
||||
* for now just reject such connections.
|
||||
**/
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
|
|
@ -247,14 +247,14 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
|
||||
if (priv->mtu > NM_INFINIBAND_MAX_MTU) {
|
||||
/* Traditionally, MTU for "datagram" mode was limited to 2044
|
||||
* and for "connected" mode it was 65520.
|
||||
*
|
||||
* This is no longer the case, and both transport modes use the same
|
||||
* maximum of 65520 (NM_INFINIBAND_MAX_MTU).
|
||||
*
|
||||
* Note that this is the MTU in the connection profile. Whether
|
||||
* we will be able to configure large MTUs later (during activation)
|
||||
* is unknown at this point. */
|
||||
* and for "connected" mode it was 65520.
|
||||
*
|
||||
* This is no longer the case, and both transport modes use the same
|
||||
* maximum of 65520 (NM_INFINIBAND_MAX_MTU).
|
||||
*
|
||||
* Note that this is the MTU in the connection profile. Whether
|
||||
* we will be able to configure large MTUs later (during activation)
|
||||
* is unknown at this point. */
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
|
|
@ -385,30 +385,30 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingInfiniband:mac-address:
|
||||
*
|
||||
* 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).
|
||||
**/
|
||||
* NMSettingInfiniband:mac-address:
|
||||
*
|
||||
* 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).
|
||||
**/
|
||||
/* ---keyfile---
|
||||
* property: mac-address
|
||||
* format: usual hex-digits-and-colons notation
|
||||
* description: MAC address in traditional hex-digits-and-colons notation, or
|
||||
* or semicolon separated list of 20 decimal bytes (obsolete)
|
||||
* example: mac-address= 80:00:00:6d:fe:80:00:00:00:00:00:00:00:02:55:00:70:33:cf:01
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: mac-address
|
||||
* variable: HWADDR
|
||||
* description: IBoIP 20-byte hardware address of the device (in traditional
|
||||
* hex-digits-and-colons notation).
|
||||
* Note that for initscripts this is the current MAC address of the device as found
|
||||
* during ifup. For NetworkManager this is the permanent MAC address. Or in case no
|
||||
* permanent MAC address exists, the MAC address initially configured on the device.
|
||||
* example: HWADDR=01:02:03:04:05:06:07:08:09:0A:01:02:03:04:05:06:07:08:09:11
|
||||
* ---end---
|
||||
*/
|
||||
* property: mac-address
|
||||
* format: usual hex-digits-and-colons notation
|
||||
* description: MAC address in traditional hex-digits-and-colons notation, or
|
||||
* or semicolon separated list of 20 decimal bytes (obsolete)
|
||||
* example: mac-address= 80:00:00:6d:fe:80:00:00:00:00:00:00:00:02:55:00:70:33:cf:01
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: mac-address
|
||||
* variable: HWADDR
|
||||
* description: IBoIP 20-byte hardware address of the device (in traditional
|
||||
* hex-digits-and-colons notation).
|
||||
* Note that for initscripts this is the current MAC address of the device as found
|
||||
* during ifup. For NetworkManager this is the permanent MAC address. Or in case no
|
||||
* permanent MAC address exists, the MAC address initially configured on the device.
|
||||
* example: HWADDR=01:02:03:04:05:06:07:08:09:0A:01:02:03:04:05:06:07:08:09:11
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_MAC_ADDRESS] = g_param_spec_string(
|
||||
NM_SETTING_INFINIBAND_MAC_ADDRESS,
|
||||
"",
|
||||
|
|
@ -420,17 +420,17 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass)
|
|||
&nm_sett_info_propert_type_mac_address);
|
||||
|
||||
/**
|
||||
* NMSettingInfiniband:mtu:
|
||||
*
|
||||
* If non-zero, only transmit packets of the specified size or smaller,
|
||||
* breaking larger packets up into multiple frames.
|
||||
**/
|
||||
* NMSettingInfiniband:mtu:
|
||||
*
|
||||
* If non-zero, only transmit packets of the specified size or smaller,
|
||||
* breaking larger packets up into multiple frames.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: mtu
|
||||
* variable: MTU
|
||||
* description: MTU of the interface.
|
||||
* ---end---
|
||||
*/
|
||||
* property: mtu
|
||||
* variable: MTU
|
||||
* description: MTU of the interface.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_MTU] = g_param_spec_uint(NM_SETTING_INFINIBAND_MTU,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -441,19 +441,19 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingInfiniband:transport-mode:
|
||||
*
|
||||
* The IP-over-InfiniBand transport mode. Either "datagram" or
|
||||
* "connected".
|
||||
**/
|
||||
* NMSettingInfiniband:transport-mode:
|
||||
*
|
||||
* The IP-over-InfiniBand transport mode. Either "datagram" or
|
||||
* "connected".
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: transport-mode
|
||||
* variable: CONNECTED_MODE
|
||||
* default: CONNECTED_MODE=no
|
||||
* description: CONNECTED_MODE=yes for "connected" mode, CONNECTED_MODE=no for
|
||||
* "datagram" mode
|
||||
* ---end---
|
||||
*/
|
||||
* property: transport-mode
|
||||
* variable: CONNECTED_MODE
|
||||
* default: CONNECTED_MODE=no
|
||||
* description: CONNECTED_MODE=yes for "connected" mode, CONNECTED_MODE=no for
|
||||
* "datagram" mode
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_TRANSPORT_MODE] = g_param_spec_string(
|
||||
NM_SETTING_INFINIBAND_TRANSPORT_MODE,
|
||||
"",
|
||||
|
|
@ -462,23 +462,23 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingInfiniband:p-key:
|
||||
*
|
||||
* The InfiniBand P_Key to use for this device. A value of -1 means to use
|
||||
* the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit
|
||||
* unsigned integer, whose high bit is set if it is a "full membership"
|
||||
* P_Key.
|
||||
**/
|
||||
* NMSettingInfiniband:p-key:
|
||||
*
|
||||
* The InfiniBand P_Key to use for this device. A value of -1 means to use
|
||||
* the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit
|
||||
* unsigned integer, whose high bit is set if it is a "full membership"
|
||||
* P_Key.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: p-key
|
||||
* variable: PKEY_ID (and PKEY=yes)
|
||||
* default: PKEY=no
|
||||
* description: InfiniBand P_Key. The value can be a hex number prefixed with "0x"
|
||||
* or a decimal number.
|
||||
* When PKEY_ID is specified, PHYSDEV and DEVICE also must be specified.
|
||||
* example: PKEY=yes PKEY_ID=2 PHYSDEV=mlx4_ib0 DEVICE=mlx4_ib0.8002
|
||||
* ---end---
|
||||
*/
|
||||
* property: p-key
|
||||
* variable: PKEY_ID (and PKEY=yes)
|
||||
* default: PKEY=no
|
||||
* description: InfiniBand P_Key. The value can be a hex number prefixed with "0x"
|
||||
* or a decimal number.
|
||||
* When PKEY_ID is specified, PHYSDEV and DEVICE also must be specified.
|
||||
* example: PKEY=yes PKEY_ID=2 PHYSDEV=mlx4_ib0 DEVICE=mlx4_ib0.8002
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_P_KEY] =
|
||||
g_param_spec_int(NM_SETTING_INFINIBAND_P_KEY,
|
||||
"",
|
||||
|
|
@ -489,21 +489,21 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingInfiniband:parent:
|
||||
*
|
||||
* The interface name of the parent device of this device. Normally %NULL,
|
||||
* but if the #NMSettingInfiniband:p_key property is set, then you must
|
||||
* specify the base device by setting either this property or
|
||||
* #NMSettingInfiniband:mac-address.
|
||||
**/
|
||||
* NMSettingInfiniband:parent:
|
||||
*
|
||||
* The interface name of the parent device of this device. Normally %NULL,
|
||||
* but if the #NMSettingInfiniband:p_key property is set, then you must
|
||||
* specify the base device by setting either this property or
|
||||
* #NMSettingInfiniband:mac-address.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: parent
|
||||
* variable: PHYSDEV (PKEY=yes)
|
||||
* default: PKEY=no
|
||||
* description: InfiniBand parent device.
|
||||
* example: PHYSDEV=ib0
|
||||
* ---end---
|
||||
*/
|
||||
* property: parent
|
||||
* variable: PHYSDEV (PKEY=yes)
|
||||
* default: PKEY=no
|
||||
* description: InfiniBand parent device.
|
||||
* example: PHYSDEV=ib0
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PARENT] = g_param_spec_string(
|
||||
NM_SETTING_INFINIBAND_PARENT,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -322,13 +322,13 @@ nm_ip_address_cmp_full(const NMIPAddress *a, const NMIPAddress *b, NMIPAddressCm
|
|||
while (g_hash_table_iter_next(&iter, (gpointer *) &key, (gpointer *) &value)) {
|
||||
value2 = g_hash_table_lookup(b->attributes, key);
|
||||
/* We cannot really compare GVariants, because g_variant_compare() does
|
||||
* not work in general. So, don't bother. NM_IP_ADDRESS_CMP_FLAGS_WITH_ATTRS is
|
||||
* documented to not provide a total order for the attribute contents.
|
||||
*
|
||||
* Theoretically, we can implement also a total order. However we should
|
||||
* not do that by default because it would require us to sort the keys
|
||||
* first. Most callers don't care about total order, so they shouldn't
|
||||
* pay the overhead. */
|
||||
* not work in general. So, don't bother. NM_IP_ADDRESS_CMP_FLAGS_WITH_ATTRS is
|
||||
* documented to not provide a total order for the attribute contents.
|
||||
*
|
||||
* Theoretically, we can implement also a total order. However we should
|
||||
* not do that by default because it would require us to sort the keys
|
||||
* first. Most callers don't care about total order, so they shouldn't
|
||||
* pay the overhead. */
|
||||
if (!value2)
|
||||
return -2;
|
||||
if (!g_variant_equal(value, value2))
|
||||
|
|
@ -2452,9 +2452,9 @@ nm_ip_routing_rule_cmp(const NMIPRoutingRule *rule, const NMIPRoutingRule *other
|
|||
NM_CMP_FIELD(rule, other, ipproto);
|
||||
|
||||
/* We compare the plain strings, not the binary values after utf8safe unescaping.
|
||||
*
|
||||
* The reason is, that the rules differ already when the direct strings differ, not
|
||||
* only when the unescaped names differ. */
|
||||
*
|
||||
* The reason is, that the rules differ already when the direct strings differ, not
|
||||
* only when the unescaped names differ. */
|
||||
NM_CMP_FIELD_STR0(rule, other, iifname);
|
||||
NM_CMP_FIELD_STR0(rule, other, oifname);
|
||||
|
||||
|
|
@ -2539,19 +2539,19 @@ nm_ip_routing_rule_validate(const NMIPRoutingRule *self, GError **error)
|
|||
g_return_val_if_fail(!error || !*error, FALSE);
|
||||
|
||||
/* Kernel may be more flexible about validating. We do a strict validation
|
||||
* here and reject certain settings eagerly. We can always relax it later. */
|
||||
* here and reject certain settings eagerly. We can always relax it later. */
|
||||
|
||||
if (!self->priority_has) {
|
||||
/* iproute2 accepts not specifying the priority, in which case kernel will select
|
||||
* an unused priority. We don't allow for that, and will always require the user to
|
||||
* select a priority.
|
||||
*
|
||||
* Note that if the user selects priority 0 or a non-unique priority, this is problematic
|
||||
* due to kernel bugs rh#1685816 and rh#1685816. It may result in NetworkManager wrongly being
|
||||
* unable to add a rule or deleting the wrong rule.
|
||||
* This problem is not at all specific to the priority, it affects all rules that
|
||||
* have default values which confuse kernel. But setting a unique priority avoids
|
||||
* this problem nicely. */
|
||||
* an unused priority. We don't allow for that, and will always require the user to
|
||||
* select a priority.
|
||||
*
|
||||
* Note that if the user selects priority 0 or a non-unique priority, this is problematic
|
||||
* due to kernel bugs rh#1685816 and rh#1685816. It may result in NetworkManager wrongly being
|
||||
* unable to add a rule or deleting the wrong rule.
|
||||
* This problem is not at all specific to the priority, it affects all rules that
|
||||
* have default values which confuse kernel. But setting a unique priority avoids
|
||||
* this problem nicely. */
|
||||
g_set_error_literal(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
|
|
@ -2562,9 +2562,9 @@ nm_ip_routing_rule_validate(const NMIPRoutingRule *self, GError **error)
|
|||
if (NM_IN_SET(self->action, FR_ACT_TO_TBL)) {
|
||||
if (self->table == 0) {
|
||||
/* with IPv4, kernel allows a table (in RTM_NEWRULE) of zero to automatically select
|
||||
* an unused table. We don't. The user needs to specify the table.
|
||||
*
|
||||
* For IPv6, kernel doesn't allow a table of zero, so we are consistent here. */
|
||||
* an unused table. We don't. The user needs to specify the table.
|
||||
*
|
||||
* For IPv6, kernel doesn't allow a table of zero, so we are consistent here. */
|
||||
g_set_error_literal(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
|
|
@ -3146,38 +3146,38 @@ nm_ip_routing_rule_from_string(const char * str,
|
|||
return NULL;
|
||||
|
||||
/* NM_IP_ROUTING_RULE_TO_STRING_TYPE_IPROUTE gives a string representation that is
|
||||
* partly compatibly with iproute2. That is, the part after `ip -[46] rule add $ARGS`.
|
||||
* There are differences though:
|
||||
*
|
||||
* - trying to convert an invalid rule to string may not be possible. The reason is for
|
||||
* example that an invalid rule can have nm_ip_routing_rule_get_from() like "bogus",
|
||||
* but we don't write that as "from bogus". In general, if you try to convert an invalid
|
||||
* rule to string, the operation may fail or the result may itself not be parsable.
|
||||
* Of course, valid rules can be converted to string and read back the same (round-trip).
|
||||
*
|
||||
* - iproute2 in may regards is flexible about the command lines. For example
|
||||
* - for tables it accepts table names from /etc/iproute2/rt_tables. We only
|
||||
* accept the special aliases "main", "local", and "default".
|
||||
* - key names like "preference" can be abbreviated to "pref", we don't do that.
|
||||
* - the "preference"/"priority" may be unspecified, in which kernel automatically
|
||||
* chooses an unused priority (during `ip rule add`). We don't allow for that, the
|
||||
* priority must be explicitly set.
|
||||
*
|
||||
* - iproute2 does not support any escaping. Well, it's the shell that supports quoting
|
||||
* and escaping and splits the command line. We need to split the command line ourself,
|
||||
* but we don't support full shell quotation.
|
||||
* from-string tokenizes words at (ASCII) whitespaces (removing the whitespaces).
|
||||
* It also supports backslash escaping (e.g. to contain whitespace), but it does
|
||||
* not support special escape sequences. Values are taken literally, meaning
|
||||
* "\n\ \111" gives results in "n 111".
|
||||
* The strings really shouldn't contain any special characters that require escaping,
|
||||
* but that's the rule.
|
||||
* This also goes together with the @allow_escaping parameter of nm_utils_strsplit_set().
|
||||
* If you concatenate multiple rule expressions with a delimiter, the delimiter inside
|
||||
* each word can be backslash escaped, and nm_utils_strsplit_set(allow_escaping=TRUE) will
|
||||
* properly split the words, preserving the backslashes, which then will be removed by
|
||||
* nm_ip_routing_rule_from_string().
|
||||
*/
|
||||
* partly compatibly with iproute2. That is, the part after `ip -[46] rule add $ARGS`.
|
||||
* There are differences though:
|
||||
*
|
||||
* - trying to convert an invalid rule to string may not be possible. The reason is for
|
||||
* example that an invalid rule can have nm_ip_routing_rule_get_from() like "bogus",
|
||||
* but we don't write that as "from bogus". In general, if you try to convert an invalid
|
||||
* rule to string, the operation may fail or the result may itself not be parsable.
|
||||
* Of course, valid rules can be converted to string and read back the same (round-trip).
|
||||
*
|
||||
* - iproute2 in may regards is flexible about the command lines. For example
|
||||
* - for tables it accepts table names from /etc/iproute2/rt_tables. We only
|
||||
* accept the special aliases "main", "local", and "default".
|
||||
* - key names like "preference" can be abbreviated to "pref", we don't do that.
|
||||
* - the "preference"/"priority" may be unspecified, in which kernel automatically
|
||||
* chooses an unused priority (during `ip rule add`). We don't allow for that, the
|
||||
* priority must be explicitly set.
|
||||
*
|
||||
* - iproute2 does not support any escaping. Well, it's the shell that supports quoting
|
||||
* and escaping and splits the command line. We need to split the command line ourself,
|
||||
* but we don't support full shell quotation.
|
||||
* from-string tokenizes words at (ASCII) whitespaces (removing the whitespaces).
|
||||
* It also supports backslash escaping (e.g. to contain whitespace), but it does
|
||||
* not support special escape sequences. Values are taken literally, meaning
|
||||
* "\n\ \111" gives results in "n 111".
|
||||
* The strings really shouldn't contain any special characters that require escaping,
|
||||
* but that's the rule.
|
||||
* This also goes together with the @allow_escaping parameter of nm_utils_strsplit_set().
|
||||
* If you concatenate multiple rule expressions with a delimiter, the delimiter inside
|
||||
* each word can be backslash escaped, and nm_utils_strsplit_set(allow_escaping=TRUE) will
|
||||
* properly split the words, preserving the backslashes, which then will be removed by
|
||||
* nm_ip_routing_rule_from_string().
|
||||
*/
|
||||
|
||||
addr_family = _rr_string_addr_family_from_flags(to_string_flags);
|
||||
|
||||
|
|
@ -3194,7 +3194,7 @@ nm_ip_routing_rule_from_string(const char * str,
|
|||
}
|
||||
|
||||
/* iproute2 matches keywords with any partial prefix. We don't allow
|
||||
* for that flexibility. */
|
||||
* for that flexibility. */
|
||||
|
||||
if (NM_IN_STRSET(word0, "from")) {
|
||||
if (!word1)
|
||||
|
|
@ -3214,7 +3214,7 @@ nm_ip_routing_rule_from_string(const char * str,
|
|||
}
|
||||
if (NM_IN_STRSET(word0, "not")) {
|
||||
/* we accept multiple "not" specifiers. "not not" still means
|
||||
* not. */
|
||||
* not. */
|
||||
val_invert = TRUE;
|
||||
goto next_words_consumed;
|
||||
}
|
||||
|
|
@ -3331,8 +3331,8 @@ nm_ip_routing_rule_from_string(const char * str,
|
|||
}
|
||||
|
||||
/* also the action is still unsupported. For the moment, we only support
|
||||
* FR_ACT_TO_TBL, which is the default (by not expressing it on the command
|
||||
* line). */
|
||||
* FR_ACT_TO_TBL, which is the default (by not expressing it on the command
|
||||
* line). */
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_FAILED,
|
||||
|
|
@ -3541,13 +3541,13 @@ nm_ip_routing_rule_to_string(const NMIPRoutingRule * self,
|
|||
}
|
||||
|
||||
/* It is only guaranteed that valid rules can be expressed as string.
|
||||
*
|
||||
* Still, unless requested proceed to convert to string without validating and
|
||||
* hope for the best.
|
||||
*
|
||||
* That is, because self->from_str might contain an invalid IP address (indicated
|
||||
* by self->from_valid). But we don't support serializing such arbitrary strings
|
||||
* as "from %s". */
|
||||
*
|
||||
* Still, unless requested proceed to convert to string without validating and
|
||||
* hope for the best.
|
||||
*
|
||||
* That is, because self->from_str might contain an invalid IP address (indicated
|
||||
* by self->from_valid). But we don't support serializing such arbitrary strings
|
||||
* as "from %s". */
|
||||
if (NM_FLAGS_HAS(to_string_flags, NM_IP_ROUTING_RULE_AS_STRING_FLAGS_VALIDATE)) {
|
||||
gs_free_error GError *local = NULL;
|
||||
|
||||
|
|
@ -5541,11 +5541,11 @@ _nm_sett_info_property_override_create_array_ip_config(void)
|
|||
.from_dbus_fcn = ip_gateway_set, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: routing-rules
|
||||
* format: array of 'a{sv}'
|
||||
* description: Array of dictionaries for routing rules.
|
||||
* ---end---
|
||||
*/
|
||||
* property: routing-rules
|
||||
* format: array of 'a{sv}'
|
||||
* description: Array of dictionaries for routing rules.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_dbus(
|
||||
properties_override,
|
||||
NM_SETTING_IP_CONFIG_ROUTING_RULES,
|
||||
|
|
@ -5811,28 +5811,28 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
setting_class->enumerate_values = enumerate_values;
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:method:
|
||||
*
|
||||
* IP configuration method.
|
||||
*
|
||||
* #NMSettingIP4Config and #NMSettingIP6Config both support "disabled",
|
||||
* "auto", "manual", and "link-local". See the subclass-specific
|
||||
* documentation for other values.
|
||||
*
|
||||
* In general, for the "auto" method, properties such as
|
||||
* #NMSettingIPConfig:dns and #NMSettingIPConfig:routes specify information
|
||||
* that is added on to the information returned from automatic
|
||||
* configuration. The #NMSettingIPConfig:ignore-auto-routes and
|
||||
* #NMSettingIPConfig:ignore-auto-dns properties modify this behavior.
|
||||
*
|
||||
* For methods that imply no upstream network, such as "shared" or
|
||||
* "link-local", these properties must be empty.
|
||||
*
|
||||
* For IPv4 method "shared", the IP subnet can be configured by adding one
|
||||
* manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the
|
||||
* shared method must be configured on the interface which shares the internet
|
||||
* to a subnet, not on the uplink which is shared.
|
||||
**/
|
||||
* NMSettingIPConfig:method:
|
||||
*
|
||||
* IP configuration method.
|
||||
*
|
||||
* #NMSettingIP4Config and #NMSettingIP6Config both support "disabled",
|
||||
* "auto", "manual", and "link-local". See the subclass-specific
|
||||
* documentation for other values.
|
||||
*
|
||||
* In general, for the "auto" method, properties such as
|
||||
* #NMSettingIPConfig:dns and #NMSettingIPConfig:routes specify information
|
||||
* that is added on to the information returned from automatic
|
||||
* configuration. The #NMSettingIPConfig:ignore-auto-routes and
|
||||
* #NMSettingIPConfig:ignore-auto-dns properties modify this behavior.
|
||||
*
|
||||
* For methods that imply no upstream network, such as "shared" or
|
||||
* "link-local", these properties must be empty.
|
||||
*
|
||||
* For IPv4 method "shared", the IP subnet can be configured by adding one
|
||||
* manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the
|
||||
* shared method must be configured on the interface which shares the internet
|
||||
* to a subnet, not on the uplink which is shared.
|
||||
**/
|
||||
obj_properties[PROP_METHOD] = g_param_spec_string(
|
||||
NM_SETTING_IP_CONFIG_METHOD,
|
||||
"",
|
||||
|
|
@ -5841,10 +5841,10 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dns:
|
||||
*
|
||||
* Array of IP addresses of DNS servers.
|
||||
**/
|
||||
* NMSettingIPConfig:dns:
|
||||
*
|
||||
* Array of IP addresses of DNS servers.
|
||||
**/
|
||||
obj_properties[PROP_DNS] = g_param_spec_boxed(NM_SETTING_IP_CONFIG_DNS,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -5852,18 +5852,18 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dns-search:
|
||||
*
|
||||
* Array of DNS search domains. Domains starting with a tilde ('~')
|
||||
* are considered 'routing' domains and are used only to decide the
|
||||
* interface over which a query must be forwarded; they are not used
|
||||
* to complete unqualified host names.
|
||||
*
|
||||
* When using a DNS plugin that supports Conditional Forwarding or
|
||||
* Split DNS, then the search domains specify which name servers to
|
||||
* query. This makes the behavior different from running with plain
|
||||
* /etc/resolv.conf. For more information see also the dns-priority setting.
|
||||
**/
|
||||
* NMSettingIPConfig:dns-search:
|
||||
*
|
||||
* Array of DNS search domains. Domains starting with a tilde ('~')
|
||||
* are considered 'routing' domains and are used only to decide the
|
||||
* interface over which a query must be forwarded; they are not used
|
||||
* to complete unqualified host names.
|
||||
*
|
||||
* When using a DNS plugin that supports Conditional Forwarding or
|
||||
* Split DNS, then the search domains specify which name servers to
|
||||
* query. This makes the behavior different from running with plain
|
||||
* /etc/resolv.conf. For more information see also the dns-priority setting.
|
||||
**/
|
||||
obj_properties[PROP_DNS_SEARCH] =
|
||||
g_param_spec_boxed(NM_SETTING_IP_CONFIG_DNS_SEARCH,
|
||||
"",
|
||||
|
|
@ -5872,25 +5872,25 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dns-options:
|
||||
*
|
||||
* Array of DNS options as described in man 5 resolv.conf.
|
||||
*
|
||||
* %NULL means that the options are unset and left at the default.
|
||||
* In this case NetworkManager will use default options. This is
|
||||
* distinct from an empty list of properties.
|
||||
*
|
||||
* The currently supported options are "attempts", "debug", "edns0",
|
||||
* "inet6", "ip6-bytestring", "ip6-dotint", "ndots", "no-check-names",
|
||||
* "no-ip6-dotint", "no-reload", "no-tld-query", "rotate", "single-request",
|
||||
* "single-request-reopen", "timeout", "trust-ad", "use-vc".
|
||||
*
|
||||
* The "trust-ad" setting is only honored if the profile contributes
|
||||
* name servers to resolv.conf, and if all contributing profiles have
|
||||
* "trust-ad" enabled.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPConfig:dns-options:
|
||||
*
|
||||
* Array of DNS options as described in man 5 resolv.conf.
|
||||
*
|
||||
* %NULL means that the options are unset and left at the default.
|
||||
* In this case NetworkManager will use default options. This is
|
||||
* distinct from an empty list of properties.
|
||||
*
|
||||
* The currently supported options are "attempts", "debug", "edns0",
|
||||
* "inet6", "ip6-bytestring", "ip6-dotint", "ndots", "no-check-names",
|
||||
* "no-ip6-dotint", "no-reload", "no-tld-query", "rotate", "single-request",
|
||||
* "single-request-reopen", "timeout", "trust-ad", "use-vc".
|
||||
*
|
||||
* The "trust-ad" setting is only honored if the profile contributes
|
||||
* name servers to resolv.conf, and if all contributing profiles have
|
||||
* "trust-ad" enabled.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_DNS_OPTIONS] =
|
||||
g_param_spec_boxed(NM_SETTING_IP_CONFIG_DNS_OPTIONS,
|
||||
"",
|
||||
|
|
@ -5899,58 +5899,58 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dns-priority:
|
||||
*
|
||||
* DNS servers priority.
|
||||
*
|
||||
* The relative priority for DNS servers specified by this setting. A lower
|
||||
* numerical value is better (higher priority).
|
||||
*
|
||||
* Negative values have the special effect of excluding other configurations
|
||||
* with a greater numerical priority value; so in presence of at least one negative
|
||||
* priority, only DNS servers from connections with the lowest priority value will be used.
|
||||
* To avoid all DNS leaks, set the priority of the profile that should be used
|
||||
* to the most negative value of all active connections profiles.
|
||||
*
|
||||
* Zero selects a globally configured default value. If the latter is missing
|
||||
* or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for
|
||||
* other connections.
|
||||
*
|
||||
* Note that the priority is to order DNS settings for multiple active
|
||||
* connections. It does not disambiguate multiple DNS servers within the
|
||||
* same connection profile.
|
||||
*
|
||||
* When multiple devices have configurations with the same priority, VPNs will be
|
||||
* considered first, then devices with the best (lowest metric) default
|
||||
* route and then all other devices.
|
||||
*
|
||||
* When using dns=default, servers with higher priority will be on top of
|
||||
* resolv.conf. To prioritize a given server over another one within the
|
||||
* same connection, just specify them in the desired order.
|
||||
* Note that commonly the resolver tries name servers in /etc/resolv.conf
|
||||
* in the order listed, proceeding with the next server in the list
|
||||
* on failure. See for example the "rotate" option of the dns-options setting.
|
||||
* If there are any negative DNS priorities, then only name servers from
|
||||
* the devices with that lowest priority will be considered.
|
||||
*
|
||||
* When using a DNS resolver that supports Conditional Forwarding or
|
||||
* Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection
|
||||
* is used to query domains in its search list. The search domains determine which
|
||||
* name servers to ask, and the DNS priority is used to prioritize
|
||||
* name servers based on the domain. Queries for domains not present in any
|
||||
* search list are routed through connections having the '~.' special wildcard
|
||||
* domain, which is added automatically to connections with the default route
|
||||
* (or can be added manually). When multiple connections specify the same domain, the
|
||||
* one with the best priority (lowest numerical value) wins. If a sub domain
|
||||
* is configured on another interface it will be accepted regardless the priority,
|
||||
* unless parent domain on the other interface has a negative priority, which causes
|
||||
* the sub domain to be shadowed.
|
||||
* With Split DNS one can avoid undesired DNS leaks by properly configuring
|
||||
* DNS priorities and the search domains, so that only name servers of the desired
|
||||
* interface are configured.
|
||||
*
|
||||
* Since: 1.4
|
||||
**/
|
||||
* NMSettingIPConfig:dns-priority:
|
||||
*
|
||||
* DNS servers priority.
|
||||
*
|
||||
* The relative priority for DNS servers specified by this setting. A lower
|
||||
* numerical value is better (higher priority).
|
||||
*
|
||||
* Negative values have the special effect of excluding other configurations
|
||||
* with a greater numerical priority value; so in presence of at least one negative
|
||||
* priority, only DNS servers from connections with the lowest priority value will be used.
|
||||
* To avoid all DNS leaks, set the priority of the profile that should be used
|
||||
* to the most negative value of all active connections profiles.
|
||||
*
|
||||
* Zero selects a globally configured default value. If the latter is missing
|
||||
* or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for
|
||||
* other connections.
|
||||
*
|
||||
* Note that the priority is to order DNS settings for multiple active
|
||||
* connections. It does not disambiguate multiple DNS servers within the
|
||||
* same connection profile.
|
||||
*
|
||||
* When multiple devices have configurations with the same priority, VPNs will be
|
||||
* considered first, then devices with the best (lowest metric) default
|
||||
* route and then all other devices.
|
||||
*
|
||||
* When using dns=default, servers with higher priority will be on top of
|
||||
* resolv.conf. To prioritize a given server over another one within the
|
||||
* same connection, just specify them in the desired order.
|
||||
* Note that commonly the resolver tries name servers in /etc/resolv.conf
|
||||
* in the order listed, proceeding with the next server in the list
|
||||
* on failure. See for example the "rotate" option of the dns-options setting.
|
||||
* If there are any negative DNS priorities, then only name servers from
|
||||
* the devices with that lowest priority will be considered.
|
||||
*
|
||||
* When using a DNS resolver that supports Conditional Forwarding or
|
||||
* Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection
|
||||
* is used to query domains in its search list. The search domains determine which
|
||||
* name servers to ask, and the DNS priority is used to prioritize
|
||||
* name servers based on the domain. Queries for domains not present in any
|
||||
* search list are routed through connections having the '~.' special wildcard
|
||||
* domain, which is added automatically to connections with the default route
|
||||
* (or can be added manually). When multiple connections specify the same domain, the
|
||||
* one with the best priority (lowest numerical value) wins. If a sub domain
|
||||
* is configured on another interface it will be accepted regardless the priority,
|
||||
* unless parent domain on the other interface has a negative priority, which causes
|
||||
* the sub domain to be shadowed.
|
||||
* With Split DNS one can avoid undesired DNS leaks by properly configuring
|
||||
* DNS priorities and the search domains, so that only name servers of the desired
|
||||
* interface are configured.
|
||||
*
|
||||
* Since: 1.4
|
||||
**/
|
||||
obj_properties[PROP_DNS_PRIORITY] =
|
||||
g_param_spec_int(NM_SETTING_IP_CONFIG_DNS_PRIORITY,
|
||||
"",
|
||||
|
|
@ -5961,10 +5961,10 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:addresses: (type GPtrArray(NMIPAddress))
|
||||
*
|
||||
* Array of IP addresses.
|
||||
**/
|
||||
* NMSettingIPConfig:addresses: (type GPtrArray(NMIPAddress))
|
||||
*
|
||||
* Array of IP addresses.
|
||||
**/
|
||||
obj_properties[PROP_ADDRESSES] =
|
||||
g_param_spec_boxed(NM_SETTING_IP_CONFIG_ADDRESSES,
|
||||
"",
|
||||
|
|
@ -5978,18 +5978,18 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
NM_SETTING_PARAM_LEGACY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:gateway:
|
||||
*
|
||||
* The gateway associated with this configuration. This is only meaningful
|
||||
* if #NMSettingIPConfig:addresses is also set.
|
||||
*
|
||||
* The gateway's main purpose is to control the next hop of the standard default route on the device.
|
||||
* Hence, the gateway property conflicts with #NMSettingIPConfig:never-default and will be
|
||||
* automatically dropped if the IP configuration is set to never-default.
|
||||
*
|
||||
* As an alternative to set the gateway, configure a static default route with /0 as prefix
|
||||
* length.
|
||||
**/
|
||||
* NMSettingIPConfig:gateway:
|
||||
*
|
||||
* The gateway associated with this configuration. This is only meaningful
|
||||
* if #NMSettingIPConfig:addresses is also set.
|
||||
*
|
||||
* The gateway's main purpose is to control the next hop of the standard default route on the device.
|
||||
* Hence, the gateway property conflicts with #NMSettingIPConfig:never-default and will be
|
||||
* automatically dropped if the IP configuration is set to never-default.
|
||||
*
|
||||
* As an alternative to set the gateway, configure a static default route with /0 as prefix
|
||||
* length.
|
||||
**/
|
||||
obj_properties[PROP_GATEWAY] = g_param_spec_string(
|
||||
NM_SETTING_IP_CONFIG_GATEWAY,
|
||||
"",
|
||||
|
|
@ -5998,10 +5998,10 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:routes: (type GPtrArray(NMIPRoute))
|
||||
*
|
||||
* Array of IP routes.
|
||||
**/
|
||||
* NMSettingIPConfig:routes: (type GPtrArray(NMIPRoute))
|
||||
*
|
||||
* Array of IP routes.
|
||||
**/
|
||||
obj_properties[PROP_ROUTES] =
|
||||
g_param_spec_boxed(NM_SETTING_IP_CONFIG_ROUTES,
|
||||
"",
|
||||
|
|
@ -6012,19 +6012,19 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
NM_SETTING_PARAM_LEGACY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:route-metric:
|
||||
*
|
||||
* The default metric for routes that don't explicitly specify a metric.
|
||||
* The default value -1 means that the metric is chosen 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.
|
||||
**/
|
||||
* NMSettingIPConfig:route-metric:
|
||||
*
|
||||
* The default metric for routes that don't explicitly specify a metric.
|
||||
* The default value -1 means that the metric is chosen 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.
|
||||
**/
|
||||
obj_properties[PROP_ROUTE_METRIC] =
|
||||
g_param_spec_int64(NM_SETTING_IP_CONFIG_ROUTE_METRIC,
|
||||
"",
|
||||
|
|
@ -6035,26 +6035,26 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:route-table:
|
||||
*
|
||||
* Enable policy routing (source routing) and set the routing table used when adding routes.
|
||||
*
|
||||
* This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes
|
||||
* and static routes. But note that static routes can individually overwrite the setting
|
||||
* by explicitly specifying a non-zero routing table.
|
||||
*
|
||||
* If the table setting is left at zero, it is eligible to be overwritten via global
|
||||
* configuration. If the property is zero even after applying the global configuration
|
||||
* value, policy routing is disabled for the address family of this connection.
|
||||
*
|
||||
* Policy routing disabled means that NetworkManager will add all routes to the main
|
||||
* table (except static routes that explicitly configure a different table). Additionally,
|
||||
* NetworkManager will not delete any extraneous routes from tables except the main table.
|
||||
* This is to preserve backward compatibility for users who manage routing tables outside
|
||||
* of NetworkManager.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingIPConfig:route-table:
|
||||
*
|
||||
* Enable policy routing (source routing) and set the routing table used when adding routes.
|
||||
*
|
||||
* This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes
|
||||
* and static routes. But note that static routes can individually overwrite the setting
|
||||
* by explicitly specifying a non-zero routing table.
|
||||
*
|
||||
* If the table setting is left at zero, it is eligible to be overwritten via global
|
||||
* configuration. If the property is zero even after applying the global configuration
|
||||
* value, policy routing is disabled for the address family of this connection.
|
||||
*
|
||||
* Policy routing disabled means that NetworkManager will add all routes to the main
|
||||
* table (except static routes that explicitly configure a different table). Additionally,
|
||||
* NetworkManager will not delete any extraneous routes from tables except the main table.
|
||||
* This is to preserve backward compatibility for users who manage routing tables outside
|
||||
* of NetworkManager.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_ROUTE_TABLE] = g_param_spec_uint(
|
||||
NM_SETTING_IP_CONFIG_ROUTE_TABLE,
|
||||
"",
|
||||
|
|
@ -6064,12 +6064,12 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
0,
|
||||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||
/**
|
||||
* NMSettingIPConfig:ignore-auto-routes:
|
||||
*
|
||||
* When #NMSettingIPConfig:method is set to "auto" and this property to
|
||||
* %TRUE, automatically configured routes are ignored and only routes
|
||||
* specified in the #NMSettingIPConfig:routes property, if any, are used.
|
||||
**/
|
||||
* NMSettingIPConfig:ignore-auto-routes:
|
||||
*
|
||||
* When #NMSettingIPConfig:method is set to "auto" and this property to
|
||||
* %TRUE, automatically configured routes are ignored and only routes
|
||||
* specified in the #NMSettingIPConfig:routes property, if any, are used.
|
||||
**/
|
||||
obj_properties[PROP_IGNORE_AUTO_ROUTES] =
|
||||
g_param_spec_boolean(NM_SETTING_IP_CONFIG_IGNORE_AUTO_ROUTES,
|
||||
"",
|
||||
|
|
@ -6078,14 +6078,14 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:ignore-auto-dns:
|
||||
*
|
||||
* When #NMSettingIPConfig:method is set to "auto" and this property to
|
||||
* %TRUE, automatically configured name servers and search domains are
|
||||
* ignored and only name servers and search domains specified in the
|
||||
* #NMSettingIPConfig:dns and #NMSettingIPConfig:dns-search properties, if
|
||||
* any, are used.
|
||||
**/
|
||||
* NMSettingIPConfig:ignore-auto-dns:
|
||||
*
|
||||
* When #NMSettingIPConfig:method is set to "auto" and this property to
|
||||
* %TRUE, automatically configured name servers and search domains are
|
||||
* ignored and only name servers and search domains specified in the
|
||||
* #NMSettingIPConfig:dns and #NMSettingIPConfig:dns-search properties, if
|
||||
* any, are used.
|
||||
**/
|
||||
obj_properties[PROP_IGNORE_AUTO_DNS] =
|
||||
g_param_spec_boolean(NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS,
|
||||
"",
|
||||
|
|
@ -6094,13 +6094,13 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dhcp-hostname:
|
||||
*
|
||||
* If the #NMSettingIPConfig:dhcp-send-hostname property is %TRUE, then the
|
||||
* specified name will be sent to the DHCP server when acquiring a lease.
|
||||
* This property and #NMSettingIP4Config:dhcp-fqdn are mutually exclusive and
|
||||
* cannot be set at the same time.
|
||||
**/
|
||||
* NMSettingIPConfig:dhcp-hostname:
|
||||
*
|
||||
* If the #NMSettingIPConfig:dhcp-send-hostname property is %TRUE, then the
|
||||
* specified name will be sent to the DHCP server when acquiring a lease.
|
||||
* This property and #NMSettingIP4Config:dhcp-fqdn are mutually exclusive and
|
||||
* cannot be set at the same time.
|
||||
**/
|
||||
obj_properties[PROP_DHCP_HOSTNAME] =
|
||||
g_param_spec_string(NM_SETTING_IP_CONFIG_DHCP_HOSTNAME,
|
||||
"",
|
||||
|
|
@ -6109,14 +6109,14 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dhcp-send-hostname:
|
||||
*
|
||||
* If %TRUE, a hostname is sent to the DHCP server when acquiring a lease.
|
||||
* Some DHCP servers use this hostname to update DNS databases, essentially
|
||||
* providing a static hostname for the computer. If the
|
||||
* #NMSettingIPConfig:dhcp-hostname property is %NULL and this property is
|
||||
* %TRUE, the current persistent hostname of the computer is sent.
|
||||
**/
|
||||
* NMSettingIPConfig:dhcp-send-hostname:
|
||||
*
|
||||
* If %TRUE, a hostname is sent to the DHCP server when acquiring a lease.
|
||||
* Some DHCP servers use this hostname to update DNS databases, essentially
|
||||
* providing a static hostname for the computer. If the
|
||||
* #NMSettingIPConfig:dhcp-hostname property is %NULL and this property is
|
||||
* %TRUE, the current persistent hostname of the computer is sent.
|
||||
**/
|
||||
obj_properties[PROP_DHCP_SEND_HOSTNAME] =
|
||||
g_param_spec_boolean(NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME,
|
||||
"",
|
||||
|
|
@ -6125,12 +6125,12 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:never-default:
|
||||
*
|
||||
* If %TRUE, this connection will never be the default connection for this
|
||||
* IP type, meaning it will never be assigned the default route by
|
||||
* NetworkManager.
|
||||
**/
|
||||
* NMSettingIPConfig:never-default:
|
||||
*
|
||||
* If %TRUE, this connection will never be the default connection for this
|
||||
* IP type, meaning it will never be assigned the default route by
|
||||
* NetworkManager.
|
||||
**/
|
||||
obj_properties[PROP_NEVER_DEFAULT] =
|
||||
g_param_spec_boolean(NM_SETTING_IP_CONFIG_NEVER_DEFAULT,
|
||||
"",
|
||||
|
|
@ -6139,16 +6139,16 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:may-fail:
|
||||
*
|
||||
* If %TRUE, allow overall network configuration to proceed even if the
|
||||
* configuration specified by this property times out. Note that at least
|
||||
* one IP configuration must succeed or overall network configuration will
|
||||
* still fail. For example, in IPv6-only networks, setting this property to
|
||||
* %TRUE on the #NMSettingIP4Config allows the overall network configuration
|
||||
* to succeed if IPv4 configuration fails but IPv6 configuration completes
|
||||
* successfully.
|
||||
**/
|
||||
* NMSettingIPConfig:may-fail:
|
||||
*
|
||||
* If %TRUE, allow overall network configuration to proceed even if the
|
||||
* configuration specified by this property times out. Note that at least
|
||||
* one IP configuration must succeed or overall network configuration will
|
||||
* still fail. For example, in IPv6-only networks, setting this property to
|
||||
* %TRUE on the #NMSettingIP4Config allows the overall network configuration
|
||||
* to succeed if IPv4 configuration fails but IPv6 configuration completes
|
||||
* successfully.
|
||||
**/
|
||||
obj_properties[PROP_MAY_FAIL] =
|
||||
g_param_spec_boolean(NM_SETTING_IP_CONFIG_MAY_FAIL,
|
||||
"",
|
||||
|
|
@ -6157,19 +6157,19 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dad-timeout:
|
||||
*
|
||||
* 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 zero). A value greater than zero is a
|
||||
* timeout in milliseconds.
|
||||
*
|
||||
* The property is currently implemented only for IPv4.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPConfig:dad-timeout:
|
||||
*
|
||||
* 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 zero). A value greater than zero is a
|
||||
* timeout in milliseconds.
|
||||
*
|
||||
* The property is currently implemented only for IPv4.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_DAD_TIMEOUT] = g_param_spec_int(
|
||||
NM_SETTING_IP_CONFIG_DAD_TIMEOUT,
|
||||
"",
|
||||
|
|
@ -6180,14 +6180,14 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dhcp-timeout:
|
||||
*
|
||||
* A timeout for a DHCP transaction in seconds. If zero (the default), a
|
||||
* globally configured default is used. If still unspecified, a device specific
|
||||
* timeout is used (usually 45 seconds).
|
||||
*
|
||||
* Set to 2147483647 (MAXINT32) for infinity.
|
||||
**/
|
||||
* NMSettingIPConfig:dhcp-timeout:
|
||||
*
|
||||
* A timeout for a DHCP transaction in seconds. If zero (the default), a
|
||||
* globally configured default is used. If still unspecified, a device specific
|
||||
* timeout is used (usually 45 seconds).
|
||||
*
|
||||
* Set to 2147483647 (MAXINT32) for infinity.
|
||||
**/
|
||||
obj_properties[PROP_DHCP_TIMEOUT] = g_param_spec_int(
|
||||
NM_SETTING_IP_CONFIG_DHCP_TIMEOUT,
|
||||
"",
|
||||
|
|
@ -6198,23 +6198,23 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dhcp-iaid:
|
||||
*
|
||||
* A string containing the "Identity Association Identifier" (IAID) used
|
||||
* by the DHCP client. The property is a 32-bit decimal value or a
|
||||
* special value among "mac", "perm-mac", "ifname" and "stable". When
|
||||
* set to "mac" (or "perm-mac"), the last 4 bytes of the current (or
|
||||
* permanent) MAC address are used as IAID. When set to "ifname", the
|
||||
* IAID is computed by hashing the interface name. The special value
|
||||
* "stable" can be used to generate an IAID based on the stable-id (see
|
||||
* connection.stable-id), a per-host key and the interface name. When
|
||||
* the property is unset, the value from global configuration is used;
|
||||
* if no global default is set then the IAID is assumed to be
|
||||
* "ifname". Note that at the moment this property is ignored for IPv6
|
||||
* by dhclient, which always derives the IAID from the MAC address.
|
||||
*
|
||||
* Since: 1.22
|
||||
**/
|
||||
* NMSettingIPConfig:dhcp-iaid:
|
||||
*
|
||||
* A string containing the "Identity Association Identifier" (IAID) used
|
||||
* by the DHCP client. The property is a 32-bit decimal value or a
|
||||
* special value among "mac", "perm-mac", "ifname" and "stable". When
|
||||
* set to "mac" (or "perm-mac"), the last 4 bytes of the current (or
|
||||
* permanent) MAC address are used as IAID. When set to "ifname", the
|
||||
* IAID is computed by hashing the interface name. The special value
|
||||
* "stable" can be used to generate an IAID based on the stable-id (see
|
||||
* connection.stable-id), a per-host key and the interface name. When
|
||||
* the property is unset, the value from global configuration is used;
|
||||
* if no global default is set then the IAID is assumed to be
|
||||
* "ifname". Note that at the moment this property is ignored for IPv6
|
||||
* by dhclient, which always derives the IAID from the MAC address.
|
||||
*
|
||||
* Since: 1.22
|
||||
**/
|
||||
obj_properties[PROP_DHCP_IAID] =
|
||||
g_param_spec_string(NM_SETTING_IP_CONFIG_DHCP_IAID,
|
||||
"",
|
||||
|
|
@ -6223,30 +6223,30 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dhcp-hostname-flags:
|
||||
*
|
||||
* Flags for the DHCP hostname and FQDN.
|
||||
*
|
||||
* Currently, this property only includes flags to control the FQDN flags
|
||||
* set in the DHCP FQDN option. Supported FQDN flags are
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE,
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED and
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE. When no FQDN flag is set and
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS is set, the DHCP FQDN option will
|
||||
* contain no flag. Otherwise, if no FQDN flag is set and
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS is not set, the standard FQDN flags
|
||||
* are set in the request:
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE,
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED for IPv4 and
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE for IPv6.
|
||||
*
|
||||
* When this property is set to the default value %NM_DHCP_HOSTNAME_FLAG_NONE,
|
||||
* a global default is looked up in NetworkManager configuration. If that value
|
||||
* is unset or also %NM_DHCP_HOSTNAME_FLAG_NONE, then the standard FQDN flags
|
||||
* described above are sent in the DHCP requests.
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
* NMSettingIPConfig:dhcp-hostname-flags:
|
||||
*
|
||||
* Flags for the DHCP hostname and FQDN.
|
||||
*
|
||||
* Currently, this property only includes flags to control the FQDN flags
|
||||
* set in the DHCP FQDN option. Supported FQDN flags are
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE,
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED and
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_NO_UPDATE. When no FQDN flag is set and
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS is set, the DHCP FQDN option will
|
||||
* contain no flag. Otherwise, if no FQDN flag is set and
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_CLEAR_FLAGS is not set, the standard FQDN flags
|
||||
* are set in the request:
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE,
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_ENCODED for IPv4 and
|
||||
* %NM_DHCP_HOSTNAME_FLAG_FQDN_SERV_UPDATE for IPv6.
|
||||
*
|
||||
* When this property is set to the default value %NM_DHCP_HOSTNAME_FLAG_NONE,
|
||||
* a global default is looked up in NetworkManager configuration. If that value
|
||||
* is unset or also %NM_DHCP_HOSTNAME_FLAG_NONE, then the standard FQDN flags
|
||||
* described above are sent in the DHCP requests.
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
obj_properties[PROP_DHCP_HOSTNAME_FLAGS] =
|
||||
g_param_spec_uint(NM_SETTING_IP_CONFIG_DHCP_HOSTNAME_FLAGS,
|
||||
"",
|
||||
|
|
@ -6257,18 +6257,18 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dhcp-reject-servers:
|
||||
*
|
||||
* Array of servers from which DHCP offers must be rejected. This property
|
||||
* is useful to avoid getting a lease from misconfigured or rogue servers.
|
||||
*
|
||||
* For DHCPv4, each element must be an IPv4 address, optionally
|
||||
* followed by a slash and a prefix length (e.g. "192.168.122.0/24").
|
||||
*
|
||||
* This property is currently not implemented for DHCPv6.
|
||||
*
|
||||
* Since: 1.28
|
||||
**/
|
||||
* NMSettingIPConfig:dhcp-reject-servers:
|
||||
*
|
||||
* Array of servers from which DHCP offers must be rejected. This property
|
||||
* is useful to avoid getting a lease from misconfigured or rogue servers.
|
||||
*
|
||||
* For DHCPv4, each element must be an IPv4 address, optionally
|
||||
* followed by a slash and a prefix length (e.g. "192.168.122.0/24").
|
||||
*
|
||||
* This property is currently not implemented for DHCPv6.
|
||||
*
|
||||
* Since: 1.28
|
||||
**/
|
||||
obj_properties[PROP_DHCP_REJECT_SERVERS] =
|
||||
g_param_spec_boxed(NM_SETTING_IP_CONFIG_DHCP_REJECT_SERVERS,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -650,14 +650,14 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:parent:
|
||||
*
|
||||
* If given, specifies the parent interface name or parent connection UUID
|
||||
* the new device will be bound to so that tunneled packets will only be
|
||||
* routed via that interface.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:parent:
|
||||
*
|
||||
* If given, specifies the parent interface name or parent connection UUID
|
||||
* the new device will be bound to so that tunneled packets will only be
|
||||
* routed via that interface.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_PARENT] = g_param_spec_string(
|
||||
NM_SETTING_IP_TUNNEL_PARENT,
|
||||
"",
|
||||
|
|
@ -666,13 +666,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:mode:
|
||||
*
|
||||
* The tunneling mode, for example %NM_IP_TUNNEL_MODE_IPIP or
|
||||
* %NM_IP_TUNNEL_MODE_GRE.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:mode:
|
||||
*
|
||||
* The tunneling mode, for example %NM_IP_TUNNEL_MODE_IPIP or
|
||||
* %NM_IP_TUNNEL_MODE_GRE.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_MODE] =
|
||||
g_param_spec_uint(NM_SETTING_IP_TUNNEL_MODE,
|
||||
"",
|
||||
|
|
@ -683,13 +683,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:local:
|
||||
*
|
||||
* The local endpoint of the tunnel; the value can be empty, otherwise it
|
||||
* must contain an IPv4 or IPv6 address.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:local:
|
||||
*
|
||||
* The local endpoint of the tunnel; the value can be empty, otherwise it
|
||||
* must contain an IPv4 or IPv6 address.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_LOCAL] = g_param_spec_string(NM_SETTING_IP_TUNNEL_LOCAL,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -698,13 +698,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:remote:
|
||||
*
|
||||
* The remote endpoint of the tunnel; the value must contain an IPv4 or IPv6
|
||||
* address.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:remote:
|
||||
*
|
||||
* The remote endpoint of the tunnel; the value must contain an IPv4 or IPv6
|
||||
* address.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_REMOTE] = g_param_spec_string(
|
||||
NM_SETTING_IP_TUNNEL_REMOTE,
|
||||
"",
|
||||
|
|
@ -713,13 +713,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:ttl
|
||||
*
|
||||
* The TTL to assign to tunneled packets. 0 is a special value meaning that
|
||||
* packets inherit the TTL value.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:ttl
|
||||
*
|
||||
* The TTL to assign to tunneled packets. 0 is a special value meaning that
|
||||
* packets inherit the TTL value.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_TTL] =
|
||||
g_param_spec_uint(NM_SETTING_IP_TUNNEL_TTL,
|
||||
"",
|
||||
|
|
@ -730,13 +730,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:tos
|
||||
*
|
||||
* The type of service (IPv4) or traffic class (IPv6) field to be set on
|
||||
* tunneled packets.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:tos
|
||||
*
|
||||
* The type of service (IPv4) or traffic class (IPv6) field to be set on
|
||||
* tunneled packets.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_TOS] =
|
||||
g_param_spec_uint(NM_SETTING_IP_TUNNEL_TOS,
|
||||
"",
|
||||
|
|
@ -747,12 +747,12 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:path-mtu-discovery
|
||||
*
|
||||
* Whether to enable Path MTU Discovery on this tunnel.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:path-mtu-discovery
|
||||
*
|
||||
* Whether to enable Path MTU Discovery on this tunnel.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_PATH_MTU_DISCOVERY] = g_param_spec_boolean(
|
||||
NM_SETTING_IP_TUNNEL_PATH_MTU_DISCOVERY,
|
||||
"",
|
||||
|
|
@ -761,13 +761,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:input-key:
|
||||
*
|
||||
* The key used for tunnel input packets; the property is valid only for
|
||||
* certain tunnel modes (GRE, IP6GRE). If empty, no key is used.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:input-key:
|
||||
*
|
||||
* The key used for tunnel input packets; the property is valid only for
|
||||
* certain tunnel modes (GRE, IP6GRE). If empty, no key is used.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_INPUT_KEY] = g_param_spec_string(
|
||||
NM_SETTING_IP_TUNNEL_INPUT_KEY,
|
||||
"",
|
||||
|
|
@ -776,13 +776,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:output-key:
|
||||
*
|
||||
* The key used for tunnel output packets; the property is valid only for
|
||||
* certain tunnel modes (GRE, IP6GRE). If empty, no key is used.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:output-key:
|
||||
*
|
||||
* The key used for tunnel output packets; the property is valid only for
|
||||
* certain tunnel modes (GRE, IP6GRE). If empty, no key is used.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_OUTPUT_KEY] = g_param_spec_string(
|
||||
NM_SETTING_IP_TUNNEL_OUTPUT_KEY,
|
||||
"",
|
||||
|
|
@ -791,13 +791,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:encapsulation-limit:
|
||||
*
|
||||
* How many additional levels of encapsulation are permitted to be prepended
|
||||
* to packets. This property applies only to IPv6 tunnels.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:encapsulation-limit:
|
||||
*
|
||||
* How many additional levels of encapsulation are permitted to be prepended
|
||||
* to packets. This property applies only to IPv6 tunnels.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_ENCAPSULATION_LIMIT] =
|
||||
g_param_spec_uint(NM_SETTING_IP_TUNNEL_ENCAPSULATION_LIMIT,
|
||||
"",
|
||||
|
|
@ -808,13 +808,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:flow-label:
|
||||
*
|
||||
* The flow label to assign to tunnel packets. This property applies only to
|
||||
* IPv6 tunnels.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:flow-label:
|
||||
*
|
||||
* The flow label to assign to tunnel packets. This property applies only to
|
||||
* IPv6 tunnels.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_FLOW_LABEL] =
|
||||
g_param_spec_uint(NM_SETTING_IP_TUNNEL_FLOW_LABEL,
|
||||
"",
|
||||
|
|
@ -825,13 +825,13 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:mtu:
|
||||
*
|
||||
* If non-zero, only transmit packets of the specified size or smaller,
|
||||
* breaking larger packets up into multiple fragments.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIPTunnel:mtu:
|
||||
*
|
||||
* If non-zero, only transmit packets of the specified size or smaller,
|
||||
* breaking larger packets up into multiple fragments.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_MTU] = g_param_spec_uint(NM_SETTING_IP_TUNNEL_MTU,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -842,16 +842,16 @@ nm_setting_ip_tunnel_class_init(NMSettingIPTunnelClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPTunnel:flags:
|
||||
*
|
||||
* Tunnel flags. Currently, the following values are supported:
|
||||
* %NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT, %NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_TCLASS,
|
||||
* %NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FLOWLABEL, %NM_IP_TUNNEL_FLAG_IP6_MIP6_DEV,
|
||||
* %NM_IP_TUNNEL_FLAG_IP6_RCV_DSCP_COPY, %NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK.
|
||||
* They are valid only for IPv6 tunnels.
|
||||
*
|
||||
* Since: 1.12
|
||||
**/
|
||||
* NMSettingIPTunnel:flags:
|
||||
*
|
||||
* Tunnel flags. Currently, the following values are supported:
|
||||
* %NM_IP_TUNNEL_FLAG_IP6_IGN_ENCAP_LIMIT, %NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_TCLASS,
|
||||
* %NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FLOWLABEL, %NM_IP_TUNNEL_FLAG_IP6_MIP6_DEV,
|
||||
* %NM_IP_TUNNEL_FLAG_IP6_RCV_DSCP_COPY, %NM_IP_TUNNEL_FLAG_IP6_USE_ORIG_FWMARK.
|
||||
* They are valid only for IPv6 tunnels.
|
||||
*
|
||||
* Since: 1.12
|
||||
**/
|
||||
obj_properties[PROP_FLAGS] = g_param_spec_uint(NM_SETTING_IP_TUNNEL_FLAGS,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -625,208 +625,208 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: method
|
||||
* variable: BOOTPROTO
|
||||
* format: string
|
||||
* values: none, dhcp (bootp), static, ibft, autoip, shared
|
||||
* default: none
|
||||
* description: Method used for IPv4 protocol configuration.
|
||||
* ---end---
|
||||
*/
|
||||
* property: method
|
||||
* variable: BOOTPROTO
|
||||
* format: string
|
||||
* values: none, dhcp (bootp), static, ibft, autoip, shared
|
||||
* default: none
|
||||
* description: Method used for IPv4 protocol configuration.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---keyfile---
|
||||
* property: dns
|
||||
* format: list of DNS IP addresses
|
||||
* description: List of DNS servers.
|
||||
* example: dns=1.2.3.4;8.8.8.8;8.8.4.4;
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: dns
|
||||
* variable: DNS1, DNS2, ...
|
||||
* format: string
|
||||
* description: List of DNS servers. Even if NetworkManager supports many DNS
|
||||
* servers, initscripts and resolver only care about the first three, usually.
|
||||
* example: DNS1=1.2.3.4 DNS2=10.0.0.254 DNS3=8.8.8.8
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns
|
||||
* format: list of DNS IP addresses
|
||||
* description: List of DNS servers.
|
||||
* example: dns=1.2.3.4;8.8.8.8;8.8.4.4;
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: dns
|
||||
* variable: DNS1, DNS2, ...
|
||||
* format: string
|
||||
* description: List of DNS servers. Even if NetworkManager supports many DNS
|
||||
* servers, initscripts and resolver only care about the first three, usually.
|
||||
* example: DNS1=1.2.3.4 DNS2=10.0.0.254 DNS3=8.8.8.8
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dns-search
|
||||
* variable: DOMAIN
|
||||
* format: string (space-separated domains)
|
||||
* description: List of DNS search domains.
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns-search
|
||||
* variable: DOMAIN
|
||||
* format: string (space-separated domains)
|
||||
* description: List of DNS search domains.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---keyfile---
|
||||
* property: addresses
|
||||
* variable: address1, address2, ...
|
||||
* format: address/plen
|
||||
* description: List of static IP addresses.
|
||||
* example: address1=192.168.100.100/24 address2=10.1.1.5/24
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: addresses
|
||||
* variable: IPADDR, PREFIX, IPADDR1, PREFIX1, ...
|
||||
* description: List of static IP addresses.
|
||||
* example: IPADDR=10.5.5.23 PREFIX=24 IPADDR1=1.1.1.2 PREFIX1=16
|
||||
* ---end---
|
||||
*/
|
||||
* property: addresses
|
||||
* variable: address1, address2, ...
|
||||
* format: address/plen
|
||||
* description: List of static IP addresses.
|
||||
* example: address1=192.168.100.100/24 address2=10.1.1.5/24
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: addresses
|
||||
* variable: IPADDR, PREFIX, IPADDR1, PREFIX1, ...
|
||||
* description: List of static IP addresses.
|
||||
* example: IPADDR=10.5.5.23 PREFIX=24 IPADDR1=1.1.1.2 PREFIX1=16
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---keyfile---
|
||||
* property: gateway
|
||||
* variable: gateway
|
||||
* format: string
|
||||
* description: Gateway IP addresses as a string.
|
||||
* example: gateway=192.168.100.1
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: gateway
|
||||
* variable: GATEWAY
|
||||
* description: Gateway IP address.
|
||||
* example: GATEWAY=10.5.5.1
|
||||
* ---end---
|
||||
*/
|
||||
* property: gateway
|
||||
* variable: gateway
|
||||
* format: string
|
||||
* description: Gateway IP addresses as a string.
|
||||
* example: gateway=192.168.100.1
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: gateway
|
||||
* variable: GATEWAY
|
||||
* description: Gateway IP address.
|
||||
* example: GATEWAY=10.5.5.1
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---keyfile---
|
||||
* property: routes
|
||||
* variable: route1, route2, ...
|
||||
* format: route/plen[,gateway,metric]
|
||||
* description: List of IP routes.
|
||||
* example: route1=8.8.8.0/24,10.1.1.1,77
|
||||
* route2=7.7.0.0/16
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: routes
|
||||
* variable: ADDRESS1, NETMASK1, GATEWAY1, METRIC1, OPTIONS1, ...
|
||||
* description: List of static routes. They are not stored in ifcfg-* file,
|
||||
* but in route-* file instead.
|
||||
* ---end---
|
||||
*/
|
||||
* property: routes
|
||||
* variable: route1, route2, ...
|
||||
* format: route/plen[,gateway,metric]
|
||||
* description: List of IP routes.
|
||||
* example: route1=8.8.8.0/24,10.1.1.1,77
|
||||
* route2=7.7.0.0/16
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: routes
|
||||
* variable: ADDRESS1, NETMASK1, GATEWAY1, METRIC1, OPTIONS1, ...
|
||||
* description: List of static routes. They are not stored in ifcfg-* file,
|
||||
* but in route-* file instead.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: ignore-auto-routes
|
||||
* variable: PEERROUTES(+)
|
||||
* default: yes
|
||||
* description: PEERROUTES has the opposite meaning as 'ignore-auto-routes' property.
|
||||
* ---end---
|
||||
*/
|
||||
* property: ignore-auto-routes
|
||||
* variable: PEERROUTES(+)
|
||||
* default: yes
|
||||
* description: PEERROUTES has the opposite meaning as 'ignore-auto-routes' property.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: ignore-auto-dns
|
||||
* variable: PEERDNS
|
||||
* default: yes
|
||||
* description: PEERDNS has the opposite meaning as 'ignore-auto-dns' property.
|
||||
* ---end---
|
||||
*/
|
||||
* property: ignore-auto-dns
|
||||
* variable: PEERDNS
|
||||
* default: yes
|
||||
* description: PEERDNS has the opposite meaning as 'ignore-auto-dns' property.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-send-hostname
|
||||
* variable: DHCP_SEND_HOSTNAME(+)
|
||||
* default: yes
|
||||
* description: Whether DHCP_HOSTNAME should be sent to the DHCP server.
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-send-hostname
|
||||
* variable: DHCP_SEND_HOSTNAME(+)
|
||||
* default: yes
|
||||
* description: Whether DHCP_HOSTNAME should be sent to the DHCP server.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-hostname
|
||||
* variable: DHCP_HOSTNAME
|
||||
* description: Hostname to send to the DHCP server. When both DHCP_HOSTNAME and
|
||||
* DHCP_FQDN are specified only the latter is used.
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-hostname
|
||||
* variable: DHCP_HOSTNAME
|
||||
* description: Hostname to send to the DHCP server. When both DHCP_HOSTNAME and
|
||||
* DHCP_FQDN are specified only the latter is used.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: never-default
|
||||
* variable: DEFROUTE (GATEWAYDEV in /etc/sysconfig/network)
|
||||
* default: yes
|
||||
* description: DEFROUTE=no tells NetworkManager that this connection
|
||||
* should not be assigned the default route. DEFROUTE has the opposite
|
||||
* meaning as 'never-default' property.
|
||||
* ---end---
|
||||
*/
|
||||
* property: never-default
|
||||
* variable: DEFROUTE (GATEWAYDEV in /etc/sysconfig/network)
|
||||
* default: yes
|
||||
* description: DEFROUTE=no tells NetworkManager that this connection
|
||||
* should not be assigned the default route. DEFROUTE has the opposite
|
||||
* meaning as 'never-default' property.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: may-fail
|
||||
* variable: IPV4_FAILURE_FATAL(+)
|
||||
* default: no
|
||||
* description: IPV4_FAILURE_FATAL has the opposite meaning as 'may-fail' property.
|
||||
* ---end---
|
||||
*/
|
||||
* property: may-fail
|
||||
* variable: IPV4_FAILURE_FATAL(+)
|
||||
* default: no
|
||||
* description: IPV4_FAILURE_FATAL has the opposite meaning as 'may-fail' property.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: route-metric
|
||||
* variable: IPV4_ROUTE_METRIC(+)
|
||||
* default: -1
|
||||
* 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.
|
||||
* ---end---
|
||||
*/
|
||||
* property: route-metric
|
||||
* variable: IPV4_ROUTE_METRIC(+)
|
||||
* default: -1
|
||||
* 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.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: route-table
|
||||
* variable: IPV4_ROUTE_TABLE(+)
|
||||
* default: 0
|
||||
* description: IPV4_ROUTE_TABLE enables policy-routing and sets the default routing table.
|
||||
* ---end---
|
||||
*/
|
||||
* property: route-table
|
||||
* variable: IPV4_ROUTE_TABLE(+)
|
||||
* default: 0
|
||||
* description: IPV4_ROUTE_TABLE enables policy-routing and sets the default routing table.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dns-options
|
||||
* variable: RES_OPTIONS(+)
|
||||
* description: List of DNS options to be added to /etc/resolv.conf
|
||||
* example: RES_OPTIONS=ndots:2 timeout:3
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns-options
|
||||
* variable: RES_OPTIONS(+)
|
||||
* description: List of DNS options to be added to /etc/resolv.conf
|
||||
* example: RES_OPTIONS=ndots:2 timeout:3
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dns-priority
|
||||
* variable: IPV4_DNS_PRIORITY(+)
|
||||
* 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.
|
||||
* default: 0
|
||||
* example: IPV4_DNS_PRIORITY=20
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns-priority
|
||||
* variable: IPV4_DNS_PRIORITY(+)
|
||||
* 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.
|
||||
* default: 0
|
||||
* example: IPV4_DNS_PRIORITY=20
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/**
|
||||
* NMSettingIP4Config:dhcp-client-id:
|
||||
*
|
||||
* 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.
|
||||
* When the property is a hex string ('aa:bb:cc') it is interpreted as a
|
||||
* binary client ID, in which case the first byte is assumed to be the
|
||||
* 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be
|
||||
* an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet
|
||||
* ARP type and the rest is a MAC address).
|
||||
* If the property is not a hex string it is considered as a
|
||||
* non-hardware-address client ID and the 'type' field is set to 0.
|
||||
*
|
||||
* The special values "mac" and "perm-mac" are supported, which use the
|
||||
* current or permanent MAC address of the device to generate a client identifier
|
||||
* with type ethernet (01). Currently, these options only work for ethernet
|
||||
* type of links.
|
||||
*
|
||||
* The special value "duid" generates a RFC4361-compliant client identifier based
|
||||
* on a hash of the interface name as IAID and /etc/machine-id.
|
||||
*
|
||||
* The special value "stable" is supported to generate a type 0 client identifier based
|
||||
* on the stable-id (see connection.stable-id) and a per-host key. If you set the
|
||||
* stable-id, you may want to include the "${DEVICE}" or "${MAC}" specifier to get a
|
||||
* per-device key.
|
||||
*
|
||||
* If unset, a globally configured default is used. If still unset, the default
|
||||
* depends on the DHCP plugin.
|
||||
**/
|
||||
* NMSettingIP4Config:dhcp-client-id:
|
||||
*
|
||||
* 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.
|
||||
* When the property is a hex string ('aa:bb:cc') it is interpreted as a
|
||||
* binary client ID, in which case the first byte is assumed to be the
|
||||
* 'type' field as per RFC 2132 section 9.14 and the remaining bytes may be
|
||||
* an hardware address (e.g. '01:xx:xx:xx:xx:xx:xx' where 1 is the Ethernet
|
||||
* ARP type and the rest is a MAC address).
|
||||
* If the property is not a hex string it is considered as a
|
||||
* non-hardware-address client ID and the 'type' field is set to 0.
|
||||
*
|
||||
* The special values "mac" and "perm-mac" are supported, which use the
|
||||
* current or permanent MAC address of the device to generate a client identifier
|
||||
* with type ethernet (01). Currently, these options only work for ethernet
|
||||
* type of links.
|
||||
*
|
||||
* The special value "duid" generates a RFC4361-compliant client identifier based
|
||||
* on a hash of the interface name as IAID and /etc/machine-id.
|
||||
*
|
||||
* The special value "stable" is supported to generate a type 0 client identifier based
|
||||
* on the stable-id (see connection.stable-id) and a per-host key. If you set the
|
||||
* stable-id, you may want to include the "${DEVICE}" or "${MAC}" specifier to get a
|
||||
* per-device key.
|
||||
*
|
||||
* If unset, a globally configured default is used. If still unset, the default
|
||||
* depends on the DHCP plugin.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-client-id
|
||||
* variable: DHCP_CLIENT_ID(+)
|
||||
* description: A string sent to the DHCP server to identify the local machine.
|
||||
* A binary value can be specified using hex notation ('aa:bb:cc').
|
||||
* example: DHCP_CLIENT_ID=ax-srv-1; DHCP_CLIENT_ID=01:44:44:44:44:44:44
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-client-id
|
||||
* variable: DHCP_CLIENT_ID(+)
|
||||
* description: A string sent to the DHCP server to identify the local machine.
|
||||
* A binary value can be specified using hex notation ('aa:bb:cc').
|
||||
* example: DHCP_CLIENT_ID=ax-srv-1; DHCP_CLIENT_ID=01:44:44:44:44:44:44
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_DHCP_CLIENT_ID] =
|
||||
g_param_spec_string(NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID,
|
||||
"",
|
||||
|
|
@ -835,49 +835,49 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dad-timeout
|
||||
* variable: ACD_TIMEOUT(+), ARPING_WAIT
|
||||
* default: missing variable means global default (config override or zero)
|
||||
* description: Timeout (in milliseconds for ACD_TIMEOUT or in seconds
|
||||
* for ARPING_WAIT) for address conflict detection before configuring
|
||||
* IPv4 addresses. 0 turns off the ACD completely, -1 means default value.
|
||||
* example: ACD_TIMEOUT=2000 or ARPING_WAIT=2
|
||||
* ---end---
|
||||
*/
|
||||
* property: dad-timeout
|
||||
* variable: ACD_TIMEOUT(+), ARPING_WAIT
|
||||
* default: missing variable means global default (config override or zero)
|
||||
* description: Timeout (in milliseconds for ACD_TIMEOUT or in seconds
|
||||
* for ARPING_WAIT) for address conflict detection before configuring
|
||||
* IPv4 addresses. 0 turns off the ACD completely, -1 means default value.
|
||||
* example: ACD_TIMEOUT=2000 or ARPING_WAIT=2
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-timeout
|
||||
* variable: IPV4_DHCP_TIMEOUT(+)
|
||||
* description: A timeout after which the DHCP transaction fails in case of no response.
|
||||
* example: IPV4_DHCP_TIMEOUT=10
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-timeout
|
||||
* variable: IPV4_DHCP_TIMEOUT(+)
|
||||
* description: A timeout after which the DHCP transaction fails in case of no response.
|
||||
* example: IPV4_DHCP_TIMEOUT=10
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-hostname-flags
|
||||
* variable: DHCP_HOSTNAME_FLAGS
|
||||
* description: flags for the DHCP hostname and FQDN properties
|
||||
* example: DHCP_HOSTNAME_FLAGS=5
|
||||
*/
|
||||
* property: dhcp-hostname-flags
|
||||
* variable: DHCP_HOSTNAME_FLAGS
|
||||
* description: flags for the DHCP hostname and FQDN properties
|
||||
* example: DHCP_HOSTNAME_FLAGS=5
|
||||
*/
|
||||
|
||||
/**
|
||||
* NMSettingIP4Config:dhcp-fqdn:
|
||||
*
|
||||
* If the #NMSettingIPConfig:dhcp-send-hostname property is %TRUE, then the
|
||||
* specified FQDN will be sent to the DHCP server when acquiring a lease. This
|
||||
* property and #NMSettingIPConfig:dhcp-hostname are mutually exclusive and
|
||||
* cannot be set at the same time.
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
* NMSettingIP4Config:dhcp-fqdn:
|
||||
*
|
||||
* If the #NMSettingIPConfig:dhcp-send-hostname property is %TRUE, then the
|
||||
* specified FQDN will be sent to the DHCP server when acquiring a lease. This
|
||||
* property and #NMSettingIPConfig:dhcp-hostname are mutually exclusive and
|
||||
* cannot be set at the same time.
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-fqdn
|
||||
* variable: DHCP_FQDN
|
||||
* description: FQDN to send to the DHCP server. When both DHCP_HOSTNAME and
|
||||
* DHCP_FQDN are specified only the latter is used.
|
||||
* example: DHCP_FQDN=foo.bar.com
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-fqdn
|
||||
* variable: DHCP_FQDN
|
||||
* description: FQDN to send to the DHCP server. When both DHCP_HOSTNAME and
|
||||
* DHCP_FQDN are specified only the latter is used.
|
||||
* example: DHCP_FQDN=foo.bar.com
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_DHCP_FQDN] =
|
||||
g_param_spec_string(NM_SETTING_IP4_CONFIG_DHCP_FQDN,
|
||||
"",
|
||||
|
|
@ -886,24 +886,24 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIP4Config:dhcp-vendor-class-identifier:
|
||||
*
|
||||
* The Vendor Class Identifier DHCP option (60).
|
||||
* Special characters in the data string may be escaped using C-style escapes,
|
||||
* nevertheless this property cannot contain nul bytes.
|
||||
* If the per-profile value is unspecified (the default),
|
||||
* a global connection default gets consulted.
|
||||
* If still unspecified, the DHCP option is not sent to the server.
|
||||
*
|
||||
* Since 1.28
|
||||
*/
|
||||
* NMSettingIP4Config:dhcp-vendor-class-identifier:
|
||||
*
|
||||
* The Vendor Class Identifier DHCP option (60).
|
||||
* Special characters in the data string may be escaped using C-style escapes,
|
||||
* nevertheless this property cannot contain nul bytes.
|
||||
* If the per-profile value is unspecified (the default),
|
||||
* a global connection default gets consulted.
|
||||
* If still unspecified, the DHCP option is not sent to the server.
|
||||
*
|
||||
* Since 1.28
|
||||
*/
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-vendor-class-identifier
|
||||
* variable: DHCP_VENDOR_CLASS_IDENTIFIER(+)
|
||||
* description: The Vendor Class Identifier DHCP option (60).
|
||||
* example: DHCP_VENDOR_CLASS_IDENTIFIER=foo
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-vendor-class-identifier
|
||||
* variable: DHCP_VENDOR_CLASS_IDENTIFIER(+)
|
||||
* description: The Vendor Class Identifier DHCP option (60).
|
||||
* example: DHCP_VENDOR_CLASS_IDENTIFIER=foo
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_DHCP_VENDOR_CLASS_IDENTIFIER] =
|
||||
g_param_spec_string(NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER,
|
||||
"",
|
||||
|
|
@ -914,12 +914,12 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
/* IP4-specific property overrides */
|
||||
|
||||
/* ---dbus---
|
||||
* property: dns
|
||||
* format: array of uint32
|
||||
* description: Array of IP addresses of DNS servers (as network-byte-order
|
||||
* integers)
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns
|
||||
* format: array of uint32
|
||||
* description: Array of IP addresses of DNS servers (as network-byte-order
|
||||
* integers)
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_DNS),
|
||||
|
|
@ -928,20 +928,20 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
.gprop_from_dbus_fcn = ip4_dns_from_dbus, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: addresses
|
||||
* format: array of array of uint32
|
||||
* 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.
|
||||
* ---end---
|
||||
*/
|
||||
* property: addresses
|
||||
* format: array of array of uint32
|
||||
* 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.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ADDRESSES),
|
||||
|
|
@ -955,14 +955,14 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
.to_dbus_fcn = ip4_address_labels_get, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: address-data
|
||||
* format: 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.
|
||||
* ---end---
|
||||
*/
|
||||
* property: address-data
|
||||
* format: 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.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_dbus(
|
||||
properties_override,
|
||||
"address-data",
|
||||
|
|
@ -971,22 +971,22 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
.from_dbus_fcn = ip4_address_data_set, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: routes
|
||||
* format: array of array of uint32
|
||||
* 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.)
|
||||
* ---end---
|
||||
*/
|
||||
* property: routes
|
||||
* format: array of array of uint32
|
||||
* 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.)
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ROUTES),
|
||||
|
|
@ -995,18 +995,18 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
|
|||
.from_dbus_fcn = ip4_routes_set, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: route-data
|
||||
* format: array of vardict
|
||||
* description: Array of IPv4 routes. Each route dictionary contains at
|
||||
* least 'dest' and 'prefix' entries, containing the destination IP
|
||||
* address as a string, and the prefix length as a uint32. Most routes
|
||||
* will also have a 'next-hop' entry, containing the next hop IP address as
|
||||
* a string. If the route has a 'metric' entry (containing a uint32), that
|
||||
* will be used as the metric for the route (otherwise NM will pick a
|
||||
* default value appropriate to the device). Additional attributes may
|
||||
* also exist on some routes.
|
||||
* ---end---
|
||||
*/
|
||||
* property: route-data
|
||||
* format: array of vardict
|
||||
* description: Array of IPv4 routes. Each route dictionary contains at
|
||||
* least 'dest' and 'prefix' entries, containing the destination IP
|
||||
* address as a string, and the prefix length as a uint32. Most routes
|
||||
* will also have a 'next-hop' entry, containing the next hop IP address as
|
||||
* a string. If the route has a 'metric' entry (containing a uint32), that
|
||||
* will be used as the metric for the route (otherwise NM will pick a
|
||||
* default value appropriate to the device). Additional attributes may
|
||||
* also exist on some routes.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_dbus(properties_override,
|
||||
"route-data",
|
||||
NM_SETT_INFO_PROPERT_TYPE(.dbus_type = NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
|
|
|
|||
|
|
@ -623,207 +623,207 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: method
|
||||
* variable: IPV6INIT, IPV6FORWARDING, IPV6_AUTOCONF, DHCPV6C, IPV6_DISABLED
|
||||
* default: IPV6INIT=yes; IPV6FORWARDING=no; IPV6_AUTOCONF=!IPV6FORWARDING, DHCPV6=no
|
||||
* description: Method used for IPv6 protocol configuration.
|
||||
* ignore ~ IPV6INIT=no; auto ~ IPV6_AUTOCONF=yes; dhcp ~ IPV6_AUTOCONF=no and DHCPV6C=yes;
|
||||
* disabled ~ IPV6_DISABLED=yes
|
||||
* ---end---
|
||||
*/
|
||||
* property: method
|
||||
* variable: IPV6INIT, IPV6FORWARDING, IPV6_AUTOCONF, DHCPV6C, IPV6_DISABLED
|
||||
* default: IPV6INIT=yes; IPV6FORWARDING=no; IPV6_AUTOCONF=!IPV6FORWARDING, DHCPV6=no
|
||||
* description: Method used for IPv6 protocol configuration.
|
||||
* ignore ~ IPV6INIT=no; auto ~ IPV6_AUTOCONF=yes; dhcp ~ IPV6_AUTOCONF=no and DHCPV6C=yes;
|
||||
* disabled ~ IPV6_DISABLED=yes
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---keyfile---
|
||||
* property: dns
|
||||
* format: list of DNS IP addresses
|
||||
* description: List of DNS servers.
|
||||
* example: dns=2001:4860:4860::8888;2001:4860:4860::8844;
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: dns
|
||||
* variable: DNS1, DNS2, ...
|
||||
* format: string
|
||||
* description: List of DNS servers. NetworkManager uses the variables both
|
||||
* for IPv4 and IPv6.
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns
|
||||
* format: list of DNS IP addresses
|
||||
* description: List of DNS servers.
|
||||
* example: dns=2001:4860:4860::8888;2001:4860:4860::8844;
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: dns
|
||||
* variable: DNS1, DNS2, ...
|
||||
* format: string
|
||||
* description: List of DNS servers. NetworkManager uses the variables both
|
||||
* for IPv4 and IPv6.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dns-search
|
||||
* variable: IPV6_DOMAIN(+)
|
||||
* format: string (space-separated domains)
|
||||
* description: List of DNS search domains.
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns-search
|
||||
* variable: IPV6_DOMAIN(+)
|
||||
* format: string (space-separated domains)
|
||||
* description: List of DNS search domains.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---keyfile---
|
||||
* property: addresses
|
||||
* variable: address1, address2, ...
|
||||
* format: address/plen
|
||||
* description: List of static IP addresses.
|
||||
* example: address1=abbe::cafe/96 address2=2001::1234
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: addresses
|
||||
* variable: IPV6ADDR, IPV6ADDR_SECONDARIES
|
||||
* description: List of static IP addresses.
|
||||
* example: IPV6ADDR=ab12:9876::1
|
||||
* IPV6ADDR_SECONDARIES="ab12:9876::2 ab12:9876::3"
|
||||
* ---end---
|
||||
*/
|
||||
* property: addresses
|
||||
* variable: address1, address2, ...
|
||||
* format: address/plen
|
||||
* description: List of static IP addresses.
|
||||
* example: address1=abbe::cafe/96 address2=2001::1234
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: addresses
|
||||
* variable: IPV6ADDR, IPV6ADDR_SECONDARIES
|
||||
* description: List of static IP addresses.
|
||||
* example: IPV6ADDR=ab12:9876::1
|
||||
* IPV6ADDR_SECONDARIES="ab12:9876::2 ab12:9876::3"
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---keyfile---
|
||||
* property: gateway
|
||||
* variable: gateway
|
||||
* format: string
|
||||
* description: Gateway IP addresses as a string.
|
||||
* example: gateway=abbe::1
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: gateway
|
||||
* variable: IPV6_DEFAULTGW
|
||||
* description: Gateway IP address.
|
||||
* example: IPV6_DEFAULTGW=abbe::1
|
||||
* ---end---
|
||||
*/
|
||||
* property: gateway
|
||||
* variable: gateway
|
||||
* format: string
|
||||
* description: Gateway IP addresses as a string.
|
||||
* example: gateway=abbe::1
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: gateway
|
||||
* variable: IPV6_DEFAULTGW
|
||||
* description: Gateway IP address.
|
||||
* example: IPV6_DEFAULTGW=abbe::1
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---keyfile---
|
||||
* property: routes
|
||||
* variable: route1, route2, ...
|
||||
* format: route/plen[,gateway,metric]
|
||||
* description: List of IP routes.
|
||||
* example: route1=2001:4860:4860::/64,2620:52:0:2219:222:68ff:fe11:5403
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: routes
|
||||
* variable: (none)
|
||||
* description: List of static routes. They are not stored in ifcfg-* file,
|
||||
* but in route6-* file instead in the form of command line for 'ip route add'.
|
||||
* ---end---
|
||||
*/
|
||||
* property: routes
|
||||
* variable: route1, route2, ...
|
||||
* format: route/plen[,gateway,metric]
|
||||
* description: List of IP routes.
|
||||
* example: route1=2001:4860:4860::/64,2620:52:0:2219:222:68ff:fe11:5403
|
||||
* ---end---
|
||||
* ---ifcfg-rh---
|
||||
* property: routes
|
||||
* variable: (none)
|
||||
* description: List of static routes. They are not stored in ifcfg-* file,
|
||||
* but in route6-* file instead in the form of command line for 'ip route add'.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: ignore-auto-routes
|
||||
* variable: IPV6_PEERROUTES(+)
|
||||
* default: yes
|
||||
* description: IPV6_PEERROUTES has the opposite meaning as 'ignore-auto-routes' property.
|
||||
* ---end---
|
||||
*/
|
||||
* property: ignore-auto-routes
|
||||
* variable: IPV6_PEERROUTES(+)
|
||||
* default: yes
|
||||
* description: IPV6_PEERROUTES has the opposite meaning as 'ignore-auto-routes' property.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: ignore-auto-dns
|
||||
* variable: IPV6_PEERDNS(+)
|
||||
* default: yes
|
||||
* description: IPV6_PEERDNS has the opposite meaning as 'ignore-auto-dns' property.
|
||||
* ---end---
|
||||
*/
|
||||
* property: ignore-auto-dns
|
||||
* variable: IPV6_PEERDNS(+)
|
||||
* default: yes
|
||||
* description: IPV6_PEERDNS has the opposite meaning as 'ignore-auto-dns' property.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-hostname
|
||||
* variable: DHCPV6_HOSTNAME
|
||||
* description: Hostname to send the DHCP server.
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-hostname
|
||||
* variable: DHCPV6_HOSTNAME
|
||||
* description: Hostname to send the DHCP server.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-timeout
|
||||
* variable: IPV6_DHCP_TIMEOUT(+)
|
||||
* description: A timeout after which the DHCP transaction fails in case of no response.
|
||||
* example: IPV6_DHCP_TIMEOUT=10
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-timeout
|
||||
* variable: IPV6_DHCP_TIMEOUT(+)
|
||||
* description: A timeout after which the DHCP transaction fails in case of no response.
|
||||
* example: IPV6_DHCP_TIMEOUT=10
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-hostname-flags
|
||||
* variable: DHCPV6_HOSTNAME_FLAGS
|
||||
* description: flags for the DHCP hostname property
|
||||
* example: DHCPV6_HOSTNAME_FLAGS=5
|
||||
*/
|
||||
* property: dhcp-hostname-flags
|
||||
* variable: DHCPV6_HOSTNAME_FLAGS
|
||||
* description: flags for the DHCP hostname property
|
||||
* example: DHCPV6_HOSTNAME_FLAGS=5
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: never-default
|
||||
* variable: IPV6_DEFROUTE(+), (and IPV6_DEFAULTGW, IPV6_DEFAULTDEV in /etc/sysconfig/network)
|
||||
* default: IPV6_DEFROUTE=yes (when no variable specified)
|
||||
* description: IPV6_DEFROUTE=no tells NetworkManager that this connection
|
||||
* should not be assigned the default IPv6 route. IPV6_DEFROUTE has the opposite
|
||||
* meaning as 'never-default' property.
|
||||
* ---end---
|
||||
*/
|
||||
* property: never-default
|
||||
* variable: IPV6_DEFROUTE(+), (and IPV6_DEFAULTGW, IPV6_DEFAULTDEV in /etc/sysconfig/network)
|
||||
* default: IPV6_DEFROUTE=yes (when no variable specified)
|
||||
* description: IPV6_DEFROUTE=no tells NetworkManager that this connection
|
||||
* should not be assigned the default IPv6 route. IPV6_DEFROUTE has the opposite
|
||||
* meaning as 'never-default' property.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: may-fail
|
||||
* variable: IPV6_FAILURE_FATAL(+)
|
||||
* default: no
|
||||
* description: IPV6_FAILURE_FATAL has the opposite meaning as 'may-fail' property.
|
||||
* ---end---
|
||||
*/
|
||||
* property: may-fail
|
||||
* variable: IPV6_FAILURE_FATAL(+)
|
||||
* default: no
|
||||
* description: IPV6_FAILURE_FATAL has the opposite meaning as 'may-fail' property.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: route-metric
|
||||
* variable: IPV6_ROUTE_METRIC(+)
|
||||
* default: -1
|
||||
* description: IPV6_ROUTE_METRIC is the default IPv6 metric for routes on this connection.
|
||||
* If set to -1, a default metric based on the device type is used.
|
||||
* ---end---
|
||||
*/
|
||||
* property: route-metric
|
||||
* variable: IPV6_ROUTE_METRIC(+)
|
||||
* default: -1
|
||||
* description: IPV6_ROUTE_METRIC is the default IPv6 metric for routes on this connection.
|
||||
* If set to -1, a default metric based on the device type is used.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: route-table
|
||||
* variable: IPV6_ROUTE_TABLE(+)
|
||||
* default: 0
|
||||
* description: IPV6_ROUTE_TABLE enables policy-routing and sets the default routing table.
|
||||
* ---end---
|
||||
*/
|
||||
* property: route-table
|
||||
* variable: IPV6_ROUTE_TABLE(+)
|
||||
* default: 0
|
||||
* description: IPV6_ROUTE_TABLE enables policy-routing and sets the default routing table.
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dns-priority
|
||||
* variable: IPV6_DNS_PRIORITY(+)
|
||||
* 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.
|
||||
* default: 0
|
||||
* example: IPV6_DNS_PRIORITY=20
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns-priority
|
||||
* variable: IPV6_DNS_PRIORITY(+)
|
||||
* 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.
|
||||
* default: 0
|
||||
* example: IPV6_DNS_PRIORITY=20
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/* ---ifcfg-rh---
|
||||
* property: dns-options
|
||||
* variable: IPV6_RES_OPTIONS(+)
|
||||
* description: List of DNS options to be added to /etc/resolv.conf
|
||||
* example: IPV6_RES_OPTIONS=ndots:2 timeout:3
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns-options
|
||||
* variable: IPV6_RES_OPTIONS(+)
|
||||
* description: List of DNS options to be added to /etc/resolv.conf
|
||||
* example: IPV6_RES_OPTIONS=ndots:2 timeout:3
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
/**
|
||||
* NMSettingIP6Config:ip6-privacy:
|
||||
*
|
||||
* Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If
|
||||
* enabled, it makes the kernel generate a temporary IPv6 address in
|
||||
* addition to the public one generated from MAC address via modified
|
||||
* EUI-64. This enhances privacy, but could cause problems in some
|
||||
* applications, on the other hand. The permitted values are: -1: unknown,
|
||||
* 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary
|
||||
* addresses).
|
||||
*
|
||||
* Having a per-connection setting set to "-1" (unknown) means fallback to
|
||||
* global configuration "ipv6.ip6-privacy".
|
||||
*
|
||||
* If also global configuration is unspecified or set to "-1", fallback to read
|
||||
* "/proc/sys/net/ipv6/conf/default/use_tempaddr".
|
||||
*
|
||||
* Note that this setting is distinct from the Stable Privacy addresses
|
||||
* that can be enabled with the "addr-gen-mode" property's "stable-privacy"
|
||||
* setting as another way of avoiding host tracking with IPv6 addresses.
|
||||
**/
|
||||
* NMSettingIP6Config:ip6-privacy:
|
||||
*
|
||||
* Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If
|
||||
* enabled, it makes the kernel generate a temporary IPv6 address in
|
||||
* addition to the public one generated from MAC address via modified
|
||||
* EUI-64. This enhances privacy, but could cause problems in some
|
||||
* applications, on the other hand. The permitted values are: -1: unknown,
|
||||
* 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary
|
||||
* addresses).
|
||||
*
|
||||
* Having a per-connection setting set to "-1" (unknown) means fallback to
|
||||
* global configuration "ipv6.ip6-privacy".
|
||||
*
|
||||
* If also global configuration is unspecified or set to "-1", fallback to read
|
||||
* "/proc/sys/net/ipv6/conf/default/use_tempaddr".
|
||||
*
|
||||
* Note that this setting is distinct from the Stable Privacy addresses
|
||||
* that can be enabled with the "addr-gen-mode" property's "stable-privacy"
|
||||
* setting as another way of avoiding host tracking with IPv6 addresses.
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: ip6-privacy
|
||||
* variable: IPV6_PRIVACY, IPV6_PRIVACY_PREFER_PUBLIC_IP(+)
|
||||
* values: IPV6_PRIVACY: no, yes (rfc3041 or rfc4941);
|
||||
* IPV6_PRIVACY_PREFER_PUBLIC_IP: yes, no
|
||||
* default: no
|
||||
* description: Configure IPv6 Privacy Extensions for SLAAC (RFC4941).
|
||||
* example: IPV6_PRIVACY=rfc3041 IPV6_PRIVACY_PREFER_PUBLIC_IP=yes
|
||||
* ---end---
|
||||
*/
|
||||
* property: ip6-privacy
|
||||
* variable: IPV6_PRIVACY, IPV6_PRIVACY_PREFER_PUBLIC_IP(+)
|
||||
* values: IPV6_PRIVACY: no, yes (rfc3041 or rfc4941);
|
||||
* IPV6_PRIVACY_PREFER_PUBLIC_IP: yes, no
|
||||
* default: no
|
||||
* description: Configure IPv6 Privacy Extensions for SLAAC (RFC4941).
|
||||
* example: IPV6_PRIVACY=rfc3041 IPV6_PRIVACY_PREFER_PUBLIC_IP=yes
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_IP6_PRIVACY] =
|
||||
g_param_spec_enum(NM_SETTING_IP6_CONFIG_IP6_PRIVACY,
|
||||
"",
|
||||
|
|
@ -833,46 +833,46 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIP6Config:addr-gen-mode:
|
||||
*
|
||||
* Configure method for creating the address for use with RFC4862 IPv6
|
||||
* Stateless Address Autoconfiguration. The permitted values are:
|
||||
* %NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64 or
|
||||
* %NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_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.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingIP6Config:addr-gen-mode:
|
||||
*
|
||||
* Configure method for creating the address for use with RFC4862 IPv6
|
||||
* Stateless Address Autoconfiguration. The permitted values are:
|
||||
* %NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64 or
|
||||
* %NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_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.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: addr-gen-mode
|
||||
* variable: IPV6_ADDR_GEN_MODE
|
||||
* values: IPV6_ADDR_GEN_MODE: eui64, stable-privacy
|
||||
* default: eui64
|
||||
* description: Configure IPv6 Stable Privacy addressing for SLAAC (RFC7217).
|
||||
* example: IPV6_ADDR_GEN_MODE=stable-privacy
|
||||
* ---end---
|
||||
*/
|
||||
* property: addr-gen-mode
|
||||
* variable: IPV6_ADDR_GEN_MODE
|
||||
* values: IPV6_ADDR_GEN_MODE: eui64, stable-privacy
|
||||
* default: eui64
|
||||
* description: Configure IPv6 Stable Privacy addressing for SLAAC (RFC7217).
|
||||
* example: IPV6_ADDR_GEN_MODE=stable-privacy
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_ADDR_GEN_MODE] =
|
||||
g_param_spec_int(NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE,
|
||||
"",
|
||||
|
|
@ -883,20 +883,20 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIP6Config:token:
|
||||
*
|
||||
* Configure the token for draft-chown-6man-tokenised-ipv6-identifiers-02
|
||||
* IPv6 tokenized interface identifiers. Useful with eui64 addr-gen-mode.
|
||||
*
|
||||
* Since: 1.4
|
||||
**/
|
||||
* NMSettingIP6Config:token:
|
||||
*
|
||||
* Configure the token for draft-chown-6man-tokenised-ipv6-identifiers-02
|
||||
* IPv6 tokenized interface identifiers. Useful with eui64 addr-gen-mode.
|
||||
*
|
||||
* Since: 1.4
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: token
|
||||
* variable: IPV6_TOKEN
|
||||
* description: The IPv6 tokenized interface identifier token
|
||||
* example: IPV6_TOKEN=::53
|
||||
* ---end---
|
||||
*/
|
||||
* property: token
|
||||
* variable: IPV6_TOKEN
|
||||
* description: The IPv6 tokenized interface identifier token
|
||||
* example: IPV6_TOKEN=::53
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_TOKEN] = g_param_spec_string(NM_SETTING_IP6_CONFIG_TOKEN,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -905,23 +905,23 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIP6Config:ra-timeout:
|
||||
*
|
||||
* A timeout for waiting Router Advertisements in seconds. If zero (the default), a
|
||||
* globally configured default is used. If still unspecified, the timeout depends on the
|
||||
* sysctl settings of the device.
|
||||
*
|
||||
* Set to 2147483647 (MAXINT32) for infinity.
|
||||
*
|
||||
* Since: 1.24
|
||||
**/
|
||||
* NMSettingIP6Config:ra-timeout:
|
||||
*
|
||||
* A timeout for waiting Router Advertisements in seconds. If zero (the default), a
|
||||
* globally configured default is used. If still unspecified, the timeout depends on the
|
||||
* sysctl settings of the device.
|
||||
*
|
||||
* Set to 2147483647 (MAXINT32) for infinity.
|
||||
*
|
||||
* Since: 1.24
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-timeout
|
||||
* variable: IPV6_RA_TIMEOUT(+)
|
||||
* description: A timeout for waiting Router Advertisements in seconds.
|
||||
* example: IPV6_RA_TIMEOUT=10
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-timeout
|
||||
* variable: IPV6_RA_TIMEOUT(+)
|
||||
* description: A timeout for waiting Router Advertisements in seconds.
|
||||
* example: IPV6_RA_TIMEOUT=10
|
||||
* ---end---
|
||||
*/
|
||||
|
||||
obj_properties[PROP_RA_TIMEOUT] = g_param_spec_int(
|
||||
NM_SETTING_IP6_CONFIG_RA_TIMEOUT,
|
||||
|
|
@ -933,50 +933,50 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIP6Config:dhcp-duid:
|
||||
*
|
||||
* A string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp
|
||||
* client to identify itself to DHCPv6 servers (RFC 3315). The DUID is carried
|
||||
* in the Client Identifier option.
|
||||
* If the property is a hex string ('aa:bb:cc') it is interpreted as a binary
|
||||
* DUID and filled as an opaque value in the Client Identifier option.
|
||||
*
|
||||
* The special value "lease" will retrieve the DUID previously used from the
|
||||
* lease file belonging to the connection. If no DUID is found and "dhclient"
|
||||
* is the configured dhcp client, the DUID is searched in the system-wide
|
||||
* dhclient lease file. If still no DUID is found, or another dhcp client is
|
||||
* used, a global and permanent DUID-UUID (RFC 6355) will be generated based
|
||||
* on the machine-id.
|
||||
*
|
||||
* The special values "llt" and "ll" will generate a DUID of type LLT or LL
|
||||
* (see RFC 3315) based on the current MAC address of the device. In order to
|
||||
* try providing a stable DUID-LLT, the time field will contain a constant
|
||||
* timestamp that is used globally (for all profiles) and persisted to disk.
|
||||
*
|
||||
* The special values "stable-llt", "stable-ll" and "stable-uuid" will generate
|
||||
* a DUID of the corresponding type, derived from the connection's stable-id and
|
||||
* a per-host unique key. You may want to include the "${DEVICE}" or "${MAC}" specifier
|
||||
* in the stable-id, in case this profile gets activated on multiple devices.
|
||||
* So, the link-layer address of "stable-ll" and "stable-llt" will be a generated
|
||||
* address derived from the stable id. The DUID-LLT time value in the "stable-llt"
|
||||
* option will be picked among a static timespan of three years (the upper bound
|
||||
* of the interval is the same constant timestamp used in "llt").
|
||||
*
|
||||
* When the property is unset, the global value provided for "ipv6.dhcp-duid" is
|
||||
* used. If no global value is provided, the default "lease" value is assumed.
|
||||
*
|
||||
* Since: 1.12
|
||||
**/
|
||||
* NMSettingIP6Config:dhcp-duid:
|
||||
*
|
||||
* A string containing the DHCPv6 Unique Identifier (DUID) used by the dhcp
|
||||
* client to identify itself to DHCPv6 servers (RFC 3315). The DUID is carried
|
||||
* in the Client Identifier option.
|
||||
* If the property is a hex string ('aa:bb:cc') it is interpreted as a binary
|
||||
* DUID and filled as an opaque value in the Client Identifier option.
|
||||
*
|
||||
* The special value "lease" will retrieve the DUID previously used from the
|
||||
* lease file belonging to the connection. If no DUID is found and "dhclient"
|
||||
* is the configured dhcp client, the DUID is searched in the system-wide
|
||||
* dhclient lease file. If still no DUID is found, or another dhcp client is
|
||||
* used, a global and permanent DUID-UUID (RFC 6355) will be generated based
|
||||
* on the machine-id.
|
||||
*
|
||||
* The special values "llt" and "ll" will generate a DUID of type LLT or LL
|
||||
* (see RFC 3315) based on the current MAC address of the device. In order to
|
||||
* try providing a stable DUID-LLT, the time field will contain a constant
|
||||
* timestamp that is used globally (for all profiles) and persisted to disk.
|
||||
*
|
||||
* The special values "stable-llt", "stable-ll" and "stable-uuid" will generate
|
||||
* a DUID of the corresponding type, derived from the connection's stable-id and
|
||||
* a per-host unique key. You may want to include the "${DEVICE}" or "${MAC}" specifier
|
||||
* in the stable-id, in case this profile gets activated on multiple devices.
|
||||
* So, the link-layer address of "stable-ll" and "stable-llt" will be a generated
|
||||
* address derived from the stable id. The DUID-LLT time value in the "stable-llt"
|
||||
* option will be picked among a static timespan of three years (the upper bound
|
||||
* of the interval is the same constant timestamp used in "llt").
|
||||
*
|
||||
* When the property is unset, the global value provided for "ipv6.dhcp-duid" is
|
||||
* used. If no global value is provided, the default "lease" value is assumed.
|
||||
*
|
||||
* Since: 1.12
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: dhcp-duid
|
||||
* variable: DHCPV6_DUID(+)
|
||||
* description: A string sent to the DHCPv6 server to identify the local machine.
|
||||
* Apart from the special values "lease", "stable-llt", "stable-ll", "stable-uuid",
|
||||
* "llt" and "ll" a binary value in hex format is expected. An hex string where
|
||||
* each octet is separated by a colon is also accepted.
|
||||
* example: DHCPV6_DUID=LL; DHCPV6_DUID=0301deadbeef0001; DHCPV6_DUID=03:01:de:ad:be:ef:00:01
|
||||
* ---end---
|
||||
*/
|
||||
* property: dhcp-duid
|
||||
* variable: DHCPV6_DUID(+)
|
||||
* description: A string sent to the DHCPv6 server to identify the local machine.
|
||||
* Apart from the special values "lease", "stable-llt", "stable-ll", "stable-uuid",
|
||||
* "llt" and "ll" a binary value in hex format is expected. An hex string where
|
||||
* each octet is separated by a colon is also accepted.
|
||||
* example: DHCPV6_DUID=LL; DHCPV6_DUID=0301deadbeef0001; DHCPV6_DUID=03:01:de:ad:be:ef:00:01
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_DHCP_DUID] =
|
||||
g_param_spec_string(NM_SETTING_IP6_CONFIG_DHCP_DUID,
|
||||
"",
|
||||
|
|
@ -987,11 +987,11 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
/* IP6-specific property overrides */
|
||||
|
||||
/* ---dbus---
|
||||
* property: dns
|
||||
* format: array of byte array
|
||||
* description: Array of IP addresses of DNS servers (in network byte order)
|
||||
* ---end---
|
||||
*/
|
||||
* property: dns
|
||||
* format: array of byte array
|
||||
* description: Array of IP addresses of DNS servers (in network byte order)
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_DNS),
|
||||
|
|
@ -1000,19 +1000,19 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
.gprop_from_dbus_fcn = ip6_dns_from_dbus, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: addresses
|
||||
* format: array of legacy IPv6 address struct (a(ayuay))
|
||||
* 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.
|
||||
* ---end---
|
||||
*/
|
||||
* property: addresses
|
||||
* format: array of legacy IPv6 address struct (a(ayuay))
|
||||
* 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.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ADDRESSES),
|
||||
|
|
@ -1021,14 +1021,14 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
.from_dbus_fcn = ip6_addresses_set, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: address-data
|
||||
* format: 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.
|
||||
* ---end---
|
||||
*/
|
||||
* property: address-data
|
||||
* format: 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.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_dbus(
|
||||
properties_override,
|
||||
"address-data",
|
||||
|
|
@ -1037,19 +1037,19 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
.from_dbus_fcn = ip6_address_data_set, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: routes
|
||||
* format: array of legacy IPv6 route struct (a(ayuayu))
|
||||
* 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.
|
||||
* ---end---
|
||||
*/
|
||||
* property: routes
|
||||
* format: array of legacy IPv6 route struct (a(ayuayu))
|
||||
* 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.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_gobj(
|
||||
properties_override,
|
||||
g_object_class_find_property(G_OBJECT_CLASS(setting_class), NM_SETTING_IP_CONFIG_ROUTES),
|
||||
|
|
@ -1058,18 +1058,18 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
|
|||
.from_dbus_fcn = ip6_routes_set, ));
|
||||
|
||||
/* ---dbus---
|
||||
* property: route-data
|
||||
* format: array of vardict
|
||||
* description: Array of IPv6 routes. Each route dictionary contains at
|
||||
* least 'dest' and 'prefix' entries, containing the destination IP
|
||||
* address as a string, and the prefix length as a uint32. Most routes
|
||||
* will also have a 'next-hop' entry, containing the next hop IP address as
|
||||
* a string. If the route has a 'metric' entry (containing a uint32), that
|
||||
* will be used as the metric for the route (otherwise NM will pick a
|
||||
* default value appropriate to the device). Additional attributes may
|
||||
* also exist on some routes.
|
||||
* ---end---
|
||||
*/
|
||||
* property: route-data
|
||||
* format: array of vardict
|
||||
* description: Array of IPv6 routes. Each route dictionary contains at
|
||||
* least 'dest' and 'prefix' entries, containing the destination IP
|
||||
* address as a string, and the prefix length as a uint32. Most routes
|
||||
* will also have a 'next-hop' entry, containing the next hop IP address as
|
||||
* a string. If the route has a 'metric' entry (containing a uint32), that
|
||||
* will be used as the metric for the route (otherwise NM will pick a
|
||||
* default value appropriate to the device). Additional attributes may
|
||||
* also exist on some routes.
|
||||
* ---end---
|
||||
*/
|
||||
_nm_properties_override_dbus(properties_override,
|
||||
"route-data",
|
||||
NM_SETT_INFO_PROPERT_TYPE(.dbus_type = NM_G_VARIANT_TYPE("aa{sv}"),
|
||||
|
|
|
|||
|
|
@ -218,8 +218,8 @@ verify_macsec_key(const char *key, gboolean cak, GError **error)
|
|||
int req_len;
|
||||
|
||||
/* CAK is a connection secret and can be NULL for various
|
||||
* reasons (agent-owned, no permissions to get secrets, etc.)
|
||||
*/
|
||||
* reasons (agent-owned, no permissions to get secrets, etc.)
|
||||
*/
|
||||
if (cak && !key)
|
||||
return TRUE;
|
||||
|
||||
|
|
@ -269,8 +269,8 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
if (priv->parent) {
|
||||
if (nm_utils_is_uuid(priv->parent)) {
|
||||
/* If we have an NMSettingConnection:master with slave-type="macsec",
|
||||
* then it must be the same UUID.
|
||||
*/
|
||||
* then it must be the same UUID.
|
||||
*/
|
||||
if (s_con) {
|
||||
const char *master = NULL, *slave_type = NULL;
|
||||
|
||||
|
|
@ -308,8 +308,8 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
}
|
||||
} else {
|
||||
/* If parent is NULL, the parent must be specified via
|
||||
* NMSettingWired:mac-address.
|
||||
*/
|
||||
* NMSettingWired:mac-address.
|
||||
*/
|
||||
if (connection && (!s_wired || !nm_setting_wired_get_mac_address(s_wired))) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
|
|
@ -527,15 +527,15 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
setting_class->need_secrets = need_secrets;
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:parent:
|
||||
*
|
||||
* If given, specifies the parent interface name or parent connection UUID
|
||||
* from which this MACSEC interface should be created. If this property is
|
||||
* not specified, the connection must contain an #NMSettingWired setting
|
||||
* with a #NMSettingWired:mac-address property.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
* NMSettingMacsec:parent:
|
||||
*
|
||||
* If given, specifies the parent interface name or parent connection UUID
|
||||
* from which this MACSEC interface should be created. If this property is
|
||||
* not specified, the connection must contain an #NMSettingWired setting
|
||||
* with a #NMSettingWired:mac-address property.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
obj_properties[PROP_PARENT] = g_param_spec_string(
|
||||
NM_SETTING_MACSEC_PARENT,
|
||||
"",
|
||||
|
|
@ -544,13 +544,13 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:mode:
|
||||
*
|
||||
* Specifies how the CAK (Connectivity Association Key) for MKA (MACsec Key
|
||||
* Agreement) is obtained.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
* NMSettingMacsec:mode:
|
||||
*
|
||||
* Specifies how the CAK (Connectivity Association Key) for MKA (MACsec Key
|
||||
* Agreement) is obtained.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
obj_properties[PROP_MODE] =
|
||||
g_param_spec_int(NM_SETTING_MACSEC_MODE,
|
||||
"",
|
||||
|
|
@ -561,12 +561,12 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:encrypt:
|
||||
*
|
||||
* Whether the transmitted traffic must be encrypted.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
* NMSettingMacsec:encrypt:
|
||||
*
|
||||
* Whether the transmitted traffic must be encrypted.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
obj_properties[PROP_ENCRYPT] = g_param_spec_boolean(NM_SETTING_MACSEC_ENCRYPT,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -574,13 +574,13 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:mka-cak:
|
||||
*
|
||||
* The pre-shared CAK (Connectivity Association Key) for MACsec
|
||||
* Key Agreement.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
* NMSettingMacsec:mka-cak:
|
||||
*
|
||||
* The pre-shared CAK (Connectivity Association Key) for MACsec
|
||||
* Key Agreement.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
obj_properties[PROP_MKA_CAK] =
|
||||
g_param_spec_string(NM_SETTING_MACSEC_MKA_CAK,
|
||||
"",
|
||||
|
|
@ -589,13 +589,13 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:mka-cak-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingMacsec:mka-cak
|
||||
* property.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
* NMSettingMacsec:mka-cak-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingMacsec:mka-cak
|
||||
* property.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
obj_properties[PROP_MKA_CAK_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_MACSEC_MKA_CAK_FLAGS,
|
||||
"",
|
||||
|
|
@ -605,13 +605,13 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:mka-ckn:
|
||||
*
|
||||
* The pre-shared CKN (Connectivity-association Key Name) for
|
||||
* MACsec Key Agreement.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
* NMSettingMacsec:mka-ckn:
|
||||
*
|
||||
* The pre-shared CKN (Connectivity-association Key Name) for
|
||||
* MACsec Key Agreement.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
obj_properties[PROP_MKA_CKN] = g_param_spec_string(NM_SETTING_MACSEC_MKA_CKN,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -619,12 +619,12 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:port:
|
||||
*
|
||||
* The port component of the SCI (Secure Channel Identifier), between 1 and 65534.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
* NMSettingMacsec:port:
|
||||
*
|
||||
* The port component of the SCI (Secure Channel Identifier), between 1 and 65534.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
obj_properties[PROP_PORT] =
|
||||
g_param_spec_int(NM_SETTING_MACSEC_PORT,
|
||||
"",
|
||||
|
|
@ -635,12 +635,12 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:validation:
|
||||
*
|
||||
* Specifies the validation mode for incoming frames.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
* NMSettingMacsec:validation:
|
||||
*
|
||||
* Specifies the validation mode for incoming frames.
|
||||
*
|
||||
* Since: 1.6
|
||||
**/
|
||||
obj_properties[PROP_VALIDATION] =
|
||||
g_param_spec_int(NM_SETTING_MACSEC_VALIDATION,
|
||||
"",
|
||||
|
|
@ -651,13 +651,13 @@ nm_setting_macsec_class_init(NMSettingMacsecClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacsec:send-sci:
|
||||
*
|
||||
* Specifies whether the SCI (Secure Channel Identifier) is included
|
||||
* in every packet.
|
||||
*
|
||||
* Since: 1.12
|
||||
**/
|
||||
* NMSettingMacsec:send-sci:
|
||||
*
|
||||
* Specifies whether the SCI (Secure Channel Identifier) is included
|
||||
* in every packet.
|
||||
*
|
||||
* Since: 1.12
|
||||
**/
|
||||
obj_properties[PROP_SEND_SCI] =
|
||||
g_param_spec_boolean(NM_SETTING_MACSEC_SEND_SCI,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|||
}
|
||||
} else {
|
||||
/* If parent is NULL, the parent must be specified via
|
||||
* NMSettingWired:mac-address.
|
||||
*/
|
||||
* NMSettingWired:mac-address.
|
||||
*/
|
||||
if (connection && (!s_wired || !nm_setting_wired_get_mac_address(s_wired))) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
|
|
@ -265,15 +265,15 @@ nm_setting_macvlan_class_init(NMSettingMacvlanClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingMacvlan:parent:
|
||||
*
|
||||
* 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 #NMSettingWired setting
|
||||
* with a #NMSettingWired:mac-address property.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingMacvlan:parent:
|
||||
*
|
||||
* 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 #NMSettingWired setting
|
||||
* with a #NMSettingWired:mac-address property.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_PARENT] = g_param_spec_string(
|
||||
NM_SETTING_MACVLAN_PARENT,
|
||||
"",
|
||||
|
|
@ -282,13 +282,13 @@ nm_setting_macvlan_class_init(NMSettingMacvlanClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacvlan:mode:
|
||||
*
|
||||
* The macvlan mode, which specifies the communication mechanism between multiple
|
||||
* macvlans on the same lower device.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingMacvlan:mode:
|
||||
*
|
||||
* The macvlan mode, which specifies the communication mechanism between multiple
|
||||
* macvlans on the same lower device.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_MODE] =
|
||||
g_param_spec_uint(NM_SETTING_MACVLAN_MODE,
|
||||
"",
|
||||
|
|
@ -299,12 +299,12 @@ nm_setting_macvlan_class_init(NMSettingMacvlanClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacvlan:promiscuous:
|
||||
*
|
||||
* Whether the interface should be put in promiscuous mode.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingMacvlan:promiscuous:
|
||||
*
|
||||
* Whether the interface should be put in promiscuous mode.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_PROMISCUOUS] = g_param_spec_boolean(
|
||||
NM_SETTING_MACVLAN_PROMISCUOUS,
|
||||
"",
|
||||
|
|
@ -313,12 +313,12 @@ nm_setting_macvlan_class_init(NMSettingMacvlanClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMacvlan:tap:
|
||||
*
|
||||
* Whether the interface should be a MACVTAP.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
* NMSettingMacvlan:tap:
|
||||
*
|
||||
* Whether the interface should be a MACVTAP.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
obj_properties[PROP_TAP] = g_param_spec_boolean(NM_SETTING_MACVLAN_TAP,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -785,25 +785,25 @@ nm_setting_match_class_init(NMSettingMatchClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingMatch:interface-name
|
||||
*
|
||||
* A list of interface names to match. Each element is a shell wildcard
|
||||
* pattern.
|
||||
*
|
||||
* An element can be prefixed with a pipe symbol (|) or an ampersand (&).
|
||||
* The former means that the element is optional and the latter means that
|
||||
* it is mandatory. If there are any optional elements, than the match
|
||||
* evaluates to true if at least one of the optional element matches
|
||||
* (logical OR). If there are any mandatory elements, then they all
|
||||
* must match (logical AND). By default, an element is optional. This means
|
||||
* that an element "foo" behaves the same as "|foo". An element can also be inverted
|
||||
* with exclamation mark (!) between the pipe symbol (or the ampersand) and before
|
||||
* the pattern. Note that "!foo" is a shortcut for the mandatory match "&!foo". Finally,
|
||||
* a backslash can be used at the beginning of the element (after the optional special characters)
|
||||
* to escape the start of the pattern. For example, "&\\!a" is an mandatory match for literally "!a".
|
||||
*
|
||||
* Since: 1.14
|
||||
**/
|
||||
* NMSettingMatch:interface-name
|
||||
*
|
||||
* A list of interface names to match. Each element is a shell wildcard
|
||||
* pattern.
|
||||
*
|
||||
* An element can be prefixed with a pipe symbol (|) or an ampersand (&).
|
||||
* The former means that the element is optional and the latter means that
|
||||
* it is mandatory. If there are any optional elements, than the match
|
||||
* evaluates to true if at least one of the optional element matches
|
||||
* (logical OR). If there are any mandatory elements, then they all
|
||||
* must match (logical AND). By default, an element is optional. This means
|
||||
* that an element "foo" behaves the same as "|foo". An element can also be inverted
|
||||
* with exclamation mark (!) between the pipe symbol (or the ampersand) and before
|
||||
* the pattern. Note that "!foo" is a shortcut for the mandatory match "&!foo". Finally,
|
||||
* a backslash can be used at the beginning of the element (after the optional special characters)
|
||||
* to escape the start of the pattern. For example, "&\\!a" is an mandatory match for literally "!a".
|
||||
*
|
||||
* Since: 1.14
|
||||
**/
|
||||
obj_properties[PROP_INTERFACE_NAME] = g_param_spec_boxed(
|
||||
NM_SETTING_MATCH_INTERFACE_NAME,
|
||||
"",
|
||||
|
|
@ -812,22 +812,22 @@ nm_setting_match_class_init(NMSettingMatchClass *klass)
|
|||
NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMatch:kernel-command-line
|
||||
*
|
||||
* A list of kernel command line arguments to match. This may be used to check
|
||||
* whether a specific kernel command line option is set (or if prefixed with
|
||||
* the exclamation mark unset). The argument must either be a single word, or
|
||||
* an assignment (i.e. two words, separated "="). In the former case the kernel
|
||||
* command line is searched for the word appearing as is, or as left hand side
|
||||
* of an assignment. In the latter case, the exact assignment is looked for
|
||||
* with right and left hand side matching.
|
||||
*
|
||||
* See NMSettingMatch:interface-name for how special characters '|', '&',
|
||||
* '!' and '\\' are used for optional and mandatory matches and inverting the
|
||||
* pattern.
|
||||
*
|
||||
* Since: 1.26
|
||||
**/
|
||||
* NMSettingMatch:kernel-command-line
|
||||
*
|
||||
* A list of kernel command line arguments to match. This may be used to check
|
||||
* whether a specific kernel command line option is set (or if prefixed with
|
||||
* the exclamation mark unset). The argument must either be a single word, or
|
||||
* an assignment (i.e. two words, separated "="). In the former case the kernel
|
||||
* command line is searched for the word appearing as is, or as left hand side
|
||||
* of an assignment. In the latter case, the exact assignment is looked for
|
||||
* with right and left hand side matching.
|
||||
*
|
||||
* See NMSettingMatch:interface-name for how special characters '|', '&',
|
||||
* '!' and '\\' are used for optional and mandatory matches and inverting the
|
||||
* pattern.
|
||||
*
|
||||
* Since: 1.26
|
||||
**/
|
||||
obj_properties[PROP_KERNEL_COMMAND_LINE] = g_param_spec_boxed(
|
||||
NM_SETTING_MATCH_KERNEL_COMMAND_LINE,
|
||||
"",
|
||||
|
|
@ -836,16 +836,16 @@ nm_setting_match_class_init(NMSettingMatchClass *klass)
|
|||
NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMatch:driver
|
||||
*
|
||||
* A list of driver names to match. Each element is a shell wildcard pattern.
|
||||
*
|
||||
* See NMSettingMatch:interface-name for how special characters '|', '&',
|
||||
* '!' and '\\' are used for optional and mandatory matches and inverting the
|
||||
* pattern.
|
||||
*
|
||||
* Since: 1.26
|
||||
**/
|
||||
* NMSettingMatch:driver
|
||||
*
|
||||
* A list of driver names to match. Each element is a shell wildcard pattern.
|
||||
*
|
||||
* See NMSettingMatch:interface-name for how special characters '|', '&',
|
||||
* '!' and '\\' are used for optional and mandatory matches and inverting the
|
||||
* pattern.
|
||||
*
|
||||
* Since: 1.26
|
||||
**/
|
||||
obj_properties[PROP_DRIVER] = g_param_spec_boxed(
|
||||
NM_SETTING_MATCH_DRIVER,
|
||||
"",
|
||||
|
|
@ -854,38 +854,38 @@ nm_setting_match_class_init(NMSettingMatchClass *klass)
|
|||
NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingMatch:path
|
||||
*
|
||||
* A list of paths to match against the ID_PATH udev property of
|
||||
* devices. ID_PATH represents the topological persistent path of a
|
||||
* device. It typically contains a subsystem string (pci, usb, platform,
|
||||
* etc.) and a subsystem-specific identifier.
|
||||
*
|
||||
* For PCI devices the path has the form
|
||||
* "pci-$domain:$bus:$device.$function", where each variable is an
|
||||
* hexadecimal value; for example "pci-0000:0a:00.0".
|
||||
*
|
||||
* The path of a device can be obtained with "udevadm info
|
||||
* /sys/class/net/$dev | grep ID_PATH=" or by looking at the "path"
|
||||
* property exported by NetworkManager ("nmcli -f general.path device
|
||||
* show $dev").
|
||||
*
|
||||
* Each element of the list is a shell wildcard pattern.
|
||||
*
|
||||
* See NMSettingMatch:interface-name for how special characters '|', '&',
|
||||
* '!' and '\\' are used for optional and mandatory matches and inverting the
|
||||
* pattern.
|
||||
*
|
||||
* Since: 1.26
|
||||
**/
|
||||
* NMSettingMatch:path
|
||||
*
|
||||
* A list of paths to match against the ID_PATH udev property of
|
||||
* devices. ID_PATH represents the topological persistent path of a
|
||||
* device. It typically contains a subsystem string (pci, usb, platform,
|
||||
* etc.) and a subsystem-specific identifier.
|
||||
*
|
||||
* For PCI devices the path has the form
|
||||
* "pci-$domain:$bus:$device.$function", where each variable is an
|
||||
* hexadecimal value; for example "pci-0000:0a:00.0".
|
||||
*
|
||||
* The path of a device can be obtained with "udevadm info
|
||||
* /sys/class/net/$dev | grep ID_PATH=" or by looking at the "path"
|
||||
* property exported by NetworkManager ("nmcli -f general.path device
|
||||
* show $dev").
|
||||
*
|
||||
* Each element of the list is a shell wildcard pattern.
|
||||
*
|
||||
* See NMSettingMatch:interface-name for how special characters '|', '&',
|
||||
* '!' and '\\' are used for optional and mandatory matches and inverting the
|
||||
* pattern.
|
||||
*
|
||||
* Since: 1.26
|
||||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: path
|
||||
* variable: MATCH_PATH
|
||||
* description: space-separated list of paths to match against the udev
|
||||
* property ID_PATHS of devices
|
||||
* example: MATCH_PATH="pci-0000:01:00.0 pci-0000:0c:00.0"
|
||||
* ---end---
|
||||
*/
|
||||
* property: path
|
||||
* variable: MATCH_PATH
|
||||
* description: space-separated list of paths to match against the udev
|
||||
* property ID_PATHS of devices
|
||||
* example: MATCH_PATH="pci-0000:01:00.0 pci-0000:0c:00.0"
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PATH] = g_param_spec_boxed(NM_SETTING_MATCH_PATH,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -221,10 +221,10 @@ nm_setting_olpc_mesh_class_init(NMSettingOlpcMeshClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingOlpcMesh:ssid:
|
||||
*
|
||||
* SSID of the mesh network to join.
|
||||
**/
|
||||
* NMSettingOlpcMesh:ssid:
|
||||
*
|
||||
* SSID of the mesh network to join.
|
||||
**/
|
||||
obj_properties[PROP_SSID] = g_param_spec_boxed(NM_SETTING_OLPC_MESH_SSID,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -233,10 +233,10 @@ nm_setting_olpc_mesh_class_init(NMSettingOlpcMeshClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOlpcMesh:channel:
|
||||
*
|
||||
* Channel on which the mesh network to join is located.
|
||||
**/
|
||||
* NMSettingOlpcMesh:channel:
|
||||
*
|
||||
* Channel on which the mesh network to join is located.
|
||||
**/
|
||||
obj_properties[PROP_CHANNEL] =
|
||||
g_param_spec_uint(NM_SETTING_OLPC_MESH_CHANNEL,
|
||||
"",
|
||||
|
|
@ -247,12 +247,12 @@ nm_setting_olpc_mesh_class_init(NMSettingOlpcMeshClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOlpcMesh:dhcp-anycast-address:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingOlpcMesh:dhcp-anycast-address:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_DHCP_ANYCAST_ADDRESS] =
|
||||
g_param_spec_string(NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -299,12 +299,12 @@ nm_setting_ovs_bridge_class_init(NMSettingOvsBridgeClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingOvsBridge:fail-mode:
|
||||
*
|
||||
* The bridge failure mode. One of "secure", "standalone" or empty.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsBridge:fail-mode:
|
||||
*
|
||||
* The bridge failure mode. One of "secure", "standalone" or empty.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_FAIL_MODE] = g_param_spec_string(
|
||||
NM_SETTING_OVS_BRIDGE_FAIL_MODE,
|
||||
"",
|
||||
|
|
@ -313,12 +313,12 @@ nm_setting_ovs_bridge_class_init(NMSettingOvsBridgeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsBridge:mcast-snooping-enable:
|
||||
*
|
||||
* Enable or disable multicast snooping.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsBridge:mcast-snooping-enable:
|
||||
*
|
||||
* Enable or disable multicast snooping.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_MCAST_SNOOPING_ENABLE] =
|
||||
g_param_spec_boolean(NM_SETTING_OVS_BRIDGE_MCAST_SNOOPING_ENABLE,
|
||||
"",
|
||||
|
|
@ -327,12 +327,12 @@ nm_setting_ovs_bridge_class_init(NMSettingOvsBridgeClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsBridge:rstp-enable:
|
||||
*
|
||||
* Enable or disable RSTP.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsBridge:rstp-enable:
|
||||
*
|
||||
* Enable or disable RSTP.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_RSTP_ENABLE] =
|
||||
g_param_spec_boolean(NM_SETTING_OVS_BRIDGE_RSTP_ENABLE,
|
||||
"",
|
||||
|
|
@ -341,12 +341,12 @@ nm_setting_ovs_bridge_class_init(NMSettingOvsBridgeClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsBridge:stp-enable:
|
||||
*
|
||||
* Enable or disable STP.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsBridge:stp-enable:
|
||||
*
|
||||
* Enable or disable STP.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_STP_ENABLE] =
|
||||
g_param_spec_boolean(NM_SETTING_OVS_BRIDGE_STP_ENABLE,
|
||||
"",
|
||||
|
|
@ -355,12 +355,12 @@ nm_setting_ovs_bridge_class_init(NMSettingOvsBridgeClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsBridge:datapath-type:
|
||||
*
|
||||
* The data path type. One of "system", "netdev" or empty.
|
||||
*
|
||||
* Since: 1.20
|
||||
**/
|
||||
* NMSettingOvsBridge:datapath-type:
|
||||
*
|
||||
* The data path type. One of "system", "netdev" or empty.
|
||||
*
|
||||
* Since: 1.20
|
||||
**/
|
||||
obj_properties[PROP_DATAPATH_TYPE] = g_param_spec_string(
|
||||
NM_SETTING_OVS_BRIDGE_DATAPATH_TYPE,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -133,12 +133,12 @@ nm_setting_ovs_dpdk_class_init(NMSettingOvsDpdkClass *klass)
|
|||
object_class->finalize = finalize;
|
||||
|
||||
/**
|
||||
* NMSettingOvsDpdk:devargs:
|
||||
*
|
||||
* Open vSwitch DPDK device arguments.
|
||||
*
|
||||
* Since: 1.20
|
||||
**/
|
||||
* NMSettingOvsDpdk:devargs:
|
||||
*
|
||||
* Open vSwitch DPDK device arguments.
|
||||
*
|
||||
* Since: 1.20
|
||||
**/
|
||||
obj_properties[PROP_DEVARGS] = g_param_spec_string(
|
||||
NM_SETTING_OVS_DPDK_DEVARGS,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -107,13 +107,13 @@ _nm_setting_ovs_interface_verify_interface_type(NMSettingOvsInterface *self,
|
|||
connection_type = nm_connection_get_connection_type(connection);
|
||||
if (!connection_type) {
|
||||
/* if we have an ovs-interface, then the connection type must be either
|
||||
* "ovs-interface" (for non "system" type) or anything else (for "system" type).
|
||||
*
|
||||
* The connection type usually can be normalized based on the presence of a
|
||||
* base setting. However, in this case, if the connection type is missing,
|
||||
* that is too complicate to guess what the user wanted.
|
||||
*
|
||||
* Require the use to be explicit and fail. */
|
||||
* "ovs-interface" (for non "system" type) or anything else (for "system" type).
|
||||
*
|
||||
* The connection type usually can be normalized based on the presence of a
|
||||
* base setting. However, in this case, if the connection type is missing,
|
||||
* that is too complicate to guess what the user wanted.
|
||||
*
|
||||
* Require the use to be explicit and fail. */
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
|
|
@ -408,12 +408,12 @@ nm_setting_ovs_interface_class_init(NMSettingOvsInterfaceClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingOvsInterface:type:
|
||||
*
|
||||
* The interface type. Either "internal", "system", "patch", "dpdk", or empty.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsInterface:type:
|
||||
*
|
||||
* The interface type. Either "internal", "system", "patch", "dpdk", or empty.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_TYPE] = g_param_spec_string(NM_SETTING_OVS_INTERFACE_TYPE,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -168,13 +168,13 @@ nm_setting_ovs_patch_class_init(NMSettingOvsPatchClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingOvsPatch:peer:
|
||||
*
|
||||
* Specifies the name of the interface for the other side of the patch.
|
||||
* The patch on the other side must also set this interface as peer.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsPatch:peer:
|
||||
*
|
||||
* Specifies the name of the interface for the other side of the patch.
|
||||
* The patch on the other side must also set this interface as peer.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_PEER] = g_param_spec_string(NM_SETTING_OVS_PATCH_PEER,
|
||||
"",
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -371,13 +371,13 @@ nm_setting_ovs_port_class_init(NMSettingOvsPortClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingOvsPort:vlan-mode:
|
||||
*
|
||||
* The VLAN mode. One of "access", "native-tagged", "native-untagged",
|
||||
* "trunk" or unset.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsPort:vlan-mode:
|
||||
*
|
||||
* The VLAN mode. One of "access", "native-tagged", "native-untagged",
|
||||
* "trunk" or unset.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_VLAN_MODE] = g_param_spec_string(
|
||||
NM_SETTING_OVS_PORT_VLAN_MODE,
|
||||
"",
|
||||
|
|
@ -386,12 +386,12 @@ nm_setting_ovs_port_class_init(NMSettingOvsPortClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsPort:tag:
|
||||
*
|
||||
* The VLAN tag in the range 0-4095.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsPort:tag:
|
||||
*
|
||||
* The VLAN tag in the range 0-4095.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_TAG] =
|
||||
g_param_spec_uint(NM_SETTING_OVS_PORT_TAG,
|
||||
"",
|
||||
|
|
@ -402,12 +402,12 @@ nm_setting_ovs_port_class_init(NMSettingOvsPortClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsPort:lacp:
|
||||
*
|
||||
* LACP mode. One of "active", "off", or "passive".
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsPort:lacp:
|
||||
*
|
||||
* LACP mode. One of "active", "off", or "passive".
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_LACP] = g_param_spec_string(NM_SETTING_OVS_PORT_LACP,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -416,12 +416,12 @@ nm_setting_ovs_port_class_init(NMSettingOvsPortClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsPort:bond-mode:
|
||||
*
|
||||
* Bonding mode. One of "active-backup", "balance-slb", or "balance-tcp".
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsPort:bond-mode:
|
||||
*
|
||||
* Bonding mode. One of "active-backup", "balance-slb", or "balance-tcp".
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_BOND_MODE] = g_param_spec_string(
|
||||
NM_SETTING_OVS_PORT_BOND_MODE,
|
||||
"",
|
||||
|
|
@ -430,12 +430,12 @@ nm_setting_ovs_port_class_init(NMSettingOvsPortClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsPort:bond-updelay:
|
||||
*
|
||||
* The time port must be active before it starts forwarding traffic.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsPort:bond-updelay:
|
||||
*
|
||||
* The time port must be active before it starts forwarding traffic.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_BOND_UPDELAY] =
|
||||
g_param_spec_uint(NM_SETTING_OVS_PORT_BOND_UPDELAY,
|
||||
"",
|
||||
|
|
@ -446,12 +446,12 @@ nm_setting_ovs_port_class_init(NMSettingOvsPortClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingOvsPort:bond-downdelay:
|
||||
*
|
||||
* The time port must be inactive in order to be considered down.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingOvsPort:bond-downdelay:
|
||||
*
|
||||
* The time port must be inactive in order to be considered down.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_BOND_DOWNDELAY] =
|
||||
g_param_spec_uint(NM_SETTING_OVS_PORT_BOND_DOWNDELAY,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -529,12 +529,12 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
setting_class->verify = verify;
|
||||
|
||||
/**
|
||||
* NMSettingPpp:noauth:
|
||||
*
|
||||
* If %TRUE, do not require the other side (usually the PPP server) to
|
||||
* authenticate itself to the client. If %FALSE, require authentication
|
||||
* from the remote side. In almost all cases, this should be %TRUE.
|
||||
**/
|
||||
* NMSettingPpp:noauth:
|
||||
*
|
||||
* If %TRUE, do not require the other side (usually the PPP server) to
|
||||
* authenticate itself to the client. If %FALSE, require authentication
|
||||
* from the remote side. In almost all cases, this should be %TRUE.
|
||||
**/
|
||||
obj_properties[PROP_NOAUTH] = g_param_spec_boolean(NM_SETTING_PPP_NOAUTH,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -542,10 +542,10 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:refuse-eap:
|
||||
*
|
||||
* If %TRUE, the EAP authentication method will not be used.
|
||||
**/
|
||||
* NMSettingPpp:refuse-eap:
|
||||
*
|
||||
* If %TRUE, the EAP authentication method will not be used.
|
||||
**/
|
||||
obj_properties[PROP_REFUSE_EAP] =
|
||||
g_param_spec_boolean(NM_SETTING_PPP_REFUSE_EAP,
|
||||
"",
|
||||
|
|
@ -554,10 +554,10 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:refuse-pap:
|
||||
*
|
||||
* If %TRUE, the PAP authentication method will not be used.
|
||||
**/
|
||||
* NMSettingPpp:refuse-pap:
|
||||
*
|
||||
* If %TRUE, the PAP authentication method will not be used.
|
||||
**/
|
||||
obj_properties[PROP_REFUSE_PAP] =
|
||||
g_param_spec_boolean(NM_SETTING_PPP_REFUSE_PAP,
|
||||
"",
|
||||
|
|
@ -566,10 +566,10 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:refuse-chap:
|
||||
*
|
||||
* If %TRUE, the CHAP authentication method will not be used.
|
||||
**/
|
||||
* NMSettingPpp:refuse-chap:
|
||||
*
|
||||
* If %TRUE, the CHAP authentication method will not be used.
|
||||
**/
|
||||
obj_properties[PROP_REFUSE_CHAP] =
|
||||
g_param_spec_boolean(NM_SETTING_PPP_REFUSE_CHAP,
|
||||
"",
|
||||
|
|
@ -578,10 +578,10 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:refuse-mschap:
|
||||
*
|
||||
* If %TRUE, the MSCHAP authentication method will not be used.
|
||||
**/
|
||||
* NMSettingPpp:refuse-mschap:
|
||||
*
|
||||
* If %TRUE, the MSCHAP authentication method will not be used.
|
||||
**/
|
||||
obj_properties[PROP_REFUSE_MSCHAP] =
|
||||
g_param_spec_boolean(NM_SETTING_PPP_REFUSE_MSCHAP,
|
||||
"",
|
||||
|
|
@ -590,10 +590,10 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:refuse-mschapv2:
|
||||
*
|
||||
* If %TRUE, the MSCHAPv2 authentication method will not be used.
|
||||
**/
|
||||
* NMSettingPpp:refuse-mschapv2:
|
||||
*
|
||||
* If %TRUE, the MSCHAPv2 authentication method will not be used.
|
||||
**/
|
||||
obj_properties[PROP_REFUSE_MSCHAPV2] =
|
||||
g_param_spec_boolean(NM_SETTING_PPP_REFUSE_MSCHAPV2,
|
||||
"",
|
||||
|
|
@ -602,10 +602,10 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:nobsdcomp:
|
||||
*
|
||||
* If %TRUE, BSD compression will not be requested.
|
||||
**/
|
||||
* NMSettingPpp:nobsdcomp:
|
||||
*
|
||||
* If %TRUE, BSD compression will not be requested.
|
||||
**/
|
||||
obj_properties[PROP_NOBSDCOMP] = g_param_spec_boolean(
|
||||
NM_SETTING_PPP_NOBSDCOMP,
|
||||
"",
|
||||
|
|
@ -614,10 +614,10 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:nodeflate:
|
||||
*
|
||||
* If %TRUE, "deflate" compression will not be requested.
|
||||
**/
|
||||
* NMSettingPpp:nodeflate:
|
||||
*
|
||||
* If %TRUE, "deflate" compression will not be requested.
|
||||
**/
|
||||
obj_properties[PROP_NODEFLATE] = g_param_spec_boolean(
|
||||
NM_SETTING_PPP_NODEFLATE,
|
||||
"",
|
||||
|
|
@ -626,10 +626,10 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:no-vj-comp:
|
||||
*
|
||||
* If %TRUE, Van Jacobsen TCP header compression will not be requested.
|
||||
**/
|
||||
* NMSettingPpp:no-vj-comp:
|
||||
*
|
||||
* If %TRUE, Van Jacobsen TCP header compression will not be requested.
|
||||
**/
|
||||
obj_properties[PROP_NO_VJ_COMP] = g_param_spec_boolean(
|
||||
NM_SETTING_PPP_NO_VJ_COMP,
|
||||
"",
|
||||
|
|
@ -638,13 +638,13 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:require-mppe:
|
||||
*
|
||||
* If %TRUE, MPPE (Microsoft Point-to-Point Encryption) 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.
|
||||
**/
|
||||
* NMSettingPpp:require-mppe:
|
||||
*
|
||||
* If %TRUE, MPPE (Microsoft Point-to-Point Encryption) 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.
|
||||
**/
|
||||
obj_properties[PROP_REQUIRE_MPPE] =
|
||||
g_param_spec_boolean(NM_SETTING_PPP_REQUIRE_MPPE,
|
||||
"",
|
||||
|
|
@ -653,12 +653,12 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:require-mppe-128:
|
||||
*
|
||||
* If %TRUE, 128-bit MPPE (Microsoft Point-to-Point Encryption) 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.
|
||||
**/
|
||||
* NMSettingPpp:require-mppe-128:
|
||||
*
|
||||
* If %TRUE, 128-bit MPPE (Microsoft Point-to-Point Encryption) 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.
|
||||
**/
|
||||
obj_properties[PROP_REQUIRE_MPPE_128] =
|
||||
g_param_spec_boolean(NM_SETTING_PPP_REQUIRE_MPPE_128,
|
||||
"",
|
||||
|
|
@ -667,11 +667,11 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:mppe-stateful:
|
||||
*
|
||||
* If %TRUE, stateful MPPE is used. See pppd documentation for more
|
||||
* information on stateful MPPE.
|
||||
**/
|
||||
* NMSettingPpp:mppe-stateful:
|
||||
*
|
||||
* If %TRUE, stateful MPPE is used. See pppd documentation for more
|
||||
* information on stateful MPPE.
|
||||
**/
|
||||
obj_properties[PROP_MPPE_STATEFUL] =
|
||||
g_param_spec_boolean(NM_SETTING_PPP_MPPE_STATEFUL,
|
||||
"",
|
||||
|
|
@ -680,12 +680,12 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:crtscts:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingPpp:crtscts:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_CRTSCTS] = g_param_spec_boolean(NM_SETTING_PPP_CRTSCTS,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -693,12 +693,12 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:baud:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingPpp:baud:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_BAUD] = g_param_spec_uint(NM_SETTING_PPP_BAUD,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -709,12 +709,12 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:mru:
|
||||
*
|
||||
* If non-zero, instruct pppd to request that the peer send packets no
|
||||
* larger than the specified size. If non-zero, the MRU should be between
|
||||
* 128 and 16384.
|
||||
*/
|
||||
* NMSettingPpp:mru:
|
||||
*
|
||||
* If non-zero, instruct pppd to request that the peer send packets no
|
||||
* larger than the specified size. If non-zero, the MRU should be between
|
||||
* 128 and 16384.
|
||||
*/
|
||||
obj_properties[PROP_MRU] = g_param_spec_uint(NM_SETTING_PPP_MRU,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -724,11 +724,11 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:mtu:
|
||||
*
|
||||
* If non-zero, instruct pppd to send packets no larger than the specified
|
||||
* size.
|
||||
**/
|
||||
* NMSettingPpp:mtu:
|
||||
*
|
||||
* If non-zero, instruct pppd to send packets no larger than the specified
|
||||
* size.
|
||||
**/
|
||||
obj_properties[PROP_MTU] = g_param_spec_uint(NM_SETTING_PPP_MTU,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -739,13 +739,13 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
| G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:lcp-echo-failure:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingPpp:lcp-echo-failure:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_LCP_ECHO_FAILURE] = g_param_spec_uint(
|
||||
NM_SETTING_PPP_LCP_ECHO_FAILURE,
|
||||
"",
|
||||
|
|
@ -756,13 +756,13 @@ nm_setting_ppp_class_init(NMSettingPppClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPpp:lcp-echo-interval:
|
||||
*
|
||||
* If non-zero, instruct pppd to send an LCP echo-request frame to the peer
|
||||
* every n seconds (where n is the specified value). Note that some PPP
|
||||
* peers will respond to echo requests and some will not, and it is not
|
||||
* possible to autodetect this.
|
||||
**/
|
||||
* NMSettingPpp:lcp-echo-interval:
|
||||
*
|
||||
* If non-zero, instruct pppd to send an LCP echo-request frame to the peer
|
||||
* every n seconds (where n is the specified value). Note that some PPP
|
||||
* peers will respond to echo requests and some will not, and it is not
|
||||
* possible to autodetect this.
|
||||
**/
|
||||
obj_properties[PROP_LCP_ECHO_INTERVAL] = g_param_spec_uint(
|
||||
NM_SETTING_PPP_LCP_ECHO_INTERVAL,
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -286,15 +286,15 @@ nm_setting_pppoe_class_init(NMSettingPppoeClass *klass)
|
|||
setting_class->need_secrets = need_secrets;
|
||||
|
||||
/**
|
||||
* NMSettingPppoe:parent:
|
||||
*
|
||||
* If given, specifies the parent interface name on which this PPPoE
|
||||
* connection should be created. If this property is not specified,
|
||||
* the connection is activated on the interface specified in
|
||||
* #NMSettingConnection:interface-name of #NMSettingConnection.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
* NMSettingPppoe:parent:
|
||||
*
|
||||
* If given, specifies the parent interface name on which this PPPoE
|
||||
* connection should be created. If this property is not specified,
|
||||
* the connection is activated on the interface specified in
|
||||
* #NMSettingConnection:interface-name of #NMSettingConnection.
|
||||
*
|
||||
* Since: 1.10
|
||||
**/
|
||||
obj_properties[PROP_PARENT] = g_param_spec_string(
|
||||
NM_SETTING_PPPOE_PARENT,
|
||||
"",
|
||||
|
|
@ -303,13 +303,13 @@ nm_setting_pppoe_class_init(NMSettingPppoeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPppoe:service:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
* NMSettingPppoe:service:
|
||||
*
|
||||
* 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.
|
||||
**/
|
||||
obj_properties[PROP_SERVICE] = g_param_spec_string(NM_SETTING_PPPOE_SERVICE,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -317,10 +317,10 @@ nm_setting_pppoe_class_init(NMSettingPppoeClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPppoe:username:
|
||||
*
|
||||
* Username used to authenticate with the PPPoE service.
|
||||
**/
|
||||
* NMSettingPppoe:username:
|
||||
*
|
||||
* Username used to authenticate with the PPPoE service.
|
||||
**/
|
||||
obj_properties[PROP_USERNAME] = g_param_spec_string(NM_SETTING_PPPOE_USERNAME,
|
||||
"",
|
||||
"",
|
||||
|
|
@ -328,10 +328,10 @@ nm_setting_pppoe_class_init(NMSettingPppoeClass *klass)
|
|||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPppoe:password:
|
||||
*
|
||||
* Password used to authenticate with the PPPoE service.
|
||||
**/
|
||||
* NMSettingPppoe:password:
|
||||
*
|
||||
* Password used to authenticate with the PPPoE service.
|
||||
**/
|
||||
obj_properties[PROP_PASSWORD] =
|
||||
g_param_spec_string(NM_SETTING_PPPOE_PASSWORD,
|
||||
"",
|
||||
|
|
@ -340,10 +340,10 @@ nm_setting_pppoe_class_init(NMSettingPppoeClass *klass)
|
|||
G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingPppoe:password-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingPppoe:password property.
|
||||
**/
|
||||
* NMSettingPppoe:password-flags:
|
||||
*
|
||||
* Flags indicating how to handle the #NMSettingPppoe:password property.
|
||||
**/
|
||||
obj_properties[PROP_PASSWORD_FLAGS] =
|
||||
g_param_spec_flags(NM_SETTING_PPPOE_PASSWORD_FLAGS,
|
||||
"",
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue