|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpcap.packet.DatalinkPacket
jpcap.packet.EthernetPacket
public class EthernetPacket
This class represents Ethernet packet.
Field Summary | |
---|---|
byte[] |
dst_mac
Destination MAC address (6byte) |
static short |
ETHERTYPE_ARP
Addr. |
static short |
ETHERTYPE_IP
IP protocol |
static short |
ETHERTYPE_IPV6
IPv6 |
static short |
ETHERTYPE_LOOPBACK
used to test interfaces |
static short |
ETHERTYPE_PUP
PUP protocol |
static short |
ETHERTYPE_REVARP
reverse Addr. |
static short |
ETHERTYPE_VLAN
IEEE 802.1Q VLAN tagging |
short |
frametype
Frame type |
byte[] |
src_mac
Source MAC address (6byte) |
Constructor Summary | |
---|---|
EthernetPacket()
|
Method Summary | |
---|---|
java.lang.String |
getDestinationAddress()
Returns the MAC address of the destination. |
java.lang.String |
getSourceAddress()
Returns the MAC address of the source. |
java.lang.String |
toString()
Returns a string representation of this Ethernet packet. Format: Fsrc_mac -> dst_mac (frametype) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public byte[] dst_mac
public byte[] src_mac
public short frametype
public static final short ETHERTYPE_PUP
public static final short ETHERTYPE_IP
public static final short ETHERTYPE_ARP
public static final short ETHERTYPE_REVARP
public static final short ETHERTYPE_VLAN
public static final short ETHERTYPE_IPV6
public static final short ETHERTYPE_LOOPBACK
Constructor Detail |
---|
public EthernetPacket()
Method Detail |
---|
public java.lang.String getSourceAddress()
public java.lang.String getDestinationAddress()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |