jist.swans.route
Class RouteAodv.RouteErrorMessage

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

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

Represents a Route Error (RERR) message class.


Field Summary
private static int MESSAGE_SIZE
          RERR Message size in bytes.
private  java.util.LinkedList unreachableList
          List of net addresses for destinations that have become unreachable.
 
Fields inherited from interface jist.swans.misc.Message
NULL
 
Constructor Summary
RouteAodv.RouteErrorMessage()
          Constructs a new Route Error (RERR) Message object with an empty unreachable list.
RouteAodv.RouteErrorMessage(java.util.LinkedList list)
          Constructs a new Route Error (RERR) Message object with a given unreachable list.
 
Method Summary
 void addUnreachable(NetAddress node)
          Add an unreachable node.
 void getBytes(byte[] msg, int offset)
          Store packet into byte array.
 int getSize()
          Return packet size.
 java.util.LinkedList getUnreachableList()
          Returns the unreachable list.
 
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
RERR Message size in bytes.

See Also:
Constant Field Values

unreachableList

private java.util.LinkedList unreachableList
List of net addresses for destinations that have become unreachable.

Constructor Detail

RouteAodv.RouteErrorMessage

public RouteAodv.RouteErrorMessage()
Constructs a new Route Error (RERR) Message object with an empty unreachable list.


RouteAodv.RouteErrorMessage

public RouteAodv.RouteErrorMessage(java.util.LinkedList list)
Constructs a new Route Error (RERR) Message object with a given unreachable list.

Parameters:
list - List of net addresses for destinations that have become unreachable
Method Detail

getUnreachableList

public java.util.LinkedList getUnreachableList()
Returns the unreachable list.

Returns:
linked list of unreachable node net addresses

addUnreachable

public void addUnreachable(NetAddress node)
Add an unreachable node.

Parameters:
node - netAddress of node to be added

getSize

public int getSize()
Return 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