2019-09-10 11:19:01 +02:00
|
|
|
// SPDX-License-Identifier: LGPL-2.1+
|
2014-07-24 08:53:33 -04:00
|
|
|
/*
|
2019-10-01 09:20:35 +02:00
|
|
|
* Copyright (C) 2005 - 2017 Red Hat, Inc.
|
2014-07-24 08:53:33 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __NM_UTILS_PRIVATE_H__
|
|
|
|
|
#define __NM_UTILS_PRIVATE_H__
|
|
|
|
|
|
2018-01-02 13:37:06 +01:00
|
|
|
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
|
|
|
|
|
#error Cannot use this header.
|
2015-05-20 12:23:03 +02:00
|
|
|
#endif
|
|
|
|
|
|
2014-07-24 08:53:33 -04:00
|
|
|
#include "nm-setting-private.h"
|
2015-03-26 08:57:02 +01:00
|
|
|
#include "nm-setting-ip-config.h"
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2019-05-01 11:56:29 +02:00
|
|
|
#define NM_VARIANT_ATTRIBUTE_SPEC_DEFINE(_name, _type, ...) \
|
|
|
|
|
(&((const NMVariantAttributeSpec) { \
|
|
|
|
|
.name = _name, \
|
|
|
|
|
.type = _type, \
|
|
|
|
|
__VA_ARGS__ \
|
|
|
|
|
}))
|
|
|
|
|
|
2014-07-24 08:53:33 -04:00
|
|
|
gboolean _nm_utils_string_slist_validate (GSList *list,
|
|
|
|
|
const char **valid_values);
|
|
|
|
|
|
2019-02-09 11:14:51 +01:00
|
|
|
gboolean _nm_utils_secret_flags_validate (NMSettingSecretFlags secret_flags,
|
|
|
|
|
const char *setting_name,
|
|
|
|
|
const char *property_name,
|
|
|
|
|
NMSettingSecretFlags disallowed_flags,
|
|
|
|
|
GError **error);
|
|
|
|
|
|
2019-01-28 00:36:08 +01:00
|
|
|
gboolean _nm_utils_wps_method_validate (NMSettingWirelessSecurityWpsMethod wps_method,
|
|
|
|
|
const char *setting_name,
|
|
|
|
|
const char *property_name,
|
|
|
|
|
gboolean wps_required,
|
|
|
|
|
GError **error);
|
|
|
|
|
|
2014-08-16 10:09:48 -04:00
|
|
|
/* D-Bus transform funcs */
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2019-09-22 10:57:57 +02:00
|
|
|
extern const NMSettInfoPropertType nm_sett_info_propert_type_strdict;
|
|
|
|
|
|
2020-03-19 16:57:56 +01:00
|
|
|
extern const NMSettInfoPropertType nm_sett_info_propert_type_mac_address;
|
2019-09-22 10:57:57 +02:00
|
|
|
|
|
|
|
|
extern const NMSettInfoPropertType nm_sett_info_propert_type_cloned_mac_address;
|
|
|
|
|
|
|
|
|
|
extern const NMSettInfoPropertType nm_sett_info_propert_type_assigned_mac_address;
|
|
|
|
|
|
|
|
|
|
extern const NMSettInfoPropertType nm_sett_info_propert_type_bridge_vlans;
|
|
|
|
|
|
2014-08-16 10:09:48 -04:00
|
|
|
void _nm_utils_strdict_from_dbus (GVariant *dbus_value,
|
2014-06-24 17:40:08 -04:00
|
|
|
GValue *prop_value);
|
|
|
|
|
|
2014-08-16 10:09:48 -04:00
|
|
|
void _nm_utils_bytes_from_dbus (GVariant *dbus_value,
|
2014-06-26 10:42:11 -04:00
|
|
|
GValue *prop_value);
|
|
|
|
|
|
2014-10-28 08:56:07 -04:00
|
|
|
char * _nm_utils_hwaddr_canonical_or_invalid (const char *mac, gssize length);
|
|
|
|
|
|
2020-03-23 19:29:24 +01:00
|
|
|
gboolean _nm_utils_hwaddr_link_local_valid (const char *mac);
|
|
|
|
|
|
2018-05-25 12:05:24 +02:00
|
|
|
gboolean _nm_sriov_vf_parse_vlans (NMSriovVF *vf, const char *str, GError **error);
|
2018-06-18 18:46:52 +02:00
|
|
|
|
2019-03-16 17:21:35 +01:00
|
|
|
gboolean _nm_utils_bridge_vlan_verify_list (GPtrArray *vlans,
|
|
|
|
|
gboolean check_normalizable,
|
|
|
|
|
GError **error,
|
|
|
|
|
const char *setting,
|
|
|
|
|
const char *property);
|
|
|
|
|
|
2014-07-24 08:53:33 -04:00
|
|
|
#endif
|