Loading ttcn/Ats464XLat/Ats464XLat_Functions.ttcn3 +9 −0 Original line number Diff line number Diff line Loading @@ -968,4 +968,13 @@ module Ats464XLat_Functions { } // End of group globalSteps group getFunctions { function f_getTcpTimeWait() return float { return PX_TCP_TIME_WAIT; } // End of function f_getTcpTimeWait } // End of group getFunctions } // End of module Ats464XLat_Functions No newline at end of file ttcn/Ats464XLat/Ats464XLat_Pixits.ttcn3 +2 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ module Ats464XLat_Pixits { } } modulepar float PX_TCP_TIME_WAIT := 15.0; modulepar Ipv6Address PX_FTP_CLIENT_IPV6_ADDRESS := '20010db8000000000000000000000001'O; modulepar Ipv4Address PX_FTP_SERVER_IPV4_ADDRESS := '41d0e4df'O; Loading ttcn/Ats464XLat/Ats464XLat_TestCases.ttcn3 +179 −4 Original line number Diff line number Diff line Loading @@ -261,6 +261,182 @@ module Ats464XLat_TestCases { group validBehaviour { /** * @desc Check that the IUT TCP_time_wait timer expires when required * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the IUT being properly provisioned * and the interfaces are connected & functional * and the IUT TCP_time_wait timer being set * and the IUT having received an IPv6 packet * containing TCP payload * indicating port numbers * } * Expected behaviour: * ensure that { * when { * the TCP_time_wait timer expires * and the IUT having received a second IPv6 packet * containing source address * indicating a different IPv6 address to the first IPv6 packet * containing TCP payload * indicating the same port numbers as the first originating packet * } * then { * the IUT decapsulates the IPv4 packet * and the IUT forwards it on * } * } * </pre> * * @version 0.0.1 * @reference ETSI TS 101 569-1 Clause 6.6.6.2 PLAT Timers * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2013-07) TP/464XLAT/PLAT-LSN/NT/VB/01 */ testcase TC_464XLAT_PLAT_LSN_NT_BV_001() runs on FourSixFourXLatComponent system TestAdapter { // Local variables var UInt v_hostNum := 0; var Ipv4Packet v_ipv4Packet; /** IPv4 packets */ var Ipv6Packet v_ipv6Packet; /** IPv6 packets address to IPv4 */ var Ipv6Packet v_ipv6Packet2; /** IPv6 packets address to IPv4 */ // Test control // Test component configuration vc_lsnComponents[v_hostNum] := LSNComponent.create(c_COMP_LSN); vc_hostComponents[v_hostNum] := HostComponent.create(c_COMP_HOST & int2str(v_hostNum)); f_cf01Up_PLAT(); // Test adapter configuration // Test Body // Start all components v_ipv4Packet := m_ipv4Packet_dummy( PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, PX_IPV4_DESTINATION_INFORMATION.iutAddress, m_tcp_packet( PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[v_hostNum].srcPort, PX_464XLAT_MAPPING_TABLE_1_TO_N.dstPort, PX_IPV4_DESTINATION_INFORMATION.payload, m_tcp_flags_syn ) ); v_ipv6Packet := m_generalIpv6_ipv4Payload( c_ipv4Hdr, PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[v_hostNum].ip6Address, PX_464XLAT_PREFIX & c_4ZeroBytes & PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, v_ipv4Packet ); v_ipv6Packet2 := v_ipv6Packet; v_ipv6Packet2.ipv6Hdr.sourceAddress := PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[v_hostNum+1].ip6Address; vc_lsnComponents[v_hostNum].start(f_TC_464XLAT_PLAT_LSN_NT_BV_001_lsn(v_ipv4Packet)); vc_hostComponents[v_hostNum].start(f_TC_464XLAT_PLAT_LSN_NT_BV_001_host(v_ipv6Packet, v_ipv6Packet2)); f_serverSyncNClientsAndStop(2, { c_prDone, c_tbDone, c_poDone }); // Postamble f_down(); } // End of testcase TC_464XLAT_PLAT_LSN_NT_BV_001 group f_TC_464XLAT_PLAT_LSN_NT_BV_001 { /** * @desc Simulates LSN side * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_464XLAT_PLAT_LSN_NT_BV_001_lsn(Ipv4Packet p_ipv4Packet) runs on LSNComponent { // Local variables var FncRetCode v_result; var Ipv4Address v_localAddress := PX_IPV4_DESTINATION_INFORMATION.iutAddress; // Preamble // Clause 'Initial conditions' f_preamble_lsn(v_localAddress); tc_ac.start; alt { [] ipv4Port.receive( mw_ipv4Packet_dummy( PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, v_localAddress, ? ) ) { tc_ac.stop; log("*** " & __SCOPE__ & ": IPv4 packet was correctly forwarded. ***"); } [] tc_ac.timeout { v_result := e_timeout; log("*** " & __SCOPE__ & ": Message was not received in time. ***"); } } // End of 'altstep' statement f_selfOrClientSyncAndVerdict(c_prDone, v_result); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body tc_ac.start; alt { [] ipv4Port.receive( mw_ipv4Packet_dummy( PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, v_localAddress, ? ) ) { tc_ac.stop; log("*** " & __SCOPE__ & ": IPv4 packet was correctly forwarded. ***"); } [] tc_ac.timeout { v_result := e_timeout; log("*** " & __SCOPE__ & ": Message was not received in time. ***"); } } // End of 'altstep' statement f_selfOrClientSyncAndVerdict(c_tbDone, v_result); // Postamble f_postamble_lsn(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_464XLAT_PLAT_LSN_NT_BV_001_lsn /** * @desc Simulates client side * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_464XLAT_PLAT_LSN_NT_BV_001_host(Ipv6Packet p_ipv6Packet, Ipv6Packet p_ipv6Packet2) runs on HostComponent { // Local variables timer t_tcpTimeWait := f_getTcpTimeWait(); // Preamble // Clause 'Initial conditions' f_preamble_host(); f_sendIpv6Packet(p_ipv6Packet); t_tcpTimeWait.start; f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body t_tcpTimeWait.timeout; f_sendIpv6Packet(p_ipv6Packet2); // Postamble f_postamble_host(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_464XLAT_PLAT_LSN_NT_BV_001_host } // End of group f_TC_464XLAT_PLAT_LSN_NT_BV_001 } // End of group validBehaviour } // End of group natTimers Loading Loading @@ -1466,12 +1642,11 @@ module Ats464XLat_TestCases { m_tcp_flags_syn ) ); v_ipv6Packet := m_generalIpv6_extHdr_data( c_tcpHdr, v_ipv6Packet := m_generalIpv6_ipv4Payload( c_ipv4Hdr, PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[v_host].ip6Address, PX_464XLAT_PREFIX & c_4ZeroBytes & PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, omit, v_ipv4Packet.ipv4Payload.rawPacket v_ipv4Packet ); vc_hostComponents[v_host].start(f_TC_464XLAT_PLATLSN_AA_BV_001_host(v_ipv6Packet)); Loading Loading
ttcn/Ats464XLat/Ats464XLat_Functions.ttcn3 +9 −0 Original line number Diff line number Diff line Loading @@ -968,4 +968,13 @@ module Ats464XLat_Functions { } // End of group globalSteps group getFunctions { function f_getTcpTimeWait() return float { return PX_TCP_TIME_WAIT; } // End of function f_getTcpTimeWait } // End of group getFunctions } // End of module Ats464XLat_Functions No newline at end of file
ttcn/Ats464XLat/Ats464XLat_Pixits.ttcn3 +2 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,8 @@ module Ats464XLat_Pixits { } } modulepar float PX_TCP_TIME_WAIT := 15.0; modulepar Ipv6Address PX_FTP_CLIENT_IPV6_ADDRESS := '20010db8000000000000000000000001'O; modulepar Ipv4Address PX_FTP_SERVER_IPV4_ADDRESS := '41d0e4df'O; Loading
ttcn/Ats464XLat/Ats464XLat_TestCases.ttcn3 +179 −4 Original line number Diff line number Diff line Loading @@ -261,6 +261,182 @@ module Ats464XLat_TestCases { group validBehaviour { /** * @desc Check that the IUT TCP_time_wait timer expires when required * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the IUT being properly provisioned * and the interfaces are connected & functional * and the IUT TCP_time_wait timer being set * and the IUT having received an IPv6 packet * containing TCP payload * indicating port numbers * } * Expected behaviour: * ensure that { * when { * the TCP_time_wait timer expires * and the IUT having received a second IPv6 packet * containing source address * indicating a different IPv6 address to the first IPv6 packet * containing TCP payload * indicating the same port numbers as the first originating packet * } * then { * the IUT decapsulates the IPv4 packet * and the IUT forwards it on * } * } * </pre> * * @version 0.0.1 * @reference ETSI TS 101 569-1 Clause 6.6.6.2 PLAT Timers * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2013-07) TP/464XLAT/PLAT-LSN/NT/VB/01 */ testcase TC_464XLAT_PLAT_LSN_NT_BV_001() runs on FourSixFourXLatComponent system TestAdapter { // Local variables var UInt v_hostNum := 0; var Ipv4Packet v_ipv4Packet; /** IPv4 packets */ var Ipv6Packet v_ipv6Packet; /** IPv6 packets address to IPv4 */ var Ipv6Packet v_ipv6Packet2; /** IPv6 packets address to IPv4 */ // Test control // Test component configuration vc_lsnComponents[v_hostNum] := LSNComponent.create(c_COMP_LSN); vc_hostComponents[v_hostNum] := HostComponent.create(c_COMP_HOST & int2str(v_hostNum)); f_cf01Up_PLAT(); // Test adapter configuration // Test Body // Start all components v_ipv4Packet := m_ipv4Packet_dummy( PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, PX_IPV4_DESTINATION_INFORMATION.iutAddress, m_tcp_packet( PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[v_hostNum].srcPort, PX_464XLAT_MAPPING_TABLE_1_TO_N.dstPort, PX_IPV4_DESTINATION_INFORMATION.payload, m_tcp_flags_syn ) ); v_ipv6Packet := m_generalIpv6_ipv4Payload( c_ipv4Hdr, PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[v_hostNum].ip6Address, PX_464XLAT_PREFIX & c_4ZeroBytes & PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, v_ipv4Packet ); v_ipv6Packet2 := v_ipv6Packet; v_ipv6Packet2.ipv6Hdr.sourceAddress := PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[v_hostNum+1].ip6Address; vc_lsnComponents[v_hostNum].start(f_TC_464XLAT_PLAT_LSN_NT_BV_001_lsn(v_ipv4Packet)); vc_hostComponents[v_hostNum].start(f_TC_464XLAT_PLAT_LSN_NT_BV_001_host(v_ipv6Packet, v_ipv6Packet2)); f_serverSyncNClientsAndStop(2, { c_prDone, c_tbDone, c_poDone }); // Postamble f_down(); } // End of testcase TC_464XLAT_PLAT_LSN_NT_BV_001 group f_TC_464XLAT_PLAT_LSN_NT_BV_001 { /** * @desc Simulates LSN side * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_464XLAT_PLAT_LSN_NT_BV_001_lsn(Ipv4Packet p_ipv4Packet) runs on LSNComponent { // Local variables var FncRetCode v_result; var Ipv4Address v_localAddress := PX_IPV4_DESTINATION_INFORMATION.iutAddress; // Preamble // Clause 'Initial conditions' f_preamble_lsn(v_localAddress); tc_ac.start; alt { [] ipv4Port.receive( mw_ipv4Packet_dummy( PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, v_localAddress, ? ) ) { tc_ac.stop; log("*** " & __SCOPE__ & ": IPv4 packet was correctly forwarded. ***"); } [] tc_ac.timeout { v_result := e_timeout; log("*** " & __SCOPE__ & ": Message was not received in time. ***"); } } // End of 'altstep' statement f_selfOrClientSyncAndVerdict(c_prDone, v_result); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body tc_ac.start; alt { [] ipv4Port.receive( mw_ipv4Packet_dummy( PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, v_localAddress, ? ) ) { tc_ac.stop; log("*** " & __SCOPE__ & ": IPv4 packet was correctly forwarded. ***"); } [] tc_ac.timeout { v_result := e_timeout; log("*** " & __SCOPE__ & ": Message was not received in time. ***"); } } // End of 'altstep' statement f_selfOrClientSyncAndVerdict(c_tbDone, v_result); // Postamble f_postamble_lsn(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_464XLAT_PLAT_LSN_NT_BV_001_lsn /** * @desc Simulates client side * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_464XLAT_PLAT_LSN_NT_BV_001_host(Ipv6Packet p_ipv6Packet, Ipv6Packet p_ipv6Packet2) runs on HostComponent { // Local variables timer t_tcpTimeWait := f_getTcpTimeWait(); // Preamble // Clause 'Initial conditions' f_preamble_host(); f_sendIpv6Packet(p_ipv6Packet); t_tcpTimeWait.start; f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body t_tcpTimeWait.timeout; f_sendIpv6Packet(p_ipv6Packet2); // Postamble f_postamble_host(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_464XLAT_PLAT_LSN_NT_BV_001_host } // End of group f_TC_464XLAT_PLAT_LSN_NT_BV_001 } // End of group validBehaviour } // End of group natTimers Loading Loading @@ -1466,12 +1642,11 @@ module Ats464XLat_TestCases { m_tcp_flags_syn ) ); v_ipv6Packet := m_generalIpv6_extHdr_data( c_tcpHdr, v_ipv6Packet := m_generalIpv6_ipv4Payload( c_ipv4Hdr, PX_464XLAT_MAPPING_TABLE_1_TO_N.portInfos[v_host].ip6Address, PX_464XLAT_PREFIX & c_4ZeroBytes & PX_464XLAT_MAPPING_TABLE_1_TO_N.ip4Address, omit, v_ipv4Packet.ipv4Payload.rawPacket v_ipv4Packet ); vc_hostComponents[v_host].start(f_TC_464XLAT_PLATLSN_AA_BV_001_host(v_ipv6Packet)); Loading