diff options
| author | Michael Biebl <biebl@debian.org> | 2019-02-26 19:01:41 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-02-26 19:01:41 +0100 |
| commit | 964ae8cc391520440cf5aa13e2b9cc34850ea6c2 (patch) | |
| tree | 50da9ecaee7fbb612ec18f9e24f7dec215bf7861 /libnm-core/nm-core-internal.h | |
| parent | 3626b425d1bc017fdc6f1ea0cfd329d1e1681641 (diff) | |
New upstream version 1.14.6 upstream/1.14.6
Diffstat (limited to 'libnm-core/nm-core-internal.h')
| -rw-r--r-- | libnm-core/nm-core-internal.h | 60 |
1 files changed, 50 insertions, 10 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index f0d4e40f..9d2d0f2c 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -101,6 +101,11 @@ #define NM_BR_MIN_AGEING_TIME 0 #define NM_BR_MAX_AGEING_TIME 1000000 +#define NM_BR_PORT_MAX_PRIORITY 63 +#define NM_BR_PORT_DEF_PRIORITY 32 + +#define NM_BR_PORT_MAX_PATH_COST 65535 + /* NM_SETTING_COMPARE_FLAG_INFERRABLE: check whether a device-generated * connection can be replaced by a already-defined connection. This flag only * takes into account properties marked with the %NM_SETTING_PARAM_INFERRABLE @@ -174,6 +179,13 @@ NMSettingPriority _nm_setting_get_setting_priority (NMSetting *setting); gboolean _nm_setting_get_property (NMSetting *setting, const char *name, GValue *value); +/* NM_CONNECTION_SERIALIZE_NO_SYNTH: This flag is passed to _nm_setting_to_dbus() + * by nm_setting_to_string() to let it know that it shouldn't serialize the + * synthetic properties. It wouldn't be able to do so, since the full connection + * is not available, only the setting alone. + */ +#define NM_CONNECTION_SERIALIZE_NO_SYNTH ((NMConnectionSerializationFlags) 0x80000000) + /*****************************************************************************/ GHashTable *_nm_setting_gendata_hash (NMSetting *setting, @@ -212,15 +224,26 @@ guint nm_setting_ethtool_init_features (NMSettingEthtool *setting, guint8 *_nm_utils_hwaddr_aton (const char *asc, gpointer buffer, gsize buffer_length, gsize *out_length); const char *nm_utils_hwaddr_ntoa_buf (gconstpointer addr, gsize addr_len, gboolean upper_case, char *buf, gsize buf_len); -char *_nm_utils_bin2str (gconstpointer addr, gsize length, gboolean upper_case); -void _nm_utils_bin2str_full (gconstpointer addr, gsize length, const char delimiter, gboolean upper_case, char *out); +char *_nm_utils_bin2hexstr_full (gconstpointer addr, gsize length, const char delimiter, gboolean upper_case, char *out); + +guint8 *_nm_utils_hexstr2bin_full (const char *hexstr, + gboolean allow_0x_prefix, + gboolean delimiter_required, + const char *delimiter_candidates, + gsize required_len, + guint8 *buffer, + gsize buffer_len, + gsize *out_len); + +#define _nm_utils_hexstr2bin_buf(hexstr, allow_0x_prefix, delimiter_required, delimiter_candidates, buffer) \ + _nm_utils_hexstr2bin_full ((hexstr), (allow_0x_prefix), (delimiter_required), (delimiter_candidates), G_N_ELEMENTS (buffer), (buffer), G_N_ELEMENTS (buffer), NULL) -guint8 *_nm_utils_str2bin_full (const char *asc, - gboolean delimiter_required, - const char *delimiter_candidates, - guint8 *buffer, - gsize buffer_length, - gsize *out_len); +guint8 *_nm_utils_hexstr2bin_alloc (const char *hexstr, + gboolean allow_0x_prefix, + gboolean delimiter_required, + const char *delimiter_candidates, + gsize required_len, + gsize *out_len); GSList * _nm_utils_hash_values_to_slist (GHashTable *hash); @@ -234,7 +257,7 @@ gboolean _nm_ip_route_attribute_validate_all (const NMIPRoute *route); const char **_nm_ip_route_get_attribute_names (const NMIPRoute *route, gboolean sorted, guint *out_length); GHashTable *_nm_ip_route_get_attributes_direct (NMIPRoute *route); -NMSriovVF *_nm_utils_sriov_vf_from_strparts (const char *index, const char *detail, GError **error); +NMSriovVF *_nm_utils_sriov_vf_from_strparts (const char *index, const char *detail, gboolean ignore_unknown, GError **error); gboolean _nm_sriov_vf_attribute_validate_all (const NMSriovVF *vf, GError **error); static inline void @@ -272,8 +295,25 @@ gboolean _nm_utils_check_module_file (const char *name, gpointer user_data, GError **error); +/*****************************************************************************/ + +typedef struct _NMUuid { + guchar uuid[16]; +} NMUuid; + +NMUuid *_nm_utils_uuid_parse (const char *str, + NMUuid *uuid); +char *_nm_utils_uuid_unparse (const NMUuid *uuid, + char *out_str /*[37]*/); +NMUuid *_nm_utils_uuid_generate_random (NMUuid *out_uuid); + +gboolean nm_utils_uuid_is_null (const NMUuid *uuid); + #define NM_UTILS_UUID_TYPE_LEGACY 0 -#define NM_UTILS_UUID_TYPE_VARIANT3 1 +#define NM_UTILS_UUID_TYPE_VERSION3 3 +#define NM_UTILS_UUID_TYPE_VERSION5 5 + +NMUuid *nm_utils_uuid_generate_from_string_bin (NMUuid *uuid, const char *s, gssize slen, int uuid_type, gpointer type_args); char *nm_utils_uuid_generate_from_string (const char *s, gssize slen, int uuid_type, gpointer type_args); |