Commit e378601c authored by tepelmann's avatar tepelmann
Browse files

Initial version of Ipv6OverGeoNetworking framework and test case.

Aligned GeoNetworking.
parent 4393ac01
Loading
Loading
Loading
Loading
+91 −32
Original line number Original line Diff line number Diff line
@@ -290,7 +290,7 @@ module LibItsGeoNetworking_Functions {
            activate(a_neighbourDefault());
            activate(a_neighbourDefault());
            f_taStartBeaconing(
            f_taStartBeaconing(
                m_beaconHeader(
                m_beaconHeader(
                    f_getPosition(vc_positionTable, vc_componentName)
                    f_getPosition(vc_componentName)
                )
                )
            );    
            );    
            
            
@@ -309,20 +309,30 @@ module LibItsGeoNetworking_Functions {
    group geoPositionFunctions {
    group geoPositionFunctions {
        
        
        function f_addPosition(
        function f_addPosition(
            inout PositionTable p_positionTable, 
            in PositionTable v_positionTable,
            in charstring p_positionKey,
            in charstring p_positionKey,
            in LongPosVector p_positionValue) {
            in LongPosVector p_positionValue
        ) {
            
            
            // TODO
            v_positionTable[lengthof(v_positionTable)] := {
                key := p_positionKey,
                position := p_positionValue
            };
        }
        }
        
        
        function f_getPosition(
        function f_getPosition(
            in PositionTable p_positionTable, 
            in charstring p_positionKey
            in charstring p_positionKey)
        ) runs on ItsNt 
        return LongPosVector {
        return LongPosVector {
            
            
            var LongPosVector v_return;
            var LongPosVector v_return;
            // TODO   
            var integer i := 0;
            
            for (i:=0; i<lengthof(vc_positionTable); i:=i+1) {
                if (vc_positionTable[i].key == p_positionKey) {
                    v_return := vc_positionTable[i].position;
                }
            }
            
            
            return v_return;
            return v_return;
        }
        }
@@ -350,22 +360,71 @@ module LibItsGeoNetworking_Functions {
            return v_return;
            return v_return;
        }
        }
        
        
        function f_getBroadcastArea(in charstring p_areaName) 
        function f_getArea(in GeoAreaTable p_areaTable, in charstring p_areaName) return GeoArea {
        return BroadcastArea {
            var GeoArea v_return;
            var integer i := 0;
            
            
            var BroadcastArea v_return;
            for (i:=0; i<lengthof(p_areaTable); i:=i+1) {
            // TODO
                if (p_areaTable[i].key == p_areaName) {
                    v_return := p_areaTable[i].geoArea;
                }
            }
            
            
            return v_return;
            return v_return;
        }
        }
        
        
        function f_getAnycastArea(in charstring p_areaName)
        function f_getGeoBroadcastArea(in charstring p_areaName) runs on ItsNt 
        return AnycastArea {
        return GeoBroadcastArea {         
            return f_geoArea2geoBroadcastArea(f_getArea(vc_areaTable, p_areaName));
        }
        
        
            var AnycastArea v_return;
        function f_getAnycastArea(in charstring p_areaName) runs on ItsNt 
            // TODO
        return GeoAnycastArea {
            return f_geoArea2geoAnycastArea(f_getArea(vc_areaTable, p_areaName));
        }
        
        
            return v_return;  
        function f_geoArea2geoBroadcastArea(GeoArea p_area) 
        return GeoBroadcastArea {
            var GeoBroadcastArea v_broadcastArea;
            
            if (p_area.shape == e_geoCircle) {
                v_broadcastArea.geoBroadcastSubType := e_geoBroadcastCircle;
            }
            else if (p_area.shape == e_geoRect) {
                v_broadcastArea.geoBroadcastSubType := e_geoBroadcastRect;
            }
            else if (p_area.shape == e_geoElip) {
                v_broadcastArea.geoBroadcastSubType := e_geoBroadcastElip;
            }
            else {
                v_broadcastArea.geoBroadcastSubType := e_reserved;
            }
            
            v_broadcastArea.geoBroadcastArea := p_area.area;
            
            return v_broadcastArea;
        }
        
        function f_geoArea2geoAnycastArea(GeoArea p_area) 
        return GeoAnycastArea {
            var GeoAnycastArea v_anycastArea;
            
            if (p_area.shape == e_geoCircle) {
                v_anycastArea.geoAnycastSubType := e_geoAnycastCircle;
            }
            else if (p_area.shape == e_geoRect) {
                v_anycastArea.geoAnycastSubType := e_geoAnycastRect;
            }
            else if (p_area.shape == e_geoElip) {
                v_anycastArea.geoAnycastSubType := e_geoAnycastElip;
            }
            else {
                v_anycastArea.geoAnycastSubType := e_reserved;
            }
            
            v_anycastArea.geoAnycastArea := p_area.area;
            
            return v_anycastArea;
        }
        }
        
        
        /**
        /**
@@ -424,9 +483,9 @@ module LibItsGeoNetworking_Functions {
        altstep a_neighbourDefault() runs on ItsNt {
        altstep a_neighbourDefault() runs on ItsNt {
      
      
            [] a_receiveLsRequestAndReply(
            [] a_receiveLsRequestAndReply(
                ?, ?, f_getPosition(vc_positionTable, vc_componentName).gnAddr, 
                ?, ?, f_getPosition(vc_componentName).gnAddr, 
                f_getPosition(vc_positionTable, vc_componentName), 
                f_getPosition(vc_componentName), 
                f_getPosition(vc_positionTable, vc_componentName), 
                f_getPosition(vc_componentName), 
                e_vehicleStation
                e_vehicleStation
               ) { 
               ) { 
                repeat;
                repeat;
@@ -507,7 +566,7 @@ module LibItsGeoNetworking_Functions {
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) UInt16 p_seqNumber,
                in template (present) UInt16 p_seqNumber,
                in template (present) BroadcastArea p_broadcastArea,
                in template (present) GeoBroadcastArea p_broadcastArea,
                in template (present) UInt8 p_hopLimit
                in template (present) UInt8 p_hopLimit
            ) runs on ItsNt {
            ) runs on ItsNt {
                
                
@@ -530,7 +589,7 @@ module LibItsGeoNetworking_Functions {
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) UInt16 p_seqNumber,
                in template (present) UInt16 p_seqNumber,
                in template (present) BroadcastArea p_broadcastArea
                in template (present) GeoBroadcastArea p_broadcastArea
            ) runs on ItsNt {
            ) runs on ItsNt {
                
                
                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoBroadcastHeaderWithArea(
                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoBroadcastHeaderWithArea(
@@ -574,7 +633,7 @@ module LibItsGeoNetworking_Functions {
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) UInt16 p_seqNumber,
                in template (present) UInt16 p_seqNumber,
                in template (present) AnycastArea p_anycastArea,
                in template (present) GeoAnycastArea p_anycastArea,
                in template (present) UInt8 p_hopLimit
                in template (present) UInt8 p_hopLimit
            ) runs on ItsNt {
            ) runs on ItsNt {
                
                
@@ -597,7 +656,7 @@ module LibItsGeoNetworking_Functions {
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) UInt16 p_seqNumber,
                in template (present) UInt16 p_seqNumber,
                in template (present) AnycastArea p_anycastArea
                in template (present) GeoAnycastArea p_anycastArea
            ) runs on ItsNt {
            ) runs on ItsNt {
                
                
                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoAnycastHeaderWithArea(
                [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoAnycastHeaderWithArea(
+73 −20
Original line number Original line Diff line number Diff line
@@ -9,6 +9,7 @@ module LibItsGeoNetworking_Templates {
    
    
    // Libcommon
    // Libcommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    
    
    // LibIts
    // LibIts
    import from LibIts_Interface all;
    import from LibIts_Interface all;
@@ -44,12 +45,18 @@ module LibItsGeoNetworking_Templates {
            payload := *          
            payload := *          
        }     
        }     
                
                
        template GeoNetworkingPacket mw_geoNwPduWithPayload(in template (present) Header p_header) := {
        template GeoNetworkingPacket mw_geoNwPduAnyPayload(in template (present) Header p_header) := {
        	header := p_header,
        	header := p_header,
        	secHeader := *,
        	secHeader := *,
            payload := ?          
            payload := ?          
        }     
        }     
                
                
        template GeoNetworkingPacket mw_geoNwPduWithPayload(in template (present) Header p_header, in template (present) Payload p_payload) := {
            header := p_header,
            secHeader := *,
            payload := p_payload
        }     
                
    } // end geoNwPduTemplates
    } // end geoNwPduTemplates
    
    
    group geoNwHeadersTemplates {
    group geoNwHeadersTemplates {
@@ -122,6 +129,16 @@ module LibItsGeoNetworking_Templates {
                hopLimit := p_hopLimit   
                hopLimit := p_hopLimit   
            }
            }
            
            
            template CommonHeader mw_commonHeaderWithTrafficClass (
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) NextHeader p_nextHeader,
                in template (present) HeaderTST p_headerTST,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) TrafficClass p_trafficClass
            ) modifies mw_commonHeader := {
                trafficClass := p_trafficClass
            }
            
            template (value) Flags m_flags(
            template (value) Flags m_flags(
            	in template (value) StationTypeIdentifier p_stationType
            	in template (value) StationTypeIdentifier p_stationType
            ) := {
            ) := {
@@ -145,6 +162,14 @@ module LibItsGeoNetworking_Templates {
                latency := e_veryLow
                latency := e_veryLow
            }
            }
            
            
            template (present) TrafficClass mw_trafficClass(
                in template (present) Reliability p_reliability,
                in template (present) Latency p_latency
            ) modifies m_trafficClass := {
                reliability := p_reliability,
                latency := p_latency
            }
            
            template GN_Address mw_gnAddressAny := {
            template GN_Address mw_gnAddressAny := {
                typeOfAddress := ?,
                typeOfAddress := ?,
                stationType := ?,
                stationType := ?,
@@ -272,7 +297,7 @@ module LibItsGeoNetworking_Templates {
            	in template (value) LongPosVector p_senderLongPosVec,
            	in template (value) LongPosVector p_senderLongPosVec,
    			in template (value) StationTypeIdentifier p_stationType,
    			in template (value) StationTypeIdentifier p_stationType,
            	in template (value) UInt16 p_seqNumber,
            	in template (value) UInt16 p_seqNumber,
            	in template (value) BroadcastArea p_broadcastArea
            	in template (value) GeoBroadcastArea p_broadcastArea
            ) := {
            ) := {
                geoBroadcastHeader := {
                geoBroadcastHeader := {
                    commonHeader := m_commonHeader(
                    commonHeader := m_commonHeader(
@@ -301,7 +326,7 @@ module LibItsGeoNetworking_Templates {
                in template (value) LongPosVector p_senderLongPosVec,
                in template (value) LongPosVector p_senderLongPosVec,
                in template (value) StationTypeIdentifier p_stationType,
                in template (value) StationTypeIdentifier p_stationType,
                in template (value) UInt16 p_seqNumber,
                in template (value) UInt16 p_seqNumber,
                in template (value) BroadcastArea p_broadcastArea,
                in template (value) GeoBroadcastArea p_broadcastArea,
                in template (value) UInt8 p_hopLimit
                in template (value) UInt8 p_hopLimit
            ) modifies m_geoBroadcastHeader := {
            ) modifies m_geoBroadcastHeader := {
                geoBroadcastHeader := {
                geoBroadcastHeader := {
@@ -347,7 +372,7 @@ module LibItsGeoNetworking_Templates {
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) UInt16 p_seqNumber,
                in template (present) UInt16 p_seqNumber,
                in template (present) BroadcastArea p_broadcastArea
                in template (present) GeoBroadcastArea p_broadcastArea
            ) modifies mw_geoBroadcastHeader := {
            ) modifies mw_geoBroadcastHeader := {
                geoBroadcastHeader := {
                geoBroadcastHeader := {
                    commonHeader := mw_commonHeader(
                    commonHeader := mw_commonHeader(
@@ -369,7 +394,7 @@ module LibItsGeoNetworking_Templates {
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) UInt16 p_seqNumber,   
                in template (present) UInt16 p_seqNumber,   
                in template (present) BroadcastArea p_broadcastArea,             
                in template (present) GeoBroadcastArea p_broadcastArea,             
                in template (present) UInt8 p_hopLimit
                in template (present) UInt8 p_hopLimit
            ) modifies mw_geoBroadcastHeaderWithArea := {
            ) modifies mw_geoBroadcastHeaderWithArea := {
                geoBroadcastHeader := {
                geoBroadcastHeader := {
@@ -383,6 +408,29 @@ module LibItsGeoNetworking_Templates {
                } 
                } 
            }
            }
                        
                        
            //TODO use a better name
            template Header mw_geoBroadcastHeaderWithAreaWithChWithLt(
                in template (present) LongPosVector p_sourceLongPosVec,
                in template (present) UInt16 p_seqNumber,
                in template (present) GeoBroadcastArea p_broadcastArea,
                in template (present) CommonHeader p_commonHeader,
                in template (present) Lifetime p_lifetime
            ) := {
                geoBroadcastHeader := {
                    commonHeader := p_commonHeader,
                    seqNumber := p_seqNumber,
                    lifetime := p_lifetime,
                    reserved := c_uInt8Zero,
                    srcPosVector := p_sourceLongPosVec,
                    geoAreaPosLatitude := p_broadcastArea.geoBroadcastArea.geoAreaPosLatitude,
                    geoAreaPosLongitude := p_broadcastArea.geoBroadcastArea.geoAreaPosLongitude,
                    distanceA := p_broadcastArea.geoBroadcastArea.distanceA,
                    distanceB := p_broadcastArea.geoBroadcastArea.distanceB,
                    angle := p_broadcastArea.geoBroadcastArea.angle,
                    reserved2 := c_uInt24Zero
                }
            } 
                       
            template (value) HeaderTST m_geoBroadcastHeaderType(
            template (value) HeaderTST m_geoBroadcastHeaderType(
            	in template (value) HeaderSubTypeGeoBroadcast p_headerSubType
            	in template (value) HeaderSubTypeGeoBroadcast p_headerSubType
            ) := {
            ) := {
@@ -412,6 +460,11 @@ module LibItsGeoNetworking_Templates {
                ltBase := e_1s
                ltBase := e_1s
            }
            }
            
            
            template (present) Lifetime mw_lifetime0 := {
                multiplier := 0,
                ltBase := ?
            }
                
        } // end geoBroadcastHeaderTemplates
        } // end geoBroadcastHeaderTemplates


        group geoAnycastHeaderTemplates {
        group geoAnycastHeaderTemplates {
@@ -421,7 +474,7 @@ module LibItsGeoNetworking_Templates {
                in template (value) LongPosVector p_senderLongPosVec,
                in template (value) LongPosVector p_senderLongPosVec,
                in template (value) StationTypeIdentifier p_stationType,
                in template (value) StationTypeIdentifier p_stationType,
                in template (value) UInt16 p_seqNumber,
                in template (value) UInt16 p_seqNumber,
                in template (value) AnycastArea p_anycastArea
                in template (value) GeoAnycastArea p_anycastArea
            ) := {
            ) := {
                geoAnycastHeader := {
                geoAnycastHeader := {
                    commonHeader := m_commonHeader(
                    commonHeader := m_commonHeader(
@@ -450,7 +503,7 @@ module LibItsGeoNetworking_Templates {
                in template (value) LongPosVector p_senderLongPosVec,
                in template (value) LongPosVector p_senderLongPosVec,
                in template (value) StationTypeIdentifier p_stationType,
                in template (value) StationTypeIdentifier p_stationType,
                in template (value) UInt16 p_seqNumber,
                in template (value) UInt16 p_seqNumber,
                in template (value) AnycastArea p_anycastArea,
                in template (value) GeoAnycastArea p_anycastArea,
                in template (value) UInt8 p_hopLimit
                in template (value) UInt8 p_hopLimit
            ) modifies m_geoAnycastHeader := {
            ) modifies m_geoAnycastHeader := {
                geoAnycastHeader := {
                geoAnycastHeader := {
@@ -496,7 +549,7 @@ module LibItsGeoNetworking_Templates {
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) UInt16 p_seqNumber,
                in template (present) UInt16 p_seqNumber,
                in template (present) AnycastArea p_anycastArea
                in template (present) GeoAnycastArea p_anycastArea
            ) modifies mw_geoAnycastHeader := {
            ) modifies mw_geoAnycastHeader := {
                geoAnycastHeader := {
                geoAnycastHeader := {
                    commonHeader := mw_commonHeader(
                    commonHeader := mw_commonHeader(
@@ -518,7 +571,7 @@ module LibItsGeoNetworking_Templates {
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) LongPosVector p_senderLongPosVec,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) StationTypeIdentifier p_stationType,
                in template (present) UInt16 p_seqNumber,   
                in template (present) UInt16 p_seqNumber,   
                in template (present) AnycastArea p_anycastArea,             
                in template (present) GeoAnycastArea p_anycastArea,             
                in template (present) UInt8 p_hopLimit
                in template (present) UInt8 p_hopLimit
            ) modifies mw_geoAnycastHeaderWithArea := {
            ) modifies mw_geoAnycastHeaderWithArea := {
                geoAnycastHeader := {
                geoAnycastHeader := {
@@ -905,7 +958,7 @@ module LibItsGeoNetworking_Templates {
                },
                },
                stationSubType := e_private,
                stationSubType := e_private,
                stationCountryCode := c_uInt10Zero,
                stationCountryCode := c_uInt10Zero,
                mid := c_uInt48Zero              
                mid := c_6ZeroBytes
            }
            }
            
            
            template (value) LongPosVector m_dummyLongPosVector := {
            template (value) LongPosVector m_dummyLongPosVector := {
@@ -931,7 +984,7 @@ module LibItsGeoNetworking_Templates {
                angle := c_uInt8Zero    
                angle := c_uInt8Zero    
            }
            }
        
        
            template (value) BroadcastArea m_dummyGeoBroadcastArea := {
            template (value) GeoBroadcastArea m_dummyGeoBroadcastArea := {
                geoBroadcastSubType := e_geoBroadcastRect,
                geoBroadcastSubType := e_geoBroadcastRect,
                geoBroadcastArea := m_dummyArea
                geoBroadcastArea := m_dummyArea
            }
            }
+31 −8
Original line number Original line Diff line number Diff line
@@ -7,9 +7,13 @@
 */
 */
module LibItsGeoNetworking_TypesAndValues {
module LibItsGeoNetworking_TypesAndValues {


    //LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    import from LibCommon_DataStrings all;


    //LibIts
    import from LibItsIpv6OverGeoNetworking_TypesAndValues {type Ipv6Packet;}
    
    group geoConfigurationValues {
    group geoConfigurationValues {
        
        
        const charstring c_compIut := "IUT";
        const charstring c_compIut := "IUT";
@@ -53,16 +57,35 @@ module LibItsGeoNetworking_TypesAndValues {
            UInt8 angle    
            UInt8 angle    
        }
        }
                
                
        type record BroadcastArea {
        type record GeoBroadcastArea {
            HeaderSubTypeGeoBroadcast geoBroadcastSubType,
            HeaderSubTypeGeoBroadcast geoBroadcastSubType,
            Area geoBroadcastArea
            Area geoBroadcastArea
        }
        }
        
        
        type record AnycastArea {
        type record GeoAnycastArea {
            HeaderSubTypeGeoAnycast geoAnycastSubType,
            HeaderSubTypeGeoAnycast geoAnycastSubType,
            Area geoAnycastArea   
            Area geoAnycastArea   
        }
        }
        
        
        type record GeoArea {
            GeoShape shape,
            Area area
        }
        
        type enumerated GeoShape {
            e_geoCircle(0),
            e_geoRect(1),
            e_geoElip(2),
            e_reserved
        }
        
        type record GeoAreaEntry {
            charstring key,
            GeoArea geoArea
        }
        
        type record of GeoAreaEntry GeoAreaTable;
                
    } // end geoConfigurationTypes
    } // end geoConfigurationTypes


	group geoNwValues {
	group geoNwValues {
@@ -630,7 +653,7 @@ module LibItsGeoNetworking_TypesAndValues {
                        StationType     stationType,
                        StationType     stationType,
                        StationSubType  stationSubType,
                        StationSubType  stationSubType,
                        UInt10          stationCountryCode,
                        UInt10          stationCountryCode,
                        UInt48          mid
                        Oct6            mid
                    }
                    }
                    
                    
                    group geoNetworkingAddressSubtypes {
                    group geoNetworkingAddressSubtypes {
@@ -799,10 +822,10 @@ module LibItsGeoNetworking_TypesAndValues {


    group geoNetworkingPayload {
    group geoNetworkingPayload {
        
        
        /**
        type union Payload {
         * @desc TODO change it to concrete union value
            Ipv6Packet ipv6Packet,
         */
            octetstring otherPayload
        type octetstring Payload;
        }
        
        
    } //end group geoNetworkingPayload
    } //end group geoNetworkingPayload
    
    
+230 −0

File added.

Preview size limit exceeded, changes collapsed.

+98 −0
Original line number Original line Diff line number Diff line
/**
 *  @author   ETSI / STF405
 *  @version  $URL: svn+ssh://vcs.etsi.org/TTCN3/ATS/Its/trunk/ttcn/AtsIPv6OverGeoNetworking/ItsIpv6OverGeoNetworking_TestCases.ttcn $
 *            $Id: ItsIpv6OverGeoNetworking_TestCases.ttcn 169 2010-09-23 08:12:36Z berge $
 *  @desc     IPv6 over GeoNetworking Protocol Templates
 *
 */
module LibItsIpv6OverGeoNetworking_Templates {
    
    //LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    
    //LibIts
    import from LibIts_Interface all;
    import from LibItsGeoNetworking_TypesAndValues {type Payload;}
    import from LibItsIpv6OverGeoNetworking_TypesAndValues all;
    
    group ipv6OverGeoNwPrimitivesTemplates {
    
        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
        }
        
        template IPv6OverGeoNetworkingInd mw_ipv6OverGeoNwInd(
            template (value) charstring p_interface,
            template (value) MacAddress p_srcMacAddr,
            template (value) MacAddress p_dstMacAddr,
            template (present) Ipv6Packet p_ipv6Packet
        ) := {
            interface := p_interface,
            macSourceAddress := p_srcMacAddr,
            macDestinationAddress := p_dstMacAddr,
            ipv6Packet := p_ipv6Packet
        }
    
    } // ipv6OverGeoNwPrimitivesTemplates
    
    group ipv6 {
        
        template Payload mw_ipv6Payload(in template (present) Ipv6Packet p_ipv6Packet) := {
            ipv6Packet := p_ipv6Packet
        }
        
        template 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
        }
        
        template 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
        }
        
        template Ipv6Payload m_rtAdv := {
            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 := 0,
                retransTimer := 0,
                rtAdvOptions := omit
            }
        }
        
    } // end group ipv6
    
} // end LibItsIpv6OverGeoNetworking_TypesAndValues
 No newline at end of file
Loading