net.sourceforge.jpcap.net
Class ICMPPacket

java.lang.Object
  |
  +--net.sourceforge.jpcap.net.Packet
        |
        +--net.sourceforge.jpcap.net.EthernetPacket
              |
              +--net.sourceforge.jpcap.net.IPPacket
                    |
                    +--net.sourceforge.jpcap.net.ICMPPacket

public class ICMPPacket
extends IPPacket

An ICMP packet.

Extends an IP packet, adding an ICMP header and ICMP data payload.


Constructor Summary
ICMPPacket(int lLen, byte[] bytes, java.lang.String macSourceAddress, java.lang.String macDestinationAddress, java.lang.String sourceAddress, java.lang.String destinationAddress, int messageType)
           
 
Method Summary
 byte[] getData()
          Fetch data portion of the icmp header.
 byte[] getHeader()
          Fetch the icmp header, excluding icmp data payload.
 int getMessageType()
          Fetch the ICMP message type code.
 java.lang.String toString()
          Convert this ICMP packet to a readable string.
 
Methods inherited from class net.sourceforge.jpcap.net.IPPacket
getDestinationAddress, getProtocol, getSourceAddress
 
Methods inherited from class net.sourceforge.jpcap.net.EthernetPacket
getDestinationHwAddress, getSourceHwAddress, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ICMPPacket

public ICMPPacket(int lLen,
                  byte[] bytes,
                  java.lang.String macSourceAddress,
                  java.lang.String macDestinationAddress,
                  java.lang.String sourceAddress,
                  java.lang.String destinationAddress,
                  int messageType)
Method Detail

getHeader

public byte[] getHeader()
Fetch the icmp header, excluding icmp data payload.
Overrides:
getHeader in class IPPacket

getData

public byte[] getData()
Fetch data portion of the icmp header.
Overrides:
getData in class IPPacket

getMessageType

public int getMessageType()
Fetch the ICMP message type code.

toString

public java.lang.String toString()
Convert this ICMP packet to a readable string.
Overrides:
toString in class IPPacket