summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-06 17:16:41 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-07-12 20:58:23 +0200
commitf2cda621c01a5a5ee4be2a35d276adc1cc86cc80 (patch)
tree633bf7c1e9bde8c819f7b5d9072959c4ff87aa4c
parent40ad91330d6ceb9d429ad5943128b2faf5bfa0f0 (diff)
gsm0808: Add value_string for encryption algorithms
Change-Id: Iadf6460c438d02c53c2eaa9e42d51844ad28859a
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h1
-rw-r--r--src/gsm/gsm0808.c12
-rw-r--r--src/gsm/libosmogsm.map1
3 files changed, 14 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index bd5705f1..69007b5c 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -463,6 +463,7 @@ enum gsm0808_chosen_enc_alg {
GSM0808_ALG_ID_A5_6 = 0x07,
GSM0808_ALG_ID_A5_7 = 0x08,
};
+extern const struct value_string gsm0808_chosen_enc_alg_names[];
/* GSM 08.08 3.2.2.85 Paging Information */
enum gsm0808_paging_info {
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index a26addd4..a90aa227 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -1167,6 +1167,18 @@ const struct value_string gsm0808_permitted_speech_names[] = {
{ 0, NULL }
};
+const struct value_string gsm0808_chosen_enc_alg_names[] = {
+ { GSM0808_ALG_ID_A5_0, "A5/0" },
+ { GSM0808_ALG_ID_A5_1, "A5/1" },
+ { GSM0808_ALG_ID_A5_2, "A5/2" },
+ { GSM0808_ALG_ID_A5_3, "A5/3" },
+ { GSM0808_ALG_ID_A5_4, "A5/4" },
+ { GSM0808_ALG_ID_A5_5, "A5/5" },
+ { GSM0808_ALG_ID_A5_6, "A5/6" },
+ { GSM0808_ALG_ID_A5_7, "A5/7" },
+ { 0, NULL }
+};
+
static const struct value_string gsm0808_cause_names[] = {
{ GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE, "RADIO INTERFACE MESSAGE FAILURE" },
{ GSM0808_CAUSE_RADIO_INTERFACE_FAILURE, "RADIO INTERFACE FAILURE" },
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 5eed5b56..3b403c2b 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -202,6 +202,7 @@ gsm0808_chan_type_to_speech_codec;
gsm0808_speech_codec_from_chan_type;
gsm0808_speech_codec_type_names;
gsm0808_permitted_speech_names;
+gsm0808_chosen_enc_alg_names;
gsm0808_channel_type_name;
gsm0808_lcls_config_names;
gsm0808_lcls_control_names;