Loading ttcn/AtsMAPE/AtsMapE_Pixits.ttcn3 +5 −0 Original line number Diff line number Diff line Loading @@ -105,4 +105,9 @@ module AtsMapE_Pixits { */ modulepar UInt PX_MAPE_TUNNEL_MTU := 1500; /** * @desc CPE IPv4 port ranges */ modulepar UInt16 PX_IUT_PORT_RANGE := 3000; } // End of module AtsMapE_Pixits No newline at end of file ttcn/AtsMAPE/AtsMapE_TestCases.ttcn3 +206 −14 Original line number Diff line number Diff line Loading @@ -1853,7 +1853,7 @@ module AtsMapE_TestCases { alt { [v_dataReceived == true] ipPort.receive( mdw_generalIpv6_extHdr_dst_ipv4Payload( c_tunneledIpHdr, c_ipv4Hdr, PX_BR_GW_IPv6_ADDRESS, // containing destination address indicating IPv6 BR GW address ?, ? Loading Loading @@ -2019,8 +2019,8 @@ module AtsMapE_TestCases { var integer v_host; /** 'for' statement counter */ // Test control if (not(PICS_ROLE_IS_BR)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_BR' required for executing the TC ***"); if (not(PICS_ROLE_IS_CPE)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_CPE' required for executing the TC ***"); stop; } Loading Loading @@ -2092,7 +2092,7 @@ module AtsMapE_TestCases { alt { [] ipPort.receive( mdw_generalIpv6_extHdr_dst_ipv4Payload( c_tunneledIpHdr, c_ipv4Hdr, PX_BR_GW_IPv6_ADDRESS, // containing destination address indicating IPv6 BR GW address ?, ? Loading Loading @@ -2165,7 +2165,7 @@ module AtsMapE_TestCases { * @desc Check that the IUT fragments an HTML IPv4 packet upstream * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * PICS Selection: PICS_ROLE_IS_CPE * Initial conditions: * with { * the physical MTU (Phy-MTU) size being equal or greater than the MAP-E IPv6 packet between all devices and, Loading Loading @@ -2199,6 +2199,10 @@ module AtsMapE_TestCases { var integer v_index := 0; // Test control if (not(PICS_ROLE_IS_CPE)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_CPE' required for executing the TC ***"); stop; } // Test component configuration vc_brComponents[v_index] := BRComponent.create(c_COMP_BR); Loading Loading @@ -2361,7 +2365,7 @@ module AtsMapE_TestCases { * @desc Check that the IUT functions with MSS clamping * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * PICS Selection: PICS_ROLE_IS_CPE * Initial conditions: * with { * the physical MTU (Phy-MTU) size being equal or greater than the MAP-E IPv6 packet between all devices and, Loading Loading @@ -2393,6 +2397,10 @@ module AtsMapE_TestCases { var Ipv4Packet v_ipv4Packet; /** IPv4 packets */ // Test control if (not(PICS_ROLE_IS_CPE)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_CPE' required for executing the TC ***"); stop; } // Test component configuration vc_brComponents[0] := BRComponent.create(c_COMP_LSN); Loading Loading @@ -2511,6 +2519,190 @@ module AtsMapE_TestCases { } // End of group mssClamping /** * @desc Session Control * @reference ETSI TS xxx xxx-x V0.0.1 (2013-12) Clause 5.2.6 */ group sessionControl { group validBehaviour { /** * @desc Check that the IUT supports session control within port range * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: PICS_ROLE_IS_CPE and PICS_PORT_RANGE * Initial conditions: * with { * the IUT is properly provisioned * the interfaces are connected & functional * the IUT is configured with a specific port range address * } * Expected behaviour: * ensure that { * when { * the IUT receives multiple IPv4 packets * containing IPv4 transport header * containing source address * indicating a private IPv4 address * containing destination address * indicating public address * from a single CPE devices * } * then { * * } * } * </pre> * * @version 0.0.1 * @reference ETSI TS 101 569-1 V1.1.1 Clause 6.7.9.14 Feature: MAP-E Inbound Session control * @reference draft-ietf-softwire-map-10 Clause 5 * @see ETSI TS xxx xxx-x V0.0.1 (2013-12) TP/MAP-E/CPE/SC/BV/001 */ testcase TC_MAPE_CPE_SC_BV_001() runs on MapEComponent system TestAdapter { // Local variables var integer v_hostNum := lengthof(PX_MULTIPLE_HOSTS_V4_IN_V6); /** Expected number of IPv6 packets to be forwarded */ var HostBrDataMsgs v_hostBrDataMsgs; /** Expected of IPv4 packets to be sent to the SUT */ var Ipv4Packet v_ipv4Packet; /** IPv4 packets to be sent */ var integer v_host; /** 'for' statement counter */ // Test control if (not(PICS_ROLE_IS_CPE) or not(PICS_PORT_RANGE)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_CPE and PICS_PORT_RANGE' required for executing the TC ***"); stop; } // Test component configuration vc_brComponents[0] := BRComponent.create(c_COMP_AFTR); for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { vc_hostComponents[v_host] := HostComponent.create(c_COMP_HOST & int2str(v_host)); } // End of 'for' statement f_cf01Up_br(); // Test adapter configuration // Build the list of the IPv6packet to be sent for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { // Encapsulate IPv6 packet into IPv4 f_finalyzeIpv4Packet( m_ipv4Packet_dummy( // containing IPv4 transport header PX_MULTIPLE_HOSTS_V4_IN_V6[v_host].srcAddress, // containing source address a private IPv4 address PX_IPv4_BROADCAST_ADDRESS, // containing destination address indicating a broadcast address m_tcp_packet( PX_MULTIPLE_HOSTS_V4_IN_V6[v_host].srcPort, PX_IUT_PORT_RANGE, // Shall be within port range PX_MULTIPLE_HOSTS_V4_IN_V6[v_host].payload, m_tcp_flags_syn ) ), v_ipv4Packet ); v_hostBrDataMsgs[v_host].hostId := v_host; v_hostBrDataMsgs[v_host].payload.ipv4Packet := v_ipv4Packet; } // End of 'for' statement // Start all components vc_brComponents[0].start(f_TC_MAPE_CPE_SC_BV_001_br()); for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { vc_hostComponents[v_host].start(f_TC_MAPE_CPE_SC_BV_001_host(v_hostBrDataMsgs[v_host])); } // End of 'for' statement // Test Body // Clause 'when': Nothing to do // Clause 'then': Nothing to do, refer to a_default f_serverSyncNClientsAndStop(v_hostNum + 1, { c_prDone, c_tbDone, c_poDone }); // Postamble f_down(); } // End of testcase TC_MAPE_CPE_SC_BV_001 group f_TC_MAPE_CPE_SC_BV_001 { /** * @desc Implements BR side behavior * @verdict pass on success, inconc on timeout, fail otherwise */ function f_TC_MAPE_CPE_SC_BV_001_br() runs on BRComponent { // Local variables // Preamble // Clause 'Initial conditions' f_preamble_br(c_4ZeroBytes/*Not used*/); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body tc_ac.start; alt { [] ipPort.receive( mdw_generalIpv6_extHdr_dst_ipv4Payload( c_ipv4Hdr, PX_BR_GW_IPv6_ADDRESS, // containing destination address indicating IPv6 BR GW address ?, ? )) { tc_ac.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_error); log("*** " & __SCOPE__ & ": FAIL: The IUT should drop the packet. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: The IUT drops the packets. ***"); } } // End of 'altstep' statement // Postamble f_postamble_br(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_MAPE_CPE_SC_BV_001_br /** * @desc Implements multiple host side behavior * @param p_srcAddress The HTTP client address * @param p_httpServerAddress The HTTP server address * @param p_noOfDataRequests The number of hosts to simulate * @verdict pass on success, inconc on timeout, fail otherwise */ function f_TC_MAPE_CPE_SC_BV_001_host(in HostBrDataMsg p_hostBrDataMsg) runs on HostComponent { // Local variables // Preamble // Clause 'Initial conditions' f_preamble_host(); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body // Clause 'when': the IUT receives multiple HTML IPv4 packets ipv4Port.send(p_hostBrDataMsg.payload.ipv4Packet); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // Postamble f_postamble_host(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_MAPE_CPE_SC_BV_001_host } // End of group f_TC_MAPE_CPE_SC_BV_001 } // End of group validBehaviour group invalidBehaviour { } // End of group invalidBehaviour } // End of group sessionControl } // End of group cpeRole } // End of AtsMapE_TestCases No newline at end of file ttcn/AtsMAPE/AtsMapE_TestControl.ttcn3 +11 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,17 @@ module AtsMapE_TestControl { * @reference RFC 4459 */ execute(TC_MAPE_CPE_MSSC_BV_001()); if (PICS_PORT_RANGE) { /** * @desc Check that the IUT supports session control within port range * @reference ETSI TS 101 569-1 V1.1.1 Clause 6.7.9.14 Feature: MAP-E Inbound Session control * @reference draft-ietf-softwire-map-10 Clause 5 */ execute(TC_MAPE_CPE_SC_BV_001()); } } } // End of 'control' statement Loading Loading
ttcn/AtsMAPE/AtsMapE_Pixits.ttcn3 +5 −0 Original line number Diff line number Diff line Loading @@ -105,4 +105,9 @@ module AtsMapE_Pixits { */ modulepar UInt PX_MAPE_TUNNEL_MTU := 1500; /** * @desc CPE IPv4 port ranges */ modulepar UInt16 PX_IUT_PORT_RANGE := 3000; } // End of module AtsMapE_Pixits No newline at end of file
ttcn/AtsMAPE/AtsMapE_TestCases.ttcn3 +206 −14 Original line number Diff line number Diff line Loading @@ -1853,7 +1853,7 @@ module AtsMapE_TestCases { alt { [v_dataReceived == true] ipPort.receive( mdw_generalIpv6_extHdr_dst_ipv4Payload( c_tunneledIpHdr, c_ipv4Hdr, PX_BR_GW_IPv6_ADDRESS, // containing destination address indicating IPv6 BR GW address ?, ? Loading Loading @@ -2019,8 +2019,8 @@ module AtsMapE_TestCases { var integer v_host; /** 'for' statement counter */ // Test control if (not(PICS_ROLE_IS_BR)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_BR' required for executing the TC ***"); if (not(PICS_ROLE_IS_CPE)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_CPE' required for executing the TC ***"); stop; } Loading Loading @@ -2092,7 +2092,7 @@ module AtsMapE_TestCases { alt { [] ipPort.receive( mdw_generalIpv6_extHdr_dst_ipv4Payload( c_tunneledIpHdr, c_ipv4Hdr, PX_BR_GW_IPv6_ADDRESS, // containing destination address indicating IPv6 BR GW address ?, ? Loading Loading @@ -2165,7 +2165,7 @@ module AtsMapE_TestCases { * @desc Check that the IUT fragments an HTML IPv4 packet upstream * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * PICS Selection: PICS_ROLE_IS_CPE * Initial conditions: * with { * the physical MTU (Phy-MTU) size being equal or greater than the MAP-E IPv6 packet between all devices and, Loading Loading @@ -2199,6 +2199,10 @@ module AtsMapE_TestCases { var integer v_index := 0; // Test control if (not(PICS_ROLE_IS_CPE)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_CPE' required for executing the TC ***"); stop; } // Test component configuration vc_brComponents[v_index] := BRComponent.create(c_COMP_BR); Loading Loading @@ -2361,7 +2365,7 @@ module AtsMapE_TestCases { * @desc Check that the IUT functions with MSS clamping * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * PICS Selection: PICS_ROLE_IS_CPE * Initial conditions: * with { * the physical MTU (Phy-MTU) size being equal or greater than the MAP-E IPv6 packet between all devices and, Loading Loading @@ -2393,6 +2397,10 @@ module AtsMapE_TestCases { var Ipv4Packet v_ipv4Packet; /** IPv4 packets */ // Test control if (not(PICS_ROLE_IS_CPE)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_CPE' required for executing the TC ***"); stop; } // Test component configuration vc_brComponents[0] := BRComponent.create(c_COMP_LSN); Loading Loading @@ -2511,6 +2519,190 @@ module AtsMapE_TestCases { } // End of group mssClamping /** * @desc Session Control * @reference ETSI TS xxx xxx-x V0.0.1 (2013-12) Clause 5.2.6 */ group sessionControl { group validBehaviour { /** * @desc Check that the IUT supports session control within port range * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: PICS_ROLE_IS_CPE and PICS_PORT_RANGE * Initial conditions: * with { * the IUT is properly provisioned * the interfaces are connected & functional * the IUT is configured with a specific port range address * } * Expected behaviour: * ensure that { * when { * the IUT receives multiple IPv4 packets * containing IPv4 transport header * containing source address * indicating a private IPv4 address * containing destination address * indicating public address * from a single CPE devices * } * then { * * } * } * </pre> * * @version 0.0.1 * @reference ETSI TS 101 569-1 V1.1.1 Clause 6.7.9.14 Feature: MAP-E Inbound Session control * @reference draft-ietf-softwire-map-10 Clause 5 * @see ETSI TS xxx xxx-x V0.0.1 (2013-12) TP/MAP-E/CPE/SC/BV/001 */ testcase TC_MAPE_CPE_SC_BV_001() runs on MapEComponent system TestAdapter { // Local variables var integer v_hostNum := lengthof(PX_MULTIPLE_HOSTS_V4_IN_V6); /** Expected number of IPv6 packets to be forwarded */ var HostBrDataMsgs v_hostBrDataMsgs; /** Expected of IPv4 packets to be sent to the SUT */ var Ipv4Packet v_ipv4Packet; /** IPv4 packets to be sent */ var integer v_host; /** 'for' statement counter */ // Test control if (not(PICS_ROLE_IS_CPE) or not(PICS_PORT_RANGE)) { log("*** " & __SCOPE__ & ": ERROR: 'PICS_ROLE_IS_CPE and PICS_PORT_RANGE' required for executing the TC ***"); stop; } // Test component configuration vc_brComponents[0] := BRComponent.create(c_COMP_AFTR); for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { vc_hostComponents[v_host] := HostComponent.create(c_COMP_HOST & int2str(v_host)); } // End of 'for' statement f_cf01Up_br(); // Test adapter configuration // Build the list of the IPv6packet to be sent for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { // Encapsulate IPv6 packet into IPv4 f_finalyzeIpv4Packet( m_ipv4Packet_dummy( // containing IPv4 transport header PX_MULTIPLE_HOSTS_V4_IN_V6[v_host].srcAddress, // containing source address a private IPv4 address PX_IPv4_BROADCAST_ADDRESS, // containing destination address indicating a broadcast address m_tcp_packet( PX_MULTIPLE_HOSTS_V4_IN_V6[v_host].srcPort, PX_IUT_PORT_RANGE, // Shall be within port range PX_MULTIPLE_HOSTS_V4_IN_V6[v_host].payload, m_tcp_flags_syn ) ), v_ipv4Packet ); v_hostBrDataMsgs[v_host].hostId := v_host; v_hostBrDataMsgs[v_host].payload.ipv4Packet := v_ipv4Packet; } // End of 'for' statement // Start all components vc_brComponents[0].start(f_TC_MAPE_CPE_SC_BV_001_br()); for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { vc_hostComponents[v_host].start(f_TC_MAPE_CPE_SC_BV_001_host(v_hostBrDataMsgs[v_host])); } // End of 'for' statement // Test Body // Clause 'when': Nothing to do // Clause 'then': Nothing to do, refer to a_default f_serverSyncNClientsAndStop(v_hostNum + 1, { c_prDone, c_tbDone, c_poDone }); // Postamble f_down(); } // End of testcase TC_MAPE_CPE_SC_BV_001 group f_TC_MAPE_CPE_SC_BV_001 { /** * @desc Implements BR side behavior * @verdict pass on success, inconc on timeout, fail otherwise */ function f_TC_MAPE_CPE_SC_BV_001_br() runs on BRComponent { // Local variables // Preamble // Clause 'Initial conditions' f_preamble_br(c_4ZeroBytes/*Not used*/); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body tc_ac.start; alt { [] ipPort.receive( mdw_generalIpv6_extHdr_dst_ipv4Payload( c_ipv4Hdr, PX_BR_GW_IPv6_ADDRESS, // containing destination address indicating IPv6 BR GW address ?, ? )) { tc_ac.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_error); log("*** " & __SCOPE__ & ": FAIL: The IUT should drop the packet. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: The IUT drops the packets. ***"); } } // End of 'altstep' statement // Postamble f_postamble_br(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_MAPE_CPE_SC_BV_001_br /** * @desc Implements multiple host side behavior * @param p_srcAddress The HTTP client address * @param p_httpServerAddress The HTTP server address * @param p_noOfDataRequests The number of hosts to simulate * @verdict pass on success, inconc on timeout, fail otherwise */ function f_TC_MAPE_CPE_SC_BV_001_host(in HostBrDataMsg p_hostBrDataMsg) runs on HostComponent { // Local variables // Preamble // Clause 'Initial conditions' f_preamble_host(); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body // Clause 'when': the IUT receives multiple HTML IPv4 packets ipv4Port.send(p_hostBrDataMsg.payload.ipv4Packet); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // Postamble f_postamble_host(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_MAPE_CPE_SC_BV_001_host } // End of group f_TC_MAPE_CPE_SC_BV_001 } // End of group validBehaviour group invalidBehaviour { } // End of group invalidBehaviour } // End of group sessionControl } // End of group cpeRole } // End of AtsMapE_TestCases No newline at end of file
ttcn/AtsMAPE/AtsMapE_TestControl.ttcn3 +11 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,17 @@ module AtsMapE_TestControl { * @reference RFC 4459 */ execute(TC_MAPE_CPE_MSSC_BV_001()); if (PICS_PORT_RANGE) { /** * @desc Check that the IUT supports session control within port range * @reference ETSI TS 101 569-1 V1.1.1 Clause 6.7.9.14 Feature: MAP-E Inbound Session control * @reference draft-ietf-softwire-map-10 Clause 5 */ execute(TC_MAPE_CPE_SC_BV_001()); } } } // End of 'control' statement Loading