From: Arran Cudbard-Bell Date: Mon, 15 Apr 2024 03:09:19 +0000 (-0400) Subject: Add fr_htrie_type_to_str X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9fa6af5418bb35bf6d4e03489fae06967614154;p=thirdparty%2Ffreeradius-server.git Add fr_htrie_type_to_str --- diff --git a/src/lib/util/htrie.h b/src/lib/util/htrie.h index 809bb4324c9..06407e29550 100644 --- a/src/lib/util/htrie.h +++ b/src/lib/util/htrie.h @@ -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, ""); +} + #ifdef __cplusplus } #endif