|
|||||||||
| 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.JBuffer
org.jnetpcap.packet.JHeader
org.jnetpcap.packet.JHeaderMap<Ip4>
org.jnetpcap.protocol.network.Ip4
@Protocol(suite=NETWORK,
analyzers={Ip4Sequencer.class,Ip4Assembler.class})
@Header(name="Ip4",
nicname="Ip",
osi=NETWORK,
suite=NETWORK,
spec="RFC792",
description="ip version 4")
public class Ip4IP version 4. Network layer internet protocol version 4. This is the main header file for Internet Protocol version 4. The header file defines various accessor methods for reading directly out of the Ip4 data structure found within the packet data buffer. The header is peered with the packet at appropriate offset into the buffer and data can be accessed via friendly accessor methods defined by this header, or by using JBuffer accessors. The header also performs decoding of the header, sepecifically decoding and attaching optional sub-headers to this header.
Ip4 header is the backbone of the internet.
| Nested Class Summary | |
|---|---|
static class |
Ip4.Flag
Enum table for Ip4.flags field. |
static class |
Ip4.Ip4Type
A table of IpTypes and their names |
static class |
Ip4.IpOption
Baseclass for all Ip option headers |
static class |
Ip4.LooseSourceRoute
Ip4 optional Loose Source Route header |
static class |
Ip4.NoOp
Ip4 optional No Operation header. |
static class |
Ip4.RecordRoute
Ip4 optional Record Route header |
static class |
Ip4.Routing
Ip4 optional Routing header |
static class |
Ip4.Security
Ip4 optional Security header. |
static class |
Ip4.StreamId
Ip4 optional Stream ID header |
static class |
Ip4.StrictSourceRoute
Ip4 optional Strict Source Route header |
static class |
Ip4.Timestamp
Ip4 optional Timestamp header |
| 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 |
DIFF_CODEPOINT
|
static int |
DIFF_ECE
|
static int |
DIFF_ECT
|
static int |
FLAG_DONT_FRAGMENT
|
static int |
FLAG_MORE_FRAGMENTS
|
static int |
FLAG_RESERVED
|
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 | |
|---|---|
Ip4()
|
|
| Method Summary | |
|---|---|
static boolean |
bindToEthernet(JPacket packet,
Ethernet eth)
|
static boolean |
bindToSnap(JPacket packet,
IEEESnap snap)
|
int |
checksum()
|
void |
checksum(int value)
|
boolean |
checkType(int type)
|
void |
clearFlags(int flags)
|
protected void |
decodeHeader()
Allows a header to decode its complex fields |
byte[] |
destination()
|
void |
destination(byte[] value)
|
byte[] |
destinationToByteArray(byte[] address)
|
int |
destinationToInt()
Converts the 32 bit Ip4 destination address to a java signed 32 bit integer. |
int |
flags_DF()
|
java.lang.String |
flags_DFDescription()
|
int |
flags_MF()
|
java.lang.String |
flags_MFDescription()
|
int |
flags_Reserved()
|
int |
flags()
Retrives the flags header field as an unsigned integer, length of 3 bits, that has each Ip4 flag encoded as a bit field. |
void |
flags(int flags)
A setter method that changes the flag bits directly in the peered Ip4 header structure within the packet data buffer. |
java.util.Set<Ip4.Flag> |
flagsEnum()
Retrieves the flags field as a collection's set of enum constants that represent each flag. |
static int |
getHeaderLength(JBuffer buffer,
int offset)
|
int |
hashCode()
|
int |
hlen()
|
void |
hlen(int value)
|
java.lang.String |
hlenDescription()
|
int |
id()
|
void |
id(int value)
|
boolean |
isFragment()
Checks if this is ip fragment of a larger PDU. |
boolean |
isReassembled()
Checks if this packet has been reassembled from other IP fragments. |
int |
length()
|
void |
length(int value)
|
int |
offset()
|
void |
offset(int offset)
|
java.lang.String |
offsetDescription()
|
byte[] |
source()
Converts the 32 bit Ip4 source address to a java signed 32 bit integer. |
void |
source(byte[] value)
|
byte[] |
sourceToByteArray(byte[] address)
|
int |
sourceToInt()
|
int |
tos_Codepoint()
|
java.lang.String |
tos_CodepointDescription()
|
int |
tos_ECE()
|
java.lang.String |
tos_ECEDescription()
|
int |
tos_ECN()
|
java.lang.String |
tos_ECNDescription()
|
int |
tos()
|
void |
tos(int value)
|
int |
ttl()
|
void |
ttl(int value)
|
int |
type()
|
void |
type(int value)
|
void |
type(Ip4.Ip4Type type)
|
java.lang.String |
typeDescription()
|
Ip4.Ip4Type |
typeEnum()
|
int |
version()
|
void |
version(int value)
|
| 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, getPayload, getState, getType, hasAnalysis, hasAnalysis, hasAnalysis, hasDescription, peer, peer, peerPayloadTo, setPacket, sizeof, toString, transferPayloadTo, transferPayloadTo, transferPayloadTo, 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, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jnetpcap.nio.JByteBuffer |
|---|
size |
| Field Detail |
|---|
public static final int DIFF_CODEPOINT
public static final int DIFF_ECE
public static final int DIFF_ECT
public static final int FLAG_DONT_FRAGMENT
public static final int FLAG_MORE_FRAGMENTS
public static final int FLAG_RESERVED
public static final int ID
| Constructor Detail |
|---|
public Ip4()
| Method Detail |
|---|
@Bind(to=Ethernet.class)
public static boolean bindToEthernet(JPacket packet,
Ethernet eth)
@Bind(to=IEEESnap.class)
public static boolean bindToSnap(JPacket packet,
IEEESnap snap)
@HeaderLength
public static int getHeaderLength(JBuffer buffer,
int offset)
@Field(offset=80,
length=16,
format="%x")
public int checksum()
@FieldSetter public void checksum(int value)
public boolean checkType(int type)
public void clearFlags(int flags)
protected void decodeHeader()
JHeader
decodeHeader in class JHeader
@Field(offset=128,
length=32,
format="#ip4#")
@FlowKey(index=0)
public byte[] destination()
@FieldSetter public void destination(byte[] value)
public byte[] destinationToByteArray(byte[] address)
public int destinationToInt()
@Field(offset=48,
length=3,
format="%x")
public int flags()
public java.util.Set<Ip4.Flag> flagsEnum()
@FieldSetter public void flags(int flags)
flags - new flags to set
@Field(parent="flags",
offset=2,
length=1,
display="reserved")
public int flags_Reserved()
@Field(parent="flags",
offset=1,
length=1,
display="DF: do not fragment")
public int flags_DF()
@Dynamic(value=DESCRIPTION) public java.lang.String flags_DFDescription()
@Field(parent="flags",
offset=0,
length=1,
display="MF: more fragments",
nicname="M")
public int flags_MF()
@Dynamic(value=DESCRIPTION) public java.lang.String flags_MFDescription()
public int hashCode()
hashCode in class java.lang.Object
@Field(offset=4,
length=4,
format="%d")
public int hlen()
@FieldSetter public void hlen(int value)
@Dynamic(value=DESCRIPTION) public java.lang.String hlenDescription()
@Field(offset=32,
length=16,
format="%x")
public int id()
@FieldSetter public void id(int value)
public boolean isFragment()
public boolean isReassembled()
@Field(offset=16,
length=16,
format="%d")
public int length()
@FieldSetter public void length(int value)
@Dynamic(value=DESCRIPTION) public java.lang.String offsetDescription()
@Field(offset=51,
length=13,
format="%d")
public int offset()
@FieldSetter public void offset(int offset)
@Field(offset=96,
length=32,
format="#ip4#")
@FlowKey(index=0)
public byte[] source()
@FieldSetter public void source(byte[] value)
public byte[] sourceToByteArray(byte[] address)
public int sourceToInt()
@Field(offset=8,
length=8,
format="%x",
display="diffserv")
public int tos()
@FieldSetter public void tos(int value)
@Field(parent="tos",
offset=2,
length=6,
display="code point")
public int tos_Codepoint()
@Dynamic(value=DESCRIPTION) public java.lang.String tos_CodepointDescription()
@Field(parent="tos",
offset=0,
length=1,
display="ECE bit")
public int tos_ECE()
@Dynamic(value=DESCRIPTION) public java.lang.String tos_ECEDescription()
@Field(parent="tos",
offset=1,
length=1,
display="ECN bit")
public int tos_ECN()
@Dynamic(value=DESCRIPTION) public java.lang.String tos_ECNDescription()
@Field(offset=64,
length=8,
format="%d",
description="time to live")
public int ttl()
@FieldSetter public void ttl(int value)
@Field(offset=72,
length=8,
format="%d")
@FlowKey(index=1)
public int type()
@FieldSetter public void type(int value)
public void type(Ip4.Ip4Type type)
@Dynamic(value=DESCRIPTION) public java.lang.String typeDescription()
public Ip4.Ip4Type typeEnum()
@Field(offset=0,
length=4,
format="%d")
public int version()
@FieldSetter public void version(int value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||