summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/gsm/gsm0808.h15
-rw-r--r--src/gsm/gsm0808.c33
-rw-r--r--src/gsm/libosmogsm.map3
3 files changed, 51 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index 84029575..d704aa91 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -27,6 +27,7 @@
#include <osmocom/gsm/protocol/gsm_08_08.h>
#include <osmocom/gsm/gsm0808_utils.h>
#include <osmocom/gsm/gsm23003.h>
+#include <osmocom/core/utils.h>
struct sockaddr_storage;
@@ -135,4 +136,18 @@ const char *gsm0808_bssmap_name(uint8_t msg_type);
const char *gsm0808_bssap_name(uint8_t msg_type);
const char *gsm0808_cause_name(uint8_t cause);
+extern const struct value_string gsm0808_lcls_config_names[];
+extern const struct value_string gsm0808_lcls_control_names[];
+extern const struct value_string gsm0808_lcls_status_names[];
+
+static inline const char *gsm0808_lcls_config_name(uint8_t val) {
+ return get_value_string(gsm0808_lcls_config_names, val);
+}
+static inline const char *gsm0808_lcls_control_name(uint8_t val) {
+ return get_value_string(gsm0808_lcls_control_names, val);
+}
+static inline const char *gsm0808_lcls_status_name(uint8_t val) {
+ return get_value_string(gsm0808_lcls_status_names, val);
+}
+
/*! @} */
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 347e9855..3a631372 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -1144,4 +1144,37 @@ const char *gsm0808_cause_name(uint8_t cause)
return get_value_string(gsm0808_cause_names, cause);
}
+const struct value_string gsm0808_lcls_config_names[] = {
+ { GSM0808_LCLS_CFG_BOTH_WAY, "Connect both-way" },
+ { GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL,
+ "Connect both-way, bi-cast UL to CN" },
+ { GSM0808_LCLS_CFG_BOTH_WAY_AND_SEND_DL,
+ "Connect both-way, send access DL from CN" },
+ { GSM0808_LCLS_CFG_BOTH_WAY_AND_SEND_DL_BLOCK_LOCAL_DL,
+ "Connect both-way, send access DL from CN, block local DL" },
+ { GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL_SEND_DL,
+ "Connect both-way, bi-cast UL to CN, send access DL from CN" },
+ { GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL_SEND_DL_BLOCK_LOCAL_DL,
+ "Connect both-way, bi-cast UL to CN, send access DL from CN, block local DL" },
+ { 0, NULL }
+};
+
+const struct value_string gsm0808_lcls_control_names[] = {
+ { GSM0808_LCLS_CSC_CONNECT, "Connect" },
+ { GSM0808_LCLS_CSC_DO_NOT_CONNECT, "Do not connect" },
+ { GSM0808_LCLS_CSC_RELEASE_LCLS, "Release LCLS" },
+ { GSM0808_LCLS_CSC_BICAST_UL_AT_HANDOVER, "Bi-cast UL at Handover" },
+ { GSM0808_LCLS_CSC_BICAST_UL_AND_RECV_DL_AT_HANDOVER, "Bi-cast UL and receive DL at Handover" },
+ { 0, NULL }
+};
+
+const struct value_string gsm0808_lcls_status_names[] = {
+ { GSM0808_LCLS_STS_NOT_YET_LS, "Call not yet locally switched" },
+ { GSM0808_LCLS_STS_NOT_POSSIBLE_LS, "Call not possible to be locally switched" },
+ { GSM0808_LCLS_STS_NO_LONGER_LS, "Call is no longer locally switched" },
+ { GSM0808_LCLS_STS_REQ_LCLS_NOT_SUPP, "Requested LCLS configuration is not supported" },
+ { GSM0808_LCLS_STS_LOCALLY_SWITCHED, "Call is locally switched with requested LCLS config" },
+ { 0, NULL }
+};
+
/*! @} */
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index c05b4eeb..117cecfa 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -195,6 +195,9 @@ gsm0808_chan_type_to_speech_codec;
gsm0808_speech_codec_from_chan_type;
gsm0808_speech_codec_type_names;
gsm0808_channel_type_name;
+gsm0808_lcls_config_names;
+gsm0808_lcls_control_names;
+gsm0808_lcls_status_names;
gsm0858_rsl_ul_meas_enc;