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
diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h
index e10894f..2540a7e 100644
--- a/include/osmocom/sgsn/gb_proxy.h
+++ b/include/osmocom/sgsn/gb_proxy.h
@@ -3,6 +3,7 @@
 
 
 #include <osmocom/core/msgb.h>
+#include <osmocom/gsm/gsm23003.h>
 
 #include <osmocom/gprs/gprs_ns.h>
 #include <osmocom/vty/command.h>
@@ -101,8 +102,7 @@
 	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_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;