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
This commit is contained in:
Harald Welte 2018-02-12 20:50:08 +01:00
parent 70b52c9d4b
commit c20b1c4207
1 changed files with 8 additions and 1 deletions

View File

@ -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 */