aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-01 11:59:10 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-04 07:20:42 +0200
commit79fc392751b9551abd3dae702ce28318fa48d637 (patch)
treed1bf1d791b7ef71069d046601541e644a6fd91e9
parentb77c697c0b86a17870da5dda8f0f17007f5e35b4 (diff)
move gsm48_parse_ra() and gprs_tlli_type() to libosmocore
-rw-r--r--openbsc/include/openbsc/gsm_04_08_gprs.h16
-rw-r--r--openbsc/src/gsm_04_08_gprs.c36
2 files changed, 0 insertions, 52 deletions
diff --git a/openbsc/include/openbsc/gsm_04_08_gprs.h b/openbsc/include/openbsc/gsm_04_08_gprs.h
index 20ab04432..afc5abc93 100644
--- a/openbsc/include/openbsc/gsm_04_08_gprs.h
+++ b/openbsc/include/openbsc/gsm_04_08_gprs.h
@@ -72,13 +72,6 @@ enum gsm48_gprs_ie_sm {
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 @@ enum gsm48_gsm_cause {
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 150322872..ffc3303a3 100644
--- a/openbsc/src/gsm_04_08_gprs.c
+++ b/openbsc/src/gsm_04_08_gprs.c
@@ -126,48 +126,12 @@ static const char *upd_name(u_int8_t type)
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)
{