diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-02-20 15:13:18 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-02-22 06:01:58 +0100 |
commit | c38b32dde94ae5547a11c4d59adb3510576300b0 (patch) | |
tree | 45a5709adc415943022d141e394d2ff8dfc71d78 /tests/gsm0408/gsm0408_test.c | |
parent | 0bf93a6482e620b773fe3eea926c70c15d95b962 (diff) |
gsm0408_test: include BCD and leading zeros in test output
(Preparation for adding 3-digit MNC)
Change-Id: I7f8ae05fa3e4a6fc004212757b05ca8a14c9ef45
Diffstat (limited to 'tests/gsm0408/gsm0408_test.c')
-rw-r--r-- | tests/gsm0408/gsm0408_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 87f8dded..aa6a8bee 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -132,7 +132,7 @@ static int test_bearer_cap() static inline void dump_ra(const struct gprs_ra_id *raid) { - printf("RA: MCC=%u, MNC=%u, LAC=%u, RAC=%u\n", raid->mcc, raid->mnc, raid->lac, raid->rac); + printf("%03u-%02u-%u-%u\n", raid->mcc, raid->mnc, raid->lac, raid->rac); } static inline void check_ra(const struct gprs_ra_id *raid) @@ -150,6 +150,7 @@ static inline void check_ra(const struct gprs_ra_id *raid) gsm48_parse_ra(&raid0, (const uint8_t *)&ra); dump_ra(raid); + printf("MCC+MNC in BCD: %s\n", osmo_hexdump(ra.digits, sizeof(ra.digits))); dump_ra(&raid0); printf("RA test..."); if (raid->mnc != raid0.mnc || raid->mcc != raid0.mcc || raid->lac != raid0.lac || raid->rac != raid0.rac) |