Loading ttcn3/EtsiLibrary/LibIpv6/LibCommonRfcs/LibIpv6_CommonRfcs_Functions.ttcn +30 −1 Original line number Diff line number Diff line Loading @@ -86,6 +86,35 @@ return e_success; }//end function f_createIpAddresses function f_createHaAnycastAddress( in Oct16 /*Prefix*/ p_prefix, in UInt8 p_prefixLen, out Ipv6Address p_haAca ) return FncRetCode { var UInt8 i; const UInt8 c_uniIdLen := 64; var Bit128 v_prefixBits := oct2bit(p_prefix); var Bit64 v_prefixReadyBits := oct2bit('0000000000000000'O); var Oct8 v_prefixReady := int2oct(0,8); if (p_prefixLen > 64) { log("**** f_createHaAnycastAddress: Wrong prefixLen ****"); return e_error; } else { //Fill v_prefixReady with existing Prefix for (i:=0; i<p_prefixLen; i:=i+1) { v_prefixReadyBits[i] := v_prefixBits[i]; } //Complete v_prefixReady with Zero Bytes for (i:=p_prefixLen; i<64; i:=i+1) { v_prefixReadyBits[i] := int2bit(0,1); } v_prefixReady := bit2oct(v_prefixReadyBits); } return e_success; }//end function f_createHaAnycastAddress /* * @desc Creates a prefix using p_address and p_prefixLength. The p_prefixLength * MSB bits remain unchanged, the others are set to zero. Loading Loading
ttcn3/EtsiLibrary/LibIpv6/LibCommonRfcs/LibIpv6_CommonRfcs_Functions.ttcn +30 −1 Original line number Diff line number Diff line Loading @@ -86,6 +86,35 @@ return e_success; }//end function f_createIpAddresses function f_createHaAnycastAddress( in Oct16 /*Prefix*/ p_prefix, in UInt8 p_prefixLen, out Ipv6Address p_haAca ) return FncRetCode { var UInt8 i; const UInt8 c_uniIdLen := 64; var Bit128 v_prefixBits := oct2bit(p_prefix); var Bit64 v_prefixReadyBits := oct2bit('0000000000000000'O); var Oct8 v_prefixReady := int2oct(0,8); if (p_prefixLen > 64) { log("**** f_createHaAnycastAddress: Wrong prefixLen ****"); return e_error; } else { //Fill v_prefixReady with existing Prefix for (i:=0; i<p_prefixLen; i:=i+1) { v_prefixReadyBits[i] := v_prefixBits[i]; } //Complete v_prefixReady with Zero Bytes for (i:=p_prefixLen; i<64; i:=i+1) { v_prefixReadyBits[i] := int2bit(0,1); } v_prefixReady := bit2oct(v_prefixReadyBits); } return e_success; }//end function f_createHaAnycastAddress /* * @desc Creates a prefix using p_address and p_prefixLength. The p_prefixLength * MSB bits remain unchanged, the others are set to zero. Loading