jist.swans.route
Interface RouteInterface.Dsr

All Superinterfaces:
JistAPI.Proxiable, JistAPI.Timeless, NetInterface.NetHandler, RouteInterface
All Known Implementing Classes:
RouteDsr
Enclosing interface:
RouteInterface

public static interface RouteInterface.Dsr
extends RouteInterface

DSR routing entity interface.


Nested Class Summary
static class RouteInterface.Dsr.BufferedPacket
          Contains a packet and the time it was inserted into the buffer.
 
Nested classes/interfaces inherited from interface jist.swans.route.RouteInterface
RouteInterface.Aodv, RouteInterface.Dsr, RouteInterface.Zrp
 
Method Summary
 void AddRouteReplyEntry(NetAddress originator, NetAddress lastHop)
          Adds an entry into the gratuitous route reply table.
 void DeleteBuffer(RouteInterface.Dsr.BufferedPacket packet)
          Removes an entry from the send buffer.
 void DeleteRouteReplyEntry(NetAddress originator, NetAddress lastHop)
          Removes an entry from the gratuitous route reply table.
 void DiscoverRoute(NetAddress dest, short requestId)
          Initiates route discovery for the given destination.
 void InsertBuffer(NetMessage.Ip msg)
          Inserts an packet into the send buffer.
 void TransmitWithNetworkAck(NetMessage.Ip msg, java.lang.Short ackId, long timeout, int numRetransmits)
          Transmits the given packet with a request for a network-level acknowledgement.
 void TransmitWithPassiveAck(NetMessage.Ip msg, int numRetransmits)
          Transmits the given packet and waits for a passive acknowledgement.
 
Methods inherited from interface jist.swans.route.RouteInterface
peek, send
 
Methods inherited from interface jist.swans.net.NetInterface.NetHandler
receive
 

Method Detail

DiscoverRoute

void DiscoverRoute(NetAddress dest,
                   short requestId)
Initiates route discovery for the given destination. Route requests are retransmitted if no reply is received after a timeout elapses.

Parameters:
dest - the destination to which a route is being sought
requestId - the ID number of this route discovery

TransmitWithNetworkAck

void TransmitWithNetworkAck(NetMessage.Ip msg,
                            java.lang.Short ackId,
                            long timeout,
                            int numRetransmits)
Transmits the given packet with a request for a network-level acknowledgement. The packet is retransmitted if no acknowledgement is received before the timeout elapses.

Parameters:
msg - the message to send
ackId - the ID number of the acknowledgement request
timeout - the timeout before retransmitting the packet
numRetransmits - the number of times msg has already been retransmitted

TransmitWithPassiveAck

void TransmitWithPassiveAck(NetMessage.Ip msg,
                            int numRetransmits)
Transmits the given packet and waits for a passive acknowledgement. If no passive acknowledgement is received before a timeout occurs, the packet is retransmitted. If no acknowledgement is received after TRY_PASSIVE_ACKS attempts, the packet is retransmitted with a request for a network-level acknowledgement.

Parameters:
msg - the message to be sent
numRetransmits - the number of times msg has already been retransmitted

AddRouteReplyEntry

void AddRouteReplyEntry(NetAddress originator,
                        NetAddress lastHop)
Adds an entry into the gratuitous route reply table.

Parameters:
originator - the originator of the packet being replied to
lastHop - the last-hop address of the packet being replied to

DeleteRouteReplyEntry

void DeleteRouteReplyEntry(NetAddress originator,
                           NetAddress lastHop)
Removes an entry from the gratuitous route reply table.

Parameters:
originator - the originator of the packet being removed
lastHop - the last-hop address of the packet being removed

InsertBuffer

void InsertBuffer(NetMessage.Ip msg)
Inserts an packet into the send buffer.

Parameters:
msg - the packet to insert into the send buffer

DeleteBuffer

void DeleteBuffer(RouteInterface.Dsr.BufferedPacket packet)
Removes an entry from the send buffer.

Parameters:
packet - the BufferedPacket to be removed from the send buffer