diff options
author | Max <msuraev@sysmocom.de> | 2018-02-15 11:27:18 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2018-02-15 11:44:33 +0100 |
commit | d55d7d4fc7a7b66b5c45b431ce86a9786e095333 (patch) | |
tree | b916a08e80e23096e8f72df66f4bb87032ee2cf4 /tests/gsm0408 | |
parent | 408a90093bd389826fe4806a31b8bc1b2425efbf (diff) |
Add test for gsm48_generate_mid_from_imsi()
Change-Id: Ibe5c0831268c788ceecd10fd7b22ece6480da817
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 |