|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jnetpcap.nio.JMemory
org.jnetpcap.nio.JStruct
org.jnetpcap.packet.JHeader.State
public static class JHeader.State
This class is peered state of a header a native state structure
typedef struct header_t {
uint8_t hdr_id; // header ID
uint8_t hdr_prefix; // length of the prefix (preamble) before the header
uint8_t hdr_gap; // length of the gap between header and payload
uint16_t hdr_flags; // flags for this header
uint16_t hdr_postfix; // length of the postfix (trailer) after the payload
uint32_t hdr_offset; // offset into the packet_t->data buffer
uint32_t hdr_length; // length of the header in packet_t->data buffer
uint32_t hdr_payload; // length of the payload
jobject hdr_analysis; // Java JAnalysis based object if not null
} header_t;
.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jnetpcap.nio.JMemory |
|---|
JMemory.Type |
| Field Summary | |
|---|---|
static int |
FLAG_CRC_INVALID
Flag set in the header_t structure, tells if the CRC, if performed, was valid or invalid. |
static int |
FLAG_CRC_PERFORMED
Flag set in the header_t structure, a protocol specific CRC had been performed on the frame, header or its payload. |
static int |
FLAG_FIELDS_DISSECTED
Flag set in the header_t structure, which indicates that the current header was dissected for optional fields. |
static int |
FLAG_GAP_TRUNCATED
Flag set in the header_t structure, which tells if the postifx is incomplete due to packet truncation at the time of the capture. |
static int |
FLAG_HEADER_FRAGMENTED
Flag set in the header_t structure, which indicates that the current header and/or payload are fragmented. |
static int |
FLAG_HEADER_TRUNCATED
Flag set in the header_t structure, which tells if the header is incomplete due to packet truncation at the time of the capture. |
static int |
FLAG_HEURISTIC_BINDING
Flag set in the header_t structure, which tells if this header was bound due to a heuristic binding. |
static int |
FLAG_IGNORE_BOUNDS
A flag that is set for headers that should not strictly enforce their header boundaries. |
static int |
FLAG_PAYLOAD_TRUNCATED
Flag set in the header_t structure, which tells if the payload is incomplete due to packet truncation at the time of the capture. |
static int |
FLAG_POSTFIX_TRUNCATED
Flag set in the header_t structure, which tells if the postifx is incomplete due to packet truncation at the time of the capture. |
static int |
FLAG_PREFIX_TRUNCATED
Flag set in the header_t structure, which tells if the prefix is incomplete due to packet truncation at the time of the capture. |
static int |
FLAG_SUBHEADERS_DISSECTED
Flag set in the header_t structure, which indicates that the current header was dissected for optional sub-headers. |
static java.lang.String |
STRUCT_NAME
Name of the native structure backing this peer class. |
| Fields inherited from class org.jnetpcap.nio.JMemory |
|---|
JNETPCAP_LIBRARY_NAME, MAX_DIRECT_MEMORY_DEFAULT, POINTER |
| Constructor Summary | |
|---|---|
JHeader.State(JMemory.Type type)
Create an uninitialized type. |
|
| Method Summary | |
|---|---|
int |
getFlags()
Every header "record" keeps int-bit-flags that describe certain additional information about the header. |
int |
getGap()
Gets the length in bytes of a gap (padding) between the header and the protocol 'records' payload: |
int |
getId()
Gets the numerical ID of the header this structure describes as defined by JRegistry. |
int |
getLength()
Gets the length of the protocol's header in bytes within the protocol's 'record': |
int |
getOffset()
Gets the offset into the packet buffer of the actual protocol header header in bytes of protocols 'record': |
int |
getPayload()
Gets the length of the payload that follows a protocol header in bytes within the protocol's 'record': |
int |
getPostfix()
Gets the length of the postfix that follows a protocol's payload in bytes within the protocol's 'record': |
int |
getPrefix()
Gets the length of the prefix that precedes a protocol's header in bytes within the protocol's 'record': |
boolean |
isDirect()
Checks if this state object is reading for native structures or has a java implementation backing it. |
int |
peer(JHeader.State peer)
Peers this state object with the native structures of another. |
void |
setFlags(int flags)
Sets the header flags to new values. |
java.lang.String |
toString()
Creates a string containing light debug information about this state class and underlying header it belongs to. |
| Methods inherited from class org.jnetpcap.nio.JStruct |
|---|
getStructName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int FLAG_CRC_INVALID
public static final int FLAG_CRC_PERFORMED
public static final int FLAG_GAP_TRUNCATED
public static final int FLAG_HEADER_TRUNCATED
public static final int FLAG_HEURISTIC_BINDING
public static final int FLAG_PAYLOAD_TRUNCATED
public static final int FLAG_POSTFIX_TRUNCATED
public static final int FLAG_PREFIX_TRUNCATED
public static final int FLAG_HEADER_FRAGMENTED
public static final int FLAG_FIELDS_DISSECTED
public static final int FLAG_SUBHEADERS_DISSECTED
public static final int FLAG_IGNORE_BOUNDS
public static final java.lang.String STRUCT_NAME
| Constructor Detail |
|---|
public JHeader.State(JMemory.Type type)
type - type of memory| Method Detail |
|---|
public int getFlags()
FLAG_PAYLOAD_TRUNCATED and other like it.public int getGap()
+------------------=====--------------------+ | prefix | header | GAP | payload | postfix | +------------------=====--------------------+.
public int getId()
JRegistry.
JRegistrypublic int getLength()
+---------========--------------------------+ | prefix | HEADER | gap | payload | postfix | +---------========--------------------------+.
public int getOffset()
+---------========--------------------------+ | prefix | HEADER | gap | payload | postfix | +---------========--------------------------+.
public int getPayload()
+------------------------=========----------+ | prefix | header | gap | PAYLOAD | postfix | +------------------------=========----------+.
public int getPostfix()
+----------------------------------=========+ | prefix | header | gap | payload | POSTFIX | +----------------------------------=========+.
public int getPrefix()
+========-----------------------------------+ | PREFIX | header | gap | payload | postfix | +========-----------------------------------+.
public boolean isDirect()
public int peer(JHeader.State peer)
peer - destination object holding the native memory reference we need
to peer to
public void setFlags(int flags)
flags - unsinged integer containing the bit-flags to set for this headerpublic java.lang.String toString()
toString in class JStruct
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||