Loading ttcn3/EtsiAts/AtsIpv6/AtsCommon/AtsIpv6_TestConfiguration.ttcn +140 −0 Original line number Diff line number Diff line Loading @@ -543,6 +543,50 @@ }//end f_cfTrans03Up /* * @desc Creates configuration of CF_TRANS_03 specially for SIIT * @param p_ipv6NodeRef1 Reference to IPv6 test component with IPv4 interface * @param p_ipv6NodeRef2 Reference to IPv6 test component with IPv6 interface * @param p_cfMsgIPv4 Configuration message of first test component for Test Adapter * @param p_cfMsgIPv6 Configuration message of second test component for Test Adapter */ function f_cfTrans03Up_SIIT( out Ipv6Node p_ipv6NodeRef1, out Ipv6Node p_ipv6NodeRef2, out CfMessage p_cfMsgIPv4, out CfMessage p_cfMsgIPv6) runs on ServerSyncComp { //Variables var FncRetCode v_ret := e_success; //Create p_ipv6NodeRef1 := Ipv6Node.create ; p_ipv6NodeRef2 := Ipv6Node.create ; if (PX_MAC_LAYER == e_eth) { //Connect connect(p_ipv6NodeRef1:syncPort, self:syncPort) ; connect(p_ipv6NodeRef2:syncPort, self:syncPort) ; //Map map(p_ipv6NodeRef1:ipv4Port, system:ipv4EthernetPort) ; map(p_ipv6NodeRef1:cfPort, system:cfTaPort) ; map(p_ipv6NodeRef1:arpPort, system:arpEthernetPort) ; map(p_ipv6NodeRef2:ipPort, system:ethernetPort) ; map(p_ipv6NodeRef2:cfPort, system:cfTaPort) ; } else { log("**** f_cfTrans03Up_SIIT: Error with Pixit PX_MAC_LAYER ****") ; v_ret := e_error; } p_cfMsgIPv4 := f_createCfMsg_relayRt01_SIIT(); p_cfMsgIPv6 := f_createTrans02CfMsg_hs02_SIIT() ; f_setVerdict(v_ret); }//end f_cfTrans03Up_SIIT }//end cfTrans03 group createParams { Loading Loading @@ -1466,6 +1510,50 @@ }//end f_createTrans02CfMsg_hs02 /* * @desc This function creates a test adapter configuration message * for the test component acting as IPv6to4 RT02 (IPv6 side of SIIT) */ function f_createTrans02CfMsg_hs02_SIIT() return CfMessage { //Variables var CfMessage v_cfMsg ; var Ipv6NodeParams v_paramsHs02, v_paramsIut ; //HS02 Calculate values for native IPv6 Node v_paramsHs02 := f_createParamsHs02(PX_MAC_UCA_HS02, true); //Build values for IPv6to4 Node v_paramsHs02.gla := c_6to4Prefix_SIIT & PX_6to4_IPv4_ADDR_IUT;//6to4Addr SIIT style //IUT Calculate values for native IPv6 Node v_paramsIut := f_createParamsIutB(PX_MAC_UCA_IUT_2, true); //Build values for IPv6to4 Node v_paramsIut.gla := c_6to4Prefix_SIIT & PX_6to4_IPv4_ADDR_IUT;//6to4Addr SIIT style var FncRetCode v_ret := e_error; //fill v_cfMsg v_cfMsg.role := c_ptcRoleHs02 ; v_cfMsg.netDeviceId := PX_NET_DEVICE_ID_2 ; v_cfMsg.macFilterList := { PX_MAC_UCA_HS02, v_paramsHs02.macSolNodeMca, c_macAllNodesMca, c_macAllRoutersMca } ; v_cfMsg.paramsHs01 := omit; v_cfMsg.paramsHs02 := v_paramsHs02; v_cfMsg.paramsHs03 := omit; v_cfMsg.paramsRt01 := f_createParamsRt01(PX_MAC_UCA_IUT_2, true);//relayRouter with IPv6 native information v_cfMsg.paramsRt02 := omit; v_cfMsg.paramsRt03 := omit; v_cfMsg.paramsRt04 := omit; v_cfMsg.paramsMn01 := omit; v_cfMsg.paramsIut := v_paramsIut; return v_cfMsg ; }//end f_createTrans02CfMsg_hs02_SIIT /* * @desc This function creates a test adapter configuration message * for the test component acting as RT01 Loading Loading @@ -1519,6 +1607,58 @@ }//end function f_createCfMsg_relayRt01 /* * @desc This function creates a test adapter configuration message * for the test component acting as RT01 (IPv4 side of SIIT) */ function f_createCfMsg_relayRt01_SIIT() return CfMessage { //Variables var CfMessage v_cfMsg ; var Ipv6NodeParams v_paramsRt01, v_paramsHs02, v_paramsIut; v_paramsRt01 := f_createParamsRt01(PX_MAC_UCA_RT01_A, true);//native IPv6 leg v_paramsRt01.ipv4Addr := PX_6to4_IPv4_ADDR_RT01; v_paramsRt01.relRtAca := c_6to4Relay_anycastAddr; v_paramsIut := f_createParamsIutA(PX_MAC_UCA_IUT_1, true); v_paramsIut.ipv4Addr := PX_6to4_IPv4_ADDR_IUT; v_paramsHs02 := { useInTa := false, lla := omit, gla := c_6to4Prefix_SIIT & PX_6to4_IPv4_ADDR_IUT,//6to4Addr for SIIT solNodeMca := omit, haAca := omit, mnHoa := omit, mnCoa := omit, macUca := omit, macSolNodeMca := omit, prefixLength := omit, ipv4Addr := omit, relRtAca := omit }; var FncRetCode v_ret := e_error; //fill v_cfMsg v_cfMsg.role := c_ptcRoleIpv4Rt01 ; v_cfMsg.netDeviceId := PX_NET_DEVICE_ID_1 ; v_cfMsg.macFilterList := { PX_MAC_UCA_RT01_A, c_macBroadcast // to catch ARP } ; v_cfMsg.paramsHs01 := omit; v_cfMsg.paramsHs02 := v_paramsHs02; v_cfMsg.paramsHs03 := omit; v_cfMsg.paramsRt01 := v_paramsRt01; v_cfMsg.paramsRt02 := omit; v_cfMsg.paramsRt03 := omit; v_cfMsg.paramsRt04 := omit; v_cfMsg.paramsMn01 := omit; v_cfMsg.paramsIut := v_paramsIut; return v_cfMsg ; }//end function f_createCfMsg_relayRt01_SIIT }//end group create CfMsg Loading ttcn3/EtsiAts/AtsIpv6/AtsCommon/AtsIpv6_TestConfiguration_TypesAndValues.ttcn +1 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ module AtsIpv6_TestConfiguration_TypesAndValues { group ip6to4Prefix { const Oct2 c_6to4Prefix := '2002'O; const Oct12 c_6to4Prefix_SIIT := '000000000000FFFF00000000'O; const Oct4 c_6to4Relay_anycastAddr := 'C0586301'O; const Oct2 c_6to4_SUBNET_ID_RT01 := '0001'O; Loading ttcn3/EtsiAts/AtsIpv6/AtsTransitioning/AtsIpv6_Transitioning_Testcases.ttcn +2660 −12 File changed.Preview size limit exceeded, changes collapsed. Show changes ttcn3/EtsiAts/AtsIpv6/AtsTransitioning/AtsIpv6_Transitioning_Tp_Functions.ttcn +302 −0 Original line number Diff line number Diff line Loading @@ -484,4 +484,306 @@ }//end f_TP_ipv4PacketIsDiscardedDst_4 /* * @desc Test node 2 is on the IUTs IPv6 side and waits for fragmented packet. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslateAndFragmentPacket_6( template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated and fragmented packet v_ret := f_waitFragmentedPacket_6( p_paramsHs02.gla, p_paramsRelayRt01.gla) ; f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslateAndFragmentPacket_6 /* * @desc A packet leading to overall size >1280 bytes is sent, DF = 1. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslateAndFragmentPacket_4( template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendIpv4Packet ( m_ipv4EchoRequest_data ( c_doNotFragFlag1, p_paramsRelayRt01.ipv4Addr, p_paramsHs02.ipv4Addr, c_1280ZeroBytes) ); if(v_ret != e_success) { log("**** f_TP_ipv4TranslateAndFragmentPacket_4: Error: Problem in f_sendIpv4Packet. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslateAndFragmentPacket_4 /* * @desc Test node 2 is within on the IUTs IPv6 side and waits for unfragmented packet with fragment header. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslatePacketFragmentHeader_6( template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated unfragmented packet v_ret := f_waitTranslatedPacketFragmentHeader_6( p_paramsHs02.gla, p_paramsRelayRt01.gla) ; f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacketFragmentHeader_6 /* * @desc Test node 2 is within on the IUTs IPv6 side and waits for unfragmented packet without fragment header. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslatePacketNoFragmentHeader_6( template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated unfragmented packet v_ret := f_waitTranslatedPacketNoFragmentHeader_6( p_paramsHs02.gla, p_paramsRelayRt01.gla) ; f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacketNoFragmentHeader_6 /* * @desc A packet leading to overall size <1280 bytes is sent, DF = parametrized. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslatePacketData_4( UInt1 p_doNotFragFlag, template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendIpv4Packet ( m_ipv4EchoRequest_data ( p_doNotFragFlag, p_paramsRelayRt01.ipv4Addr, p_paramsHs02.ipv4Addr, c_80ZeroBytes) ); if(v_ret != e_success) { log("**** f_TP_ipv4TranslatePacketData_4: Error: Problem in f_sendIpv4Packet. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacketData_4 /* * @desc A packet containing options in the header is sent. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslatePacketOption_4( template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendIpv4Packet ( m_ipv4EchoRequest_option ( p_paramsRelayRt01.ipv4Addr, p_paramsHs02.ipv4Addr) ); if(v_ret != e_success) { log("**** f_TP_ipv4TranslatePacketOption_4: Error: Problem in f_sendIpv4Packet. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacketOption_4 /* * @desc A ICMP packet with parametrized type is sent. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslatePacket_4( UInt8 p_icmpType, template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendPacketForTranslate_4 ( p_icmpType, p_paramsRelayRt01, p_paramsHs02); if(v_ret != e_success) { log("**** f_TP_ipv4TranslatePacket_4: Error: Problem in f_sendPacketForTranslate_4. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacket_4 /* * @desc Test node 2 is on the IUTs IPv6 side and waits for translated packet. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslatePacket_6( UInt8 p_icmpType, template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated and fragmented packet v_ret := f_waitTranslatedPacket_6( p_icmpType, p_paramsHs02.gla, p_paramsRelayRt01.gla) ; if(v_ret != e_success) { log("**** f_TP_ipv4TranslatePacket_6: Error: Problem in f_waitTranslatedPacket_6. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacket_6 /* * @desc A ICMP Destination Unreachable message with parametrized code is sent. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslateDestinationUnreachable_4( UInt8 p_icmpCode, template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendDestinationUnreachableForTranslate_4 ( p_icmpCode, p_paramsRelayRt01, p_paramsHs02); if(v_ret != e_success) { log("**** f_TP_ipv4TranslateDestinationUnreachable_4: Error: Problem in f_sendDestinationUnreachableForTranslate_4. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslateDestinationUnreachable_4 /* * @desc Test node 2 is on the IUTs IPv6 side and waits for translated Destination Unreachable message. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslateDestinationUnreachable_6( UInt8 p_icmpCode, template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated and fragmented packet v_ret := f_waitTranslatedDestinationUnreachable_6( p_icmpCode, p_paramsHs02.gla, p_paramsRelayRt01.gla) ; if(v_ret != e_success) { log("**** f_TP_ipv4TranslateDestinationUnreachable_6: Error: Problem in f_waitTranslatedDestinationUnreachable_6. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslateDestinationUnreachable_6 /* * @desc Test node 2 is on the IUTs IPv6 side and checks that packet is not translated. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4DiscardPacket_4( template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; //check that packet is not translated v_ret := f_discardPacket() ; if(v_ret != e_success) { log("**** f_TP_ipv4DiscardPacket_4: Error: Problem in f_waitDiscardPacket. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4DiscardPacket_4 /* * @desc Test node 2 is on the IUTs IPv6 side and checks that packet is not translated. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4DiscardPacket_6( template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //check that packet is not translated v_ret := f_discardPacket() ; if(v_ret != e_success) { log("**** f_TP_ipv4DiscardPacket_6: Error: Problem in f_waitDiscardPacket. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4DiscardPacket_6 } // end module AtsIpv6_Transitioning_Tp_Functions Loading
ttcn3/EtsiAts/AtsIpv6/AtsCommon/AtsIpv6_TestConfiguration.ttcn +140 −0 Original line number Diff line number Diff line Loading @@ -543,6 +543,50 @@ }//end f_cfTrans03Up /* * @desc Creates configuration of CF_TRANS_03 specially for SIIT * @param p_ipv6NodeRef1 Reference to IPv6 test component with IPv4 interface * @param p_ipv6NodeRef2 Reference to IPv6 test component with IPv6 interface * @param p_cfMsgIPv4 Configuration message of first test component for Test Adapter * @param p_cfMsgIPv6 Configuration message of second test component for Test Adapter */ function f_cfTrans03Up_SIIT( out Ipv6Node p_ipv6NodeRef1, out Ipv6Node p_ipv6NodeRef2, out CfMessage p_cfMsgIPv4, out CfMessage p_cfMsgIPv6) runs on ServerSyncComp { //Variables var FncRetCode v_ret := e_success; //Create p_ipv6NodeRef1 := Ipv6Node.create ; p_ipv6NodeRef2 := Ipv6Node.create ; if (PX_MAC_LAYER == e_eth) { //Connect connect(p_ipv6NodeRef1:syncPort, self:syncPort) ; connect(p_ipv6NodeRef2:syncPort, self:syncPort) ; //Map map(p_ipv6NodeRef1:ipv4Port, system:ipv4EthernetPort) ; map(p_ipv6NodeRef1:cfPort, system:cfTaPort) ; map(p_ipv6NodeRef1:arpPort, system:arpEthernetPort) ; map(p_ipv6NodeRef2:ipPort, system:ethernetPort) ; map(p_ipv6NodeRef2:cfPort, system:cfTaPort) ; } else { log("**** f_cfTrans03Up_SIIT: Error with Pixit PX_MAC_LAYER ****") ; v_ret := e_error; } p_cfMsgIPv4 := f_createCfMsg_relayRt01_SIIT(); p_cfMsgIPv6 := f_createTrans02CfMsg_hs02_SIIT() ; f_setVerdict(v_ret); }//end f_cfTrans03Up_SIIT }//end cfTrans03 group createParams { Loading Loading @@ -1466,6 +1510,50 @@ }//end f_createTrans02CfMsg_hs02 /* * @desc This function creates a test adapter configuration message * for the test component acting as IPv6to4 RT02 (IPv6 side of SIIT) */ function f_createTrans02CfMsg_hs02_SIIT() return CfMessage { //Variables var CfMessage v_cfMsg ; var Ipv6NodeParams v_paramsHs02, v_paramsIut ; //HS02 Calculate values for native IPv6 Node v_paramsHs02 := f_createParamsHs02(PX_MAC_UCA_HS02, true); //Build values for IPv6to4 Node v_paramsHs02.gla := c_6to4Prefix_SIIT & PX_6to4_IPv4_ADDR_IUT;//6to4Addr SIIT style //IUT Calculate values for native IPv6 Node v_paramsIut := f_createParamsIutB(PX_MAC_UCA_IUT_2, true); //Build values for IPv6to4 Node v_paramsIut.gla := c_6to4Prefix_SIIT & PX_6to4_IPv4_ADDR_IUT;//6to4Addr SIIT style var FncRetCode v_ret := e_error; //fill v_cfMsg v_cfMsg.role := c_ptcRoleHs02 ; v_cfMsg.netDeviceId := PX_NET_DEVICE_ID_2 ; v_cfMsg.macFilterList := { PX_MAC_UCA_HS02, v_paramsHs02.macSolNodeMca, c_macAllNodesMca, c_macAllRoutersMca } ; v_cfMsg.paramsHs01 := omit; v_cfMsg.paramsHs02 := v_paramsHs02; v_cfMsg.paramsHs03 := omit; v_cfMsg.paramsRt01 := f_createParamsRt01(PX_MAC_UCA_IUT_2, true);//relayRouter with IPv6 native information v_cfMsg.paramsRt02 := omit; v_cfMsg.paramsRt03 := omit; v_cfMsg.paramsRt04 := omit; v_cfMsg.paramsMn01 := omit; v_cfMsg.paramsIut := v_paramsIut; return v_cfMsg ; }//end f_createTrans02CfMsg_hs02_SIIT /* * @desc This function creates a test adapter configuration message * for the test component acting as RT01 Loading Loading @@ -1519,6 +1607,58 @@ }//end function f_createCfMsg_relayRt01 /* * @desc This function creates a test adapter configuration message * for the test component acting as RT01 (IPv4 side of SIIT) */ function f_createCfMsg_relayRt01_SIIT() return CfMessage { //Variables var CfMessage v_cfMsg ; var Ipv6NodeParams v_paramsRt01, v_paramsHs02, v_paramsIut; v_paramsRt01 := f_createParamsRt01(PX_MAC_UCA_RT01_A, true);//native IPv6 leg v_paramsRt01.ipv4Addr := PX_6to4_IPv4_ADDR_RT01; v_paramsRt01.relRtAca := c_6to4Relay_anycastAddr; v_paramsIut := f_createParamsIutA(PX_MAC_UCA_IUT_1, true); v_paramsIut.ipv4Addr := PX_6to4_IPv4_ADDR_IUT; v_paramsHs02 := { useInTa := false, lla := omit, gla := c_6to4Prefix_SIIT & PX_6to4_IPv4_ADDR_IUT,//6to4Addr for SIIT solNodeMca := omit, haAca := omit, mnHoa := omit, mnCoa := omit, macUca := omit, macSolNodeMca := omit, prefixLength := omit, ipv4Addr := omit, relRtAca := omit }; var FncRetCode v_ret := e_error; //fill v_cfMsg v_cfMsg.role := c_ptcRoleIpv4Rt01 ; v_cfMsg.netDeviceId := PX_NET_DEVICE_ID_1 ; v_cfMsg.macFilterList := { PX_MAC_UCA_RT01_A, c_macBroadcast // to catch ARP } ; v_cfMsg.paramsHs01 := omit; v_cfMsg.paramsHs02 := v_paramsHs02; v_cfMsg.paramsHs03 := omit; v_cfMsg.paramsRt01 := v_paramsRt01; v_cfMsg.paramsRt02 := omit; v_cfMsg.paramsRt03 := omit; v_cfMsg.paramsRt04 := omit; v_cfMsg.paramsMn01 := omit; v_cfMsg.paramsIut := v_paramsIut; return v_cfMsg ; }//end function f_createCfMsg_relayRt01_SIIT }//end group create CfMsg Loading
ttcn3/EtsiAts/AtsIpv6/AtsCommon/AtsIpv6_TestConfiguration_TypesAndValues.ttcn +1 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ module AtsIpv6_TestConfiguration_TypesAndValues { group ip6to4Prefix { const Oct2 c_6to4Prefix := '2002'O; const Oct12 c_6to4Prefix_SIIT := '000000000000FFFF00000000'O; const Oct4 c_6to4Relay_anycastAddr := 'C0586301'O; const Oct2 c_6to4_SUBNET_ID_RT01 := '0001'O; Loading
ttcn3/EtsiAts/AtsIpv6/AtsTransitioning/AtsIpv6_Transitioning_Testcases.ttcn +2660 −12 File changed.Preview size limit exceeded, changes collapsed. Show changes
ttcn3/EtsiAts/AtsIpv6/AtsTransitioning/AtsIpv6_Transitioning_Tp_Functions.ttcn +302 −0 Original line number Diff line number Diff line Loading @@ -484,4 +484,306 @@ }//end f_TP_ipv4PacketIsDiscardedDst_4 /* * @desc Test node 2 is on the IUTs IPv6 side and waits for fragmented packet. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslateAndFragmentPacket_6( template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated and fragmented packet v_ret := f_waitFragmentedPacket_6( p_paramsHs02.gla, p_paramsRelayRt01.gla) ; f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslateAndFragmentPacket_6 /* * @desc A packet leading to overall size >1280 bytes is sent, DF = 1. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslateAndFragmentPacket_4( template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendIpv4Packet ( m_ipv4EchoRequest_data ( c_doNotFragFlag1, p_paramsRelayRt01.ipv4Addr, p_paramsHs02.ipv4Addr, c_1280ZeroBytes) ); if(v_ret != e_success) { log("**** f_TP_ipv4TranslateAndFragmentPacket_4: Error: Problem in f_sendIpv4Packet. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslateAndFragmentPacket_4 /* * @desc Test node 2 is within on the IUTs IPv6 side and waits for unfragmented packet with fragment header. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslatePacketFragmentHeader_6( template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated unfragmented packet v_ret := f_waitTranslatedPacketFragmentHeader_6( p_paramsHs02.gla, p_paramsRelayRt01.gla) ; f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacketFragmentHeader_6 /* * @desc Test node 2 is within on the IUTs IPv6 side and waits for unfragmented packet without fragment header. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslatePacketNoFragmentHeader_6( template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated unfragmented packet v_ret := f_waitTranslatedPacketNoFragmentHeader_6( p_paramsHs02.gla, p_paramsRelayRt01.gla) ; f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacketNoFragmentHeader_6 /* * @desc A packet leading to overall size <1280 bytes is sent, DF = parametrized. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslatePacketData_4( UInt1 p_doNotFragFlag, template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendIpv4Packet ( m_ipv4EchoRequest_data ( p_doNotFragFlag, p_paramsRelayRt01.ipv4Addr, p_paramsHs02.ipv4Addr, c_80ZeroBytes) ); if(v_ret != e_success) { log("**** f_TP_ipv4TranslatePacketData_4: Error: Problem in f_sendIpv4Packet. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacketData_4 /* * @desc A packet containing options in the header is sent. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslatePacketOption_4( template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendIpv4Packet ( m_ipv4EchoRequest_option ( p_paramsRelayRt01.ipv4Addr, p_paramsHs02.ipv4Addr) ); if(v_ret != e_success) { log("**** f_TP_ipv4TranslatePacketOption_4: Error: Problem in f_sendIpv4Packet. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacketOption_4 /* * @desc A ICMP packet with parametrized type is sent. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslatePacket_4( UInt8 p_icmpType, template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendPacketForTranslate_4 ( p_icmpType, p_paramsRelayRt01, p_paramsHs02); if(v_ret != e_success) { log("**** f_TP_ipv4TranslatePacket_4: Error: Problem in f_sendPacketForTranslate_4. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacket_4 /* * @desc Test node 2 is on the IUTs IPv6 side and waits for translated packet. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslatePacket_6( UInt8 p_icmpType, template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated and fragmented packet v_ret := f_waitTranslatedPacket_6( p_icmpType, p_paramsHs02.gla, p_paramsRelayRt01.gla) ; if(v_ret != e_success) { log("**** f_TP_ipv4TranslatePacket_6: Error: Problem in f_waitTranslatedPacket_6. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslatePacket_6 /* * @desc A ICMP Destination Unreachable message with parametrized code is sent. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4TranslateDestinationUnreachable_4( UInt8 p_icmpCode, template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; v_ret := f_sendDestinationUnreachableForTranslate_4 ( p_icmpCode, p_paramsRelayRt01, p_paramsHs02); if(v_ret != e_success) { log("**** f_TP_ipv4TranslateDestinationUnreachable_4: Error: Problem in f_sendDestinationUnreachableForTranslate_4. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslateDestinationUnreachable_4 /* * @desc Test node 2 is on the IUTs IPv6 side and waits for translated Destination Unreachable message. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4TranslateDestinationUnreachable_6( UInt8 p_icmpCode, template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //wait translated and fragmented packet v_ret := f_waitTranslatedDestinationUnreachable_6( p_icmpCode, p_paramsHs02.gla, p_paramsRelayRt01.gla) ; if(v_ret != e_success) { log("**** f_TP_ipv4TranslateDestinationUnreachable_6: Error: Problem in f_waitTranslatedDestinationUnreachable_6. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4TranslateDestinationUnreachable_6 /* * @desc Test node 2 is on the IUTs IPv6 side and checks that packet is not translated. * @param p_paramsRelayRt01 Address Information of Test Node 1 * @param p_paramsHs02 Address Information of Test Node 2 */ function f_TP_ipv4DiscardPacket_4( template Ipv6NodeParams p_paramsRelayRt01, template Ipv6NodeParams p_paramsHs02 ) runs on Ipv6Node { var FncRetCode v_ret := e_error; //check that packet is not translated v_ret := f_discardPacket() ; if(v_ret != e_success) { log("**** f_TP_ipv4DiscardPacket_4: Error: Problem in f_waitDiscardPacket. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4DiscardPacket_4 /* * @desc Test node 2 is on the IUTs IPv6 side and checks that packet is not translated. * @param p_paramsHs02 Address Information of Testing Node * @param p_paramsRelayRt01 Address Information of Node within the domain of the 6to4RelayRouter */ function f_TP_ipv4DiscardPacket_6( template Ipv6NodeParams p_paramsHs02, template Ipv6NodeParams p_paramsRelayRt01 ) runs on Ipv6Node { var FncRetCode v_ret; //check that packet is not translated v_ret := f_discardPacket() ; if(v_ret != e_success) { log("**** f_TP_ipv4DiscardPacket_6: Error: Problem in f_waitDiscardPacket. ****"); } f_selfOrClientSyncAndVerdict(c_tbDone, v_ret); }//end f_TP_ipv4DiscardPacket_6 } // end module AtsIpv6_Transitioning_Tp_Functions