diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-05-11 05:49:43 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-11 05:49:43 +0200 |
commit | 85801d02940833729b6057d48b41df3ed0816207 (patch) | |
tree | 6772ffe9ec36a0d5e15037346a2aff591b3dbcbd /openbsc/src/gprs/gb_proxy.c | |
parent | 1c0de6802c9b4ba77a110d96509b1de50eea3c7e (diff) |
[gprs] gb_proxy: More VTY 'show' information
The 'show gbproxy' now actually shows information about the Gb proxy
BTS peers, whereas 'show ns' shows information about existing NS links.
Diffstat (limited to 'openbsc/src/gprs/gb_proxy.c')
-rw-r--r-- | openbsc/src/gprs/gb_proxy.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index fe5ad702f..3ed7fdfde 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -414,3 +414,28 @@ int gbprox_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci) return rc; } + + +#include <vty/command.h> + +gDEFUN(show_gbproxy, show_gbproxy_cmd, "show gbproxy", + SHOW_STR "Display information about the Gb proxy") +{ + struct gbprox_peer *peer; + + llist_for_each_entry(peer, &gbprox_bts_peers, list) { + struct gprs_nsvc *nsvc = peer->nsvc; + struct gprs_ra_id raid; + gsm48_parse_ra(&raid, &peer->ra); + + vty_out(vty, "NSEI %5u, NS-VC %5u, PTP-BVCI %u, " + "RAC %u-%u-%u-%u%s", + nsvc->nsei, nsvc->nsvci, peer->bvci, + raid.mcc, raid.mnc, raid.lac, raid.rac, VTY_NEWLINE); + if (nsvc->nsi->ll == GPRS_NS_LL_UDP) + vty_out(vty, " remote address %s:%u%s", + inet_ntoa(nsvc->ip.bts_addr.sin_addr), + ntohs(nsvc->ip.bts_addr.sin_port), VTY_NEWLINE); + } + return CMD_SUCCESS; +} |