diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2020-05-12 23:21:56 +0300 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2020-05-13 00:46:00 +0300 |
commit | fdfe25b1056c51bdd8710de37b6d9aa3df950522 (patch) | |
tree | 3ee7ad50dafbc87db040754850655b073001caff /include | |
parent | 3c0a87ca4b25da5fdf9229418ab6fecd9c12cbcd (diff) |
gsm0808: Make a function to extract Cause IE publicly available.
Function gsm0808_get_cipher_reject_cause() was previously available
in private gsm0808_utils.h. In practice, the exact same code is useful
to extract Cause IE value from any of the many other BSSMAP messages
which use it.
So let's rename it to gsm0808_get_cause() and make it avilable
to everyone to use.
Change-Id: Idf2b99e9ef014eba26e3d4f0f38c2714d3a0520a
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gsm/gsm0808.h | 4 | ||||
-rw-r--r-- | include/osmocom/gsm/gsm0808_utils.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 373b4341..5a33f605 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -315,6 +315,10 @@ const char *gsm0808_bssap_name(uint8_t msg_type); const char *gsm0808_cause_name(enum gsm0808_cause cause); const char *gsm0808_cause_class_name(enum gsm0808_cause_class class); +/*! Parse Cause TLV 3GPP TS 08.08 ยง3.2.2.5 + * \returns Cause value */ +enum gsm0808_cause gsm0808_get_cause(const struct tlv_parsed *tp); + 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[]; diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index ccdf5ed9..1cdca8c6 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -155,8 +155,6 @@ static inline bool gsm0808_cause_ext(enum gsm0808_cause cause) return (cause & 0x80) && !(cause & 0x0F); } -int gsm0808_get_cipher_reject_cause(const struct tlv_parsed *tp); - /*! \returns 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum gsm_chan_t. */ static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type) { |