Loading ttcn3/EtsiLibrary/LibIpv6/LibCommonRfcs/LibIpv6_Interface_Functions.ttcn +18 −13 Original line number Diff line number Diff line Loading @@ -85,12 +85,14 @@ group rfc2460Root_Functions { v_pseudoSrcAddr := v_activeIpv6Packet.ipv6Hdr.sourceAddress; //calc payloadLen p_ipv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (p_ipv6Packet); if (v_activeIpv6Packet.ipv6Hdr.payloadLength == c_uInt16Zero ) { v_activeIpv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (v_activeIpv6Packet); } if (ispresent(v_activeIpv6Packet.extHdrList)) { for (i:=0; i<sizeof(v_activeIpv6Packet.extHdrList) and v_loop ;i:=i+1) { // Process Home Address Destination Option // Process Home Address Destination Option, non-recursive if (ischosen(v_activeIpv6Packet.extHdrList[i].destinationOptionHeader)) { for (j:=0; j<sizeof(v_activeIpv6Packet.extHdrList[i].destinationOptionHeader.destOptionList);j:=j+1) { if (ischosen(v_activeIpv6Packet.extHdrList[i].destinationOptionHeader.destOptionList[j].homeAddressOption)) { Loading @@ -98,13 +100,13 @@ group rfc2460Root_Functions { } } } // Proccess Routing Header Type 2 // Proccess Routing Header Type 2, non-recursive else if (ischosen(v_activeIpv6Packet.extHdrList[i].routingHeader) and (v_activeIpv6Packet.extHdrList[i].routingHeader.routingType == c_routeHdrType2)) { if (ischosen(v_activeIpv6Packet.extHdrList[i].routingHeader.routingHeaderData.rtHdrDataHomeAddress)) { v_pseudoDstAddr := v_activeIpv6Packet.extHdrList[i].routingHeader.routingHeaderData.rtHdrDataHomeAddress; } } // Process Mobile Header // Process Mobile Header, non-recursive else if (ischosen(v_activeIpv6Packet.extHdrList[i].mobileHeader)) { v_ret := f_setMobileHeader( v_activeIpv6Packet.ipv6Hdr.sourceAddress, v_activeIpv6Packet.ipv6Hdr.destinationAddress, Loading @@ -115,7 +117,7 @@ group rfc2460Root_Functions { // update packet payloadLen v_activeIpv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (v_activeIpv6Packet); } // Process Tunneled Header // Process Tunneled Header, recursive else if (ischosen(v_activeIpv6Packet.extHdrList[i].tunneledIpv6)) { v_nrOfTunnelHdr := v_nrOfTunnelHdr + 1; Loading @@ -129,9 +131,11 @@ group rfc2460Root_Functions { } v_originalIpv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (v_originalIpv6Packet); // recursive call, original packet can still contain other headers f_setExtensionHeaders( v_originalIpv6Packet, v_originalIpv6Packet.ipv6Hdr.sourceAddress, v_originalIpv6Packet.ipv6Hdr.destinationAddress); //Update the original packet v_originalIpv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (v_originalIpv6Packet); // include recursion results Loading Loading @@ -173,7 +177,6 @@ group rfc2460Root_Functions { } } //Process Auth Header // Process Mobile Header else if (ischosen(v_activeIpv6Packet.extHdrList[i].authHeader)) { v_ret := f_setExtensionHeaders( v_activeIpv6Packet, v_activeIpv6Packet.ipv6Hdr.sourceAddress, Loading @@ -188,6 +191,8 @@ group rfc2460Root_Functions { }//end for } // all extension headers have been processed // Is there still a payload to be processed and which has not been already processed in a recursive call? if (v_loop==true and ispresent(v_activeIpv6Packet.ipv6Payload)) { v_originalIpv6Packet := v_activeIpv6Packet; v_originalIpv6Packet.ipv6Hdr.sourceAddress := v_pseudoSrcAddr; Loading Loading
ttcn3/EtsiLibrary/LibIpv6/LibCommonRfcs/LibIpv6_Interface_Functions.ttcn +18 −13 Original line number Diff line number Diff line Loading @@ -85,12 +85,14 @@ group rfc2460Root_Functions { v_pseudoSrcAddr := v_activeIpv6Packet.ipv6Hdr.sourceAddress; //calc payloadLen p_ipv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (p_ipv6Packet); if (v_activeIpv6Packet.ipv6Hdr.payloadLength == c_uInt16Zero ) { v_activeIpv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (v_activeIpv6Packet); } if (ispresent(v_activeIpv6Packet.extHdrList)) { for (i:=0; i<sizeof(v_activeIpv6Packet.extHdrList) and v_loop ;i:=i+1) { // Process Home Address Destination Option // Process Home Address Destination Option, non-recursive if (ischosen(v_activeIpv6Packet.extHdrList[i].destinationOptionHeader)) { for (j:=0; j<sizeof(v_activeIpv6Packet.extHdrList[i].destinationOptionHeader.destOptionList);j:=j+1) { if (ischosen(v_activeIpv6Packet.extHdrList[i].destinationOptionHeader.destOptionList[j].homeAddressOption)) { Loading @@ -98,13 +100,13 @@ group rfc2460Root_Functions { } } } // Proccess Routing Header Type 2 // Proccess Routing Header Type 2, non-recursive else if (ischosen(v_activeIpv6Packet.extHdrList[i].routingHeader) and (v_activeIpv6Packet.extHdrList[i].routingHeader.routingType == c_routeHdrType2)) { if (ischosen(v_activeIpv6Packet.extHdrList[i].routingHeader.routingHeaderData.rtHdrDataHomeAddress)) { v_pseudoDstAddr := v_activeIpv6Packet.extHdrList[i].routingHeader.routingHeaderData.rtHdrDataHomeAddress; } } // Process Mobile Header // Process Mobile Header, non-recursive else if (ischosen(v_activeIpv6Packet.extHdrList[i].mobileHeader)) { v_ret := f_setMobileHeader( v_activeIpv6Packet.ipv6Hdr.sourceAddress, v_activeIpv6Packet.ipv6Hdr.destinationAddress, Loading @@ -115,7 +117,7 @@ group rfc2460Root_Functions { // update packet payloadLen v_activeIpv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (v_activeIpv6Packet); } // Process Tunneled Header // Process Tunneled Header, recursive else if (ischosen(v_activeIpv6Packet.extHdrList[i].tunneledIpv6)) { v_nrOfTunnelHdr := v_nrOfTunnelHdr + 1; Loading @@ -129,9 +131,11 @@ group rfc2460Root_Functions { } v_originalIpv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (v_originalIpv6Packet); // recursive call, original packet can still contain other headers f_setExtensionHeaders( v_originalIpv6Packet, v_originalIpv6Packet.ipv6Hdr.sourceAddress, v_originalIpv6Packet.ipv6Hdr.destinationAddress); //Update the original packet v_originalIpv6Packet.ipv6Hdr.payloadLength := fx_payloadLength (v_originalIpv6Packet); // include recursion results Loading Loading @@ -173,7 +177,6 @@ group rfc2460Root_Functions { } } //Process Auth Header // Process Mobile Header else if (ischosen(v_activeIpv6Packet.extHdrList[i].authHeader)) { v_ret := f_setExtensionHeaders( v_activeIpv6Packet, v_activeIpv6Packet.ipv6Hdr.sourceAddress, Loading @@ -188,6 +191,8 @@ group rfc2460Root_Functions { }//end for } // all extension headers have been processed // Is there still a payload to be processed and which has not been already processed in a recursive call? if (v_loop==true and ispresent(v_activeIpv6Packet.ipv6Payload)) { v_originalIpv6Packet := v_activeIpv6Packet; v_originalIpv6Packet.ipv6Hdr.sourceAddress := v_pseudoSrcAddr; Loading