Commit 2e3edd1a authored by berge's avatar berge
Browse files

Added a_ipv6Default: ignore GN rebroadcast, IPv6 packets not concerning tester

parent fcf58195
Loading
Loading
Loading
Loading
+74 −0
Original line number Diff line number Diff line
@@ -78,6 +78,80 @@ module LibItsIpv6OverGeoNetworking_Functions {
        
    } // end group ipv6OverGeoConfigurationFunctions
    
    group ipv6OverGeoNwAltsteps {
        
        /**
         * @desc IPv6 default.
         */
        altstep a_ipv6Default() runs on ItsNt {
            
            [] geoNetworkingPort.receive (
                mw_geoNwInd(
                    mw_geoNwPduWithPayload(
                        mw_geoBroadcastHeaderWithNextHeader(?, ?, ?, e_ipv6),
                        mw_ipv6Payload(
                            mw_ipv6Packet(
                                ?,
                                ?,
                                ?,
                                mw_octetstringPayload(?)
                            )
                        )
                    )
                )
            ) {
                log("*** a_ipv6Default: INFO: Ignoring unsupported IPv6 packet ***");   
                repeat; 
            }
            
            [] geoNetworkingPort.receive (
                mw_geoNwInd(
                    mw_geoNwPduWithPayload(
                        mw_geoBroadcastHeaderWithNextHeader(
                            (
                                mw_longPosVectorPosition_withDelta(f_getPosition(c_compNodeA)), 
                                mw_longPosVectorPosition_withDelta(f_getPosition(c_compNodeB))
                            ), 
                            ?, 
                            ?, 
                            e_ipv6),
                        mw_ipv6Payload(
                            ?
                        )
                    )
                )
            ) {
                log("*** a_ipv6Default: INFO: Ignoring rebroadcasted IPv6 packet ***");   
                repeat; 
            }
            
        } // end a_ipv6Default
                 
    } // end ipv6OverGeoNwAltsteps
    
    
    group preambles {
    
        /**
         * @desc Preamble for IPv6 neighbour nodes
         */        
        function f_prIpv6Neighbour() runs on ItsNt {
            f_prNeighbour();
            activate(a_ipv6Default());      
        }	
    	
    } // end preambles
    
    group postambles {
    
        /**
         * @desc Postamble for neighbour nodes
         */          
        function f_poIpv6Neighbour() runs on ItsNt {
            f_poNeighbour();           
        }            	
    } // end postambles
    
    group testAdapter {
        
        /**