aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gprs
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-01-06 20:56:43 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2021-01-18 21:11:44 +0100
commit7450f77f5786a0d096f37aa4b90268c143ffd4a8 (patch)
tree8f40ecd25473bd9c2fa56b55c87bc9c925e74a65 /include/osmocom/gprs
parent9828d28fc37cf12a447759335c56573671700c18 (diff)
bssgp_rim: move bssgp_parse_rim_ri and bssgp_create_rim_ri to gprs_bssgp_rim
The function bssgp_parse_rim_ri() and bssgp_create_rim_ri() are located in gprs_bssgp.c, since there is now a gprs_bssgp_rim.c module it makes more sense to put them there. Also adjust the code a bit so that its more intuitive to read. Change-Id: Icd667f41d5735de56cd9fb257670337c679dd258 Related: SYS#5103
Diffstat (limited to 'include/osmocom/gprs')
-rw-r--r--include/osmocom/gprs/gprs_bssgp.h31
-rw-r--r--include/osmocom/gprs/gprs_bssgp_rim.h30
2 files changed, 30 insertions, 31 deletions
diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h
index d228c53c..92556615 100644
--- a/include/osmocom/gprs/gprs_bssgp.h
+++ b/include/osmocom/gprs/gprs_bssgp.h
@@ -178,37 +178,6 @@ uint16_t bssgp_parse_cell_id(struct gprs_ra_id *raid, const uint8_t *buf);
int bssgp_create_cell_id(uint8_t *buf, const struct gprs_ra_id *raid,
uint16_t cid);
-enum bssgp_rim_routing_info_discr {
- BSSGP_RIM_ROUTING_INFO_GERAN,
- BSSGP_RIM_ROUTING_INFO_UTRAN,
- BSSGP_RIM_ROUTING_INFO_EUTRAN,
-};
-
-/*! BSSGP RIM Routing information, see also 3GPP TS 48.018, section 11.3.70 */
-struct bssgp_rim_routing_info {
- enum bssgp_rim_routing_info_discr discr;
- union {
- struct {
- struct gprs_ra_id raid;
- uint16_t cid;
- } geran;
- struct {
- struct gprs_ra_id raid;
- uint16_t rncid;
- } utran;
- struct {
- struct osmo_eutran_tai tai;
- /* See also 3GPP TS 36.413 9.2.1.37 and 3GPP TS 36.401 */
- uint8_t global_enb_id[8];
- uint8_t global_enb_id_len;
- } eutran;
- };
-};
-
-int bssgp_parse_rim_ri(struct bssgp_rim_routing_info *ri, const uint8_t *buf,
- unsigned int len);
-int bssgp_create_rim_ri(uint8_t *buf, const struct bssgp_rim_routing_info *ri);
-
/* Wrapper around TLV parser to parse BSSGP IEs */
static inline int bssgp_tlv_parse(struct tlv_parsed *tp, const uint8_t *buf, int len)
{
diff --git a/include/osmocom/gprs/gprs_bssgp_rim.h b/include/osmocom/gprs/gprs_bssgp_rim.h
index 0612a910..7f3a0e43 100644
--- a/include/osmocom/gprs/gprs_bssgp_rim.h
+++ b/include/osmocom/gprs/gprs_bssgp_rim.h
@@ -27,6 +27,36 @@
#include <osmocom/gprs/protocol/gsm_08_18.h>
+enum bssgp_rim_routing_info_discr {
+ BSSGP_RIM_ROUTING_INFO_GERAN,
+ BSSGP_RIM_ROUTING_INFO_UTRAN,
+ BSSGP_RIM_ROUTING_INFO_EUTRAN,
+};
+
+/*! BSSGP RIM Routing information, see also 3GPP TS 48.018, section 11.3.70 */
+struct bssgp_rim_routing_info {
+ enum bssgp_rim_routing_info_discr discr;
+ union {
+ struct {
+ struct gprs_ra_id raid;
+ uint16_t cid;
+ } geran;
+ struct {
+ struct gprs_ra_id raid;
+ uint16_t rncid;
+ } utran;
+ struct {
+ struct osmo_eutran_tai tai;
+ /* See also 3GPP TS 36.413 9.2.1.37 and 3GPP TS 36.401 */
+ uint8_t global_enb_id[8];
+ uint8_t global_enb_id_len;
+ } eutran;
+ };
+};
+
+int bssgp_parse_rim_ri(struct bssgp_rim_routing_info *ri, const uint8_t *buf, unsigned int len);
+int bssgp_create_rim_ri(uint8_t *buf, const struct bssgp_rim_routing_info *ri);
+
/* 3GPP TS 48.018, table 11.3.63.1.1: RAN-INFORMATION-REQUEST Application Container coding for NACC */
struct bssgp_ran_inf_req_app_cont_nacc {
struct osmo_cell_global_id_ps reprt_cell;