summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-04-06 04:31:00 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-04-09 17:57:15 +0200
commitaead241df0282344e068dbae4d4221dbad7a71d9 (patch)
tree0acaf85e570d44a4b068d6dca1266d63a7fe11af /src
parenta64c45a03e3b318b5fdc93c960670d89a5745271 (diff)
add gsm48_reject_value_names
There seems to be quite some confusion / overlap between enum gsm48_reject_value, gsm48_gsm_cause and gsm48_gmm_cause. I tried to go with gsm48_gsm_cause_names[], but e.g. GSM48_REJECT_CONGESTION is not represented. Instead of attempting to mix/merge those enums, provide a separate value string array for enum gsm48_reject_value. This will be used by osmo-msc's libvlr (refactoring of FSM result handling), I27bf8d68737ff1f8dc6d11fb1eac3d391aab0cb1. Change-Id: I6661f139e68a498fb1bef10c266c2f064b72774a
Diffstat (limited to 'src')
-rw-r--r--src/gsm/gsm48.c33
-rw-r--r--src/gsm/libosmogsm.map1
2 files changed, 34 insertions, 0 deletions
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index c2affaeb..468b2a9b 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -980,4 +980,37 @@ const char *gsm48_pdisc_msgtype_name(uint8_t pdisc, uint8_t msg_type)
return namebuf;
}
+const struct value_string gsm48_reject_value_names[] = {
+ { GSM48_REJECT_IMSI_UNKNOWN_IN_HLR, "IMSI_UNKNOWN_IN_HLR" },
+ { GSM48_REJECT_ILLEGAL_MS, "ILLEGAL_MS" },
+ { GSM48_REJECT_IMSI_UNKNOWN_IN_VLR, "IMSI_UNKNOWN_IN_VLR" },
+ { GSM48_REJECT_IMEI_NOT_ACCEPTED, "IMEI_NOT_ACCEPTED" },
+ { GSM48_REJECT_ILLEGAL_ME, "ILLEGAL_ME" },
+ { GSM48_REJECT_PLMN_NOT_ALLOWED, "PLMN_NOT_ALLOWED" },
+ { GSM48_REJECT_LOC_NOT_ALLOWED, "LOC_NOT_ALLOWED" },
+ { GSM48_REJECT_ROAMING_NOT_ALLOWED, "ROAMING_NOT_ALLOWED" },
+ { GSM48_REJECT_NETWORK_FAILURE, "NETWORK_FAILURE" },
+ { GSM48_REJECT_SYNCH_FAILURE, "SYNCH_FAILURE" },
+ { GSM48_REJECT_CONGESTION, "CONGESTION" },
+ { GSM48_REJECT_SRV_OPT_NOT_SUPPORTED, "SRV_OPT_NOT_SUPPORTED" },
+ { GSM48_REJECT_RQD_SRV_OPT_NOT_SUPPORTED, "RQD_SRV_OPT_NOT_SUPPORTED" },
+ { GSM48_REJECT_SRV_OPT_TMP_OUT_OF_ORDER, "SRV_OPT_TMP_OUT_OF_ORDER" },
+ { GSM48_REJECT_CALL_CAN_NOT_BE_IDENTIFIED, "CALL_CAN_NOT_BE_IDENTIFIED" },
+ { GSM48_REJECT_INCORRECT_MESSAGE, "INCORRECT_MESSAGE" },
+ { GSM48_REJECT_INVALID_MANDANTORY_INF, "INVALID_MANDANTORY_INF" },
+ { GSM48_REJECT_MSG_TYPE_NOT_IMPLEMENTED, "MSG_TYPE_NOT_IMPLEMENTED" },
+ { GSM48_REJECT_MSG_TYPE_NOT_COMPATIBLE, "MSG_TYPE_NOT_COMPATIBLE" },
+ { GSM48_REJECT_INF_ELEME_NOT_IMPLEMENTED, "INF_ELEME_NOT_IMPLEMENTED" },
+ { GSM48_REJECT_CONDTIONAL_IE_ERROR, "CONDTIONAL_IE_ERROR" },
+ { GSM48_REJECT_MSG_NOT_COMPATIBLE, "MSG_NOT_COMPATIBLE" },
+ { GSM48_REJECT_PROTOCOL_ERROR, "PROTOCOL_ERROR" },
+ { GSM48_REJECT_GPRS_NOT_ALLOWED, "GPRS_NOT_ALLOWED" },
+ { GSM48_REJECT_SERVICES_NOT_ALLOWED, "SERVICES_NOT_ALLOWED" },
+ { GSM48_REJECT_MS_IDENTITY_NOT_DERVIVABLE, "MS_IDENTITY_NOT_DERVIVABLE" },
+ { GSM48_REJECT_IMPLICITLY_DETACHED, "IMPLICITLY_DETACHED" },
+ { GSM48_REJECT_GPRS_NOT_ALLOWED_IN_PLMN, "GPRS_NOT_ALLOWED_IN_PLMN" },
+ { GSM48_REJECT_MSC_TMP_NOT_REACHABLE, "MSC_TMP_NOT_REACHABLE" },
+ { 0, NULL }
+};
+
/*! @} */
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index dd4722e3..31717d55 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -287,6 +287,7 @@ gsm48_rr_msgtype_names;
gsm48_mm_msgtype_names;
gsm48_cc_msgtype_names;
gsm48_pdisc_msgtype_name;
+gsm48_reject_value_names;
gsm_7bit_decode;
gsm_7bit_decode_ussd;