public interface EtherHeader extends ProtocolHeader
EtherHeader describes the contents of ethernet header and
IEEE 802.1Q VLAN tag.| Modifier and Type | Field and Description |
|---|---|
static int |
VLAN_NONE
A pseudo VLAN ID that indicates untagged ethernet frame.
|
| Modifier and Type | Method and Description |
|---|---|
EtherAddress |
getDestinationAddress()
Return the destination MAC address.
|
int |
getEtherType()
Return the ethernet type.
|
EtherAddress |
getSourceAddress()
Return the source MAC address.
|
int |
getVlanId()
Return the VLAN ID in the IEEE 802.1Q VLAN tag.
|
short |
getVlanPriority()
Return the VLAN priority value in the IEEE 802.1Q VLAN tag.
|
void |
setDestinationAddress(EtherAddress mac)
Set the destination MAC address.
|
void |
setSourceAddress(EtherAddress mac)
Set the source MAC address.
|
void |
setVlanId(int vid)
Set the VLAN ID to the IEEE 802.1Q VLAN tag.
|
void |
setVlanPriority(short pcp)
Set the VLAN priority value to the IEEE 802.1Q VLAN tag.
|
setDescriptionstatic final int VLAN_NONE
EtherAddress getSourceAddress()
EtherAddress instance which represents the source
MAC address.void setSourceAddress(EtherAddress mac)
mac - An EtherAddress instance which represents the source
MAC address.EtherAddress getDestinationAddress()
EtherAddress instance which represents the
destination MAC address.void setDestinationAddress(EtherAddress mac)
mac - An EtherAddress instance which represents the
destination MAC address.int getEtherType()
int getVlanId()
VLAN_NONE is returned if this frame does not contain
a VLAN tag.void setVlanId(int vid)
vid - A VLAN ID in the VLAN tag.
If VLAN_NONE is specified, the VLAN tag will be
removed.short getVlanPriority()
void setVlanPriority(short pcp)
pcp - A byte value which represents the VLAN priority.Copyright © 2018 OpenDaylight. All rights reserved.