From bb70a3fbce8ddce7019ce59896b64c51d15bce05 Mon Sep 17 00:00:00 2001 From: berge Date: Fri, 9 Mar 2012 09:19:51 +0000 Subject: [PATCH] Added a_ipv6Default: ignore GN rebroadcast, IPv6 packets not concerning tester --- ...LibItsIpv6OverGeoNetworking_Functions.ttcn | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Functions.ttcn b/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Functions.ttcn index dcafa15c..a644661e 100644 --- a/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Functions.ttcn +++ b/Ipv6OverGeoNetworking/LibItsIpv6OverGeoNetworking_Functions.ttcn @@ -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 { /** -- GitLab