diff options
author | Harald Welte <laforge@gnumonks.org> | 2015-12-26 23:40:54 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-12-26 23:40:54 +0100 |
commit | 96e36eb675bf40329ddb16210babae7f26424e85 (patch) | |
tree | d80d5a2a1b37eeaa4a44edf75e9b7f2d9e3dfc97 /src/hnbgw_ranap.c | |
parent | 5bea800fa752efe7d307ede31574a236663dfc17 (diff) |
remove ranap_parse_lai() from hnbgw_ranap.c
Diffstat (limited to 'src/hnbgw_ranap.c')
-rw-r--r-- | src/hnbgw_ranap.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/hnbgw_ranap.c b/src/hnbgw_ranap.c index 7e3cfaf..5d9168b 100644 --- a/src/hnbgw_ranap.c +++ b/src/hnbgw_ranap.c @@ -22,7 +22,6 @@ #include <osmocom/core/msgb.h> #include <osmocom/core/utils.h> -#include <osmocom/gsm/gsm48.h> #include <unistd.h> #include <errno.h> @@ -92,31 +91,6 @@ static int ranap_rx_error_ind(struct hnb_context *hnb, ANY_t *in) return 0; } -int ranap_parse_lai(struct gprs_ra_id *ra_id, const RANAP_LAI_t *lai) -{ - uint8_t *ptr = lai->pLMNidentity.buf; - - /* TS 25.413 9.2.3.55 */ - if (lai->pLMNidentity.size != 3) - return -1; - - ra_id->mcc = (ptr[0] & 0xF) * 100 + - (ptr[0] >> 4) * 10 + - (ptr[1] & 0xF); - ra_id->mnc = (ptr[2] & 0xF) + - (ptr[2] >> 4) * 10; - if ((ptr[1] >> 4) != 0xF) - ra_id->mnc += (ptr[1] >> 4) * 100; - - ra_id->lac = asn1str_to_u16(&lai->lAC); - - /* TS 25.413 9.2.3.6 */ - if (ra_id->lac == 0 || ra_id->lac == 0xfffe) - return -1; - - return 0; -} - static int ranap_rx_dt(struct hnb_context *hnb, ANY_t *in) { RANAP_DirectTransferIEs_t ies; |