net.sourceforge.jpcap.net
Class ICMPEncoding

java.lang.Object
  |
  +--net.sourceforge.jpcap.net.ICMPEncoding

public class ICMPEncoding
extends java.lang.Object

ICMP protocol encoding information.


Field Summary
static int HEADER_LEN
          Length in bytes of an ICMP header.
 
Constructor Summary
ICMPEncoding()
           
 
Method Summary
static ICMPPacket create(int lLen, byte[] bytes)
          ICMPPacket factory.
static int extractICMPMessageCode(int lLen, byte[] packetBytes)
          Extract the ICMP message code from packet data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_LEN

public static final int HEADER_LEN
Length in bytes of an ICMP header.
Constructor Detail

ICMPEncoding

public ICMPEncoding()
Method Detail

create

public static ICMPPacket create(int lLen,
                                byte[] bytes)
ICMPPacket factory.

extractICMPMessageCode

public static int extractICMPMessageCode(int lLen,
                                         byte[] packetBytes)
Extract the ICMP message code from packet data. The packet data must contain an ICMP header.
Parameters:
llen - the length of the link-level header.
packetBytes - packet bytes, including the link-layer and IP headers.
Returns:
the ICMP message code. i.e. 0x08 signifies echo request.