jist.swans.route
Interface RouteInterface

All Superinterfaces:
JistAPI.Proxiable, JistAPI.Timeless, NetInterface.NetHandler
All Known Subinterfaces:
RouteInterface.Aodv, RouteInterface.BezierRouting, RouteInterface.Dsr, RouteInterface.ECGRIDRouting, RouteInterface.GenericRouting, RouteInterface.HeartbeatProtocol, RouteInterface.MultiTreeRouting, RouteInterface.RandomPathRouting, RouteInterface.ShortestPathRouting, RouteInterface.Zrp
All Known Implementing Classes:
DummyRoute, ElectrostaticRouter, ElectrostaticRouter, ElectrostaticRouter, GeographicalTreeRouting, GeographicalTreeRouting, GeographicalTreeRouting, GeographicalTreeRouting, GeographicalTreeRoutingAlternating, GeographicalTreeRoutingAlternating, HeartbeatProtocol, HeartbeatProtocol, KShortestPathRouting, KShortestPathRouting, KShortestPathRouting5, KShortestPathRouting5, MultiTreeRouting, Route_Assignment2, RouteAodv, RouteBezier, RouteBezier, RouteBezier, RouteDsr, RouteZrp, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, SweepRouting, TopologicalTreeRouting, TreeRouting

public interface RouteInterface
extends NetInterface.NetHandler, JistAPI.Proxiable

Defines the interface of all Routing implementations and the Route entity.

Since:
SWANS1.0

Nested Class Summary
static interface RouteInterface.Aodv
          AODV routing entity interface.
static interface RouteInterface.BezierRouting
          NWU routing entity interface.
static interface RouteInterface.Dsr
          DSR routing entity interface.
static interface RouteInterface.ECGRIDRouting
          NWU routing entity interface.
static interface RouteInterface.GenericRouting
          NWU routing entity interface.
static interface RouteInterface.HeartbeatProtocol
          NWU routing entity interface.
static interface RouteInterface.MultiTreeRouting
          NWU routing entity interface.
static interface RouteInterface.RandomPathRouting
          NWU routing entity interface.
static interface RouteInterface.ShortestPathRouting
          NWU routing entity interface.
static interface RouteInterface.Zrp
          ZRP routing entity interface.
 
Method Summary
 void peek(NetMessage msg, MacAddress lastHop)
          Called by the network layer for every incoming packet.
 void send(NetMessage msg)
          Called by the network layer to request transmission of a packet that requires routing.
 
Methods inherited from interface jist.swans.net.NetInterface.NetHandler
dropNotify, receive
 

Method Detail

peek

void peek(NetMessage msg,
          MacAddress lastHop)
Called by the network layer for every incoming packet. A routing implementation may wish to look at these packets for informational purposes, but should not change their contents.

Parameters:
msg - incoming packet
lastHop - last link-level hop of incoming packet

send

void send(NetMessage msg)
Called by the network layer to request transmission of a packet that requires routing. It is the responsibility of the routing layer to provide a best-effort transmission of this packet to an appropriate next hop by calling the network layer sending routines once this routing information becomes available.

Specified by:
send in interface NetInterface.NetHandler
Parameters:
msg - outgoing packet