Loading ttcn/AtsCommon/AtsCommon_Templates.ttcn3 +7 −2 Original line number Diff line number Diff line Loading @@ -72,7 +72,8 @@ module AtsCommon_Templates { template (value) TcpPacket m_tcp_packet( in template (value) UInt16 p_srcPort, in template (value) UInt16 p_dstPort, in template (value) TcpPayload p_payload in template (value) TcpPayload p_payload, in template (value) TcpFlags p_tcpFlags := m_tcp_flags_dummy ) := { srcPort := p_srcPort, dstPort := p_dstPort, Loading @@ -80,7 +81,7 @@ module AtsCommon_Templates { ackNumber := omit, dataOffset := 5, reserved := '000'B, flags := m_tcp_flags_dummy, flags := p_tcpFlags, windowSize := 0, checksum := 0, urgentPointer := 0, Loading @@ -101,6 +102,10 @@ module AtsCommon_Templates { fin := '0'B } // End of template m_tcp_flags_dummy template (value) TcpFlags m_tcp_flags_syn modifies m_tcp_flags_dummy := { syn := '1'B } // End m_tcp_flags_syn } // End of group tcpDummySendTemplates group tcpMessagesDummyRecvTemplates { Loading ttcn/AtsCommon/AtsCommon_TypesAndValues.ttcn +15 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,21 @@ group ipv4Hosts { /** * @desc Description of an IPv4 host service for 1:n NAT mapping * @member srcAddress * @member destInfo */ type record HostV4Description_1toN { Ipv4Address srcAddress, record of record { UInt16 srcPort, Ipv4Address dstAddress, UInt16 dstPort, TcpPayload payload } destInfo } // End of type HostV4Description /** * @desc Description of an IPv4 host service * @member srcAddress Loading ttcn/AtsNAT64/AtsNat64_Pixits.ttcn3 +29 −4 Original line number Diff line number Diff line Loading @@ -20,17 +20,17 @@ module AtsNat64_Pixits { */ modulepar HostV6Descriptions PX_HOST_V6_LIST_LSN := { { hostAddress := '20010db8000000000000000000000001'O // Containing source address indicating a private IPv6 address hostAddress := '20010db8000000000000000000000001'O // Containing source address indicating a client IPv6 address }, // Host #0 { hostAddress := '20010db8000000000000000000000002'O // Containing source address indicating a private IPv6 address hostAddress := '20010db8000000000000000000000002'O // Containing source address indicating a client IPv6 address } // Host #1 } // End of modulepar PX_HOST_V6_LIST_LSN /** * @desc Defines a list of IPv4 host services for NAT64 tests. * @desc Defines a list of IPv4 host services for 1:1 NAT mapping tests. */ modulepar HostV4Descriptions PX_HOST_V4_LIST_LSN := { modulepar HostV4Descriptions PX_HOST_V4_LIST_1_TO_1_NAT := { { srcAddress := '91fea0ed'O, // Containing source address indicating a private IPv4 address srcPort := 3372, Loading @@ -51,4 +51,29 @@ module AtsNat64_Pixits { } // Host #1 } // End of modulepar PX_HOST_V4_LIST_LSN /** * @desc Defines a list of IPv4 host services for 1:n NAT mapping tests. */ modulepar HostV4Description_1toN PX_HOST_V4_LIST_1_TO_N_NAT := { srcAddress := '91fea0ed'O, // Containing source address indicating a private IPv4 address destInfo := { { srcPort := 3372, dstAddress := '41d0e4df'O, // Containing destination address indicating a public IPv4 address from multiple hosts dstPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } }, // Host #0 { srcPort := 3372, dstAddress := '41d0e4e0'O, // Containing destination address indicating a public IPv4 address from multiple hosts dstPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } } // Host #1 } } // End of modulepar PX_HOST_V4_LIST_1_TO_N_NAT } // End of module AtsNat64_Pixits No newline at end of file ttcn/AtsNAT64/AtsNat64_TestCases.ttcn3 +167 −8 Original line number Diff line number Diff line Loading @@ -61,7 +61,8 @@ module AtsNat64_TestCases { * indicating client IPv6 address * containing destination address * indicating IUT GW IPv6 prefix first 64 bits * indicating IUT IPv4 embedded into the IPv6 address in last 64 bits from multiple client devices * indicating IUT IPv4 embedded into the IPv6 address in last 64 bits * from multiple client devices * } * then { * the IUT does a 1:1 NAT mapping for each public IPv6 client addresses sourced and, Loading @@ -77,7 +78,7 @@ module AtsNat64_TestCases { testcase TC_NAT64_LSN_BF_BV_001() runs on Nat64Component system TestAdapter { // Local variables var integer v_hostNum := lengthof(PX_HOST_V4_LIST_LSN); /** Expected number of IPv6 packets to be forwarded */ var integer v_hostNum := lengthof(PX_HOST_V4_LIST_1_TO_1_NAT); /** Expected number of IPv6 packets to be forwarded */ var Ipv4Packet v_ipv4Packet; /** IPv4 packets */ var Ipv6Packet v_ipv6Packet; /** IPv6 packets address to IPv4 */ var integer v_host; /** 'for' statement counter */ Loading @@ -98,12 +99,13 @@ module AtsNat64_TestCases { for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { f_finalyzeIpv4Packet( m_ipv4Packet_dummy( PX_HOST_V4_LIST_LSN[v_host].srcAddress, PX_HOST_V4_LIST_LSN[v_host].dstAddress, PX_HOST_V4_LIST_1_TO_1_NAT[v_host].srcAddress, PX_HOST_V4_LIST_1_TO_1_NAT[v_host].dstAddress, m_tcp_packet( PX_HOST_V4_LIST_LSN[v_host].srcPort, PX_HOST_V4_LIST_LSN[v_host].dstPort, PX_HOST_V4_LIST_LSN[v_host].payload PX_HOST_V4_LIST_1_TO_1_NAT[v_host].srcPort, PX_HOST_V4_LIST_1_TO_1_NAT[v_host].dstPort, PX_HOST_V4_LIST_1_TO_1_NAT[v_host].payload, m_tcp_flags_syn ) ), v_ipv4Packet Loading @@ -111,7 +113,7 @@ module AtsNat64_TestCases { v_ipv6Packet := m_generalIpv6_extHdr_data( c_tcpHdr, PX_HOST_V6_LIST_LSN[v_host].hostAddress, PX_NAT64_PREFIX & PX_HOST_V4_LIST_LSN[v_host].dstAddress, PX_NAT64_PREFIX & PX_HOST_V4_LIST_1_TO_1_NAT[v_host].dstAddress, omit, v_ipv4Packet.ipv4Payload.rawPacket ); Loading Loading @@ -197,6 +199,163 @@ module AtsNat64_TestCases { } // End of group f_TC_NAT64_LSN_BF_BV_001 /** * @desc Check that the IUT supports the functionality of NAT64 1:n NAT mapping with port translation * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the IUT is properly provisioned * the interfaces are connected & functional * } * Expected behaviour: * ensure that { * when { * the IUT receives multiple IPv6 packets * containing IPv6 transport header * containing source address * indicating client IPv6 address * containing destination address * indicating IUT GW IPv6 prefix first 64 bits * indicating IUT IPv4 embedded into the IPv6 address in last 64 bits * from multiple client devices * } * then { * the IUT does a 1:n NAT mapping for multiple public IPv6 B4 addresses sourced and, * the IUT forwards packets to the destination with same public IPv4 source address * } * } * </pre> * * @version 0.0.1 * @reference ETSI TS 101 569-1 Clause 6.4.4.4 1:1 Shared/Split Resources * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2013-07) TP/NAT64/LSN/BF/VB/02 */ testcase TC_NAT64_LSN_BF_BV_002() runs on Nat64Component system TestAdapter { // Local variables var integer v_hostNum := lengthof(PX_HOST_V4_LIST_1_TO_1_NAT); /** Expected number of IPv6 packets to be forwarded */ var Ipv4Packet v_ipv4Packet; /** IPv4 packets */ var Ipv6Packet v_ipv6Packet; /** IPv6 packets address to IPv4 */ var integer v_host; /** 'for' statement counter */ // Test control // Test component configuration for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { vc_lsnComponents[v_host] := LSNComponent.create(c_COMP_LSN & int2str(v_host)); vc_hostComponents[v_host] := HostComponent.create(c_COMP_HOST & int2str(v_host)); } // End of 'for' statement f_cf01Up(); // Test adapter configuration // Test Body // Start all components for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { f_finalyzeIpv4Packet( m_ipv4Packet_dummy( PX_HOST_V4_LIST_1_TO_N_NAT.srcAddress, PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].dstAddress, m_tcp_packet( PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].srcPort, PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].dstPort, PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].payload, m_tcp_flags_syn ) ), v_ipv4Packet ); v_ipv6Packet := m_generalIpv6_extHdr_data( c_tcpHdr, PX_HOST_V6_LIST_LSN[v_host].hostAddress, PX_NAT64_PREFIX & PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].dstAddress, omit, v_ipv4Packet.ipv4Payload.rawPacket ); vc_lsnComponents[v_host].start(f_TC_NAT64_LSN_NP_BV_002_lsn(v_ipv4Packet)); vc_hostComponents[v_host].start(f_TC_NAT64_LSN_NP_BV_002_host(v_ipv6Packet)); } // End of 'for' statement f_serverSyncNClientsAndStop(v_hostNum, { c_prDone, c_tbDone, c_poDone }); // Postamble f_down(); } // End of testcase TC_NAT64_LSN_BF_BV_002 group f_TC_NAT64_LSN_BF_BV_001 { /** * @desc Implement LSN protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_NAT64_LSN_NP_BV_002_lsn(Ipv4Packet v_ipv4Packet) runs on LSNComponent { // Local variables // Preamble // Clause 'Initial conditions' f_preamble_lsn(); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body // Clause 'when': the IUT does a 1:n NAT mapping for multiple public IPv6 B4 addresses sourced and, // the IUT forwards packets to the destination with same public IPv4 source address tc_ac.start; alt { [] ipv4Port.receive(v_ipv4Packet) { tc_ac.stop; log("*** " & __SCOPE__ & ": PASS: IPv4 packet was forwarded. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_lsn(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_NAT64_LSN_NP_BV_002_lsn /** * @desc Implement LSN protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_NAT64_LSN_NP_BV_002_host(Ipv6Packet p_ipv6Packet) 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 //TODO needs to be called as it sets length and checksum fields // if(f_setExtensionHeaders(v_ipv6Packet) != e_success) { // log(" **** " & __SCOPE__ & ": Error when calculating length of extension headers ****"); // f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // } ipv6Port.send(p_ipv6Packet); // Postamble f_postamble_host(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_NAT64_LSN_NP_BV_001_host } // End of group f_TC_NAT64_LSN_BF_BV_002 } // End of group validBehaviour group invalidBehaviour { Loading ttcn/AtsNAT64/AtsNat64_TypeAndValues.ttcn3 +2 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * @version $Id$ * @desc This module defines the ATS types and values */ module AtsDSLite_TypesAndValues { module AtsNat64_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues { Loading Loading @@ -48,4 +48,4 @@ module AtsDSLite_TypesAndValues { } // End of group ipv4Hosts } // End of module AtsDSLite_TypesAndValues No newline at end of file } // End of module AtsNat64_TypesAndValues No newline at end of file Loading
ttcn/AtsCommon/AtsCommon_Templates.ttcn3 +7 −2 Original line number Diff line number Diff line Loading @@ -72,7 +72,8 @@ module AtsCommon_Templates { template (value) TcpPacket m_tcp_packet( in template (value) UInt16 p_srcPort, in template (value) UInt16 p_dstPort, in template (value) TcpPayload p_payload in template (value) TcpPayload p_payload, in template (value) TcpFlags p_tcpFlags := m_tcp_flags_dummy ) := { srcPort := p_srcPort, dstPort := p_dstPort, Loading @@ -80,7 +81,7 @@ module AtsCommon_Templates { ackNumber := omit, dataOffset := 5, reserved := '000'B, flags := m_tcp_flags_dummy, flags := p_tcpFlags, windowSize := 0, checksum := 0, urgentPointer := 0, Loading @@ -101,6 +102,10 @@ module AtsCommon_Templates { fin := '0'B } // End of template m_tcp_flags_dummy template (value) TcpFlags m_tcp_flags_syn modifies m_tcp_flags_dummy := { syn := '1'B } // End m_tcp_flags_syn } // End of group tcpDummySendTemplates group tcpMessagesDummyRecvTemplates { Loading
ttcn/AtsCommon/AtsCommon_TypesAndValues.ttcn +15 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,21 @@ group ipv4Hosts { /** * @desc Description of an IPv4 host service for 1:n NAT mapping * @member srcAddress * @member destInfo */ type record HostV4Description_1toN { Ipv4Address srcAddress, record of record { UInt16 srcPort, Ipv4Address dstAddress, UInt16 dstPort, TcpPayload payload } destInfo } // End of type HostV4Description /** * @desc Description of an IPv4 host service * @member srcAddress Loading
ttcn/AtsNAT64/AtsNat64_Pixits.ttcn3 +29 −4 Original line number Diff line number Diff line Loading @@ -20,17 +20,17 @@ module AtsNat64_Pixits { */ modulepar HostV6Descriptions PX_HOST_V6_LIST_LSN := { { hostAddress := '20010db8000000000000000000000001'O // Containing source address indicating a private IPv6 address hostAddress := '20010db8000000000000000000000001'O // Containing source address indicating a client IPv6 address }, // Host #0 { hostAddress := '20010db8000000000000000000000002'O // Containing source address indicating a private IPv6 address hostAddress := '20010db8000000000000000000000002'O // Containing source address indicating a client IPv6 address } // Host #1 } // End of modulepar PX_HOST_V6_LIST_LSN /** * @desc Defines a list of IPv4 host services for NAT64 tests. * @desc Defines a list of IPv4 host services for 1:1 NAT mapping tests. */ modulepar HostV4Descriptions PX_HOST_V4_LIST_LSN := { modulepar HostV4Descriptions PX_HOST_V4_LIST_1_TO_1_NAT := { { srcAddress := '91fea0ed'O, // Containing source address indicating a private IPv4 address srcPort := 3372, Loading @@ -51,4 +51,29 @@ module AtsNat64_Pixits { } // Host #1 } // End of modulepar PX_HOST_V4_LIST_LSN /** * @desc Defines a list of IPv4 host services for 1:n NAT mapping tests. */ modulepar HostV4Description_1toN PX_HOST_V4_LIST_1_TO_N_NAT := { srcAddress := '91fea0ed'O, // Containing source address indicating a private IPv4 address destInfo := { { srcPort := 3372, dstAddress := '41d0e4df'O, // Containing destination address indicating a public IPv4 address from multiple hosts dstPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } }, // Host #0 { srcPort := 3372, dstAddress := '41d0e4e0'O, // Containing destination address indicating a public IPv4 address from multiple hosts dstPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } } // Host #1 } } // End of modulepar PX_HOST_V4_LIST_1_TO_N_NAT } // End of module AtsNat64_Pixits No newline at end of file
ttcn/AtsNAT64/AtsNat64_TestCases.ttcn3 +167 −8 Original line number Diff line number Diff line Loading @@ -61,7 +61,8 @@ module AtsNat64_TestCases { * indicating client IPv6 address * containing destination address * indicating IUT GW IPv6 prefix first 64 bits * indicating IUT IPv4 embedded into the IPv6 address in last 64 bits from multiple client devices * indicating IUT IPv4 embedded into the IPv6 address in last 64 bits * from multiple client devices * } * then { * the IUT does a 1:1 NAT mapping for each public IPv6 client addresses sourced and, Loading @@ -77,7 +78,7 @@ module AtsNat64_TestCases { testcase TC_NAT64_LSN_BF_BV_001() runs on Nat64Component system TestAdapter { // Local variables var integer v_hostNum := lengthof(PX_HOST_V4_LIST_LSN); /** Expected number of IPv6 packets to be forwarded */ var integer v_hostNum := lengthof(PX_HOST_V4_LIST_1_TO_1_NAT); /** Expected number of IPv6 packets to be forwarded */ var Ipv4Packet v_ipv4Packet; /** IPv4 packets */ var Ipv6Packet v_ipv6Packet; /** IPv6 packets address to IPv4 */ var integer v_host; /** 'for' statement counter */ Loading @@ -98,12 +99,13 @@ module AtsNat64_TestCases { for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { f_finalyzeIpv4Packet( m_ipv4Packet_dummy( PX_HOST_V4_LIST_LSN[v_host].srcAddress, PX_HOST_V4_LIST_LSN[v_host].dstAddress, PX_HOST_V4_LIST_1_TO_1_NAT[v_host].srcAddress, PX_HOST_V4_LIST_1_TO_1_NAT[v_host].dstAddress, m_tcp_packet( PX_HOST_V4_LIST_LSN[v_host].srcPort, PX_HOST_V4_LIST_LSN[v_host].dstPort, PX_HOST_V4_LIST_LSN[v_host].payload PX_HOST_V4_LIST_1_TO_1_NAT[v_host].srcPort, PX_HOST_V4_LIST_1_TO_1_NAT[v_host].dstPort, PX_HOST_V4_LIST_1_TO_1_NAT[v_host].payload, m_tcp_flags_syn ) ), v_ipv4Packet Loading @@ -111,7 +113,7 @@ module AtsNat64_TestCases { v_ipv6Packet := m_generalIpv6_extHdr_data( c_tcpHdr, PX_HOST_V6_LIST_LSN[v_host].hostAddress, PX_NAT64_PREFIX & PX_HOST_V4_LIST_LSN[v_host].dstAddress, PX_NAT64_PREFIX & PX_HOST_V4_LIST_1_TO_1_NAT[v_host].dstAddress, omit, v_ipv4Packet.ipv4Payload.rawPacket ); Loading Loading @@ -197,6 +199,163 @@ module AtsNat64_TestCases { } // End of group f_TC_NAT64_LSN_BF_BV_001 /** * @desc Check that the IUT supports the functionality of NAT64 1:n NAT mapping with port translation * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the IUT is properly provisioned * the interfaces are connected & functional * } * Expected behaviour: * ensure that { * when { * the IUT receives multiple IPv6 packets * containing IPv6 transport header * containing source address * indicating client IPv6 address * containing destination address * indicating IUT GW IPv6 prefix first 64 bits * indicating IUT IPv4 embedded into the IPv6 address in last 64 bits * from multiple client devices * } * then { * the IUT does a 1:n NAT mapping for multiple public IPv6 B4 addresses sourced and, * the IUT forwards packets to the destination with same public IPv4 source address * } * } * </pre> * * @version 0.0.1 * @reference ETSI TS 101 569-1 Clause 6.4.4.4 1:1 Shared/Split Resources * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2013-07) TP/NAT64/LSN/BF/VB/02 */ testcase TC_NAT64_LSN_BF_BV_002() runs on Nat64Component system TestAdapter { // Local variables var integer v_hostNum := lengthof(PX_HOST_V4_LIST_1_TO_1_NAT); /** Expected number of IPv6 packets to be forwarded */ var Ipv4Packet v_ipv4Packet; /** IPv4 packets */ var Ipv6Packet v_ipv6Packet; /** IPv6 packets address to IPv4 */ var integer v_host; /** 'for' statement counter */ // Test control // Test component configuration for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { vc_lsnComponents[v_host] := LSNComponent.create(c_COMP_LSN & int2str(v_host)); vc_hostComponents[v_host] := HostComponent.create(c_COMP_HOST & int2str(v_host)); } // End of 'for' statement f_cf01Up(); // Test adapter configuration // Test Body // Start all components for (v_host := 0; v_host < v_hostNum; v_host := v_host + 1) { f_finalyzeIpv4Packet( m_ipv4Packet_dummy( PX_HOST_V4_LIST_1_TO_N_NAT.srcAddress, PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].dstAddress, m_tcp_packet( PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].srcPort, PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].dstPort, PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].payload, m_tcp_flags_syn ) ), v_ipv4Packet ); v_ipv6Packet := m_generalIpv6_extHdr_data( c_tcpHdr, PX_HOST_V6_LIST_LSN[v_host].hostAddress, PX_NAT64_PREFIX & PX_HOST_V4_LIST_1_TO_N_NAT.destInfo[v_host].dstAddress, omit, v_ipv4Packet.ipv4Payload.rawPacket ); vc_lsnComponents[v_host].start(f_TC_NAT64_LSN_NP_BV_002_lsn(v_ipv4Packet)); vc_hostComponents[v_host].start(f_TC_NAT64_LSN_NP_BV_002_host(v_ipv6Packet)); } // End of 'for' statement f_serverSyncNClientsAndStop(v_hostNum, { c_prDone, c_tbDone, c_poDone }); // Postamble f_down(); } // End of testcase TC_NAT64_LSN_BF_BV_002 group f_TC_NAT64_LSN_BF_BV_001 { /** * @desc Implement LSN protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_NAT64_LSN_NP_BV_002_lsn(Ipv4Packet v_ipv4Packet) runs on LSNComponent { // Local variables // Preamble // Clause 'Initial conditions' f_preamble_lsn(); f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body // Clause 'when': the IUT does a 1:n NAT mapping for multiple public IPv6 B4 addresses sourced and, // the IUT forwards packets to the destination with same public IPv4 source address tc_ac.start; alt { [] ipv4Port.receive(v_ipv4Packet) { tc_ac.stop; log("*** " & __SCOPE__ & ": PASS: IPv4 packet was forwarded. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_lsn(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_NAT64_LSN_NP_BV_002_lsn /** * @desc Implement LSN protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_NAT64_LSN_NP_BV_002_host(Ipv6Packet p_ipv6Packet) 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 //TODO needs to be called as it sets length and checksum fields // if(f_setExtensionHeaders(v_ipv6Packet) != e_success) { // log(" **** " & __SCOPE__ & ": Error when calculating length of extension headers ****"); // f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // } ipv6Port.send(p_ipv6Packet); // Postamble f_postamble_host(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_NAT64_LSN_NP_BV_001_host } // End of group f_TC_NAT64_LSN_BF_BV_002 } // End of group validBehaviour group invalidBehaviour { Loading
ttcn/AtsNAT64/AtsNat64_TypeAndValues.ttcn3 +2 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * @version $Id$ * @desc This module defines the ATS types and values */ module AtsDSLite_TypesAndValues { module AtsNat64_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues { Loading Loading @@ -48,4 +48,4 @@ module AtsDSLite_TypesAndValues { } // End of group ipv4Hosts } // End of module AtsDSLite_TypesAndValues No newline at end of file } // End of module AtsNat64_TypesAndValues No newline at end of file