org.jnetpcap.packet
Class JHeader.State

java.lang.Object
  extended by org.jnetpcap.nio.JMemory
      extended by org.jnetpcap.nio.JStruct
          extended by org.jnetpcap.packet.JHeader.State
Enclosing class:
JHeader

public static class JHeader.State
extends JStruct

This class is peered state of a header a native state structure

 typedef struct header_t {
        int32_t hdr_id; // header ID
        uint32_t hdr_offset; // offset into the packet_t->data buffer
        int32_t hdr_length; // length of the header in packet_t->data buffer
 } header_t;
 
 

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jnetpcap.nio.JMemory
JMemory.Type
 
Field Summary
static java.lang.String STRUCT_NAME
           
 
Fields inherited from class org.jnetpcap.nio.JMemory
JNETPCAP_LIBRARY_NAME
 
Constructor Summary
JHeader.State(JMemory.Type type)
          Create an uninitialized type
 
Method Summary
 JAnalysis getAnalysis()
          Retrieves the analysis object that is attached to this header.
 int getId()
           
 int getLength()
           
 int getOffset()
           
 boolean isDirect()
           
 int peer(JHeader.State peer)
           
 void setAnalysis(JPacket.State state, JAnalysis analysis)
          Sets the analysis object for this header.
 java.lang.String toString()
           
 
Methods inherited from class org.jnetpcap.nio.JStruct
getStructName
 
Methods inherited from class org.jnetpcap.nio.JMemory
check, cleanup, finalize, isInitialized, isJMemoryBasedOwner, isOwner, peer, peer, peer, setSize, size, toDebugString, toHexdump, toHexdump, totalActiveAllocated, totalAllocateCalls, totalAllocated, totalAllocatedSegments0To255Bytes, totalAllocatedSegments256OrAbove, totalDeAllocateCalls, totalDeAllocated, transferFrom, transferFrom, transferFrom, transferFrom, transferFromDirect, transferOwnership, transferTo, transferTo, transferTo, transferTo, transferTo, transferTo, transferTo
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STRUCT_NAME

public static final java.lang.String STRUCT_NAME
See Also:
Constant Field Values
Constructor Detail

JHeader.State

public JHeader.State(JMemory.Type type)
Create an uninitialized type

Parameters:
type - type of memory
Method Detail

getAnalysis

public JAnalysis getAnalysis()
Retrieves the analysis object that is attached to this header.

Returns:
an attached analysis based object or null if not set

getId

public int getId()

getLength

public int getLength()

getOffset

public int getOffset()

isDirect

public boolean isDirect()

peer

public int peer(JHeader.State peer)

setAnalysis

public void setAnalysis(JPacket.State state,
                        JAnalysis analysis)
Sets the analysis object for this header.

Parameters:
state - packet's state object
analysis - analysis object to set

toString

public java.lang.String toString()
Overrides:
toString in class JStruct