public class Ethernet extends EtherTypePacket<Ethernet>
Ethernet
describes an Ethernet frame.
This class is provided only for VTN internal use. This class may be changed without any notice.
Packet.HeaderField
Constructor and Description |
---|
Ethernet() |
Modifier and Type | Method and Description |
---|---|
byte[] |
getDestinationMACAddress()
Gets the destination MAC address stored.
|
protected Map<String,Packet.HeaderField> |
getHeaderFormat()
Return a map that determines the format of the packet.
|
int |
getHeaderSize()
Return the number of bits in the Ethernet header.
|
byte[] |
getSourceMACAddress()
Gets the source MAC address stored.
|
Ethernet |
setDestinationMACAddress(byte[] mac)
Sets the destination MAC address for the current Ethernet object.
|
Ethernet |
setSourceMACAddress(byte[] mac)
Sets the source MAC address for the current Ethernet object.
|
clone, getEtherType, setEtherType, setHeaderField
deserialize, equals, equalsField, getByte, getBytes, getFieldNumBits, getFieldNumBits, getFieldOffset, getFieldOffset, getHeaderFieldMap, getInt, getIp4Network, getPayload, getRawPayload, getRawPayloadSize, getShort, hashCode, isCorrupted, isZeroShort, postDeserializeCustomOperation, postSerializeCustomOperation, serialize, setCorrupted, setPayload, setPayloadClass, setRawPayload, toString
public byte[] getDestinationMACAddress()
null
if not configured.public byte[] getSourceMACAddress()
null
if not configured.public Ethernet setDestinationMACAddress(byte[] mac)
mac
- The destination MAC address.
null
cannot be specified.public Ethernet setSourceMACAddress(byte[] mac)
mac
- The source MAC address.
null
cannot be specified.public int getHeaderSize()
getHeaderSize
in class Packet
protected Map<String,Packet.HeaderField> getHeaderFormat()
getHeaderFormat
in class Packet
Copyright © 2018 OpenDaylight. All rights reserved.