diff options
Diffstat (limited to 'tests/gsm0408')
-rw-r--r-- | tests/gsm0408/gsm0408_test.c | 13 | ||||
-rw-r--r-- | tests/gsm0408/gsm0408_test.ok | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 77a88224..ab2dee4c 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -194,10 +194,23 @@ static void test_mid_from_tmsi(void) printf("passed\n"); } +static void test_mid_from_imsi(void) +{ + char *imsi = "901700000004620"; + uint8_t buf[10], len; + + printf("Simple IMSI encoding test...."); + + len = gsm48_generate_mid_from_imsi(buf, imsi); + + printf("passed: [%u] %s\n", len, osmo_hexdump(buf, len)); +} + int main(int argc, char **argv) { test_bearer_cap(); test_mid_from_tmsi(); + test_mid_from_imsi(); test_ra_cap(); return EXIT_SUCCESS; diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 83165fac..76a79403 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -1,6 +1,7 @@ Test `CSD 9600/V.110/transparent' passed Test `Speech, all codecs' passed Simple TMSI encoding test....passed +Simple IMSI encoding test....passed: [10] 17 08 99 10 07 00 00 00 64 02 Constructed RA: RA: MNC=121, MCC=77, LAC=666, RAC=5 RA: MNC=121, MCC=77, LAC=666, RAC=5 |