From b1a35d63b9ad888429216276d060429d0991aaf7 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 16 Jun 2018 18:34:52 +0200 Subject: gsm 04.80: Add value_string for component type and op code Change-Id: I2615a88db5224d65f37c7cc505e183ec8b196e8a --- include/osmocom/gsm/gsm0480.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/gsm0480.h b/include/osmocom/gsm/gsm0480.h index fafa1f4b..e928d83f 100644 --- a/include/osmocom/gsm/gsm0480.h +++ b/include/osmocom/gsm/gsm0480.h @@ -7,6 +7,16 @@ #include #include +extern const struct value_string gsm0480_comp_type_names[]; +static inline const char *gsm0480_comp_type_name(uint8_t comp_type) { + return get_value_string(gsm0480_comp_type_names, comp_type); +} + +extern const struct value_string gsm0480_op_code_names[]; +static inline const char *gsm0480_op_code_name(uint8_t op_code) { + return get_value_string(gsm0480_op_code_names, op_code); +} + /** * According to the GSM 04.80 (version 5.0.0) specification Annex A * "Expanded ASN.1 Module "SS-Protocol", the maximum size of a USSD -- cgit v1.2.3