diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-21 14:45:13 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-03-22 05:23:11 +0100 |
commit | 408856088bcf376f5317803fd8d1747f8b920054 (patch) | |
tree | 9266e5698859483ef5b359f4d6f2e3e7cdd4f109 /openbsc/include | |
parent | 8469818e33ef81e9f707a0c4dd13d7b91ecf83f5 (diff) |
backport support for 3-digit MNC with leading zerosneels/mnc3
Backport the patches with the following change-ids:
osmo-bsc.git:
I5b097dbb6329f284e3b4914a744d5c3ad628f715
I8e722103344186fde118b26d8353db95a4581daa
I78f30aef7aa224b2e9db54c3a844d8f520b3aee0
I38ac98a4d25159cfd4f686efbfbaf8f00625a6d8
osmo-iuh.git:
I29ebcddd45fe3079f8883589a83cc7216a535475
Also apply change of ipac_bcch_info.cgi to struct osmo_cell_global_id in
src/ipaccess/network_listen.c, a change that appears to not have been necessary
in the new split repositories.
Related: OS#3010
Change-Id: Ibf50fd7e1ca5472d0a38fcb87c68227d6de44f42
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/abis_nm.h | 9 | ||||
-rw-r--r-- | openbsc/include/openbsc/bsc_msc_data.h | 4 | ||||
-rw-r--r-- | openbsc/include/openbsc/gsm_data.h | 18 | ||||
-rw-r--r-- | openbsc/include/openbsc/pcuif_proto.h | 6 |
4 files changed, 21 insertions, 16 deletions
diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h index db2a659e4..d7ab7d5d4 100644 --- a/openbsc/include/openbsc/abis_nm.h +++ b/openbsc/include/openbsc/abis_nm.h @@ -31,13 +31,6 @@ /* max number of attributes represented as 3GPP TS 52.021 ยง9.4.62 SW Description array */ #define MAX_BTS_ATTR 5 -struct cell_global_id { - uint16_t mcc; - uint16_t mnc; - uint16_t lac; - uint16_t ci; -}; - /* The BCCH info from an ip.access test, in host byte order * and already parsed... */ struct ipac_bcch_info { @@ -52,7 +45,7 @@ struct ipac_bcch_info { uint16_t frame_offset; uint32_t frame_nr_offset; uint8_t bsic; - struct cell_global_id cgi; + struct osmo_cell_global_id cgi; uint8_t ba_list_si2[16]; uint8_t ba_list_si2bis[16]; uint8_t ba_list_si2ter[16]; diff --git a/openbsc/include/openbsc/bsc_msc_data.h b/openbsc/include/openbsc/bsc_msc_data.h index 9a92955d9..1b1ffc2a5 100644 --- a/openbsc/include/openbsc/bsc_msc_data.h +++ b/openbsc/include/openbsc/bsc_msc_data.h @@ -31,6 +31,7 @@ #include <osmocom/core/timer.h> #include <osmocom/gsm/protocol/gsm_04_08.h> +#include <osmocom/gsm/gsm23003.h> #include <regex.h> @@ -74,8 +75,7 @@ struct bsc_msc_data { struct osmo_timer_list pong_timer; int advanced_ping; struct bsc_msc_connection *msc_con; - int core_mnc; - int core_mcc; + struct osmo_plmn_id core_plmn; int core_lac; int core_ci; int rtp_base; diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index b823acc65..2e1e64f40 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -11,6 +11,7 @@ #include <osmocom/core/select.h> #include <osmocom/core/stats.h> #include <osmocom/core/stat_item.h> +#include <osmocom/gsm/gsm23003.h> #include <osmocom/crypt/auth.h> @@ -317,9 +318,8 @@ struct gsm_tz { }; struct gsm_network { - /* global parameters */ - uint16_t country_code; - uint16_t network_code; + struct osmo_plmn_id plmn; + char *name_long; char *name_short; enum gsm_auth_policy auth_policy; @@ -429,6 +429,16 @@ struct gsm_network { struct llist_head *bsc_subscribers; }; +static inline const struct osmo_location_area_id *bts_lai(struct gsm_bts *bts) +{ + static struct osmo_location_area_id lai; + lai = (struct osmo_location_area_id){ + .plmn = bts->network->plmn, + .lac = bts->location_area_code, + }; + return &lai; +} + struct osmo_esme; enum gsm_sms_source_id { @@ -568,7 +578,7 @@ enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid); const char *bts_gprs_mode_name(enum bts_gprs_mode mode); int bts_gprs_mode_is_compat(struct gsm_bts *bts, enum bts_gprs_mode mode); -int gsm48_ra_id_by_bts(uint8_t *buf, struct gsm_bts *bts); +void gsm48_ra_id_by_bts(struct gsm48_ra_id *buf, struct gsm_bts *bts); void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts); struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan); diff --git a/openbsc/include/openbsc/pcuif_proto.h b/openbsc/include/openbsc/pcuif_proto.h index eb28d66bc..2e3f782fa 100644 --- a/openbsc/include/openbsc/pcuif_proto.h +++ b/openbsc/include/openbsc/pcuif_proto.h @@ -1,7 +1,7 @@ #ifndef _PCUIF_PROTO_H #define _PCUIF_PROTO_H -#define PCU_IF_VERSION 0x08 +#define PCU_IF_VERSION 0x09 /* msg_type */ #define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */ @@ -106,7 +106,9 @@ struct gsm_pcu_if_info_ind { struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */ uint8_t bsic; /* RAI */ - uint16_t mcc, mnc, lac, rac; + uint16_t mcc, mnc; + uint8_t mnc_3_digits; + uint16_t lac, rac; /* NSE */ uint16_t nsei; uint8_t nse_timer[7]; |