Add L3_Common for shared L3 functions between MSC and SGSN testing
Change-Id: I16e80df610235849180dc946f9457302deafb9d2
This commit is contained in:
parent
e5695f5544
commit
158a7ca881
|
@ -0,0 +1,32 @@
|
|||
module L3_Common {
|
||||
|
||||
import from Osmocom_Types all;
|
||||
import from General_Types all;
|
||||
|
||||
type record AuthVector {
|
||||
OCT16 rand,
|
||||
OCT4 sres,
|
||||
OCT8 kc
|
||||
/* FIXME: 3G elements */
|
||||
}
|
||||
|
||||
private function f_rnd_oct(integer len) return octetstring {
|
||||
var integer i;
|
||||
var octetstring res;
|
||||
for (i := 0; i < len; i := i + 1) {
|
||||
res[i] := int2oct(float2int(rnd()*256.0), 1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
function f_gen_auth_vec_2g() return AuthVector {
|
||||
var AuthVector vec;
|
||||
vec.rand := f_rnd_oct(16);
|
||||
vec.sres := f_rnd_oct(4);
|
||||
vec.kc := f_rnd_oct(8);
|
||||
return vec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -26,6 +26,7 @@ import from MobileL3_CommonIE_Types all;
|
|||
import from MobileL3_MM_Types all;
|
||||
import from MobileL3_CC_Types all;
|
||||
import from L3_Templates all;
|
||||
import from L3_Common all;
|
||||
|
||||
/* this component represents a single subscriber connection */
|
||||
type component BSC_ConnHdlr extends BSSAP_ConnHdlr, MNCC_ConnHdlr, GSUP_ConnHdlr, MGCP_ConnHdlr {
|
||||
|
@ -33,13 +34,6 @@ type component BSC_ConnHdlr extends BSSAP_ConnHdlr, MNCC_ConnHdlr, GSUP_ConnHdlr
|
|||
timer g_Tguard := 60.0;
|
||||
}
|
||||
|
||||
type record AuthVector {
|
||||
OCT16 rand,
|
||||
OCT4 sres,
|
||||
OCT8 kc
|
||||
/* FIXME: 3G elements */
|
||||
}
|
||||
|
||||
type record BSC_ConnHdlrNetworkPars {
|
||||
OCT1 kc_support,
|
||||
boolean expect_tmsi,
|
||||
|
@ -248,24 +242,6 @@ private function f_build_lu(MobileIdentityLV mi) runs on BSC_ConnHdlr return PDU
|
|||
return l3_info;
|
||||
}
|
||||
|
||||
private function f_rnd_oct(integer len) return octetstring {
|
||||
var integer i;
|
||||
var octetstring res;
|
||||
for (i := 0; i < len; i := i + 1) {
|
||||
res[i] := int2oct(float2int(rnd()*256.0), 1);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
function f_gen_auth_vec_2g() return AuthVector {
|
||||
var AuthVector vec;
|
||||
vec.rand := f_rnd_oct(16);
|
||||
vec.sres := f_rnd_oct(4);
|
||||
vec.kc := f_rnd_oct(8);
|
||||
return vec;
|
||||
}
|
||||
|
||||
|
||||
function f_mm_auth() runs on BSC_ConnHdlr
|
||||
{
|
||||
if (g_pars.net.expect_auth) {
|
||||
|
|
|
@ -45,6 +45,7 @@ import from BSC_ConnectionHandler all;
|
|||
import from MobileL3_Types all;
|
||||
import from MobileL3_CommonIE_Types all;
|
||||
import from L3_Templates all;
|
||||
import from L3_Common all;
|
||||
|
||||
|
||||
type component MTC_CT extends CTRL_Adapter_CT {
|
||||
|
|
|
@ -77,7 +77,7 @@ gen_links $DIR $FILES
|
|||
DIR=../library
|
||||
FILES="General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn MNCC_Types.ttcn MNCC_EncDec.cc MNCC_CodecPort.ttcn mncc.h MNCC_Emulation.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc "
|
||||
FILES+="IPA_Types.ttcn IPA_Emulation.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc RSL_Types.ttcn GSUP_Types.ttcn GSUP_Emulation.ttcn "
|
||||
FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn L3_Templates.ttcn L3_Templates.ttcn "
|
||||
FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn L3_Templates.ttcn L3_Common.ttcn "
|
||||
FILES+="BSSMAP_Emulation.ttcn BSSAP_CodecPort.ttcn BSSMAP_Templates.ttcn BSSAP_Adapter.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_Emulation.ttcn IPA_Emulation.ttcn "
|
||||
FILES+="RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunctDef.cc "
|
||||
FILES+="MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunctDef.cc "
|
||||
|
|
Loading…
Reference in New Issue