jpcap
Class EthernetPacket

java.lang.Object
  |
  +--jpcap.DatalinkPacket
        |
        +--jpcap.EthernetPacket

public class EthernetPacket
extends DatalinkPacket

This class represents Ethernet packet.


Field Summary
 byte[] dst_mac
          Destination MAC address (6byte)
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dst_mac

public byte[] dst_mac
Destination MAC address (6byte)


src_mac

public byte[] src_mac
Source MAC address (6byte)


frametype

public short frametype
Frame type

Constructor Detail

EthernetPacket

public EthernetPacket()
Method Detail

getSourceAddress

public java.lang.String getSourceAddress()
Returns the MAC address of the source.

Returns:
MAC address of the source

getDestinationAddress

public java.lang.String getDestinationAddress()
Returns the MAC address of the destination.

Returns:
MAC address of the destination

toString

public java.lang.String toString()
Returns a string representation of this Ethernet packet.

FormatFsrc_mac -> dst_mac (frametype)

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this Ethernet packet