mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 05:10:36 +01:00
glib-aux: move NMIcmpv6RouterPref to libnm-glib-aux
This commit is contained in:
parent
3c733cc32e
commit
a016f24353
4 changed files with 23 additions and 21 deletions
|
|
@ -4860,13 +4860,6 @@ nm_wifi_utils_level_to_quality(int val)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NM_UTILS_ENUM2STR_DEFINE(nm_icmpv6_router_pref_to_string,
|
||||
NMIcmpv6RouterPref,
|
||||
NM_UTILS_ENUM2STR(NM_ICMPV6_ROUTER_PREF_LOW, "low"),
|
||||
NM_UTILS_ENUM2STR(NM_ICMPV6_ROUTER_PREF_MEDIUM, "medium"),
|
||||
NM_UTILS_ENUM2STR(NM_ICMPV6_ROUTER_PREF_HIGH, "high"),
|
||||
NM_UTILS_ENUM2STR(NM_ICMPV6_ROUTER_PREF_INVALID, "invalid"), );
|
||||
|
||||
NM_UTILS_LOOKUP_STR_DEFINE(nm_activation_type_to_string,
|
||||
NMActivationType,
|
||||
NM_UTILS_LOOKUP_DEFAULT_WARN("(unknown)"),
|
||||
|
|
|
|||
|
|
@ -413,20 +413,6 @@ char * nm_utils_format_con_diff_for_audit(GHashTable *diff);
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* this enum is compatible with ICMPV6_ROUTER_PREF_* (from <linux/icmpv6.h>,
|
||||
* the values for netlink attribute RTA_PREF) and "enum ndp_route_preference"
|
||||
* from <ndp.h>. */
|
||||
typedef enum _nm_packed {
|
||||
NM_ICMPV6_ROUTER_PREF_MEDIUM = 0x0, /* ICMPV6_ROUTER_PREF_MEDIUM */
|
||||
NM_ICMPV6_ROUTER_PREF_LOW = 0x3, /* ICMPV6_ROUTER_PREF_LOW */
|
||||
NM_ICMPV6_ROUTER_PREF_HIGH = 0x1, /* ICMPV6_ROUTER_PREF_HIGH */
|
||||
NM_ICMPV6_ROUTER_PREF_INVALID = 0x2, /* ICMPV6_ROUTER_PREF_INVALID */
|
||||
} NMIcmpv6RouterPref;
|
||||
|
||||
const char *nm_icmpv6_router_pref_to_string(NMIcmpv6RouterPref pref, char *buf, gsize len);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
const char *nm_activation_type_to_string(NMActivationType activation_type);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -1152,6 +1152,15 @@ nm_utils_ipaddr_is_normalized(int addr_family, const char *str_addr)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
NM_UTILS_ENUM2STR_DEFINE(nm_icmpv6_router_pref_to_string,
|
||||
NMIcmpv6RouterPref,
|
||||
NM_UTILS_ENUM2STR(NM_ICMPV6_ROUTER_PREF_LOW, "low"),
|
||||
NM_UTILS_ENUM2STR(NM_ICMPV6_ROUTER_PREF_MEDIUM, "medium"),
|
||||
NM_UTILS_ENUM2STR(NM_ICMPV6_ROUTER_PREF_HIGH, "high"),
|
||||
NM_UTILS_ENUM2STR(NM_ICMPV6_ROUTER_PREF_INVALID, "invalid"), );
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* nm_g_ascii_strtoll()
|
||||
* @nptr: the string to parse
|
||||
|
|
|
|||
|
|
@ -501,6 +501,20 @@ gboolean nm_utils_ipaddr_is_normalized(int addr_family, const char *str_addr);
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* this enum is compatible with ICMPV6_ROUTER_PREF_* (from <linux/icmpv6.h>,
|
||||
* the values for netlink attribute RTA_PREF) and "enum ndp_route_preference"
|
||||
* from <ndp.h>. */
|
||||
typedef enum _nm_packed {
|
||||
NM_ICMPV6_ROUTER_PREF_MEDIUM = 0x0, /* ICMPV6_ROUTER_PREF_MEDIUM */
|
||||
NM_ICMPV6_ROUTER_PREF_LOW = 0x3, /* ICMPV6_ROUTER_PREF_LOW */
|
||||
NM_ICMPV6_ROUTER_PREF_HIGH = 0x1, /* ICMPV6_ROUTER_PREF_HIGH */
|
||||
NM_ICMPV6_ROUTER_PREF_INVALID = 0x2, /* ICMPV6_ROUTER_PREF_INVALID */
|
||||
} NMIcmpv6RouterPref;
|
||||
|
||||
const char *nm_icmpv6_router_pref_to_string(NMIcmpv6RouterPref pref, char *buf, gsize len);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
gboolean nm_utils_memeqzero(gconstpointer data, gsize length);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue