IPPacket class

The IPPacket class is the abstract superclass for creating classes that represent specific kinds of 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:

Javadoc reference documentation

For more information about the Packet classes, see the following Javadoc reference documentation:

IPPacket

ARPPacket

IP4Packet

IP6Packet

UnknownPacket