]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add fr_htrie_type_to_str
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 15 Apr 2024 03:09:19 +0000 (23:09 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 15 Apr 2024 03:09:19 +0000 (23:09 -0400)
src/lib/util/htrie.h

index 809bb4324c97b5e3b82d912cd455a493a155a1ab..06407e295505747b2528e67e686ed46dd7e6e015 100644 (file)
@@ -175,6 +175,18 @@ static inline fr_htrie_type_t fr_htrie_hint(fr_type_t type)
        return FR_HTRIE_INVALID;
 }
 
+/** Return a static string containing the type name
+ *
+ * @param[in] type to return name for.
+ * @return name of the type
+ *
+ * @hidecallergraph
+ */
+static inline char const *fr_htrie_type_to_str(fr_htrie_type_t type)
+{
+       return fr_table_str_by_value(fr_htrie_type_table, type, "<INVALID>");
+}
+
 #ifdef __cplusplus
 }
 #endif