Introduce NACC support

A new nacc_fsm is introduced per MS object, with its partner priv
structure struct nacc_fsm_ctx, which exists and is available in the MS
object only during the duration of the NACC procedure.

The NACC context is created on an MS whenever a Pkt Cell Change
Notification is received on Uplink RLCMAC, which asks for neighbor
information of a given ARFCN+BSIC.

First, the target ARFCN+BSIC needs to be translated into a CGI-PS
(RAC+CI) address. That's done by asking the BSC through the Neighbour
Resolution Service available in osmo-bsc using the CTRL interface.

Once the CGI-PS of the target cell is known, PCU starts a RIM RAN-INFO
request against the SGSN (which will route the request as needed), and
wait for a response containing the SI bits from the target cell.

After the SI are received, the scheduler is instructed to eventually
poll a TBF for the MS originating the CCN, so that we can send the SI
encapsulated into multiple Packet Neighbor Cell Data messages on the
downlink.

One all the SI bits are sent, the scheduler is instructed to send a
Packet Cell Change Continue message.

Once the message above has been sent, the FSM autodestroys itself.

Caches are also introduced in this patch which allows for re-using
recently known translations ARFCN+BSIC -> CGI-PS and CGI-PS -> SI_INFO
respectively.

Change-Id: Id35f40d05f3e081f32fddbf1fa34cb338db452ca
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index 39d65de..c57bbf6 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -40,6 +40,7 @@
 #include <osmocom/gsm/gsm48.h>
 
 #include "coding_scheme.h"
+#include <gsm_rlcmac.h>
 
 #include <stdint.h>
 #include <stddef.h>
@@ -100,6 +101,7 @@
 	enum mcs_kind mode;
 
 	struct rate_ctr_group *ctrs;
+	struct nacc_fsm_ctx *nacc;
 };
 
 struct GprsMs *ms_alloc(struct gprs_rlcmac_bts *bts, uint32_t tlli);
@@ -140,6 +142,10 @@
 
 void ms_set_callback(struct GprsMs *ms, struct gpr_ms_callback *cb);
 
+int ms_nacc_start(struct GprsMs *ms, Packet_Cell_Change_Notification_t *notif);
+bool ms_nacc_rts(const struct GprsMs *ms);
+struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf);
+
 static inline bool ms_is_idle(const struct GprsMs *ms)
 {
 	return !ms->ul_tbf && !ms->dl_tbf && !ms->ref && llist_empty(&ms->old_tbfs);