SSF.OS
Class IpHeader

java.lang.Object
  |
  +--SSF.OS.ProtocolMessage
        |
        +--SSF.OS.IpHeader

public class IpHeader
extends ProtocolMessage

IP packet Header class.


Field Summary
static int DEFAULT_TIME_TO_LIVE
          Default limit on number of hops : 128
static byte DELAY_BIT_MASK
           
 int DEST_IP
          The destination IP address of this IP packet.
 int NEXT_HOP_IP
          The next hop IP address, not in the standard IP header.
 int PROTOCOL_NO
          The protocol number for this header.
 int SOURCE_IP
          The source IP address of this IP packet.
static byte THROUGHPUT_BIT_MASK
           
 int TIME_TO_LIVE
          The time-to-live field decremented by each router.
 byte TOS
          The type of service field.
static java.lang.String VERSION
          The version of this IP protocol.
 
Constructor Summary
IpHeader(int prot_no, int src_ip, int dest_ip)
          IP header constructor with default TTL.
IpHeader(int prot_no, int src_ip, int dest_ip, int ttl)
          IP header constructor.
 
Method Summary
 int bytecount()
          Returns the total number of bytes in this IP packet.
 java.lang.Object getMeasurementBucket()
           
 int header_bytecount()
          Returns the size (in bytes) of the IP header only, doesn't include the payload, if any.
 void setMeasurementBucket(java.lang.Object meas)
          Attaches user-defined per-packet measurement data to this IP message.
 java.lang.String toString()
           
 
Methods inherited from class SSF.OS.ProtocolMessage
carryPayload, copy, dropHeader, dropPayload, frombytes, fromVersion, payload, previous, size, tobytes, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
The version of this IP protocol.

See Also:
Constant Field Values

SOURCE_IP

public int SOURCE_IP
The source IP address of this IP packet.


DEST_IP

public int DEST_IP
The destination IP address of this IP packet.


PROTOCOL_NO

public int PROTOCOL_NO
The protocol number for this header.


TOS

public byte TOS
The type of service field.


THROUGHPUT_BIT_MASK

public static final byte THROUGHPUT_BIT_MASK
See Also:
Constant Field Values

DELAY_BIT_MASK

public static final byte DELAY_BIT_MASK
See Also:
Constant Field Values

TIME_TO_LIVE

public int TIME_TO_LIVE
The time-to-live field decremented by each router.


DEFAULT_TIME_TO_LIVE

public static final int DEFAULT_TIME_TO_LIVE
Default limit on number of hops : 128

See Also:
Constant Field Values

NEXT_HOP_IP

public int NEXT_HOP_IP
The next hop IP address, not in the standard IP header.

Constructor Detail

IpHeader

public IpHeader(int prot_no,
                int src_ip,
                int dest_ip,
                int ttl)
IP header constructor.

Parameters:
prot_no - Protocol number
src_ip - IP address of packet source
dest_ip - IP address of packet destination
ttl - time to live, in hops.

IpHeader

public IpHeader(int prot_no,
                int src_ip,
                int dest_ip)
IP header constructor with default TTL.

Parameters:
prot_no - Protocol number
src_ip - IP address of packet source
dest_ip - IP address of packet destination
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

header_bytecount

public int header_bytecount()
Returns the size (in bytes) of the IP header only, doesn't include the payload, if any.

Overrides:
header_bytecount in class ProtocolMessage

bytecount

public int bytecount()
Returns the total number of bytes in this IP packet.

Overrides:
bytecount in class ProtocolMessage

setMeasurementBucket

public void setMeasurementBucket(java.lang.Object meas)
Attaches user-defined per-packet measurement data to this IP message. Introduced by Christopher R. Kelley, NIST, Aug. 2000.


getMeasurementBucket

public java.lang.Object getMeasurementBucket()