From 10719b74c362591cd01c3766f74ef03639203e1d Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 21 Feb 2018 00:39:36 +0100 Subject: implement support for 3-digit MNC with leading zeros Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout the code base to be able to handle an MNC < 100 that has three digits (leading zeros). Note that in gbproxy_test.ok, 0-0 changes to 000-000 instead of 000-00, because the parsed ra buffer is 000000 which results in 000-000, while 00f000 would result in 000-00. IOW this is expected. Change-Id: I7437dfaa586689e2bef0d4be6537e5577a8f6c26 --- include/osmocom/sgsn/gb_proxy.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h index e10894fc3..2540a7e5b 100644 --- a/include/osmocom/sgsn/gb_proxy.h +++ b/include/osmocom/sgsn/gb_proxy.h @@ -3,6 +3,7 @@ #include +#include #include #include @@ -101,8 +102,7 @@ struct gbproxy_config { struct rate_ctr_group *ctrg; /* force mcc/mnc */ - int core_mnc; - int core_mcc; + struct osmo_plmn_id core_plmn; uint8_t* core_apn; size_t core_apn_size; int tlli_max_age; @@ -120,8 +120,7 @@ struct gbproxy_config { }; struct gbproxy_patch_state { - int local_mnc; - int local_mcc; + struct osmo_plmn_id local_plmn; /* List of TLLIs for which patching is enabled */ struct llist_head logical_links; -- cgit v1.2.3