|
|||||||||
| 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.protocol.lan.Ethernet
@Header(length=14,
dlt={EN10MB,FDDI},
osi=DATALINK,
characteristics=CSMA_CD,
nicname="Eth",
description="Ethernet",
url="http://en.wikipedia.org/wiki/Ethernet")
public class EthernetEthernet2 definition. Datalink layer ethernet frame definition.
| Nested Class Summary | |
|---|---|
static class |
Ethernet.EthernetType
A table of EtherType values and their names. |
| 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 |
ADDRESS_IG_BIT
The Constant ADDRESS_IG_BIT. |
static int |
ADDRESS_LG_BIT
The Constant ADDRESS_LG_BIT. |
static int |
ID
The Constant ID. |
static int |
LENGTH
The Constant LENGTH. |
static java.lang.String |
ORG_IEEE
The Constant ORG_IEEE. |
| Fields inherited from class org.jnetpcap.packet.JHeader |
|---|
annotatedHeader, BYTE, EMPTY_HEADER_ARRAY, isSubHeader, packet, state |
| Fields inherited from class org.jnetpcap.nio.JMemory |
|---|
JNETPCAP_LIBRARY_NAME, MAX_DIRECT_MEMORY_DEFAULT, POINTER |
| Constructor Summary | |
|---|---|
Ethernet()
|
|
| Method Summary | |
|---|---|
long |
calculateChecksum()
Calculate checksum. |
long |
checksum()
Retrieves the header's checksum. |
boolean |
checksum(long crc)
Sets the checksum, Ethernet.FCS field in the last 4 bytes of the packet buffer, which is also the Ethernet trailer part or jNetPcap 'postfix'. |
boolean |
checksumCheck()
Checks if FCS is available for this Ethernet frame. |
java.lang.String |
checksumDescription()
Checksum description. |
int |
checksumOffset()
Calculates the offset of the FCS field within the Ethernet frame. |
long |
destination_IG()
Destination_ ig. |
long |
destination_LG()
Destination_ lg. |
byte[] |
destination()
Destination. |
void |
destination(byte[] array)
Destination. |
byte[] |
destinationToByteArray(byte[] array)
Destination to byte array. |
void |
formatHeader(java.util.List<JField> fields)
Format header. |
long |
source_IG()
Source_ ig. |
long |
source_LG()
Source_ lg. |
byte[] |
source()
Source. |
void |
source(byte[] array)
Source. |
byte[] |
sourceToByteArray(byte[] array)
Source to byte array. |
int |
type()
Type. |
void |
type(int type)
Type. |
java.lang.String |
typeDescription()
Type description. |
Ethernet.EthernetType |
typeEnum()
Type enum. |
| Methods inherited from class org.jnetpcap.nio.JBuffer |
|---|
findUTF8String, getByte, getByteArray, 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, setShort0, setUByte, setUInt, setUShort, transferFrom, transferFrom, transferFrom, transferTo, transferTo, transferTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ADDRESS_IG_BIT
public static final int ADDRESS_LG_BIT
public static final int ID
public static final int LENGTH
public static final java.lang.String ORG_IEEE
| Constructor Detail |
|---|
public Ethernet()
| Method Detail |
|---|
@Field(offset=0,
length=48,
format="#mac#",
mask=281470681743360L)
public byte[] destination()
@Field(parent="destination",
offset=40,
length=1,
display="IG bit")
@FlowKey(index=0)
public long destination_IG()
@Field(parent="destination",
offset=41,
length=1,
display="LG bit")
public long destination_LG()
public void destination(byte[] array)
array - the arraypublic byte[] destinationToByteArray(byte[] array)
array - the array
@Field(offset=48,
length=48,
format="#mac#",
mask=281470681743360L)
@FlowKey(index=0)
public byte[] source()
@Field(parent="source",
offset=40,
length=1,
display="IG bit")
public long source_IG()
@Field(parent="source",
offset=41,
length=1,
display="LG bit")
public long source_LG()
public void source(byte[] array)
array - the arraypublic byte[] sourceToByteArray(byte[] array)
array - the array
@Field(offset=96,
length=16,
format="%x")
@FlowKey(index=1)
public int type()
public void type(int type)
type - the type@Dynamic(value=DESCRIPTION) public java.lang.String typeDescription()
public void formatHeader(java.util.List<JField> fields)
fields - the fieldspublic Ethernet.EthernetType typeEnum()
@Dynamic(field="checksum",
value=CHECK)
public boolean checksumCheck()
@Dynamic(value=OFFSET) public int checksumOffset()
@Dynamic(value=DESCRIPTION) public java.lang.String checksumDescription()
@Field(length=32,
format="%x",
display="FCS")
public long checksum()
public boolean checksum(long crc)
crc - the crc
public long calculateChecksum()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||