jist.swans.net
Class NetMessage.IpOptionSourceRoute

java.lang.Object
  extended by jist.swans.net.NetMessage.IpOption
      extended by jist.swans.net.NetMessage.IpOptionSourceRoute
All Implemented Interfaces:
JistAPI.Timeless, Message
Enclosing class:
NetMessage

public static class NetMessage.IpOptionSourceRoute
extends NetMessage.IpOption

An IP packet source route option.


Field Summary
private  int ptr
          source route pointer: index into route.
private  NetAddress[] route
          source route.
static byte TYPE
          option type constant: source route.
 
Fields inherited from interface jist.swans.misc.Message
NULL
 
Constructor Summary
NetMessage.IpOptionSourceRoute(NetAddress[] route)
          Create new source route option.
NetMessage.IpOptionSourceRoute(NetAddress[] route, int ptr)
          Create new source route option.
 
Method Summary
 void getBytes(byte[] msg, int offset)
          Store packet into byte array.
 int getPtr()
          Return source route pointer: index into route.
 NetAddress[] getRoute()
          Return source route.
 int getSize()
          Return option length (in bytes/octets).
 byte getType()
          Return option type field.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final byte TYPE
option type constant: source route.

See Also:
Constant Field Values

route

private final NetAddress[] route
source route.


ptr

private final int ptr
source route pointer: index into route.

Constructor Detail

NetMessage.IpOptionSourceRoute

public NetMessage.IpOptionSourceRoute(NetAddress[] route)
Create new source route option.

Parameters:
route - source route

NetMessage.IpOptionSourceRoute

public NetMessage.IpOptionSourceRoute(NetAddress[] route,
                                      int ptr)
Create new source route option.

Parameters:
route - source route
ptr - source route pointer
Method Detail

getRoute

public NetAddress[] getRoute()
Return source route.

Returns:
source route (do not modify)

getPtr

public int getPtr()
Return source route pointer: index into route.

Returns:
source route pointer: index into route

getType

public byte getType()
Return option type field.

Specified by:
getType in class NetMessage.IpOption
Returns:
option type field

getSize

public int getSize()
Return option length (in bytes/octets).

Specified by:
getSize in interface Message
Specified by:
getSize in class NetMessage.IpOption
Returns:
option length (in bytes/octets)

getBytes

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

Parameters:
msg - destination byte array
offset - byte array starting offset

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object