jist.swans.route
Class RouteAodv.RouteReplyMessage

java.lang.Object
  extended by jist.swans.route.RouteAodv.RouteReplyMessage
All Implemented Interfaces:
JistAPI.Timeless, Message
Enclosing class:
RouteAodv

private static class RouteAodv.RouteReplyMessage
extends java.lang.Object
implements Message

Represents a Route Reply (RREP) message.


Field Summary
private  NetAddress destIp
          RREP message destination IP address field.
private  int destSeqNum
          RREP message destination sequence number field.
private  int hopCount
          RREP message hop count field.
private static int MESSAGE_SIZE
          RREP Message size in bytes.
private  NetAddress origIp
          RREP message originator sequence number field.
 
Fields inherited from interface jist.swans.misc.Message
NULL
 
Constructor Summary
RouteAodv.RouteReplyMessage(NetAddress destIp, int destSeqNum, NetAddress origIp, int hopCount)
          Constructs a new RREP message object.
 
Method Summary
 void getBytes(byte[] msg, int offset)
          Store packet into byte array.
 NetAddress getDestIp()
          Returns destination ip address.
 int getDestSeqNum()
          Returns destination sequence number.
 int getHopCount()
          Returns hop count.
 NetAddress getOrigIp()
          Returns originator sequence number.
 int getSize()
          Returns packet size.
 void incHopCount()
          Increments hop count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_SIZE

private static final int MESSAGE_SIZE
RREP Message size in bytes.

See Also:
Constant Field Values

destIp

private NetAddress destIp
RREP message destination IP address field.


destSeqNum

private int destSeqNum
RREP message destination sequence number field.


origIp

private NetAddress origIp
RREP message originator sequence number field.


hopCount

private int hopCount
RREP message hop count field.

Constructor Detail

RouteAodv.RouteReplyMessage

public RouteAodv.RouteReplyMessage(NetAddress destIp,
                                   int destSeqNum,
                                   NetAddress origIp,
                                   int hopCount)
Constructs a new RREP message object.

Parameters:
destIp - RREP message destination node net address
destSeqNum - RREP message destination node sequence number
origIp - RREP message originator node net address
hopCount - RREP message hopcount
Method Detail

getDestIp

public NetAddress getDestIp()
Returns destination ip address.

Returns:
destination ip address

getDestSeqNum

public int getDestSeqNum()
Returns destination sequence number.

Returns:
destination sequence number

getOrigIp

public NetAddress getOrigIp()
Returns originator sequence number.

Returns:
originator sequence number

getHopCount

public int getHopCount()
Returns hop count.

Returns:
hop count

incHopCount

public void incHopCount()
Increments hop count.


getSize

public int getSize()
Returns packet size.

Specified by:
getSize in interface Message
Returns:
packet size

getBytes

public void getBytes(byte[] msg,
                     int offset)
Store packet into byte array.

Specified by:
getBytes in interface Message
Parameters:
msg - destination byte array
offset - byte array starting offset