|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.swans.route.RouteAodv.RouteRequest
private static class RouteAodv.RouteRequest
Represents a request for a route by a node. A single route request can repeatedly broadcast RREQ messages, with increasing TTL value, until a route has been found. TTL values start at TTL_START, increment by TTL_INCREMENT, but do not exceed TTL_THRESHOLD.
| Field Summary | |
|---|---|
private NetAddress |
destIp
Net address of node for which we seek a route. |
private boolean |
routeFound
Indicates whether this request has been satisfied (route has been found). |
private int |
rreqId
Route request identifier. |
private RouteAodv |
thisNode
Reference to the encapsulating RouteAodv instance. |
private byte |
ttl
Time to live. |
| Constructor Summary | |
|---|---|
RouteAodv.RouteRequest(NetAddress destIp,
RouteAodv thisNode)
Constructs a new Route Request object. |
|
| Method Summary | |
|---|---|
void |
broadcast()
Creates and broadcasts a RREQ message. |
NetAddress |
getDest()
Returns destination net address. |
int |
getRreqId()
Return RREQ id. |
byte |
getTtl()
Returns TTL. |
void |
incTtl()
Increments the TTL value by TTL_INCREMENT, but ensures that it does not exceed TTL_THRESHOLD. |
void |
obtainNewRreqId()
Assigns a fresh RREQ id number, and updates the node's global RREQ id counter. |
void |
setRouteFound(boolean b)
Sets the Route Found flag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private NetAddress destIp
private int rreqId
private byte ttl
private boolean routeFound
private RouteAodv thisNode
| Constructor Detail |
|---|
public RouteAodv.RouteRequest(NetAddress destIp,
RouteAodv thisNode)
destIp - net address of node for which we seek a routethisNode - reference to this RouteAodv instance| Method Detail |
|---|
public int getRreqId()
public NetAddress getDest()
public byte getTtl()
public void obtainNewRreqId()
public void incTtl()
public void setRouteFound(boolean b)
b - value to assign to flagpublic void broadcast()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||