summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-09-25 13:05:40 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-09-25 13:07:45 +0200
commitb066305016141606e7f031065dc71c2002a6af0a (patch)
tree2062ac9e4b248d5ee2255f5df641bdb84f67ae61 /include/osmocom/gsm
parent5398911ddb03f994de8bbda73d41810c40fb0245 (diff)
gsm_utils: add function to get value strings for gsm48_chan_mode
The enum gsm48_chan_mode has value strings, but no function to retrieve those strings. Lets add one. Change-Id: If715705e1ebdfcfdfae1c2099932f7bb8b3861a7
Diffstat (limited to 'include/osmocom/gsm')
-rw-r--r--include/osmocom/gsm/gsm_utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h
index 6ff44598..7eda5b9f 100644
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -228,6 +228,8 @@ enum gsm_chan_t {
};
extern const struct value_string gsm_chan_t_names[];
+static inline const char *gsm_chan_t_name(enum gsm48_chan_mode val)
+{ return get_value_string(gsm_chan_t_names, val); }
/* Deprectated functions */
/* Limit encoding and decoding to use no more than this amount of buffer bytes */