move gsm48_parse_ra() and gprs_tlli_type() to libosmocore
diff --git a/openbsc/include/openbsc/gsm_04_08_gprs.h b/openbsc/include/openbsc/gsm_04_08_gprs.h
index 20ab044..afc5abc 100644
--- a/openbsc/include/openbsc/gsm_04_08_gprs.h
+++ b/openbsc/include/openbsc/gsm_04_08_gprs.h
@@ -72,13 +72,6 @@
 	GSM48_IE_GSM_LSA_ID		= 0x48, /* 10.5.3.11 */
 };
 
-/* Chapter 10.4.4.15 */
-struct gsm48_ra_id {
-	u_int8_t digits[3];	/* MCC + MNC BCD digits */
-	u_int16_t lac;		/* Location Area Code */
-	u_int8_t rac;		/* Routing Area Code */
-} __attribute__ ((packed));
-
 /* Chapter 9.4.15 / Table 9.4.15 */
 struct gsm48_ra_upd_ack {
 	u_int8_t force_stby:4,	/* 10.5.5.7 */
@@ -177,15 +170,6 @@
 	GSM_CAUSE_PROTO_ERR_UNSPEC	= 0x6f,
 };
 
-/* GSM TS 03.03 Chapter 2.6 */
-enum gprs_tlli_tyoe {
-	TLLI_LOCAL,
-	TLLI_FOREIGN,
-	TLLI_RANDOM,
-	TLLI_AUXILIARY,
-	TLLI_RESERVED,
-};
-
 /* Section 6.1.2.2: Session management states on the network side */
 enum gsm48_pdp_state {
 	PDP_S_INACTIVE,
diff --git a/openbsc/src/gsm_04_08_gprs.c b/openbsc/src/gsm_04_08_gprs.c
index 1503228..ffc3303 100644
--- a/openbsc/src/gsm_04_08_gprs.c
+++ b/openbsc/src/gsm_04_08_gprs.c
@@ -126,48 +126,12 @@
 	return "unknown";
 }
 
-void gsm48_parse_ra(struct gprs_ra_id *raid, const u_int8_t *buf)
-{
-	raid->mcc = (buf[0] & 0xf) * 100;
-	raid->mcc += (buf[0] >> 4) * 10;
-	raid->mcc += (buf[1] & 0xf) * 1;
-
-	/* I wonder who came up with the stupidity of encoding the MNC
-	 * differently depending on how many digits its decimal number has! */
-	if ((buf[1] >> 4) == 0xf) {
-		raid->mnc = (buf[2] & 0xf) * 10;
-		raid->mnc += (buf[2] >> 4) * 1;
-	} else {
-		raid->mnc = (buf[2] & 0xf) * 100;
-		raid->mnc += (buf[2] >> 4) * 10;
-		raid->mnc += (buf[1] >> 4) * 1;
-	}
-
-	raid->lac = ntohs(*(u_int16_t *)(buf + 3));
-	raid->rac = buf[5];
-}
-
 /* Send a message through the underlying layer */
 static int gsm48_gmm_sendmsg(struct msgb *msg, int command)
 {
 	return gprs_llc_tx_ui(msg, GPRS_SAPI_GMM, command);
 }
 
-/* TS 03.03 Chapter 2.6 */
-int gprs_tlli_type(u_int32_t tlli)
-{
-	if ((tlli & 0xc0000000) == 0xc0000000)
-		return TLLI_LOCAL;
-	else if ((tlli & 0xc0000000) == 0x80000000)
-		return TLLI_FOREIGN;
-	else if ((tlli & 0xf8000000) == 0x78000000)
-		return TLLI_RANDOM;
-	else if ((tlli & 0xf8000000) == 0x70000000)
-		return TLLI_AUXILIARY;
-
-	return TLLI_RESERVED;
-}
-
 /* Chapter 9.4.2: Attach accept */
 static int gsm48_tx_gmm_att_ack(struct msgb *old_msg)
 {