ggsn: Test GTP-U Echo Request/Response
Change-Id: Id92180be948ee3f5246c7befec666698a1b074f3
This commit is contained in:
parent
134aea932d
commit
480e67f00d
|
@ -1213,6 +1213,18 @@ module GGSN_Tests {
|
|||
T_default.stop;
|
||||
}
|
||||
|
||||
testcase TC_echo_req_resp_gtpu() runs on GT_CT {
|
||||
f_init();
|
||||
GTPU.send(ts_GTPU_PING(g_peer_u, g_d_seq_nr));
|
||||
T_default.start;
|
||||
alt {
|
||||
[] GTPU.receive(tr_GTPU_PONG(g_peer_u)) { setverdict(pass); };
|
||||
[] GTPU.receive { repeat; };
|
||||
[] T_default.timeout { setverdict(fail); }
|
||||
}
|
||||
T_default.stop;
|
||||
}
|
||||
|
||||
/* Test if the parser can cope with PCO that only contain either a
|
||||
* single primary DNS or a secondary DNS. */
|
||||
testcase TC_pdp4_act_deact_with_single_dns() runs on GT_CT {
|
||||
|
@ -1600,6 +1612,7 @@ module GGSN_Tests {
|
|||
execute(TC_pdp46_act_deact_apn4());
|
||||
|
||||
execute(TC_echo_req_resp());
|
||||
execute(TC_echo_req_resp_gtpu());
|
||||
execute(TC_pdp_act2_recovery());
|
||||
execute(TC_act_deact_retrans_duplicate());
|
||||
|
||||
|
|
|
@ -1121,7 +1121,7 @@ module GTP_Templates {
|
|||
}
|
||||
|
||||
/* generalized GTP-U send template */
|
||||
template PDU_GTPU ts_GTP1U_PDU(OCT1 msg_type, template (omit) uint16_t seq, OCT4 teid, GTPU_IEs ies) := {
|
||||
template (value) PDU_GTPU ts_GTP1U_PDU(OCT1 msg_type, template (omit) uint16_t seq, OCT4 teid, GTPU_IEs ies) := {
|
||||
/* N-PDU Number flag (PN): the GTP-U header contains a meaningful N-PDU Number field if the PN
|
||||
* flag is set to 1. */
|
||||
pn_bit := '0'B, /* we assume the encoder overwrites this if an optional part is given */
|
||||
|
@ -1153,8 +1153,9 @@ module GTP_Templates {
|
|||
}
|
||||
|
||||
|
||||
/* template matching reception of GTP-U echo-request */
|
||||
/* template matching reception of GTP-U echo-request/response */
|
||||
template Gtp1uUnitdata tr_GTPU_PING(template GtpPeer peer) := tr_GTPU_MsgType(peer, echoRequest, '00000000'O);
|
||||
template Gtp1uUnitdata tr_GTPU_PONG(template GtpPeer peer) := tr_GTPU_MsgType(peer, echoResponse, '00000000'O);
|
||||
|
||||
/* template matching reception of GTP-U GPDU */
|
||||
template GTPU_IEs t_GPDU(template octetstring data) := {
|
||||
|
@ -1167,6 +1168,18 @@ module GTP_Templates {
|
|||
gtpu := tr_GTP1U_PDU('FF'O, teid, t_GPDU(data))
|
||||
}
|
||||
|
||||
template GTPU_IEs ts_UEchoReqPDU := {
|
||||
echoRequest_IEs := {
|
||||
private_extension_gtpu := omit
|
||||
}
|
||||
}
|
||||
|
||||
/* master template for sending a GTP-C echo request */
|
||||
template (value) Gtp1uUnitdata ts_GTPU_PING(GtpPeer peer, uint16_t seq) := {
|
||||
peer := peer,
|
||||
gtpu := ts_GTP1U_PDU(echoRequest, seq, '00000000'O, valueof(ts_UEchoReqPDU))
|
||||
}
|
||||
|
||||
template GTPU_IEs ts_UEchoRespPDU(OCT1 restart_counter) := {
|
||||
echoResponse_IEs := {
|
||||
recovery_gtpu := {
|
||||
|
|
Loading…
Reference in New Issue