From patchwork Mon Apr 4 13:30:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max X-Patchwork-Id: 605870 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id 3qdtDj3LhYz9sC4 for ; Mon, 4 Apr 2016 23:31:33 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 9791B1C4D1; Mon, 4 Apr 2016 13:31:30 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from mail.sysmocom.de (mail.sysmocom.de [IPv6:2a01:4f8:191:444c::2:4]) by lists.osmocom.org (Postfix) with ESMTP id E17EA1C4CA for ; Mon, 4 Apr 2016 13:31:29 +0000 (UTC) Received: from mail.sysmocom.de (mail.sysmocom.de [144.76.43.93]) by mail.sysmocom.de (Postfix) with ESMTP id BCF7819C4A8; Mon, 4 Apr 2016 13:30:59 +0000 (UTC) Received: from pbell.local (ip5b418565.dynamic.kabel-deutschland.de [91.65.133.101]) by mail.sysmocom.de (Postfix) with ESMTPSA id 7E52219C496; Mon, 4 Apr 2016 13:30:59 +0000 (UTC) From: msuraev@sysmocom.de To: openbsc@lists.osmocom.org Subject: [PATCH 2/4] NAT: vty command to display number of BSCs Date: Mon, 4 Apr 2016 15:30:54 +0200 Message-Id: <1459776656-31929-2-git-send-email-msuraev@sysmocom.de> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1459776656-31929-1-git-send-email-msuraev@sysmocom.de> References: <1459776656-31929-1-git-send-email-msuraev@sysmocom.de> X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" From: Max Add command 'show nat bsc' to display number of configured BSCs. Sponsored-by: On-Waves ehf --- openbsc/src/osmo-bsc_nat/bsc_nat_vty.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c index cd8293c..96559b0 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c @@ -204,6 +204,14 @@ DEFUN(show_sccp, show_sccp_cmd, "show sccp connections", return CMD_SUCCESS; } +DEFUN(show_nat_bsc, show_nat_bsc_cmd, "show nat bsc", + SHOW_STR "Display NAT configuration details\n" + "BSCs-related\n") +{ + vty_out(vty, "%d BSCs configured%s", _nat->num_bsc, VTY_NEWLINE); + return CMD_SUCCESS; +} + DEFUN(show_bsc, show_bsc_cmd, "show bsc connections", SHOW_STR BSC_STR "All active connections\n") @@ -1169,6 +1177,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat) /* show commands */ install_element_ve(&show_sccp_cmd); install_element_ve(&show_bsc_cmd); + install_element_ve(&show_nat_bsc_cmd); install_element_ve(&show_bsc_cfg_cmd); install_element_ve(&show_stats_cmd); install_element_ve(&show_stats_lac_cmd);