Loading ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Functions.ttcn +9 −27 Original line number Diff line number Diff line Loading @@ -175,20 +175,14 @@ module LibItsIpv6OverGeoNetworking_Functions { * @param p_macAddr MAC Address * @param p_prefix Prefix * @param p_prefixLen Prefix Length * @param p_lla Computed link-local address * @param p_gla Computed global address * @param p_solNodeMca Computed solicited-node multicast address * @param p_macSolNodeMca Computed MAC solicited-node multicast address * @param p_addressDB Database contining the computed link-local address, global address, solicited-node multicast address and MAC solicited-node multicast address * @return Execution status */ function f_createIpAddresses( function f_createAddresses( in MacAddress p_macAddr, in Oct16 p_prefix, in UInt8 p_prefixLen, inout Ipv6Address p_lla, inout Ipv6Address p_gla, inout Ipv6Address p_solNodeMca, inout MacAddress p_macSolNodeMca out AddressDB p_addressDB ) return FncRetCode { var UInt8 i; Loading @@ -208,24 +202,16 @@ module LibItsIpv6OverGeoNetworking_Functions { 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); } // compute interface ID v_interfaceIdReady := f_createUniqueInterfaceId (p_macAddr); //LLA if (p_lla != null) { p_lla := 'FE80000000000000'O & v_interfaceIdReady; } p_addressDB.lla := 'FE80000000000000'O & v_interfaceIdReady; //GLA if (p_gla != null) { p_gla := v_prefixReady & v_interfaceIdReady; } p_addressDB.gla := v_prefixReady & v_interfaceIdReady; //get rightPart for (i:=3; i<lengthof(p_macAddr); i:=i+1) { Loading @@ -233,14 +219,10 @@ module LibItsIpv6OverGeoNetworking_Functions { } //SOL_NODE_MCA if (p_solNodeMca != null) { p_solNodeMca := 'FF0200000000000000000001FF'O & v_rightPartMac; } p_addressDB.solNodeMca := 'FF0200000000000000000001FF'O & v_rightPartMac; //MAC_MCA if (p_macSolNodeMca != null) { p_macSolNodeMca := '3333FF'O & v_rightPartMac; } p_addressDB.macSolNodeMca := '3333FF'O & v_rightPartMac; return e_success; }//end f_createIpAddresses Loading ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn +7 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,13 @@ module LibItsIpv6OverGeoNetworking_TypesAndValues { type record of MacTableEntry MacTable; type record AddressDB { Ipv6Address lla, Ipv6Address gla, Ipv6Address solNodeMca, MacAddress macSolNodeMca } } // end ipv6OverGeoConfigurationTypes group ethernet { Loading Loading
ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Functions.ttcn +9 −27 Original line number Diff line number Diff line Loading @@ -175,20 +175,14 @@ module LibItsIpv6OverGeoNetworking_Functions { * @param p_macAddr MAC Address * @param p_prefix Prefix * @param p_prefixLen Prefix Length * @param p_lla Computed link-local address * @param p_gla Computed global address * @param p_solNodeMca Computed solicited-node multicast address * @param p_macSolNodeMca Computed MAC solicited-node multicast address * @param p_addressDB Database contining the computed link-local address, global address, solicited-node multicast address and MAC solicited-node multicast address * @return Execution status */ function f_createIpAddresses( function f_createAddresses( in MacAddress p_macAddr, in Oct16 p_prefix, in UInt8 p_prefixLen, inout Ipv6Address p_lla, inout Ipv6Address p_gla, inout Ipv6Address p_solNodeMca, inout MacAddress p_macSolNodeMca out AddressDB p_addressDB ) return FncRetCode { var UInt8 i; Loading @@ -208,24 +202,16 @@ module LibItsIpv6OverGeoNetworking_Functions { 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); } // compute interface ID v_interfaceIdReady := f_createUniqueInterfaceId (p_macAddr); //LLA if (p_lla != null) { p_lla := 'FE80000000000000'O & v_interfaceIdReady; } p_addressDB.lla := 'FE80000000000000'O & v_interfaceIdReady; //GLA if (p_gla != null) { p_gla := v_prefixReady & v_interfaceIdReady; } p_addressDB.gla := v_prefixReady & v_interfaceIdReady; //get rightPart for (i:=3; i<lengthof(p_macAddr); i:=i+1) { Loading @@ -233,14 +219,10 @@ module LibItsIpv6OverGeoNetworking_Functions { } //SOL_NODE_MCA if (p_solNodeMca != null) { p_solNodeMca := 'FF0200000000000000000001FF'O & v_rightPartMac; } p_addressDB.solNodeMca := 'FF0200000000000000000001FF'O & v_rightPartMac; //MAC_MCA if (p_macSolNodeMca != null) { p_macSolNodeMca := '3333FF'O & v_rightPartMac; } p_addressDB.macSolNodeMca := '3333FF'O & v_rightPartMac; return e_success; }//end f_createIpAddresses Loading
ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn +7 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,13 @@ module LibItsIpv6OverGeoNetworking_TypesAndValues { type record of MacTableEntry MacTable; type record AddressDB { Ipv6Address lla, Ipv6Address gla, Ipv6Address solNodeMca, MacAddress macSolNodeMca } } // end ipv6OverGeoConfigurationTypes group ethernet { Loading