/* * @author STF 276 * @version $Id$ * @desc This module specifies functions definitions * that can be used by any RCF function. * */ module LibIpv6_CommonRfcs_Functions { //LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; import from LibCommon_VerdictControl { type FncRetCode }; //LibIpv6 import from LibIpv6_Interface_TypesAndValues all ; import from LibIpv6_ExternalFunctions all; import from LibIpv6_ModuleParameters all ; import from LibIpv6_CommonRfcs_TypesAndValues all; import from LibIpv6_CommonRfcs_Templates all; group calcPrefixFns { /* function createIpAddresses(Prefix p_prefix, Oct6to15 p_macAddr) runs on LibIpv6Node return FncRetCode { const UInt8 c_uniIdLen := 64; var Oct8 v_prefixReady := int2oct(0,8); var Oct8 v_interfaceIdReady := int2oct(0,8); var Oct3 v_leftPartMac := int2oct(0,3); var Oct3 v_rightPartMac := int2oct(0,3); var Bit24 v_leftPartBits := int2bit(0,24); var Bit24 v_leftPartBitMask := int2bit(131072,24); var Ipv6Address v_gla := int2oct(0,16); if (lengthof(p_prefix) > 8) { log("Error"); } else { //Fill v_prefixReady with existing Prefix for (i:=0; i