IPPacket class

The IBM® Toolbox for Java™ IPPacket class represents all the data packets that the network transmitted for this frame during the communications trace. IPPacket is an abstract class, so you will use the various concrete subclasses to process the headers and data in the packets.

The subclasses of IPPacket include:

Packet classes enable you to retrieve the type of packet and access the raw data (the header and payload) that the packet contains. All the subclasses use similar constructors and include one additional method that returns a printable version of the packet contents as a String.

All the Packet class constructors take a byte array of packet data as an argument, but the ARPPacket also requires an integer that specifies the type of frame. Creating an instance of a Packet class automatically creates the appropriate Header object.

The Packet classes provide methods that allow you to perform a variety of actions that include the following: