|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.swans.route.RouteZrp
public class RouteZrp
Zone Routing Protocol Implementation.
| Nested Class Summary | |
|---|---|
static class |
RouteZrp.ZrpPacketStats
Data structure to collect ZRP packet statistics. |
static class |
RouteZrp.ZrpStats
Data structure to collect ZRP statistics. |
| Nested classes/interfaces inherited from interface jist.swans.route.RouteInterface.Zrp |
|---|
RouteInterface.Zrp.Brp, RouteInterface.Zrp.Iarp, RouteInterface.Zrp.Ierp, RouteInterface.Zrp.MessageBrp, RouteInterface.Zrp.MessageIarp, RouteInterface.Zrp.MessageIerp, RouteInterface.Zrp.MessageNdp, RouteInterface.Zrp.MessageZrp, RouteInterface.Zrp.Ndp |
| 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 org.apache.log4j.Logger |
logZRP
logger for ZRP events. |
| Constructor Summary | |
|---|---|
RouteZrp(NetAddress localAddr,
int radius)
Create and initialize new ZRP instance. |
|
RouteZrp(NetAddress localAddr,
java.lang.String config)
Create and initialize new ZRP instance. |
|
| Method Summary | |
|---|---|
void |
broadcast(RouteInterface.Zrp.MessageZrp msg)
Send out a message for a sub-protocol. |
void |
dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
Notification mechanism for packet dropped due to various "Reasons" |
RouteInterface.Zrp.Brp |
getBrp()
Return BRP sub-protocol implementation. |
RouteInterface.Zrp.Iarp |
getIarp()
Return IARP sub-protocol implementation. |
RouteInterface.Zrp.Ierp |
getIerp()
Return IERP sub-protocol implementation. |
NetAddress |
getLocalAddr()
Return local network address. |
RouteInterface.Zrp.Ndp |
getNdp()
Return NDP sub-protocol implementation. |
RouteInterface.Zrp |
getProxy()
Return self-referencing proxy entity. |
byte |
getRadius()
Return ZRP zone radius. |
RouteZrp.ZrpStats |
getStats()
Return zrp statistics. |
void |
peek(NetMessage msg,
MacAddress lastHop)
Called by the network layer for every incoming packet. |
void |
receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
Receive a message from network layer. |
static NetAddress[] |
replaceDest(NetAddress[] route,
NetAddress finder,
NetAddress[] remainder)
Replace end of route with route to destination. |
void |
send(NetMessage.Ip msg,
NetAddress dst)
Send out a data packet. |
void |
send(NetMessage msg)
Send a message through the routing protocol |
static boolean |
seqAfter(int seq1,
int seq2)
Whether first sequence number is after the second (with wrap-around). |
void |
setBrp(RouteInterface.Zrp.Brp brp)
Set BRP sub-protocol implementation. |
void |
setIarp(RouteInterface.Zrp.Iarp iarp)
Set IARP sub-protocol implementation. |
void |
setIerp(RouteInterface.Zrp.Ierp ierp)
Set IERP sub-protocol implementation. |
void |
setNdp(RouteInterface.Zrp.Ndp ndp)
Set NDP sub-protocol implementation. |
void |
setNetEntity(NetInterface netEntity)
Set network entity. |
void |
setStats(RouteZrp.ZrpStats stats)
Set zrp statistics object. |
void |
setSubProtocols(RouteInterface.Zrp.Ndp ndp,
RouteInterface.Zrp.Iarp iarp,
RouteInterface.Zrp.Brp brp,
RouteInterface.Zrp.Ierp ierp)
Set all the ZRP sub-protocol implementations. |
void |
setSubProtocolsDefault()
Set all the ZRP sub-protocols to default implementations. |
void |
start()
Start running protocol. |
void |
timeout(Timer t)
Process timer expiration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger logZRP
| Constructor Detail |
|---|
public RouteZrp(NetAddress localAddr,
int radius)
localAddr - local node addressradius - zone radius
public RouteZrp(NetAddress localAddr,
java.lang.String config)
localAddr - local node addressconfig - configuration string| Method Detail |
|---|
public void dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
NetInterface.NetHandler
dropNotify in interface NetInterface.NetHandler
public static boolean seqAfter(int seq1,
int seq2)
seq1 - first sequence numberseq2 - second sequence number
public static NetAddress[] replaceDest(NetAddress[] route,
NetAddress finder,
NetAddress[] remainder)
route - route in format: (src ... partial route ... dst)finder - node that knows route to destinationremainder - route to destination from finder
public void setNetEntity(NetInterface netEntity)
netEntity - network entitypublic RouteInterface.Zrp getProxy()
public NetAddress getLocalAddr()
public byte getRadius()
public void setStats(RouteZrp.ZrpStats stats)
stats - zrp statistics objectpublic RouteZrp.ZrpStats getStats()
public void setNdp(RouteInterface.Zrp.Ndp ndp)
ndp - NDP sub-protocol implementationpublic RouteInterface.Zrp.Ndp getNdp()
public void setIarp(RouteInterface.Zrp.Iarp iarp)
iarp - IARP sub-protocol implementationpublic RouteInterface.Zrp.Iarp getIarp()
public void setBrp(RouteInterface.Zrp.Brp brp)
brp - BRP sub-protocol implementationpublic RouteInterface.Zrp.Brp getBrp()
public void setIerp(RouteInterface.Zrp.Ierp ierp)
ierp - IERP sub-protocol implementationpublic RouteInterface.Zrp.Ierp getIerp()
public void setSubProtocols(RouteInterface.Zrp.Ndp ndp,
RouteInterface.Zrp.Iarp iarp,
RouteInterface.Zrp.Brp brp,
RouteInterface.Zrp.Ierp ierp)
ndp - NDP sub-protocol implementationiarp - IARP sub-protocol implementationbrp - BRP sub-protocol implementationierp - IERP sub-protocol implementationpublic void setSubProtocolsDefault()
public void timeout(Timer t)
timeout in interface RouteInterface.Zrpt - timer that expiredpublic 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 packetpublic void broadcast(RouteInterface.Zrp.MessageZrp msg)
msg - packet payload
public void send(NetMessage.Ip msg,
NetAddress dst)
msg - data packetdst - packet destination
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 - incoming interfacedst - destination network addresspriority - packet priorityttl - packet time-to-live
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||