com.ibm.as400.util.commtrace
Class Header

java.lang.Object
  extended by com.ibm.as400.util.commtrace.Header
Direct Known Subclasses:
ARPHeader, ExtHeader, ICMP4Header, ICMP6Header, IP4Header, IP6Header, TCPHeader, UDPHeader, UnknownHeader

public abstract class Header
extends Object

Parent header class.
Contains both the raw header and the raw payload.
Maintains a pointer to the next header.


Field Summary
static int EXTAH
          An Extended AH Header
static int EXTDEST
          An Extended Destination Header
static int EXTESP
          An Extended ESP Header
static int EXTFRAG
          An Extended Fragment Header
static int EXTHOPBYHOP
          An Extended Hop By Hop Header
static int EXTROUTE
          An Extended Routing Header
static int ICMP4
          An ICMPv4 Header
static int ICMP6
          An ICMPv6 Header
static int IP4
          An IPv4 Header
static int IP6
          An IPv6 Header
static int TCP
          A TCP Header
static int UDP
          An UDP Header
static int UNK
          An Unknown Header
 
Method Summary
 byte[] getHeaderData()
          Returns the data of this header.
 int getHeaderLen()
          Returns the length of this header.
 String getName()
          The name of this header.
 Header getNextHeader()
          Returns the next header in this packet.
 String getPayload()
          Returns this header's payload as an ascii and hexadecimal string.
 byte[] getPayLoad()
          Returns this header's raw payload.
 byte[] getPayloadBytes()
          Returns this header's payload as a byte array.
 String getPayloadHexString()
          Returns this header's payload as a hexadecimal string.
 int getType()
          Returns this header's type.
 String printHexHeader()
          Returns a description of the header along with this header as a hexadecimal string.
 String toHexString()
          Returns this header as a hexadecimal string.
 String toString()
          Returns a printable representation of this header.
 String toString(FormatProperties filter)
          Returns a printable representation of this header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ICMP6

public static final int ICMP6
An ICMPv6 Header

See Also:
Constant Field Values

IP6

public static final int IP6
An IPv6 Header

See Also:
Constant Field Values

ICMP4

public static final int ICMP4
An ICMPv4 Header

See Also:
Constant Field Values

IP4

public static final int IP4
An IPv4 Header

See Also:
Constant Field Values

TCP

public static final int TCP
A TCP Header

See Also:
Constant Field Values

UDP

public static final int UDP
An UDP Header

See Also:
Constant Field Values

EXTHOPBYHOP

public static final int EXTHOPBYHOP
An Extended Hop By Hop Header

See Also:
Constant Field Values

EXTROUTE

public static final int EXTROUTE
An Extended Routing Header

See Also:
Constant Field Values

EXTFRAG

public static final int EXTFRAG
An Extended Fragment Header

See Also:
Constant Field Values

EXTESP

public static final int EXTESP
An Extended ESP Header

See Also:
Constant Field Values

EXTAH

public static final int EXTAH
An Extended AH Header

See Also:
Constant Field Values

EXTDEST

public static final int EXTDEST
An Extended Destination Header

See Also:
Constant Field Values

UNK

public static final int UNK
An Unknown Header

See Also:
Constant Field Values
Method Detail

getHeaderData

public byte[] getHeaderData()
Returns the data of this header.

Returns:
byte[] containing the raw data.

getHeaderLen

public int getHeaderLen()
Returns the length of this header.

Returns:
Will always return 0.

getName

public String getName()
The name of this header.

Returns:
The Name

getNextHeader

public Header getNextHeader()
Returns the next header in this packet.

Returns:
Will always return null.

printHexHeader

public String printHexHeader()
Returns a description of the header along with this header as a hexadecimal string.

Returns:
String containing this header as a hexadecimal string.

getPayLoad

public byte[] getPayLoad()
Returns this header's raw payload.

Returns:
byte[] containing this header's raw payload.

toString

public String toString()
Returns a printable representation of this header.
Without any specific formatting for the particular type of Header.

Overrides:
toString in class Object
Returns:
String this header.

toString

public String toString(FormatProperties filter)
Returns a printable representation of this header.

Parameters:
filter - FormatProperties object for filtering this header.
Returns:
Returns a string representation of this header.

toHexString

public String toHexString()
Returns this header as a hexadecimal string.

Returns:
A hexadecimal representation of this header.

getPayloadHexString

public String getPayloadHexString()
Returns this header's payload as a hexadecimal string.

Returns:
String a hexadecimal representation of this header's payload.

getPayloadBytes

public byte[] getPayloadBytes()
Returns this header's payload as a byte array.

Returns:
byte[] containing this header's raw payload.

getPayload

public String getPayload()
Returns this header's payload as an ascii and hexadecimal string.

Returns:
An ascii and hexadecimal representation of this header's payload.

getType

public int getType()
Returns this header's type.

Returns:
This header's type.