|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.swans.route.RouteAodv
public class RouteAodv
Ad-hoc On-demand Distance Vector (AODV) Routing Protocol Implementation.
| Nested Class Summary | |
|---|---|
static class |
RouteAodv.AodvPacketStats
Packet stats. |
static class |
RouteAodv.AodvStats
Data structure to collect AODV statistics. |
| Nested classes/interfaces inherited from interface jist.swans.route.RouteInterface |
|---|
RouteInterface.Aodv, RouteInterface.BezierRouting, RouteInterface.Dsr, RouteInterface.ECGRIDRouting, RouteInterface.GenericRouting, RouteInterface.HeartbeatProtocol, RouteInterface.MultiTreeRouting, RouteInterface.RandomPathRouting, RouteInterface.ShortestPathRouting, RouteInterface.Zrp |
| Field Summary | |
|---|---|
static long |
AODV_TIMEOUT
Period of time after which the AODV timeout event gets called. |
static boolean |
DEBUG_MODE
debug mode. |
static long |
HELLO_ALLOWED_LOSS
Number of timeout periods that must pass before this node can determine an outgoing link unreachable. |
static long |
HELLO_INTERVAL
Duration of inactivity after which a HELLO message should be sent to a precursor. |
static boolean |
HELLO_MESSAGES_ON
Hello Messages setting. |
static int |
MAX_RREQ_BUFFER_SIZE
The maximum number of entries allowed in the RREQ buffer. |
static long |
RREQ_BUFFER_EXPIRE_TIME
The maximum duration of time a RREQ buffer entry can remain in the RREQ buffer. |
static int |
RREQ_ID_SEQUENCE_NUMBER_START
Starting value for RREQ ID sequence numbers. |
static long |
RREQ_TIMEOUT_BASE
Constant term of the RREQ Timeout duration. |
static long |
RREQ_TIMEOUT_PER_TTL
Variable term of the RREQ Timeout duration, dependant on the RREQ's TTL. |
static int |
SEQUENCE_NUMBER_START
Starting value for node sequence numbers. |
static long |
TRANSMISSION_JITTER
The maximum amount of jitter before sending a packet. |
static byte |
TTL_INCREMENT
The amount added to current TTL upon successive broadcasts of a RREQ message. |
static byte |
TTL_START
The initial TTL value for any Route Request instance. |
static byte |
TTL_THRESHOLD
The maximum TTL for any RREQ message. |
| Constructor Summary | |
|---|---|
RouteAodv(NetAddress addr)
Constructs new RouteAodv instance. |
|
| Method Summary | |
|---|---|
void |
dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
Notification mechanism for packet dropped due to various "Reasons" |
NetAddress |
getLocalAddr()
Gets node's local address. |
RouteInterface.Aodv |
getProxy()
Returns self-referencing proxy entity. |
void |
peek(NetMessage msg,
MacAddress lastHop)
Called by the network layer for every incoming packet. |
void |
printOutgoing()
Prints the node's outgoing set. |
void |
printPrecursors()
Prints the node's precusor set. |
void |
receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
Receive a message from network layer. |
void |
RREQtimeout(java.lang.Object rreqObj)
This event is called periodically after a route request is originated, until a route has been found. |
void |
send(NetMessage msg)
Called by the network layer to request transmission of a packet that requires routing. |
void |
sendIpMsg(NetMessage.Ip ipMsg,
MacAddress destMacAddr)
Sends IP message after transmission delay, and renews precursor list entry. |
void |
setNetEntity(NetInterface netEntity)
Sets network entity. |
void |
setStats(RouteAodv.AodvStats stats)
Sets aodv statistics object. |
void |
start()
Start running protocol. |
void |
timeout()
AODV Timeout event, which gets called periodically at fixed intervals. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DEBUG_MODE
public static final boolean HELLO_MESSAGES_ON
public static final int SEQUENCE_NUMBER_START
public static final int RREQ_ID_SEQUENCE_NUMBER_START
public static final long RREQ_BUFFER_EXPIRE_TIME
public static final int MAX_RREQ_BUFFER_SIZE
public static final long AODV_TIMEOUT
public static final long HELLO_INTERVAL
public static final long HELLO_ALLOWED_LOSS
public static final byte TTL_START
public static final byte TTL_INCREMENT
public static final byte TTL_THRESHOLD
public static final long RREQ_TIMEOUT_BASE
public static final long RREQ_TIMEOUT_PER_TTL
public static final long TRANSMISSION_JITTER
| Constructor Detail |
|---|
public RouteAodv(NetAddress addr)
addr - node's network address| Method Detail |
|---|
public void dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
NetInterface.NetHandler
dropNotify in interface NetInterface.NetHandlerpublic void RREQtimeout(java.lang.Object rreqObj)
RREQtimeout in interface RouteInterface.AodvrreqObj - RouteRequest objectpublic void timeout()
timeout in interface RouteInterface.Aodv
public void sendIpMsg(NetMessage.Ip ipMsg,
MacAddress destMacAddr)
sendIpMsg in interface RouteInterface.AodvipMsg - IP message to senddestMacAddr - next hop mac addresspublic void start()
start in interface Protocol
public void peek(NetMessage msg,
MacAddress lastHop)
peek in interface RouteInterfacemsg - incoming packetlastHop - last link-level hop of incoming packetpublic void send(NetMessage msg)
send in interface NetInterface.NetHandlersend in interface RouteInterfacemsg - outgoing packet
public void receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
receive in interface NetInterface.NetHandlermsg - message receivedsrc - source network addresslastHop - source link addressmacId - mac identifierdst - destination network addresspriority - packet priorityttl - packet time-to-livepublic void setStats(RouteAodv.AodvStats stats)
stats - aodv statistics objectpublic NetAddress getLocalAddr()
public RouteInterface.Aodv getProxy()
public void setNetEntity(NetInterface netEntity)
netEntity - network entitypublic void printPrecursors()
public void printOutgoing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||