summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-01-16 18:06:05 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-01-17 14:38:22 +0100
commitd3e28faa35ff60737347dd5194ea852b5d799356 (patch)
tree1571f08dd3d170d03e10c1d694ffc508fed24ea6 /include
parent61d890f88f1a46131ed75a95020756e4c8b29eb2 (diff)
sccp: Add value_string for SCCP message types
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/sccp/sccp_types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/sccp/sccp_types.h b/include/osmocom/sccp/sccp_types.h
index 18b54f4..71cbb0f 100644
--- a/include/osmocom/sccp/sccp_types.h
+++ b/include/osmocom/sccp/sccp_types.h
@@ -26,6 +26,7 @@
#include <stdint.h>
#include <osmocom/core/endian.h>
+#include <osmocom/core/utils.h>
/* Table 1/Q.713 - SCCP message types */
enum sccp_message_types {
@@ -51,6 +52,10 @@ enum sccp_message_types {
SCCP_MSG_TYPE_LUDTS = 20
};
+extern const struct value_string osmo_sccp_msg_type_names[];
+static inline const char *osmo_sccp_msg_type_name(enum sccp_message_types val)
+{ return get_value_string(osmo_sccp_msg_type_names, val); }
+
/* Table 2/Q.713 - SCCP parameter name codes */
enum sccp_parameter_name_codes {
SCCP_PNC_END_OF_OPTIONAL = 0,