jist.swans.net
Interface NetInterface.NetHandler

All Known Subinterfaces:
RouteInterface, RouteInterface.Aodv, RouteInterface.BezierRouting, RouteInterface.Dsr, RouteInterface.ECGRIDRouting, RouteInterface.GenericRouting, RouteInterface.HeartbeatProtocol, RouteInterface.MultiTreeRouting, RouteInterface.RandomPathRouting, RouteInterface.ShortestPathRouting, RouteInterface.Zrp, TransInterface, TransInterface.TransTcpInterface, TransInterface.TransUdpInterface
All Known Implementing Classes:
AppHeartbeat, DummyRoute, ElectrostaticRouter, ElectrostaticRouter, ElectrostaticRouter, GeographicalTreeRouting, GeographicalTreeRouting, GeographicalTreeRouting, GeographicalTreeRouting, GeographicalTreeRoutingAlternating, GeographicalTreeRoutingAlternating, HeartbeatProtocol, HeartbeatProtocol, ip.MyIpHandler, KShortestPathRouting, KShortestPathRouting, KShortestPathRouting5, KShortestPathRouting5, MultiTreeRouting, Route_Assignment2, RouteAodv, RouteBezier, RouteBezier, RouteBezier, RouteDsr, RouteZrp, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, ShortestGeographicalPathRouting, SweepRouting, TopologicalTreeRouting, TransTcp, TransUdp, TreeRouting
Enclosing interface:
NetInterface

public static interface NetInterface.NetHandler

Network layer callback interface.

Since:
SWANS1.0

Method Summary
 void dropNotify(Message msg, MacAddress nextHopMac, Reason reason)
          Notification mechanism for packet dropped due to various "Reasons"
 void receive(Message msg, NetAddress src, MacAddress lastHop, byte macId, NetAddress dst, byte priority, byte ttl)
          Receive a message from network layer.
 void send(NetMessage msg)
          Send a message through the routing protocol
 

Method Detail

receive

void receive(Message msg,
             NetAddress src,
             MacAddress lastHop,
             byte macId,
             NetAddress dst,
             byte priority,
             byte ttl)
Receive a message from network layer.

Parameters:
msg - message received
src - source network address
lastHop - source link address
macId - incoming interface
dst - destination network address
priority - packet priority
ttl - packet time-to-live

send

void send(NetMessage msg)
Send a message through the routing protocol

Parameters:
NetMessage - outgoing message

dropNotify

void dropNotify(Message msg,
                MacAddress nextHopMac,
                Reason reason)
Notification mechanism for packet dropped due to various "Reasons"