aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gsm_data.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-03-21 14:45:13 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-03-22 05:23:11 +0100
commit408856088bcf376f5317803fd8d1747f8b920054 (patch)
tree9266e5698859483ef5b359f4d6f2e3e7cdd4f109 /openbsc/include/openbsc/gsm_data.h
parent8469818e33ef81e9f707a0c4dd13d7b91ecf83f5 (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/openbsc/gsm_data.h')
-rw-r--r--openbsc/include/openbsc/gsm_data.h18
1 files changed, 14 insertions, 4 deletions
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);