GGSN_Tests: Prepare for separate IPs on control/user plane

This commit is contained in:
Harald Welte 2017-08-04 16:19:59 +02:00
parent 94ade368e0
commit 876345e460
1 changed files with 7 additions and 5 deletions

View File

@ -11,7 +11,8 @@ module GGSN_Tests {
const integer GTP0_PORT := 3386;
const integer GTP1C_PORT := 2123;
const integer GTP1U_PORT := 2152;
const charstring g_bind_ip := "127.23.42.1";
const charstring g_bind_ip_c := "127.23.42.1";
const charstring g_bind_ip_u := g_bind_ip_c;
type component GT_CT {
port GTPC_PT GTPC;
@ -19,7 +20,8 @@ module GGSN_Tests {
var OCT1 g_restart_ctr := '01'O;
/* FIXME: unify with g_bind_ip + parse from config file */
var OCT4 g_sgsn_ip := '7f172a01'O;
var OCT4 g_sgsn_ip_c := '7f172a01'O;
var OCT4 g_sgsn_ip_u := '7f172a01'O;
/* FIXME: parse remName from config file */
var GtpPeer g_peer := { connId := 0, remName := "127.0.0.6", remPort := GTP1C_PORT };
timer T_default := 3.0;
@ -28,12 +30,12 @@ module GGSN_Tests {
function f_init() runs on GT_CT {
var Result res;
map(self:GTPC, system:GTPC);
res := GTP_CodecPort_CtrlFunct.f_IPL4_listen(GTPC, g_bind_ip, GTP1C_PORT, {udp:={}});
res := GTP_CodecPort_CtrlFunct.f_IPL4_listen(GTPC, g_bind_ip_c, GTP1C_PORT, {udp:={}});
log("GTP1C ConnectionID: ", res.connId);
g_peer.connId := res.connId;
map(self:GTPU, system:GTPU);
GTP_CodecPort_CtrlFunct.f_GTPU_listen(GTPU, g_bind_ip, GTP1U_PORT, {udp:={}});
GTP_CodecPort_CtrlFunct.f_GTPU_listen(GTPU, g_bind_ip_u, GTP1U_PORT, {udp:={}});
}
/* generalized GTP-C receive template */
@ -287,7 +289,7 @@ module GGSN_Tests {
var default d;
log("sending CreatePDP");
GTPC.send(ts_GTPC_CreatePDP(g_peer, imsi, g_restart_ctr, teid, teid, nsapi, eua, apn, g_sgsn_ip, g_sgsn_ip, msisdn));
GTPC.send(ts_GTPC_CreatePDP(g_peer, imsi, g_restart_ctr, teid, teid, nsapi, eua, apn, g_sgsn_ip_c, g_sgsn_ip_u, msisdn));
T_default.start;
d := activate(pingpong());