From c20b1c4207f5cf696ac5781b8f02dcbaf7e8a2dc Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 12 Feb 2018 20:50:08 +0100 Subject: [PATCH] MSC_ConnectionHdlr: Add telnet to VTY to each ConnHdlr This allows each ConnHandler to issue telnet commands to the VTY As a side-effect, it puts some more stress on the VTY interface, as each [parallel] DchanHdlr now has its own telnet connection. Change-Id: Ibd726af53219d829286da80b44ea4d9fb2ffdf3d --- bsc/MSC_ConnectionHandler.ttcn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 8193a8dfd..5f1095a83 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -24,6 +24,9 @@ import from MobileL3_CommonIE_Types all; import from MobileL3_RRM_Types all; import from L3_Templates all; +import from TELNETasp_PortType all; +import from Osmocom_VTY_Functions all; + /*********************************************************************** * Media related handling @@ -233,6 +236,7 @@ type component MSC_ConnHdlr extends BSSAP_ConnHdlr, RSL_DchanHdlr, MGCP_ConnHdlr /* procedure port back to our parent (BSSMAP_Emulation_CT) for control */ port BSSMAPEM_PROC_PT BSSMAPEM; + port TELNETasp_PT BSCVTY; var MediaState g_media; } @@ -240,6 +244,9 @@ type component MSC_ConnHdlr extends BSSAP_ConnHdlr, RSL_DchanHdlr, MGCP_ConnHdlr /* initialize all parameters */ function f_MscConnHdlr_init(integer i, HostName bts, HostName mgw) runs on MSC_ConnHdlr { f_MediaState_init(g_media, i, bts, mgw); + map(self:BSCVTY, system:BSCVTY); + f_vty_set_prompts(BSCVTY); + f_vty_transceive(BSCVTY, "enable"); } /* Callback function from general BSSMAP_Emulation whenever a connectionless @@ -576,7 +583,7 @@ runs on MSC_ConnHdlr return PDU_BSSAP { st.is_assignment := true; } - f_MediaState_init(g_media, 1, "127.0.0.2", "127.0.0.3"); + f_MscConnHdlr_init(1, "127.0.0.2", "127.0.0.3"); f_create_chan_and_exp(pars); /* we should now have a COMPL_L3 at the MSC */