diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-16 22:42:09 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-06-18 17:32:58 +0000 |
commit | 60f3153125fc07d406df90cde58ea658c929f5f8 (patch) | |
tree | be054546ea996b149362b661ec7cc99b38e6f452 /include | |
parent | 1eb270bda845586e6c8d54f01c49b493d248a9d6 (diff) |
add and tweak inter-BSC HO API
Add:
gsm0808_create_handover_detect()
gsm0808_create_handover_complete()
gsm0808_create_handover_failure()
To existing structs gsm0808_old_bss_to_new_bss_info and
gsm0808_handover_required, add a final 'more_items' flag that makes future
extensions API and ABI compatible.
Fix the msgb string for Handover Request Ack.
Extend some API doc comments.
Related: OS#2283 (inter-BSC Handover, BSC side, MT)
Change-Id: I03ee7ce840ecfa0b6a33358e7385528aabd4873f
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gsm/gsm0808.h | 40 | ||||
-rw-r--r-- | include/osmocom/gsm/gsm_utils.h | 2 |
2 files changed, 42 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index d704aa91..5ae0af83 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -103,6 +103,7 @@ struct gsm0808_old_bss_to_new_bss_info { } current_channel_type_2; /* more items are defined in the spec and may be added later */ + bool more_items; /*< always set this to false */ }; /*! 3GPP TS 48.008 ยง3.2.1.9 HANDOVER REQUIRED */ @@ -120,6 +121,7 @@ struct gsm0808_handover_required { struct gsm0808_old_bss_to_new_bss_info old_bss_to_new_bss_info; /* more items are defined in the spec and may be added later */ + bool more_items; /*< always set this to false */ }; struct msgb *gsm0808_create_handover_required(const struct gsm0808_handover_required *params); @@ -127,6 +129,44 @@ struct msgb *gsm0808_create_handover_request_ack(const uint8_t *l3_info, uint8_t uint8_t chosen_channel, uint8_t chosen_encr_alg, uint8_t chosen_speech_version); +struct msgb *gsm0808_create_handover_detect(); + +struct gsm0808_handover_complete { + bool rr_cause_present; + uint8_t rr_cause; + + bool speech_codec_chosen_present; + struct gsm0808_speech_codec speech_codec_chosen; + + struct gsm0808_speech_codec_list codec_list_bss_supported; /*< omit when .len == 0 */ + + bool chosen_encr_alg_present; + uint8_t chosen_encr_alg; + + bool chosen_channel_present; + uint8_t chosen_channel; + + bool lcls_bss_status_present; + enum gsm0808_lcls_status lcls_bss_status; + + /* more items are defined in the spec and may be added later */ + bool more_items; /*< always set this to false */ +}; +struct msgb *gsm0808_create_handover_complete(const struct gsm0808_handover_complete *params); + +struct gsm0808_handover_failure { + uint16_t cause; + + bool rr_cause_present; + uint8_t rr_cause; + + struct gsm0808_speech_codec_list codec_list_bss_supported; /*< omit when .len == 0 */ + + /* more items are defined in the spec and may be added later */ + bool more_items; /*< always set this to false */ +}; +struct msgb *gsm0808_create_handover_failure(const struct gsm0808_handover_failure *params); + struct msgb *gsm0808_create_dtap(struct msgb *msg, uint8_t link_id); void gsm0808_prepend_dtap_header(struct msgb *msg, uint8_t link_id); diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 83e29cac..6ff44598 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -30,6 +30,8 @@ #include <osmocom/core/defs.h> #include <osmocom/core/utils.h> +#include <osmocom/gsm/protocol/gsm_08_08.h> +#include <osmocom/gsm/protocol/gsm_04_08.h> #define ADD_MODULO(sum, delta, modulo) do { \ if ((sum += delta) >= modulo) \ |