diff options
author | Max <msuraev@sysmocom.de> | 2017-10-23 15:09:23 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-10-24 14:33:30 +0000 |
commit | 4ce24c45b9286c3946135f97d6ca6f2d4074526e (patch) | |
tree | 5a5463df566fdc742cb19fc0f44c09edcf428648 /tests/gb/gprs_ns_test.c | |
parent | abdd7a28ede091f06325b3e5b8a77fc9130e6ee3 (diff) |
GPRS: unify NS state printing
* introduce defines with NS state names
* use them for vty and tests
* expand test output to print complete NS state
Change-Id: I69f8d536135ae76dbca623c2f1ffba625adcb1e9
Related: SYS#3610
Diffstat (limited to 'tests/gb/gprs_ns_test.c')
-rw-r--r-- | tests/gb/gprs_ns_test.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/gb/gprs_ns_test.c b/tests/gb/gprs_ns_test.c index 456d8e3f..0bbf9432 100644 --- a/tests/gb/gprs_ns_test.c +++ b/tests/gb/gprs_ns_test.c @@ -390,11 +390,12 @@ static void gprs_dump_nsi(struct gprs_ns_inst *nsi) printf("Current NS-VCIs:\n"); llist_for_each_entry(nsvc, &nsi->gprs_nsvcs, list) { struct sockaddr_in *peer = &(nsvc->ip.bts_addr); - printf(" VCI 0x%04x, NSEI 0x%04x, peer 0x%08x:%d%s%s%s\n", + printf(" VCI 0x%04x, NSEI 0x%04x, peer 0x%08x:%d, %s, %s, %s%s\n", nsvc->nsvci, nsvc->nsei, ntohl(peer->sin_addr.s_addr), ntohs(peer->sin_port), - nsvc->state & NSE_S_BLOCKED ? ", blocked" : "", - nsvc->state & NSE_S_ALIVE ? "" : ", dead", + NS_DESC_A(nsvc->state), + NS_DESC_B(nsvc->state), + NS_DESC_R(nsvc->state), nsvc->nsvci_is_valid ? "" : ", invalid VCI" ); dump_rate_ctr_group(stdout, " ", nsvc->ctrg); |