summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-03-04 11:15:18 +0100
committerThomas Haller <thaller@redhat.com>2021-03-05 11:09:15 +0100
commita016f243532cf5f2b2e5d92b9e2796aeb6757327 (patch)
treea5dacf5c2a40e59d21aea2bd8cd93d8e51d10e7a
parent3c733cc32eb5332722b0dd8aa34e95db7e2df539 (diff)
downloadNetworkManager-a016f243532cf5f2b2e5d92b9e2796aeb6757327.tar.gz
glib-aux: move NMIcmpv6RouterPref to libnm-glib-aux
-rw-r--r--src/core/nm-core-utils.c7
-rw-r--r--src/core/nm-core-utils.h14
-rw-r--r--src/libnm-glib-aux/nm-shared-utils.c9
-rw-r--r--src/libnm-glib-aux/nm-shared-utils.h14
4 files changed, 23 insertions, 21 deletions
diff --git a/src/core/nm-core-utils.c b/src/core/nm-core-utils.c
index 82360bdd8c..6d6c8ef920 100644
--- a/src/core/nm-core-utils.c
+++ b/src/core/nm-core-utils.c
@@ -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)"),
diff --git a/src/core/nm-core-utils.h b/src/core/nm-core-utils.h
index 1ab72c4ab8..91ebbe8d26 100644
--- a/src/core/nm-core-utils.h
+++ b/src/core/nm-core-utils.h
@@ -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);
/*****************************************************************************/
diff --git a/src/libnm-glib-aux/nm-shared-utils.c b/src/libnm-glib-aux/nm-shared-utils.c
index 08dec9c654..8abcc7842a 100644
--- a/src/libnm-glib-aux/nm-shared-utils.c
+++ b/src/libnm-glib-aux/nm-shared-utils.c
@@ -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
diff --git a/src/libnm-glib-aux/nm-shared-utils.h b/src/libnm-glib-aux/nm-shared-utils.h
index 8bb94cb73e..1c39e1964a 100644
--- a/src/libnm-glib-aux/nm-shared-utils.h
+++ b/src/libnm-glib-aux/nm-shared-utils.h
@@ -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);
/*****************************************************************************/