From 10f5fb49dbe8e79390758d8a83e826865d76929d Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 9 Feb 2017 02:09:09 +0100 Subject: gsup: add osmo_gsup_message_type_name() Change-Id: Ic29b588b72893821d73fe90ecc16c6bf78d5a360 --- include/osmocom/gsm/gsup.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index e2912a64..04b31d0b 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -95,6 +95,11 @@ enum osmo_gsup_message_type { #define OSMO_GSUP_IS_MSGT_ERROR(msgt) (((msgt) & 0b00000011) == 0b01) #define OSMO_GSUP_TO_MSGT_ERROR(msgt) (((msgt) & 0b11111100) | 0b01) +extern const struct value_string osmo_gsup_message_type_names[]; +static inline const char * +osmo_gsup_message_type_name(enum osmo_gsup_message_type val) +{ return get_value_string(osmo_gsup_message_type_names, val); } + enum osmo_gsup_cancel_type { OSMO_GSUP_CANCEL_TYPE_UPDATE = 1, /* on wire: 0 */ OSMO_GSUP_CANCEL_TYPE_WITHDRAW = 2, /* on wire: 1 */ -- cgit v1.2.3