summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/gsm/protocol/gsm_04_08.h4
-rw-r--r--src/gsm/gsm48.c8
-rw-r--r--src/gsm/libosmogsm.map1
3 files changed, 13 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index a97225c5..791fbd4e 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -1652,6 +1652,10 @@ const char *gsm48_pdisc_msgtype_name(uint8_t pdisc, uint8_t msg_type);
#define GSM48_LUPD_IMSI_ATT 0x2
#define GSM48_LUPD_RESERVED 0x3
+extern const struct value_string osmo_lu_type_names[];
+static inline const char *osmo_lu_type_name(uint8_t lu_type)
+{ return get_value_string(osmo_lu_type_names, lu_type); }
+
/* Table 10.5.4 */
#define GSM_MI_TYPE_MASK 0x07
#define GSM_MI_TYPE_NONE 0x00
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 853ea513..099b85d0 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -1137,4 +1137,12 @@ struct gsm48_hdr *gsm48_push_l3hdr(struct msgb *msg,
return gh;
}
+const struct value_string osmo_lu_type_names[] = {
+ { GSM48_LUPD_NORMAL, "NORMAL" },
+ { GSM48_LUPD_PERIODIC, "PERIODIC" },
+ { GSM48_LUPD_IMSI_ATT, "IMSI-ATTACH" },
+ { GSM48_LUPD_RESERVED, "RESERVED" },
+ {}
+};
+
/*! @} */
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 8b7a1641..cdcbcc98 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -555,6 +555,7 @@ sgsap_ue_emm_mode_names;
sgsap_ie_tlvdef;
osmo_rat_type_names;
+osmo_lu_type_names;
local: *;
};