summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-12-19 19:19:46 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-18 18:12:06 +0100
commit8054799963f4b3b936d601eb4b1f5774f2c41fec (patch)
treebee1875f339029a1d6145b70bbe0d039401b00f8 /openbsc
parent03b463034885e7ebb09160f6d63c05ac120a8098 (diff)
sgsn: Show GSUP client info on 'show sgsn'
This commit adds a line to the output of 'show sgsn' if the GSUP client has been initialized: - Remote authorization: [not] connected to HOST:PORT via GSUP Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/gprs/sgsn_vty.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index d847d9173..4deb2acb4 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -33,11 +33,14 @@
#include <openbsc/gprs_sgsn.h>
#include <openbsc/vty.h>
#include <openbsc/gsm_04_08_gprs.h>
+#include <openbsc/gprs_gsup_client.h>
#include <osmocom/vty/command.h>
#include <osmocom/vty/vty.h>
#include <osmocom/vty/misc.h>
+#include <osmocom/abis/ipa.h>
+
#include <pdp.h>
static struct sgsn_config *g_cfg = NULL;
@@ -272,6 +275,14 @@ static void vty_dump_mmctx(struct vty *vty, const char *pfx,
DEFUN(show_sgsn, show_sgsn_cmd, "show sgsn",
SHOW_STR "Display information about the SGSN")
{
+ if (sgsn->gsup_client) {
+ struct ipa_client_conn *link = sgsn->gsup_client->link;
+ vty_out(vty,
+ " Remote authorization: %sconnected to %s:%d via GSUP%s",
+ sgsn->gsup_client->is_connected ? "" : "not ",
+ link->addr, link->port,
+ VTY_NEWLINE);
+ }
/* FIXME: statistics */
return CMD_SUCCESS;
}