|
|
|
@@ -945,7 +945,8 @@ _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info,
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_gobject(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_gobject(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
return _get_fcn_gobject_impl(property_info,
|
|
|
|
|
setting,
|
|
|
|
@@ -955,7 +956,8 @@ static gconstpointer _get_fcn_gobject(ARGS_GET_FCN)
|
|
|
|
|
out_to_free);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_gobject_int(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_gobject_int(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
GParamSpec *pspec;
|
|
|
|
|
nm_auto_unset_gvalue GValue gval = G_VALUE_INIT;
|
|
|
|
@@ -1034,7 +1036,8 @@ static gconstpointer _get_fcn_gobject_int(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(return_str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_gobject_mtu(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_gobject_mtu(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
guint32 mtu;
|
|
|
|
|
|
|
|
|
@@ -1058,7 +1061,8 @@ static gconstpointer _get_fcn_gobject_mtu(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(g_strdup_printf("%u", (unsigned) mtu));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_gobject_secret_flags(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_gobject_secret_flags(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
guint v;
|
|
|
|
|
GValue val = G_VALUE_INIT;
|
|
|
|
@@ -1072,7 +1076,8 @@ static gconstpointer _get_fcn_gobject_secret_flags(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(secret_flags_to_string(v, get_type));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_gobject_enum(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_gobject_enum(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
GType gtype = 0;
|
|
|
|
|
nm_auto_unref_gtypeclass GTypeClass *gtype_class = NULL;
|
|
|
|
@@ -1221,7 +1226,8 @@ static gconstpointer _get_fcn_gobject_enum(ARGS_GET_FCN)
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_string(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_string(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free char *to_free = NULL;
|
|
|
|
|
|
|
|
|
@@ -1281,12 +1287,14 @@ _set_fcn_gobject_bool_impl(const NMMetaPropertyInfo *property_info,
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_bool(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_bool(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
return _set_fcn_gobject_bool_impl(property_info, setting, modifier, value, error);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_ternary(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_ternary(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMTernary val;
|
|
|
|
|
|
|
|
|
@@ -1303,7 +1311,8 @@ static gboolean _set_fcn_gobject_ternary(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_int(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_int(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
int errsv;
|
|
|
|
|
const GParamSpec *pspec;
|
|
|
|
@@ -1454,7 +1463,8 @@ have_value_from_nick:
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_mtu(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_mtu(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
nm_auto_unset_gvalue GValue gval = G_VALUE_INIT;
|
|
|
|
|
const GParamSpec *pspec;
|
|
|
|
@@ -1496,7 +1506,8 @@ static gboolean _set_fcn_gobject_mtu(ARGS_SET_FCN)
|
|
|
|
|
#define IEEE802154_ADDR_LEN 8
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_mac(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_mac(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMMetaPropertyTypeMacMode mode;
|
|
|
|
|
gboolean valid;
|
|
|
|
@@ -1528,7 +1539,8 @@ static gboolean _set_fcn_gobject_mac(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_enum(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_enum(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
GType gtype = 0;
|
|
|
|
|
GType gtype_prop;
|
|
|
|
@@ -1661,7 +1673,8 @@ fail:
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static const char *const *_values_fcn_gobject_enum(ARGS_VALUES_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_values_fcn_gobject_enum(ARGS_VALUES_FCN)
|
|
|
|
|
{
|
|
|
|
|
GType gtype = 0;
|
|
|
|
|
gboolean has_gtype = FALSE;
|
|
|
|
@@ -1707,7 +1720,8 @@ static const char *const *_values_fcn_gobject_enum(ARGS_VALUES_FCN)
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static const char *const *_complete_fcn_gobject_bool(ARGS_COMPLETE_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_complete_fcn_gobject_bool(ARGS_COMPLETE_FCN)
|
|
|
|
|
{
|
|
|
|
|
static const char *const v[] = {
|
|
|
|
|
"true",
|
|
|
|
@@ -1726,7 +1740,8 @@ static const char *const *_complete_fcn_gobject_bool(ARGS_COMPLETE_FCN)
|
|
|
|
|
return v;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_complete_fcn_gobject_ternary(ARGS_COMPLETE_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_complete_fcn_gobject_ternary(ARGS_COMPLETE_FCN)
|
|
|
|
|
{
|
|
|
|
|
static const char *const v[] = {
|
|
|
|
|
"on",
|
|
|
|
@@ -1748,7 +1763,8 @@ static const char *const *_complete_fcn_gobject_ternary(ARGS_COMPLETE_FCN)
|
|
|
|
|
return v;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_complete_fcn_gobject_devices(ARGS_COMPLETE_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_complete_fcn_gobject_devices(ARGS_COMPLETE_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMDevice *const *devices = NULL;
|
|
|
|
|
guint i, j;
|
|
|
|
@@ -1882,7 +1898,8 @@ _multilist_do_validate(const NMMetaPropertyInfo *property_info,
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_multilist(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_multilist(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
return _get_fcn_gobject_impl(
|
|
|
|
|
property_info,
|
|
|
|
@@ -1909,7 +1926,8 @@ _multilist_clear_property(const NMMetaPropertyInfo *property_info,
|
|
|
|
|
return _gobject_property_reset(setting, property_info->property_name, FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_multilist(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_multilist(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free const char **strv = NULL;
|
|
|
|
|
gsize i, j, nstrv;
|
|
|
|
@@ -2000,7 +2018,8 @@ static gboolean _set_fcn_multilist(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_optionlist(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_optionlist(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free const char **strv = NULL;
|
|
|
|
|
gs_free const char **strv_val = NULL;
|
|
|
|
@@ -2129,7 +2148,8 @@ validate_flags(NMSetting *setting, const char *prop, guint val, GError **error)
|
|
|
|
|
return success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_flags(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_flags(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
unsigned long val_int;
|
|
|
|
|
|
|
|
|
@@ -2149,7 +2169,8 @@ static gboolean _set_fcn_gobject_flags(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_ssid(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_ssid(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_unref_bytes GBytes *ssid = NULL;
|
|
|
|
|
|
|
|
|
@@ -2166,7 +2187,8 @@ static gboolean _set_fcn_gobject_ssid(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_ifname(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_ifname(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
if (_SET_FCN_DO_RESET_DEFAULT(property_info, modifier, value))
|
|
|
|
|
return _gobject_property_reset_default(setting, property_info->property_name);
|
|
|
|
@@ -2175,7 +2197,8 @@ static gboolean _set_fcn_gobject_ifname(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_vpn_service_type(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_vpn_service_type(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free char *service_name = NULL;
|
|
|
|
|
|
|
|
|
@@ -2187,7 +2210,8 @@ static gboolean _set_fcn_vpn_service_type(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_complete_fcn_vpn_service_type(ARGS_COMPLETE_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_complete_fcn_vpn_service_type(ARGS_COMPLETE_FCN)
|
|
|
|
|
{
|
|
|
|
|
gsize i, j;
|
|
|
|
|
char **values;
|
|
|
|
@@ -2240,7 +2264,8 @@ _multilist_validate_fcn_is_ipv4_addr_or_subnet(const char *value, GError **error
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gobject_bytes(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gobject_bytes(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free char *val_strip_free = NULL;
|
|
|
|
|
gs_free const char **strv = NULL;
|
|
|
|
@@ -2294,7 +2319,8 @@ done:
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_cert_8021x(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_cert_8021x(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSetting8021x *s_8021X = NM_SETTING_802_1X(setting);
|
|
|
|
|
const NMSetting8021xSchemeVtable *vtable;
|
|
|
|
@@ -2325,7 +2351,8 @@ static gconstpointer _get_fcn_cert_8021x(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_cert_8021x(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_cert_8021x(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free char *value_to_free = NULL;
|
|
|
|
|
NMSetting8021xCKScheme scheme = NM_SETTING_802_1X_CK_SCHEME_PATH;
|
|
|
|
@@ -2383,7 +2410,8 @@ static gboolean _set_fcn_cert_8021x(ARGS_SET_FCN)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_complete_fcn_cert_8021x(ARGS_COMPLETE_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_complete_fcn_cert_8021x(ARGS_COMPLETE_FCN)
|
|
|
|
|
{
|
|
|
|
|
const NMSetting8021xSchemeVtable *vtable;
|
|
|
|
|
|
|
|
|
@@ -2403,7 +2431,8 @@ static const char *const *_complete_fcn_cert_8021x(ARGS_COMPLETE_FCN)
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_bond_options(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_bond_options(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingBond *s_bond = NM_SETTING_BOND(setting);
|
|
|
|
|
GString *str;
|
|
|
|
@@ -2513,7 +2542,8 @@ _nm_meta_setting_bond_add_option(NMSetting * setting,
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *_describe_fcn_bond_options(ARGS_DESCRIBE_FCN)
|
|
|
|
|
static const char *
|
|
|
|
|
_describe_fcn_bond_options(ARGS_DESCRIBE_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free char *options_str = NULL;
|
|
|
|
|
const char **valid_options;
|
|
|
|
@@ -2538,12 +2568,14 @@ static const char *_describe_fcn_bond_options(ARGS_DESCRIBE_FCN)
|
|
|
|
|
return (*out_to_free = s);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_values_fcn_bond_options(ARGS_VALUES_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_values_fcn_bond_options(ARGS_VALUES_FCN)
|
|
|
|
|
{
|
|
|
|
|
return nm_setting_bond_get_valid_options(NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_connection_permissions(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_connection_permissions(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingConnection *s_con = NM_SETTING_CONNECTION(setting);
|
|
|
|
|
GString *perm = NULL;
|
|
|
|
@@ -2575,7 +2607,8 @@ static gconstpointer _get_fcn_connection_permissions(ARGS_GET_FCN)
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_connection_type(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_connection_type(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free char *uuid = NULL;
|
|
|
|
|
|
|
|
|
@@ -2603,7 +2636,8 @@ static gboolean _set_fcn_connection_type(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_complete_fcn_connection_type(ARGS_COMPLETE_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_complete_fcn_connection_type(ARGS_COMPLETE_FCN)
|
|
|
|
|
{
|
|
|
|
|
guint i, j;
|
|
|
|
|
char **result;
|
|
|
|
@@ -2703,7 +2737,8 @@ _multilist_remove_by_value_fcn_connection_permissions(NMSetting *setting, const
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_complete_fcn_connection_master(ARGS_COMPLETE_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_complete_fcn_connection_master(ARGS_COMPLETE_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMRemoteConnection *const *connections = NULL;
|
|
|
|
|
guint len = 0;
|
|
|
|
@@ -2776,7 +2811,8 @@ _multilist_validate2_fcn_uuid(NMSetting *setting, const char *item, GError **err
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_connection_metered(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_connection_metered(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingConnection *s_conn = NM_SETTING_CONNECTION(setting);
|
|
|
|
|
const char *s;
|
|
|
|
@@ -2802,7 +2838,8 @@ static gconstpointer _get_fcn_connection_metered(ARGS_GET_FCN)
|
|
|
|
|
return s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_connection_metered(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_connection_metered(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMMetered metered;
|
|
|
|
|
NMTernary ts_val;
|
|
|
|
@@ -2859,7 +2896,8 @@ dcb_flags_to_string(NMSettingDcbFlags flags)
|
|
|
|
|
return g_string_free(flag_str, FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_dcb(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_dcb(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingDcb *s_dcb = NM_SETTING_DCB(setting);
|
|
|
|
|
GString *str;
|
|
|
|
@@ -2884,7 +2922,8 @@ static gconstpointer _get_fcn_dcb(ARGS_GET_FCN)
|
|
|
|
|
#define DCB_ALL_FLAGS \
|
|
|
|
|
(NM_SETTING_DCB_FLAG_ENABLE | NM_SETTING_DCB_FLAG_ADVERTISE | NM_SETTING_DCB_FLAG_WILLING)
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_dcb_flags(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_dcb_flags(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
nm_auto_unset_gvalue GValue val = G_VALUE_INIT;
|
|
|
|
|
guint v;
|
|
|
|
@@ -2898,7 +2937,8 @@ static gconstpointer _get_fcn_dcb_flags(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(dcb_flags_to_string(v));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_dcb_flags(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_dcb_flags(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingDcbFlags flags = NM_SETTING_DCB_FLAG_NONE;
|
|
|
|
|
long int t;
|
|
|
|
@@ -3013,7 +3053,8 @@ dcb_check_feature_enabled(const NMMetaEnvironment *environment,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_dcb(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_dcb(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
guint i = 0;
|
|
|
|
|
guint nums[8] = {
|
|
|
|
@@ -3054,7 +3095,8 @@ static gboolean _set_fcn_dcb(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_dcb_bool(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_dcb_bool(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingDcb *s_dcb = NM_SETTING_DCB(setting);
|
|
|
|
|
GString *str;
|
|
|
|
@@ -3076,7 +3118,8 @@ static gconstpointer _get_fcn_dcb_bool(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(g_string_free(str, FALSE));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_dcb_bool(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_dcb_bool(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
guint i = 0;
|
|
|
|
|
guint nums[8] = {
|
|
|
|
@@ -3105,7 +3148,8 @@ static gboolean _set_fcn_dcb_bool(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gsm_auto_config(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gsm_auto_config(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
if (!_set_fcn_gobject_bool_impl(property_info, setting, modifier, value, error))
|
|
|
|
|
return FALSE;
|
|
|
|
@@ -3127,7 +3171,8 @@ static gboolean _set_fcn_gsm_auto_config(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_gsm_sim_operator_id(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_gsm_sim_operator_id(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
const char *p = value;
|
|
|
|
|
|
|
|
|
@@ -3152,7 +3197,8 @@ static gboolean _set_fcn_gsm_sim_operator_id(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_infiniband_p_key(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_infiniband_p_key(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gint64 p_key;
|
|
|
|
|
|
|
|
|
@@ -3173,7 +3219,8 @@ static gboolean _set_fcn_infiniband_p_key(ARGS_SET_FCN)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_infiniband_p_key(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_infiniband_p_key(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingInfiniband *s_infiniband = NM_SETTING_INFINIBAND(setting);
|
|
|
|
|
int p_key;
|
|
|
|
@@ -3192,7 +3239,8 @@ static gconstpointer _get_fcn_infiniband_p_key(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(g_strdup_printf("0x%04x", p_key));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_objlist(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_objlist(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
GString *str = NULL;
|
|
|
|
|
guint num;
|
|
|
|
@@ -3314,7 +3362,8 @@ _objlist_obj_to_str_fcn_ip_config_routes(NMMetaAccessorGetType get_type,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_ip_config_method(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_ip_config_method(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
if (_SET_FCN_DO_RESET_DEFAULT(property_info, modifier, value))
|
|
|
|
|
return _gobject_property_reset_default(setting, property_info->property_name);
|
|
|
|
@@ -3367,7 +3416,8 @@ _multilist_add_fcn_ip_config_dns_options(NMSetting *setting, const char *item)
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_objlist(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_objlist(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free const char **strv = NULL;
|
|
|
|
|
gsize i, nstrv;
|
|
|
|
@@ -3457,7 +3507,8 @@ _objlist_set_fcn_ip_config_addresses(NMSetting * setting,
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_ip_config_gateway(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_ip_config_gateway(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free char *value_to_free = NULL;
|
|
|
|
|
int addr_family = nm_setting_ip_config_get_addr_family(NM_SETTING_IP_CONFIG(setting));
|
|
|
|
@@ -3594,7 +3645,8 @@ _multilist_remove_by_value_fcn_ip_config_dhcp_reject_servers(NMSettingIPConfig *
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_olpc_mesh_ssid(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_olpc_mesh_ssid(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingOlpcMesh *s_olpc_mesh = NM_SETTING_OLPC_MESH(setting);
|
|
|
|
|
GBytes *ssid;
|
|
|
|
@@ -3611,7 +3663,8 @@ static gconstpointer _get_fcn_olpc_mesh_ssid(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(ssid_str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_olpc_mesh_channel(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_olpc_mesh_channel(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
unsigned long chan_int;
|
|
|
|
|
|
|
|
|
@@ -3871,7 +3924,8 @@ _objlist_set_fcn_team_link_watchers(NMSetting * setting,
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_vlan_flags(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_vlan_flags(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingVlan *s_vlan = NM_SETTING_VLAN(setting);
|
|
|
|
|
guint32 flags;
|
|
|
|
@@ -3898,7 +3952,8 @@ _vlan_priority_map_type_from_property_info(const NMMetaPropertyInfo *property_in
|
|
|
|
|
: NM_VLAN_EGRESS_MAP;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_vlan_xgress_priority_map(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_vlan_xgress_priority_map(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMVlanPriorityMap map_type = _vlan_priority_map_type_from_property_info(property_info);
|
|
|
|
|
NMSettingVlan *s_vlan = NM_SETTING_VLAN(setting);
|
|
|
|
@@ -3927,7 +3982,8 @@ static gconstpointer _get_fcn_vlan_xgress_priority_map(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(g_string_free(str, FALSE));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_vlan_xgress_priority_map(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_vlan_xgress_priority_map(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMVlanPriorityMap map_type = _vlan_priority_map_type_from_property_info(property_info);
|
|
|
|
|
gs_free const char **prio_map = NULL;
|
|
|
|
@@ -3982,7 +4038,8 @@ _vpn_options_callback(const char *key, const char *val, gpointer user_data)
|
|
|
|
|
g_string_append(str, nm_utils_escaped_tokens_options_escape_val(val, &escaped_val));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_vpn_options(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_vpn_options(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingVpn *s_vpn = NM_SETTING_VPN(setting);
|
|
|
|
|
GString *str;
|
|
|
|
@@ -4024,7 +4081,8 @@ _optionlist_set_fcn_vpn_secrets(NMSetting * setting,
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_wired_s390_subchannels(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_wired_s390_subchannels(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free const char **strv = NULL;
|
|
|
|
|
gsize len;
|
|
|
|
@@ -4056,12 +4114,14 @@ _optionlist_set_fcn_wired_s390_options(NMSetting * setting,
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_values_fcn_wired_s390_options(ARGS_VALUES_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_values_fcn_wired_s390_options(ARGS_VALUES_FCN)
|
|
|
|
|
{
|
|
|
|
|
return nm_setting_wired_get_valid_s390_options(NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *_describe_fcn_wired_s390_options(ARGS_DESCRIBE_FCN)
|
|
|
|
|
static const char *
|
|
|
|
|
_describe_fcn_wired_s390_options(ARGS_DESCRIBE_FCN)
|
|
|
|
|
{
|
|
|
|
|
gs_free char *options_str = NULL;
|
|
|
|
|
const char **valid_options;
|
|
|
|
@@ -4078,7 +4138,8 @@ static const char *_describe_fcn_wired_s390_options(ARGS_DESCRIBE_FCN)
|
|
|
|
|
return (*out_to_free = s);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_wireless_ssid(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_wireless_ssid(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingWireless *s_wireless = NM_SETTING_WIRELESS(setting);
|
|
|
|
|
GBytes *ssid;
|
|
|
|
@@ -4095,7 +4156,8 @@ static gconstpointer _get_fcn_wireless_ssid(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(ssid_str);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_wireless_channel(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_wireless_channel(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
unsigned long chan_int;
|
|
|
|
|
|
|
|
|
@@ -4133,7 +4195,8 @@ _multilist_validate2_fcn_mac_addr(NMSetting *setting, const char *item, GError *
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_wireless_security_wep_key(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_wireless_security_wep_key(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMSettingWirelessSecurity *s_wireless_sec = NM_SETTING_WIRELESS_SECURITY(setting);
|
|
|
|
|
char *key;
|
|
|
|
@@ -4152,7 +4215,8 @@ static gconstpointer _get_fcn_wireless_security_wep_key(ARGS_GET_FCN)
|
|
|
|
|
RETURN_STR_TO_FREE(key);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_wireless_wep_key(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_wireless_wep_key(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMWepKeyType guessed_type = NM_WEP_KEY_TYPE_UNKNOWN;
|
|
|
|
|
NMWepKeyType type;
|
|
|
|
@@ -4255,7 +4319,8 @@ _gobject_enum_pre_set_notify_fcn_wireless_security_wep_key_type(
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
static gconstpointer _get_fcn_ethtool(ARGS_GET_FCN)
|
|
|
|
|
static gconstpointer
|
|
|
|
|
_get_fcn_ethtool(ARGS_GET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMEthtoolID ethtool_id = property_info->property_typ_data->subtype.ethtool.ethtool_id;
|
|
|
|
|
const char *s;
|
|
|
|
@@ -4286,7 +4351,8 @@ static gconstpointer _get_fcn_ethtool(ARGS_GET_FCN)
|
|
|
|
|
return s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static gboolean _set_fcn_ethtool(ARGS_SET_FCN)
|
|
|
|
|
static gboolean
|
|
|
|
|
_set_fcn_ethtool(ARGS_SET_FCN)
|
|
|
|
|
{
|
|
|
|
|
NMEthtoolID ethtool_id = property_info->property_typ_data->subtype.ethtool.ethtool_id;
|
|
|
|
|
gint64 i64;
|
|
|
|
@@ -4336,7 +4402,8 @@ do_unset:
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *const *_complete_fcn_ethtool(ARGS_COMPLETE_FCN)
|
|
|
|
|
static const char *const *
|
|
|
|
|
_complete_fcn_ethtool(ARGS_COMPLETE_FCN)
|
|
|
|
|
{
|
|
|
|
|
static const char *const v[] = {
|
|
|
|
|
"true",
|
|
|
|
|