summaryrefslogtreecommitdiffstats
path: root/src/gsm/gsm48.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-09 23:07:02 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-16 12:54:18 +0000
commitdbd994c05ba1f9881f884a7aa1e7d88054b7492e (patch)
tree7b924e49dff4b6d5c23c6966775a977854a0d8e9 /src/gsm/gsm48.c
parentd80a217f7f20c8af38f938a85dd62f1809c09709 (diff)
add gsm48_pdisc_names and gsm48_pdisc_name()
I often want to log the protocol discriminator in the openbsc debug log. It's more useful to get the name directly instead of looking it up every time. Change-Id: I0f053e2a4360b27ffccda7cf82469fb1b1cbb3ae
Diffstat (limited to 'src/gsm/gsm48.c')
-rw-r--r--src/gsm/gsm48.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index b626f82b..d4088977 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -678,3 +678,22 @@ int gsm48_number_of_paging_subchannels(struct gsm48_control_channel_descr *chan_
else
return n_pag_blocks * (chan_desc->bs_pa_mfrms + 2);
}
+
+const struct value_string gsm48_pdisc_names[] = {
+ OSMO_VALUE_STRING(GSM48_PDISC_GROUP_CC),
+ OSMO_VALUE_STRING(GSM48_PDISC_BCAST_CC),
+ OSMO_VALUE_STRING(GSM48_PDISC_PDSS1),
+ OSMO_VALUE_STRING(GSM48_PDISC_CC),
+ OSMO_VALUE_STRING(GSM48_PDISC_PDSS2),
+ OSMO_VALUE_STRING(GSM48_PDISC_MM),
+ OSMO_VALUE_STRING(GSM48_PDISC_RR),
+ OSMO_VALUE_STRING(GSM48_PDISC_MM_GPRS),
+ OSMO_VALUE_STRING(GSM48_PDISC_SMS),
+ OSMO_VALUE_STRING(GSM48_PDISC_SM_GPRS),
+ OSMO_VALUE_STRING(GSM48_PDISC_NC_SS),
+ OSMO_VALUE_STRING(GSM48_PDISC_LOC),
+ OSMO_VALUE_STRING(GSM48_PDISC_EXTEND),
+ OSMO_VALUE_STRING(GSM48_PDISC_MASK),
+ OSMO_VALUE_STRING(GSM48_PDISC_USSD),
+ { 0, NULL }
+};