From a27303094ab8bedb0a3b3bfe771daeed10a2e0a9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 23 Mar 2014 18:08:26 +0100 Subject: sgsn/ctrl: Add ctrl interface, implement listing subscribers Add the control interface with no hierachy right now and implement the first command to list IMSI + Context Address of active sessions. sgsn_cmd_handle could share more code with bsc variant. Fixes: SYS#264, SYS#265 --- openbsc/src/gprs/sgsn_main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'openbsc/src/gprs/sgsn_main.c') diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index 9d42648a4..f5a66e663 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -50,6 +50,7 @@ #include #include #include +#include #include @@ -288,6 +289,7 @@ static const struct log_info gprs_log_info = { int main(int argc, char **argv) { + struct ctrl_handle *ctrl; struct gsm_network dummy_network; int rc; @@ -314,6 +316,17 @@ int main(int argc, char **argv) if (rc < 0) exit(1); + ctrl = sgsn_controlif_setup(NULL, 4251); + if (!ctrl) { + LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n"); + exit(1); + } + + if (sgsn_ctrl_cmds_install() != 0) { + LOGP(DGPRS, LOGL_ERROR, "Failed to install CTRL commands.\n"); + exit(1); + } + gprs_ns_set_log_ss(DNS); bssgp_set_log_ss(DBSSGP); -- cgit v1.2.3