Loading lib/LibItsIpv6OverGeoNetworking_EncdecDeclarations.ttcn +11 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_EncdecDeclarations.ttcn: 11 added lines, 0 removed lines. Original line number Diff line number Diff line module LibItsIpv6OverGeoNetworking_EncdecDeclarations { import from LibItsIpv6OverGeoNetworking_TypesAndValues all; external function fx_enc_Ipv6Packet (Ipv6Packet p) return bitstring with {extension "prototype(convert) encode(LibItsIpv6OverGeoNetworking)"} external function fx_dec_Ipv6Packet (inout bitstring b, out Ipv6Packet p) return integer with {extension "prototype(sliding) decode(LibItsIpv6OverGeoNetworking)"} } // End of module LibItsIpv6OverGeoNetworking_EncdecDeclarations lib/LibItsIpv6OverGeoNetworking_Pics.ttcn +34 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_Pics.ttcn: 34 added lines, 0 removed lines. Original line number Diff line number Diff line /** * @author ETSI / STF405 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Pics.ttcn $ * $Id: LibItsIpv6OverGeoNetworking_Pics.ttcn 1318 2017-01-26 10:20:53Z filatov $ * @desc IPv6 Over GeoNetworking PICS * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. * */ module LibItsIpv6OverGeoNetworking_Pics { // LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; // LibIts import from LibItsGeoNetworking_TypesAndValues all; group ipv6OverGeoNwPics { /** * @desc Indicates whether the GN6ASL shall resolve the destination link-layer-address * from the IPv6 address. * FALSE, perform address resolution, otherwise do not. * @see ETSI TS 102 859-1 A.10/10 */ modulepar boolean PICS_GN6_ASL_VI_RESOL_ADDR := true; } // end ipv6OverGeoNwPics } // end LibItsIpv6OverGeoNetworking_Pics No newline at end of file lib/LibItsIpv6OverGeoNetworking_Pixits.ttcn +66 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_Pixits.ttcn: 66 added lines, 0 removed lines. Original line number Diff line number Diff line /** * @author ETSI / STF405 /STF449 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Pixits.ttcn $ * $Id: LibItsIpv6OverGeoNetworking_Pixits.ttcn 1318 2017-01-26 10:20:53Z filatov $ * @desc Module parameters for IPv6 over GeoNetworking Protocol * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. * */ module LibItsIpv6OverGeoNetworking_Pixits { // LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; /** * @desc GVL will be configured manually? */ modulepar boolean PX_CONFIG_MANUAL_GVL := false; /** * @desc Time for building the configuration and virtual interfaces dynamically. */ modulepar float PX_T_BUILD_CONFIG := 5.0; /** * @desc IPv6 prefix 1 to be used for defining GVL */ modulepar Oct16 PX_GN6_PREFIX_1 := '3FFE0000000000010000000000000000'O; /** * @desc IPv6 prefix 2 to be used for defining GVL */ modulepar Oct16 PX_GN6_PREFIX_2 := '3FFE0000000000020000000000000000'O; /** * @desc IPv6 prefix 3 to be used for defining GVL */ modulepar Oct16 PX_GN6_PREFIX_3 := '3FFE0000000000030000000000000000'O; /** * @desc Length of IPv6 prefix 1 * @see PX_GN6_PREFIX_1 */ modulepar UInt8 PX_GN6_PREFIX_LENGTH_1 := 64; /** * @desc Length of IPv6 prefix 2 * @see PX_GN6_PREFIX_2 */ modulepar UInt8 PX_GN6_PREFIX_LENGTH_2 := 64; /** * @desc Length of IPv6 prefix 3 * @see PX_GN6_PREFIX_3 */ modulepar UInt8 PX_GN6_PREFIX_LENGTH_3 := 64; /** * @desc Name of IUT's virtual interface associated with TVL */ modulepar charstring PX_GN6_TVL_INTERFACE_NAME := "tvl0"; } No newline at end of file lib/LibItsIpv6OverGeoNetworking_Templates.ttcn +291 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_Templates.ttcn: 291 added lines, 0 removed lines. Original line number Diff line number Diff line /** * @author ETSI / STF405 / STF449 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Templates.ttcn $ * $Id: LibItsIpv6OverGeoNetworking_Templates.ttcn 1318 2017-01-26 10:20:53Z filatov $ * @desc IPv6 over GeoNetworking Protocol Templates * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. * */ module LibItsIpv6OverGeoNetworking_Templates { //LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; //LibIts import from LibItsIpv6OverGeoNetworking_TypesAndValues all; import from LibItsGeoNetworking_TypesAndValues all; import from LibItsExternal_TypesAndValues {type MacAddress}; group ipv6OverGeoNwPrimitivesTemplates { /** * @desc Send template for IPv6OverGeoNetworking packet (IPv6OverGeoNetworking Primitive) * @param p_interface Which virtual interface to use for sending the packet * @param p_srcMacAddr Link-layer source address * @param p_dstMacAddr Link-layer destination address * @param p_ipv6Packet IPv6 packet to be sent */ template (value) IPv6OverGeoNetworkingReq m_ipv6OverGeoNwReq( template (value) charstring p_interface, template (value) MacAddress p_srcMacAddr, template (value) MacAddress p_dstMacAddr, template (value) Ipv6Packet p_ipv6Packet ) := { interface := p_interface, macSourceAddress := p_srcMacAddr, macDestinationAddress := p_dstMacAddr, ipv6Packet := p_ipv6Packet } /** * @desc Receive template for IPv6OverGeoNetworking packet (IPv6OverGeoNetworking Primitive) * @param p_interface On which virtual interface the packet is expected * @param p_srcMacAddr Link-layer source address * @param p_dstMacAddr Link-layer destination address * @param p_ipv6Packet Expected IPv6 packet */ template IPv6OverGeoNetworkingInd mw_ipv6OverGeoNwInd( template (present) charstring p_interface, template (present) MacAddress p_srcMacAddr, template (present) MacAddress p_dstMacAddr, template (present) Ipv6Packet p_ipv6Packet ) := { interface := p_interface, macSourceAddress := p_srcMacAddr, macDestinationAddress := p_dstMacAddr, ipv6Packet := p_ipv6Packet } } // ipv6OverGeoNwPrimitivesTemplates group ipv6 { /** * @desc Send template for IPv6 packet * @param p_srcAddr IPv6 source address * @param p_dstAddr IPv6 destination address * @param p_nextHdr IPv6's next header * @param p_payload IPv6 payload */ template (value) Ipv6Packet m_ipv6Packet( in template (value) Ipv6Address p_srcAddr, in template (value) Ipv6Address p_dstAddr, in template (value) UInt8 p_nextHdr, in template (omit) Ipv6Payload p_payload ) := { ipv6Hdr := m_ipv6Header(p_srcAddr, p_dstAddr, p_nextHdr), extHdrList := omit, ipv6Payload := p_payload } /** * @desc Reception template for IPv6 packet * @param p_srcAddr IPv6 source address * @param p_dstAddr IPv6 destination address * @param p_nextHdr IPv6's next header * @param p_payload IPv6 payload */ template Ipv6Packet mw_ipv6Packet( in template (present) Ipv6Address p_srcAddr, in template (present) Ipv6Address p_dstAddr, in template (present) UInt8 p_nextHdr, in template Ipv6Payload p_payload ) := { ipv6Hdr := mw_ipv6Header(p_srcAddr, p_dstAddr, p_nextHdr), extHdrList := omit, ipv6Payload := p_payload } /** * @desc Send template for IPv6 header * @param p_srcAddr IPv6 source address * @param p_dstAddr IPv6 destination address * @param p_nextHdr IPv6's next header */ template (value) Ipv6Header m_ipv6Header( in template (value) Ipv6Address p_srcAddr, in template (value) Ipv6Address p_dstAddr, in template (value) UInt8 p_nextHdr ) := { version := 6, trafficClass := 0, flowLabel := 0, payloadLength := 0, //indicates that the adaptation will fill the correct value nextHeader := p_nextHdr, hopLimit := 255, sourceAddress := p_srcAddr, destinationAddress := p_dstAddr } /** * @desc Receive template for IPv6 header * @param p_srcAddr IPv6 source address * @param p_dstAddr IPv6 destination address * @param p_nextHdr IPv6's next header */ template Ipv6Header mw_ipv6Header( in template (present) Ipv6Address p_srcAddr, in template (present) Ipv6Address p_dstAddr, in template (present) UInt8 p_nextHdr ) := { version := 6, trafficClass := ?, flowLabel := ?, payloadLength := ?, nextHeader := p_nextHdr, hopLimit := ?, sourceAddress := p_srcAddr, destinationAddress := p_dstAddr } /** * @desc Send template for IPv6 payload containing Router Advertisement * @param p_rtAdvOptions Router Advertisement options */ template (value) Ipv6Payload m_rtAdvWithOptions( in template (omit) RtAdvOptions p_rtAdvOptions ) := { routerAdvMsg := { icmpType := c_rtAdvMsg, icmpCode := 0, checksum := c_2ZeroBytes, //indicates that the adaptation will fill the correct value curHopLimit := 255, managedConfigFlag := 0, otherConfigFlag := 0, homeAgentFlag := 0, reserved := 0, routerLifetime := c_uInt16Max, reachableTime := c_uInt32Max, retransTimer := 0, rtAdvOptions := p_rtAdvOptions } } /** * @desc Receive template for IPv6 payload containing Router Advertisement * @param p_rtAdvOptions Router Advertisement options */ template Ipv6Payload mw_rtAdvWithOptions( in template RtAdvOptions p_rtAdvOptions ) := { routerAdvMsg := { icmpType := c_rtAdvMsg, icmpCode := 0, checksum := ?, curHopLimit := ?, managedConfigFlag := ?, otherConfigFlag := ?, homeAgentFlag := ?, reserved := ?, routerLifetime := ?, reachableTime := ?, retransTimer := ?, rtAdvOptions := p_rtAdvOptions } } /** * @desc Send template for IPv6 payload containing Router Advertisement * @param p_rtAdvOptions Router Advertisement options */ template (value) Ipv6Payload m_octetstringPayload( in template (value) octetstring p_payload ) := { octetstringMsg := p_payload } /** * @desc Receive template for IPv6 payload containing Router Advertisement * @param p_rtAdvOptions Router Advertisement options */ template Ipv6Payload mw_octetstringPayload( in template (present) octetstring p_payload ) := { octetstringMsg := p_payload } /** * @desc Send template for IPv6 Prefix option * @param p_prefixLength Length of the prefix. * @param p_lFlag Value for link flag. * @param p_aFlag Value for autoconfiguration flag. * @param p_validLifetime Value for valid life time duration. * @param p_preferredLifetime Value for preffered life time duration. * @param p_prefix Address prefix to be used */ template RtAdvOptions m_rtAdvOpt_prefixOpt ( in template (value) UInt8 p_prefixLength, in template (value) UInt1 p_lFlag, in template (value) UInt1 p_aFlag, in template (value) UInt32 p_validLifetime, in template (value) UInt32 p_preferredLifetime, in template (value) Ipv6Address p_prefix ):={ srcLinkLayerAddr := omit, prefixInfoList := { m_prefixInfo( p_prefixLength, p_lFlag, p_aFlag, p_validLifetime, p_preferredLifetime, p_prefix ) }, otherOption := omit } /** * @desc Send template for IPv6 Prefix info * @param p_prefixLength The length of the prefix * @param p_lFlag Value for link flag. * @param p_aFlag Value for autoconfiguration flag. * @param p_validLifetime Value for valid life time duration. * @param p_preferredLifetime Value for preferred life time duration. * @param p_prefix Address prefix to be used */ template PrefixInfo m_prefixInfo ( in template (value) UInt8 p_prefixLength, in template (value) UInt1 p_lFlag, in template (value) UInt1 p_aFlag, in template (value) UInt32 p_validLifetime, in template (value) UInt32 p_preferredLifetime, in template (value) Ipv6Address p_prefix ):= { icmpType:= c_prefixInfo, optionLength:= c_prefixInfoLen, prefixLength:= p_prefixLength, linkFlag:=p_lFlag, autoConfigFlag:=p_aFlag, rtAddrFlag := c_rtAddrFlag0, reserved1:=0, validLifetime:=p_validLifetime, preferredLifetime:=p_preferredLifetime, reserved2:=0, prefix:= p_prefix } } // end group ipv6 group gn6AcPrimitives { /** * @desc TA primitive for querying link-layer interfaces information */ template (value) AcGn6Primitive m_acGetInterfaceInfos := { getInterfaceInfos := 3 } /** * @desc TA primitive for retrieving link-layer interfaces information */ template AcGn6Response mw_acInterfaceInfos := { interfaceInfoList := ? } } // end gn6AcPrimitives } // end LibItsIpv6OverGeoNetworking_TypesAndValues lib/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn +346 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn: 346 added lines, 0 removed lines. Original line number Diff line number Diff line /** * @author ETSI / STF405 / STF449 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn $ * $Id: LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn 1318 2017-01-26 10:20:53Z filatov $ * @desc Types and values for IPv6 over GeoNetworking Protocol * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. * */ module LibItsIpv6OverGeoNetworking_TypesAndValues { //LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; //LibIts import from LibItsExternal_TypesAndValues all; group ipv6OverGeoConfigurationTypes { /** * @desc Entry of GVL table * @member key Reference key of the entry * @member prefix Prefix associated with the GVL * @member prefixLength Prefix length * @member area GeoArea associated with th e GVL * @member interface IUT's interface associated with the GVL */ type record GvlTableEntry { charstring key, Oct16 prefix, UInt8 prefixLength, charstring area, charstring interface } /** * @desc Table containing GVL information */ type record of GvlTableEntry GvlTable; /** * @desc Entry of Address table * @member key Reference key of the entry * @member macAddress Link-layer address * @member macSolNodeMca Link-layer solicited node multicast address * @member lla IPv6 link-local address * @member solNodeMca IPv6 solicited node multicast address */ type record AddressTableEntry { charstring key, MacAddress macAddress, MacAddress macSolNodeMca, Ipv6Address lla, Ipv6Address solNodeMca } /** * @desc Table containing Address information */ type record of AddressTableEntry AddressTable; } // end ipv6OverGeoConfigurationTypes group ipv6OverGeoConfigurationValues { type record of integer GvlIdxList; type record of UInt32 UInt32List; const integer c_gvl1 := 0; const integer c_gvl2 := 1; const integer c_gvl3 := 2; const charstring c_gvl1_name := "GVL1"; const charstring c_gvl2_name := "GVL2"; const charstring c_gvl3_name := "GVL3"; const charstring c_gvlArea1 := "GVL_AREA1"; const charstring c_gvlArea2 := "GVL_AREA2"; const charstring c_gvlArea3 := "GVL_AREA3"; } // end ipv6OverGeoConfigurationValues group ethernet { const MacAddress c_macBroadcastAddr := '333300000001'O; } // end ethernet group ipv6 { /** * @desc PDU type derived from RFC2460 */ type record Ipv6Packet { Ipv6Header ipv6Hdr, ExtensionHeaderList extHdrList optional, Ipv6Payload ipv6Payload optional } with { variant "FIELDORDER(msb)" } /** * @desc Derived from RFC 2460 Section 3 * @url http://www.ietf.org/rfc/rfc2460.txt */ type record Ipv6Header { UInt4 version, UInt8 trafficClass, UInt20 flowLabel, UInt16 payloadLength, UInt8 nextHeader, UInt8 hopLimit, Ipv6Address sourceAddress, Ipv6Address destinationAddress } group gn6ExtensionHeaderIds { const UInt8 c_hopHdr := 0; const UInt8 c_tcpHdr := 6; const UInt8 c_udpHdr := 17; const UInt8 c_tunneledIpHdr := 41; const UInt8 c_routeHdr := 43; const UInt8 c_fragHdr := 44; const UInt8 c_espHdr := 50; const UInt8 c_authHdr := 51; const UInt8 c_icmpHdr := 58; const UInt8 c_noNextHdr := 59; const UInt8 c_dstHdr := 60; const UInt8 c_mobileHdr := 135; } /** * @desc IPv6 extension header list */ type octetstring ExtensionHeaderList; /** * @desc IPv6 payload */ type union Ipv6Payload { RouterAdvertisementMsg routerAdvMsg, octetstring octetstringMsg } /** * @desc IPv6 Address */ type Oct16 Ipv6Address with {encode "length(16)"}; group rfc2461MessageTypes { const UInt8 c_prefixInfo := 3 ; const UInt8 c_rtAdvMsg := 134; } // end group rfc2461MessageTypes group ipv6Address { //Prefix const Oct2 c_llaMcaPrefix := 'FF02'O ; const Oct2 c_llaPrefix := 'FE80'O ; //Postfix const Oct2 c_allNodesMcaPostfix := '0001'O ; const Oct2 c_allRoutersMcaPostfix := '0002'O ; const Oct2 c_anycastPostfix := 'FFFF'O ; const Oct1 c_haAnycastPostfix := '7E'O ; //Wellknown Multicast Address const Ipv6Address c_allNodesMca := c_llaMcaPrefix & c_12ZeroBytes & c_allNodesMcaPostfix ; const Ipv6Address c_allRoutersMca := c_llaMcaPrefix & c_12ZeroBytes & c_allRoutersMcaPostfix ; //Unspecified const Ipv6Address c_unspecified := '00000000000000000000000000000000'O; //geographic const Bit7 c_itsGn6aslGeoAnycastID := '1111101'B; // TDB by IANA }//end group ipv6Address /** * @desc PDU type derived from RFC2461 clause 4.2 */ type record RouterAdvertisementMsg { UInt8 icmpType(c_rtAdvMsg), UInt8 icmpCode, Oct2 checksum, UInt8 curHopLimit, UInt1 managedConfigFlag, UInt1 otherConfigFlag, UInt1 homeAgentFlag, UInt5 reserved, UInt16 routerLifetime, UInt32 reachableTime, UInt32 retransTimer, RtAdvOptions rtAdvOptions optional } // FIXME CHECK while TITAN refuse it: with { variant (checksum) "MarkForIPv6ChecksumCalculation" } /** * @desc RouterAdvertisement option list * * @remark Any RtAdvOptions value should at least have * one of the first three options present! */ type set RtAdvOptions { SrcLinkLayerAddress srcLinkLayerAddr optional, // MtuOption mtuOption optional, PrefixInfoList prefixInfoList optional, // AdvertisementInterval advertisementInterval optional, // HomeAgentInfo homeAgentInfo optional, octetstring otherOption optional } /** * @desc Derived from RFC2461 clause4.6.1 + MIPv6 * @url http://www.ietf.org/rfc/rfc2461.txt */ type record SrcLinkLayerAddress { UInt8 icmpType(c_srcLinkLayerAddress), UInt8 optionLength, Oct6to15 linkLayerAddr } type set length (1..c_maxNrPrefixInfo) of PrefixInfo PrefixInfoList; /** * @desc Derived from RFC 2461 clause 4.6.2 */ type record PrefixInfo { UInt8 icmpType(c_prefixInfo), UInt8 optionLength, UInt8 prefixLength, UInt1 linkFlag, UInt1 autoConfigFlag, UInt1 rtAddrFlag, UInt5 reserved1, UInt32 validLifetime, UInt32 preferredLifetime, UInt32 reserved2, Prefix prefix } type Ipv6Address Prefix ; group neighbourDiscoveryConstants { const UInt8 c_maxNrPrefixInfo := 10; const UInt1 c_rtAddrFlag0 := 0; const UInt1 c_aFlag0 := 0; const UInt1 c_aFlag1 := 1; const UInt1 c_rFlag0 := 0; const UInt1 c_rFlag1 := 1; const UInt1 c_sFlag0 := 0; const UInt1 c_sFlag1 := 1; const UInt1 c_oFlag0 := 0; const UInt1 c_oFlag1 := 1; const UInt1 c_mFlag0 := 0; const UInt1 c_mFlag1 := 1; const UInt1 c_lFlag0 := 0; const UInt1 c_lFlag1 := 1; const UInt16 c_zeroLifetime := 0 ; const UInt32 c_validLifetime20s := 20; const UInt32 c_validLifetime30s := 30; const UInt32 c_preferredLifetime30s := 30; } // end group neighbourDiscoveryConstants const UInt8 c_srcLinkLayerAddress := 1; const UInt8 c_prefixInfoLen := 4; } // end group ipv6 group acPrimitives { /** * @desc GN6 TA primitives * @member getInterfaceInfos Primitive for querying IUT's interface information */ type union AcGn6Primitive { integer getInterfaceInfos } /** * @desc GN6 TA responses * @member interfaceInfoList Primitive for retrieving IUT's interface information */ type union AcGn6Response { AcGn6InterfaceInfoList interfaceInfoList } /** * @desc List of interface informations */ type record of AcGn6InterfaceInfo AcGn6InterfaceInfoList; /** * @desc Interface informations * @member interfaceName Interface name * @member ipv6AddressList Configured IPv6 addresses for this interface */ type record AcGn6InterfaceInfo { charstring interfaceName, Ipv6AddressList ipv6AddressList } /** * @desc List of IPv6 addresses */ type record of Ipv6Address Ipv6AddressList; } // end acPrimitives group networkAndTransportPrimitives { group nt2Primitives { /** * @desc NT2 IPv6 over GeoNetworking Indication Primitive */ type record IPv6OverGeoNetworkingInd { charstring interface, MacAddress macSourceAddress, MacAddress macDestinationAddress, Ipv6Packet ipv6Packet } /** * @desc NT2 IPv6 over GeoNetworking Request Primitive */ type record IPv6OverGeoNetworkingReq { charstring interface, MacAddress macSourceAddress, MacAddress macDestinationAddress, Ipv6Packet ipv6Packet } } // end nt2Primitives } // End of group networkAndTransportPrimitives with { encode "LibIts_Interface" } // end interfacePrimitives } with { variant "" encode "LibItsIpv6OverGeoNetworking" } Loading
lib/LibItsIpv6OverGeoNetworking_EncdecDeclarations.ttcn +11 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_EncdecDeclarations.ttcn: 11 added lines, 0 removed lines. Original line number Diff line number Diff line module LibItsIpv6OverGeoNetworking_EncdecDeclarations { import from LibItsIpv6OverGeoNetworking_TypesAndValues all; external function fx_enc_Ipv6Packet (Ipv6Packet p) return bitstring with {extension "prototype(convert) encode(LibItsIpv6OverGeoNetworking)"} external function fx_dec_Ipv6Packet (inout bitstring b, out Ipv6Packet p) return integer with {extension "prototype(sliding) decode(LibItsIpv6OverGeoNetworking)"} } // End of module LibItsIpv6OverGeoNetworking_EncdecDeclarations
lib/LibItsIpv6OverGeoNetworking_Pics.ttcn +34 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_Pics.ttcn: 34 added lines, 0 removed lines. Original line number Diff line number Diff line /** * @author ETSI / STF405 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Pics.ttcn $ * $Id: LibItsIpv6OverGeoNetworking_Pics.ttcn 1318 2017-01-26 10:20:53Z filatov $ * @desc IPv6 Over GeoNetworking PICS * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. * */ module LibItsIpv6OverGeoNetworking_Pics { // LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; // LibIts import from LibItsGeoNetworking_TypesAndValues all; group ipv6OverGeoNwPics { /** * @desc Indicates whether the GN6ASL shall resolve the destination link-layer-address * from the IPv6 address. * FALSE, perform address resolution, otherwise do not. * @see ETSI TS 102 859-1 A.10/10 */ modulepar boolean PICS_GN6_ASL_VI_RESOL_ADDR := true; } // end ipv6OverGeoNwPics } // end LibItsIpv6OverGeoNetworking_Pics No newline at end of file
lib/LibItsIpv6OverGeoNetworking_Pixits.ttcn +66 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_Pixits.ttcn: 66 added lines, 0 removed lines. Original line number Diff line number Diff line /** * @author ETSI / STF405 /STF449 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Pixits.ttcn $ * $Id: LibItsIpv6OverGeoNetworking_Pixits.ttcn 1318 2017-01-26 10:20:53Z filatov $ * @desc Module parameters for IPv6 over GeoNetworking Protocol * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. * */ module LibItsIpv6OverGeoNetworking_Pixits { // LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; /** * @desc GVL will be configured manually? */ modulepar boolean PX_CONFIG_MANUAL_GVL := false; /** * @desc Time for building the configuration and virtual interfaces dynamically. */ modulepar float PX_T_BUILD_CONFIG := 5.0; /** * @desc IPv6 prefix 1 to be used for defining GVL */ modulepar Oct16 PX_GN6_PREFIX_1 := '3FFE0000000000010000000000000000'O; /** * @desc IPv6 prefix 2 to be used for defining GVL */ modulepar Oct16 PX_GN6_PREFIX_2 := '3FFE0000000000020000000000000000'O; /** * @desc IPv6 prefix 3 to be used for defining GVL */ modulepar Oct16 PX_GN6_PREFIX_3 := '3FFE0000000000030000000000000000'O; /** * @desc Length of IPv6 prefix 1 * @see PX_GN6_PREFIX_1 */ modulepar UInt8 PX_GN6_PREFIX_LENGTH_1 := 64; /** * @desc Length of IPv6 prefix 2 * @see PX_GN6_PREFIX_2 */ modulepar UInt8 PX_GN6_PREFIX_LENGTH_2 := 64; /** * @desc Length of IPv6 prefix 3 * @see PX_GN6_PREFIX_3 */ modulepar UInt8 PX_GN6_PREFIX_LENGTH_3 := 64; /** * @desc Name of IUT's virtual interface associated with TVL */ modulepar charstring PX_GN6_TVL_INTERFACE_NAME := "tvl0"; } No newline at end of file
lib/LibItsIpv6OverGeoNetworking_Templates.ttcn +291 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_Templates.ttcn: 291 added lines, 0 removed lines. Original line number Diff line number Diff line /** * @author ETSI / STF405 / STF449 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Templates.ttcn $ * $Id: LibItsIpv6OverGeoNetworking_Templates.ttcn 1318 2017-01-26 10:20:53Z filatov $ * @desc IPv6 over GeoNetworking Protocol Templates * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. * */ module LibItsIpv6OverGeoNetworking_Templates { //LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; //LibIts import from LibItsIpv6OverGeoNetworking_TypesAndValues all; import from LibItsGeoNetworking_TypesAndValues all; import from LibItsExternal_TypesAndValues {type MacAddress}; group ipv6OverGeoNwPrimitivesTemplates { /** * @desc Send template for IPv6OverGeoNetworking packet (IPv6OverGeoNetworking Primitive) * @param p_interface Which virtual interface to use for sending the packet * @param p_srcMacAddr Link-layer source address * @param p_dstMacAddr Link-layer destination address * @param p_ipv6Packet IPv6 packet to be sent */ template (value) IPv6OverGeoNetworkingReq m_ipv6OverGeoNwReq( template (value) charstring p_interface, template (value) MacAddress p_srcMacAddr, template (value) MacAddress p_dstMacAddr, template (value) Ipv6Packet p_ipv6Packet ) := { interface := p_interface, macSourceAddress := p_srcMacAddr, macDestinationAddress := p_dstMacAddr, ipv6Packet := p_ipv6Packet } /** * @desc Receive template for IPv6OverGeoNetworking packet (IPv6OverGeoNetworking Primitive) * @param p_interface On which virtual interface the packet is expected * @param p_srcMacAddr Link-layer source address * @param p_dstMacAddr Link-layer destination address * @param p_ipv6Packet Expected IPv6 packet */ template IPv6OverGeoNetworkingInd mw_ipv6OverGeoNwInd( template (present) charstring p_interface, template (present) MacAddress p_srcMacAddr, template (present) MacAddress p_dstMacAddr, template (present) Ipv6Packet p_ipv6Packet ) := { interface := p_interface, macSourceAddress := p_srcMacAddr, macDestinationAddress := p_dstMacAddr, ipv6Packet := p_ipv6Packet } } // ipv6OverGeoNwPrimitivesTemplates group ipv6 { /** * @desc Send template for IPv6 packet * @param p_srcAddr IPv6 source address * @param p_dstAddr IPv6 destination address * @param p_nextHdr IPv6's next header * @param p_payload IPv6 payload */ template (value) Ipv6Packet m_ipv6Packet( in template (value) Ipv6Address p_srcAddr, in template (value) Ipv6Address p_dstAddr, in template (value) UInt8 p_nextHdr, in template (omit) Ipv6Payload p_payload ) := { ipv6Hdr := m_ipv6Header(p_srcAddr, p_dstAddr, p_nextHdr), extHdrList := omit, ipv6Payload := p_payload } /** * @desc Reception template for IPv6 packet * @param p_srcAddr IPv6 source address * @param p_dstAddr IPv6 destination address * @param p_nextHdr IPv6's next header * @param p_payload IPv6 payload */ template Ipv6Packet mw_ipv6Packet( in template (present) Ipv6Address p_srcAddr, in template (present) Ipv6Address p_dstAddr, in template (present) UInt8 p_nextHdr, in template Ipv6Payload p_payload ) := { ipv6Hdr := mw_ipv6Header(p_srcAddr, p_dstAddr, p_nextHdr), extHdrList := omit, ipv6Payload := p_payload } /** * @desc Send template for IPv6 header * @param p_srcAddr IPv6 source address * @param p_dstAddr IPv6 destination address * @param p_nextHdr IPv6's next header */ template (value) Ipv6Header m_ipv6Header( in template (value) Ipv6Address p_srcAddr, in template (value) Ipv6Address p_dstAddr, in template (value) UInt8 p_nextHdr ) := { version := 6, trafficClass := 0, flowLabel := 0, payloadLength := 0, //indicates that the adaptation will fill the correct value nextHeader := p_nextHdr, hopLimit := 255, sourceAddress := p_srcAddr, destinationAddress := p_dstAddr } /** * @desc Receive template for IPv6 header * @param p_srcAddr IPv6 source address * @param p_dstAddr IPv6 destination address * @param p_nextHdr IPv6's next header */ template Ipv6Header mw_ipv6Header( in template (present) Ipv6Address p_srcAddr, in template (present) Ipv6Address p_dstAddr, in template (present) UInt8 p_nextHdr ) := { version := 6, trafficClass := ?, flowLabel := ?, payloadLength := ?, nextHeader := p_nextHdr, hopLimit := ?, sourceAddress := p_srcAddr, destinationAddress := p_dstAddr } /** * @desc Send template for IPv6 payload containing Router Advertisement * @param p_rtAdvOptions Router Advertisement options */ template (value) Ipv6Payload m_rtAdvWithOptions( in template (omit) RtAdvOptions p_rtAdvOptions ) := { routerAdvMsg := { icmpType := c_rtAdvMsg, icmpCode := 0, checksum := c_2ZeroBytes, //indicates that the adaptation will fill the correct value curHopLimit := 255, managedConfigFlag := 0, otherConfigFlag := 0, homeAgentFlag := 0, reserved := 0, routerLifetime := c_uInt16Max, reachableTime := c_uInt32Max, retransTimer := 0, rtAdvOptions := p_rtAdvOptions } } /** * @desc Receive template for IPv6 payload containing Router Advertisement * @param p_rtAdvOptions Router Advertisement options */ template Ipv6Payload mw_rtAdvWithOptions( in template RtAdvOptions p_rtAdvOptions ) := { routerAdvMsg := { icmpType := c_rtAdvMsg, icmpCode := 0, checksum := ?, curHopLimit := ?, managedConfigFlag := ?, otherConfigFlag := ?, homeAgentFlag := ?, reserved := ?, routerLifetime := ?, reachableTime := ?, retransTimer := ?, rtAdvOptions := p_rtAdvOptions } } /** * @desc Send template for IPv6 payload containing Router Advertisement * @param p_rtAdvOptions Router Advertisement options */ template (value) Ipv6Payload m_octetstringPayload( in template (value) octetstring p_payload ) := { octetstringMsg := p_payload } /** * @desc Receive template for IPv6 payload containing Router Advertisement * @param p_rtAdvOptions Router Advertisement options */ template Ipv6Payload mw_octetstringPayload( in template (present) octetstring p_payload ) := { octetstringMsg := p_payload } /** * @desc Send template for IPv6 Prefix option * @param p_prefixLength Length of the prefix. * @param p_lFlag Value for link flag. * @param p_aFlag Value for autoconfiguration flag. * @param p_validLifetime Value for valid life time duration. * @param p_preferredLifetime Value for preffered life time duration. * @param p_prefix Address prefix to be used */ template RtAdvOptions m_rtAdvOpt_prefixOpt ( in template (value) UInt8 p_prefixLength, in template (value) UInt1 p_lFlag, in template (value) UInt1 p_aFlag, in template (value) UInt32 p_validLifetime, in template (value) UInt32 p_preferredLifetime, in template (value) Ipv6Address p_prefix ):={ srcLinkLayerAddr := omit, prefixInfoList := { m_prefixInfo( p_prefixLength, p_lFlag, p_aFlag, p_validLifetime, p_preferredLifetime, p_prefix ) }, otherOption := omit } /** * @desc Send template for IPv6 Prefix info * @param p_prefixLength The length of the prefix * @param p_lFlag Value for link flag. * @param p_aFlag Value for autoconfiguration flag. * @param p_validLifetime Value for valid life time duration. * @param p_preferredLifetime Value for preferred life time duration. * @param p_prefix Address prefix to be used */ template PrefixInfo m_prefixInfo ( in template (value) UInt8 p_prefixLength, in template (value) UInt1 p_lFlag, in template (value) UInt1 p_aFlag, in template (value) UInt32 p_validLifetime, in template (value) UInt32 p_preferredLifetime, in template (value) Ipv6Address p_prefix ):= { icmpType:= c_prefixInfo, optionLength:= c_prefixInfoLen, prefixLength:= p_prefixLength, linkFlag:=p_lFlag, autoConfigFlag:=p_aFlag, rtAddrFlag := c_rtAddrFlag0, reserved1:=0, validLifetime:=p_validLifetime, preferredLifetime:=p_preferredLifetime, reserved2:=0, prefix:= p_prefix } } // end group ipv6 group gn6AcPrimitives { /** * @desc TA primitive for querying link-layer interfaces information */ template (value) AcGn6Primitive m_acGetInterfaceInfos := { getInterfaceInfos := 3 } /** * @desc TA primitive for retrieving link-layer interfaces information */ template AcGn6Response mw_acInterfaceInfos := { interfaceInfoList := ? } } // end gn6AcPrimitives } // end LibItsIpv6OverGeoNetworking_TypesAndValues
lib/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn +346 Viewed Changes for lib/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn: 346 added lines, 0 removed lines. Original line number Diff line number Diff line /** * @author ETSI / STF405 / STF449 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn $ * $Id: LibItsIpv6OverGeoNetworking_TypesAndValues.ttcn 1318 2017-01-26 10:20:53Z filatov $ * @desc Types and values for IPv6 over GeoNetworking Protocol * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. * */ module LibItsIpv6OverGeoNetworking_TypesAndValues { //LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; //LibIts import from LibItsExternal_TypesAndValues all; group ipv6OverGeoConfigurationTypes { /** * @desc Entry of GVL table * @member key Reference key of the entry * @member prefix Prefix associated with the GVL * @member prefixLength Prefix length * @member area GeoArea associated with th e GVL * @member interface IUT's interface associated with the GVL */ type record GvlTableEntry { charstring key, Oct16 prefix, UInt8 prefixLength, charstring area, charstring interface } /** * @desc Table containing GVL information */ type record of GvlTableEntry GvlTable; /** * @desc Entry of Address table * @member key Reference key of the entry * @member macAddress Link-layer address * @member macSolNodeMca Link-layer solicited node multicast address * @member lla IPv6 link-local address * @member solNodeMca IPv6 solicited node multicast address */ type record AddressTableEntry { charstring key, MacAddress macAddress, MacAddress macSolNodeMca, Ipv6Address lla, Ipv6Address solNodeMca } /** * @desc Table containing Address information */ type record of AddressTableEntry AddressTable; } // end ipv6OverGeoConfigurationTypes group ipv6OverGeoConfigurationValues { type record of integer GvlIdxList; type record of UInt32 UInt32List; const integer c_gvl1 := 0; const integer c_gvl2 := 1; const integer c_gvl3 := 2; const charstring c_gvl1_name := "GVL1"; const charstring c_gvl2_name := "GVL2"; const charstring c_gvl3_name := "GVL3"; const charstring c_gvlArea1 := "GVL_AREA1"; const charstring c_gvlArea2 := "GVL_AREA2"; const charstring c_gvlArea3 := "GVL_AREA3"; } // end ipv6OverGeoConfigurationValues group ethernet { const MacAddress c_macBroadcastAddr := '333300000001'O; } // end ethernet group ipv6 { /** * @desc PDU type derived from RFC2460 */ type record Ipv6Packet { Ipv6Header ipv6Hdr, ExtensionHeaderList extHdrList optional, Ipv6Payload ipv6Payload optional } with { variant "FIELDORDER(msb)" } /** * @desc Derived from RFC 2460 Section 3 * @url http://www.ietf.org/rfc/rfc2460.txt */ type record Ipv6Header { UInt4 version, UInt8 trafficClass, UInt20 flowLabel, UInt16 payloadLength, UInt8 nextHeader, UInt8 hopLimit, Ipv6Address sourceAddress, Ipv6Address destinationAddress } group gn6ExtensionHeaderIds { const UInt8 c_hopHdr := 0; const UInt8 c_tcpHdr := 6; const UInt8 c_udpHdr := 17; const UInt8 c_tunneledIpHdr := 41; const UInt8 c_routeHdr := 43; const UInt8 c_fragHdr := 44; const UInt8 c_espHdr := 50; const UInt8 c_authHdr := 51; const UInt8 c_icmpHdr := 58; const UInt8 c_noNextHdr := 59; const UInt8 c_dstHdr := 60; const UInt8 c_mobileHdr := 135; } /** * @desc IPv6 extension header list */ type octetstring ExtensionHeaderList; /** * @desc IPv6 payload */ type union Ipv6Payload { RouterAdvertisementMsg routerAdvMsg, octetstring octetstringMsg } /** * @desc IPv6 Address */ type Oct16 Ipv6Address with {encode "length(16)"}; group rfc2461MessageTypes { const UInt8 c_prefixInfo := 3 ; const UInt8 c_rtAdvMsg := 134; } // end group rfc2461MessageTypes group ipv6Address { //Prefix const Oct2 c_llaMcaPrefix := 'FF02'O ; const Oct2 c_llaPrefix := 'FE80'O ; //Postfix const Oct2 c_allNodesMcaPostfix := '0001'O ; const Oct2 c_allRoutersMcaPostfix := '0002'O ; const Oct2 c_anycastPostfix := 'FFFF'O ; const Oct1 c_haAnycastPostfix := '7E'O ; //Wellknown Multicast Address const Ipv6Address c_allNodesMca := c_llaMcaPrefix & c_12ZeroBytes & c_allNodesMcaPostfix ; const Ipv6Address c_allRoutersMca := c_llaMcaPrefix & c_12ZeroBytes & c_allRoutersMcaPostfix ; //Unspecified const Ipv6Address c_unspecified := '00000000000000000000000000000000'O; //geographic const Bit7 c_itsGn6aslGeoAnycastID := '1111101'B; // TDB by IANA }//end group ipv6Address /** * @desc PDU type derived from RFC2461 clause 4.2 */ type record RouterAdvertisementMsg { UInt8 icmpType(c_rtAdvMsg), UInt8 icmpCode, Oct2 checksum, UInt8 curHopLimit, UInt1 managedConfigFlag, UInt1 otherConfigFlag, UInt1 homeAgentFlag, UInt5 reserved, UInt16 routerLifetime, UInt32 reachableTime, UInt32 retransTimer, RtAdvOptions rtAdvOptions optional } // FIXME CHECK while TITAN refuse it: with { variant (checksum) "MarkForIPv6ChecksumCalculation" } /** * @desc RouterAdvertisement option list * * @remark Any RtAdvOptions value should at least have * one of the first three options present! */ type set RtAdvOptions { SrcLinkLayerAddress srcLinkLayerAddr optional, // MtuOption mtuOption optional, PrefixInfoList prefixInfoList optional, // AdvertisementInterval advertisementInterval optional, // HomeAgentInfo homeAgentInfo optional, octetstring otherOption optional } /** * @desc Derived from RFC2461 clause4.6.1 + MIPv6 * @url http://www.ietf.org/rfc/rfc2461.txt */ type record SrcLinkLayerAddress { UInt8 icmpType(c_srcLinkLayerAddress), UInt8 optionLength, Oct6to15 linkLayerAddr } type set length (1..c_maxNrPrefixInfo) of PrefixInfo PrefixInfoList; /** * @desc Derived from RFC 2461 clause 4.6.2 */ type record PrefixInfo { UInt8 icmpType(c_prefixInfo), UInt8 optionLength, UInt8 prefixLength, UInt1 linkFlag, UInt1 autoConfigFlag, UInt1 rtAddrFlag, UInt5 reserved1, UInt32 validLifetime, UInt32 preferredLifetime, UInt32 reserved2, Prefix prefix } type Ipv6Address Prefix ; group neighbourDiscoveryConstants { const UInt8 c_maxNrPrefixInfo := 10; const UInt1 c_rtAddrFlag0 := 0; const UInt1 c_aFlag0 := 0; const UInt1 c_aFlag1 := 1; const UInt1 c_rFlag0 := 0; const UInt1 c_rFlag1 := 1; const UInt1 c_sFlag0 := 0; const UInt1 c_sFlag1 := 1; const UInt1 c_oFlag0 := 0; const UInt1 c_oFlag1 := 1; const UInt1 c_mFlag0 := 0; const UInt1 c_mFlag1 := 1; const UInt1 c_lFlag0 := 0; const UInt1 c_lFlag1 := 1; const UInt16 c_zeroLifetime := 0 ; const UInt32 c_validLifetime20s := 20; const UInt32 c_validLifetime30s := 30; const UInt32 c_preferredLifetime30s := 30; } // end group neighbourDiscoveryConstants const UInt8 c_srcLinkLayerAddress := 1; const UInt8 c_prefixInfoLen := 4; } // end group ipv6 group acPrimitives { /** * @desc GN6 TA primitives * @member getInterfaceInfos Primitive for querying IUT's interface information */ type union AcGn6Primitive { integer getInterfaceInfos } /** * @desc GN6 TA responses * @member interfaceInfoList Primitive for retrieving IUT's interface information */ type union AcGn6Response { AcGn6InterfaceInfoList interfaceInfoList } /** * @desc List of interface informations */ type record of AcGn6InterfaceInfo AcGn6InterfaceInfoList; /** * @desc Interface informations * @member interfaceName Interface name * @member ipv6AddressList Configured IPv6 addresses for this interface */ type record AcGn6InterfaceInfo { charstring interfaceName, Ipv6AddressList ipv6AddressList } /** * @desc List of IPv6 addresses */ type record of Ipv6Address Ipv6AddressList; } // end acPrimitives group networkAndTransportPrimitives { group nt2Primitives { /** * @desc NT2 IPv6 over GeoNetworking Indication Primitive */ type record IPv6OverGeoNetworkingInd { charstring interface, MacAddress macSourceAddress, MacAddress macDestinationAddress, Ipv6Packet ipv6Packet } /** * @desc NT2 IPv6 over GeoNetworking Request Primitive */ type record IPv6OverGeoNetworkingReq { charstring interface, MacAddress macSourceAddress, MacAddress macDestinationAddress, Ipv6Packet ipv6Packet } } // end nt2Primitives } // End of group networkAndTransportPrimitives with { encode "LibIts_Interface" } // end interfacePrimitives } with { variant "" encode "LibItsIpv6OverGeoNetworking" }