summaryrefslogtreecommitdiffstats
path: root/ggsn_tests/GGSN_Tests.ttcn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-08-05 08:51:22 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-05 08:51:22 +0200
commitf1e0d5a39fb3074e97c52654ca5368c446aeb99e (patch)
treef0721ccaf02e21db27f7f1c3293776545c960e11 /ggsn_tests/GGSN_Tests.ttcn
parent3af89489ba28c17a635816a104a9f1aa53a4132c (diff)
GGSN_Tests: Add function to send DELETE PDP CONTEXT
Diffstat (limited to 'ggsn_tests/GGSN_Tests.ttcn')
-rw-r--r--ggsn_tests/GGSN_Tests.ttcn58
1 files changed, 58 insertions, 0 deletions
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index 10f6a86..9864da1 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -270,6 +270,44 @@ module GGSN_Tests {
sgsn_ip_data, msisdn)))
}
+ function f_teardown_ind_IE(in template BIT1 ind) return template TearDownInd {
+ if (isvalue(ind)) {
+ return omit;
+ }
+ var TearDownInd ret := {
+ type_gtpc := '13'O,
+ tdInd := valueof(ind),
+ spare:= '0000000'B
+ }
+ return ret;
+ }
+
+ template GTPC_PDUs ts_DeletePdpPDU(BIT4 nsapi, template BIT1 teardown_ind) := {
+ deletePDPContextRequest := {
+ cause := omit,
+ tearDownIndicator := f_teardown_ind_IE(teardown_ind),
+ nsapi := {
+ type_gtpc := '14'O,
+ nsapi := nsapi,
+ unused := '0000'B
+ },
+ protConfigOptions := omit,
+ userLocationInformation := omit,
+ mS_TimeZone := omit,
+ extendedCommonFlags := omit,
+ uLI_Timestamp := omit,
+ private_extension_gtpc := omit
+ }
+ }
+
+ template Gtp1cUnitdata ts_GTPC_DeletePDP(GtpPeer peer, OCT4 teid, BIT4 nsapi,
+ template BIT1 teardown_ind) := {
+ peer := peer,
+ gtpc := ts_GTP1C_PDU(deletePDPContextRequest, teid,
+ valueof(ts_DeletePdpPDU(nsapi, teardown_ind)))
+ }
+
+
/* GTP-U */
template PDU_GTPU tr_GTP1U_PDU(template OCT1 msg_type, template OCT4 teid) := {
@@ -378,6 +416,26 @@ module GGSN_Tests {
deactivate(d);
}
+ function f_pdp_ctx_del(OCT4 teid, BIT4 nsapi, template BIT1 teardown_ind) runs on GT_CT {
+ var Gtp1cUnitdata ud;
+ var default d;
+
+ GTPC.send(ts_GTPC_DeletePDP(g_peer, teid, nsapi, teardown_ind));
+ T_default.start;
+
+ d := activate(pingpong());
+ alt {
+ [] GTPC.receive(tr_GTPC_MsgType(g_peer, deletePDPContextResponse, teid)) -> value ud {
+ if (ud.gtpc.gtpc_pdu.deletePDPContextResponse.cause.causevalue == '80'O) {
+ setverdict(pass);
+ } else {
+ setverdict(fail);
+ }
+ }
+ }
+ deactivate(d);
+ }
+
testcase TC_activate_pdp4() runs on GT_CT {
f_init();
var hexstring imsi := '262420123456789'H;