org.jnetpcap.protocol.network
Class Icmp

java.lang.Object
  extended by org.jnetpcap.nio.JMemory
      extended by org.jnetpcap.nio.JBuffer
          extended by org.jnetpcap.packet.JHeader
              extended by org.jnetpcap.packet.JHeaderMap<Icmp>
                  extended by org.jnetpcap.protocol.network.Icmp
All Implemented Interfaces:
JByteBuffer, JCompoundHeader<Icmp>

@Header
public class Icmp
extends JHeaderMap<Icmp>

ICMP header definition

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static class Icmp.DestinationUnreachable
          ICMP Destination Unreachable header definition
static class Icmp.Echo
          ICMP Echo header (ping) baseclass definition
static class Icmp.EchoReply
          ICMP Echo Reply header definition
static class Icmp.EchoRequest
          ICMP Echo Request header definition
static class Icmp.IcmpCode
          A table of Icmp sub-codes per Icmp type
static class Icmp.IcmpType
          A table of IcmpTypes and their names
static class Icmp.ParamProblem
          ICMP Paramater Protoblem header definition
static class Icmp.Redirect
          ICMP Redirect header definition
static class Icmp.Reserved
          Base class for various ICMP Headers that contain a reserved field
static class Icmp.SourceQuench
          ICMP Source Quence header definition
 
Nested classes/interfaces inherited from class org.jnetpcap.packet.JHeader
JHeader.State
 
Nested classes/interfaces inherited from class org.jnetpcap.nio.JMemory
JMemory.Type
 
Field Summary
static int ID
           
 
Fields inherited from class org.jnetpcap.packet.JHeaderMap
MAX_HEADERS, optionsBitmap, optionsLength, optionsOffsets, X_HEADERS
 
Fields inherited from class org.jnetpcap.packet.JHeader
annotatedHeader, EMPTY_HEADER_ARRAY, isSubHeader, packet, state
 
Fields inherited from class org.jnetpcap.nio.JMemory
JNETPCAP_LIBRARY_NAME
 
Constructor Summary
Icmp()
           
 
Method Summary
 int checksum()
           
 int code()
           
 Icmp.IcmpCode codeEnum()
           
protected  void decodeHeader()
          Allows a header to decode its complex fields
static int headerLength(JBuffer buffer, int offset)
           
 int type()
           
 java.lang.String typeDescription()
           
 Icmp.IcmpType typeEnum()
           
 
Methods inherited from class org.jnetpcap.packet.JHeaderMap
getSubHeader, getSubHeaders, hasSubHeader, hasSubHeader, hasSubHeaders, setSubHeader, setSubHeaders
 
Methods inherited from class org.jnetpcap.packet.JHeader
addAnalysis, decode, getAnalysis, getAnalysisIterable, getAnnotatedHeader, getDescription, getFields, getId, getLength, getName, getNicname, getOffset, getPacket, getParent, getState, getType, hasAnalysis, hasAnalysis, hasAnalysis, hasDescription, peer, peer, setPacket, sizeof, toString, validateHeader
 
Methods inherited from class org.jnetpcap.nio.JBuffer
findUTF8String, getByte, getByteArray, getByteArray, getDouble, getFloat, getInt, getLong, getShort, getUByte, getUInt, getUShort, getUTF8Char, getUTF8String, getUTF8String, getUTF8String, getUTF8String, isReadonly, order, order, peer, peer, peer, peer, setByte, setByteArray, setByteBuffer, setDouble, setFloat, setInt, setLong, setShort, setUByte, setUInt, setUShort, transferFrom, transferFrom, transferFrom, transferTo, transferTo, transferTo
 
Methods inherited from class org.jnetpcap.nio.JMemory
check, cleanup, finalize, isInitialized, isJMemoryBasedOwner, isOwner, peer, setSize, size, toDebugString, toHexdump, toHexdump, totalActiveAllocated, totalAllocateCalls, totalAllocated, totalAllocatedSegments0To255Bytes, totalAllocatedSegments256OrAbove, totalDeAllocateCalls, totalDeAllocated, transferFrom, transferFrom, transferFromDirect, transferOwnership, transferTo, transferTo, transferTo, transferTo, transferTo
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jnetpcap.nio.JByteBuffer
size
 

Field Detail

ID

public static final int ID
See Also:
Constant Field Values
Constructor Detail

Icmp

public Icmp()
Method Detail

headerLength

@HeaderLength
public static int headerLength(JBuffer buffer,
                                            int offset)

checksum

@Field(offset=16,
       length=16,
       format="%x")
public int checksum()

code

@Field(offset=8,
       length=8,
       format="%x")
public int code()

codeEnum

public Icmp.IcmpCode codeEnum()

decodeHeader

protected void decodeHeader()
Description copied from class: JHeader
Allows a header to decode its complex fields

Overrides:
decodeHeader in class JHeader

type

@Field(offset=0,
       length=8,
       format="%x")
public int type()

typeDescription

@Dynamic(value=DESCRIPTION)
public java.lang.String typeDescription()

typeEnum

public Icmp.IcmpType typeEnum()