aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 15:11:34 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 20:24:12 +0800
commit47dd4944ae36d7c1fa91187d355512d99d4bd137 (patch)
tree93179919c6ec8bab78f9997aed831d1e433bff0a /openbsc/src/nat/bsc_nat_vty.c
parenta7c377d593b88cd6ac91e59d2d75c6d873282590 (diff)
nat: Store the config in the connection instead of the lac
This allows that we can print the Nr. next to the lac and it allows us to change the lac at runtime without reconnecting the BSC.
Diffstat (limited to 'openbsc/src/nat/bsc_nat_vty.c')
-rw-r--r--openbsc/src/nat/bsc_nat_vty.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/openbsc/src/nat/bsc_nat_vty.c b/openbsc/src/nat/bsc_nat_vty.c
index d5f83ebdd..4c60a19f7 100644
--- a/openbsc/src/nat/bsc_nat_vty.c
+++ b/openbsc/src/nat/bsc_nat_vty.c
@@ -76,8 +76,9 @@ DEFUN(show_sccp, show_sccp_cmd, "show connections sccp",
{
struct sccp_connections *con;
llist_for_each_entry(con, &_nat->sccp_connections, list_entry) {
- vty_out(vty, "SCCP for BSC: %d BSC ref: 0x%x Local ref: 0x%x MSC/BSC mux: 0x%x/0x%x%s",
- con->bsc->lac,
+ vty_out(vty, "SCCP for BSC: Nr: %d lac: %d BSC ref: 0x%x Local ref: 0x%x MSC/BSC mux: 0x%x/0x%x%s",
+ con->bsc->cfg ? con->bsc->cfg->nr : -1,
+ con->bsc->cfg ? con->bsc->cfg->lac : -1,
sccp_src_ref_to_int(&con->real_ref),
sccp_src_ref_to_int(&con->patched_ref),
con->msc_timeslot, con->bsc_timeslot,
@@ -92,8 +93,10 @@ DEFUN(show_bsc, show_bsc_cmd, "show connections bsc",
{
struct bsc_connection *con;
llist_for_each_entry(con, &_nat->bsc_connections, list_entry) {
- vty_out(vty, "BSC lac: %d auth: %d fd: %d%s",
- con->lac, con->authenticated, con->write_queue.bfd.fd, VTY_NEWLINE);
+ vty_out(vty, "BSC lac: %d, %d auth: %d fd: %d%s",
+ con->cfg ? con->cfg->nr : -1,
+ con->cfg ? con->cfg->lac : -1,
+ con->authenticated, con->write_queue.bfd.fd, VTY_NEWLINE);
}
return CMD_SUCCESS;