summaryrefslogtreecommitdiffstats
path: root/src/gsm
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-08-16 17:56:25 +0200
committerHarald Welte <laforge@gnumonks.org>2015-08-18 19:32:33 +0200
commit1a8c4e05fbf51662e3ffe47ed64c20f4752e2563 (patch)
treef41fdfd37d6a8adf20b48dfcaa90c5dc8f675a71 /src/gsm
parent1f6aad1c042f3040ac62696fc38c65a875862b6a (diff)
Introduce gsm48_mi_type_name() function
Diffstat (limited to 'src/gsm')
-rw-r--r--src/gsm/gsm48.c14
-rw-r--r--src/gsm/libosmogsm.map1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 80f75024..48b22c75 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -254,6 +254,20 @@ const char *rr_cause_name(uint8_t cause)
return get_value_string(rr_cause_names, cause);
}
+static const struct value_string mi_type_names[] = {
+ { GSM_MI_TYPE_NONE, "NONE" },
+ { GSM_MI_TYPE_IMSI, "IMSI" },
+ { GSM_MI_TYPE_IMEI, "IMEI" },
+ { GSM_MI_TYPE_IMEISV, "IMEI-SV" },
+ { GSM_MI_TYPE_TMSI, "TMSI" },
+ { 0, NULL }
+};
+
+const char *gsm48_mi_type_name(uint8_t mi)
+{
+ return get_value_string(mi_type_names, mi);
+}
+
static void to_bcd(uint8_t *bcd, uint16_t val)
{
bcd[2] = val % 10;
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index c2914284..0c0d9f77 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -137,6 +137,7 @@ gsm48_mm_att_tlvdef;
gsm48_number_of_paging_subchannels;
gsm48_parse_ra;
gsm48_rr_att_tlvdef;
+gsm48_mi_type_name;
gsm_7bit_decode;
gsm_7bit_decode_ussd;