public class Ethernet extends Packet
corrupted, hdrFieldCoordMap, hdrFieldsMap, LOG, parent, payload, payloadClass, rawPayload, writeAccess
Constructor and Description |
---|
Ethernet()
Default constructor that creates and sets the HashMap.
|
Ethernet(boolean writeAccess)
Constructor that sets the access level for the packet and creates and sets the HashMap.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getDestinationMACAddress()
Gets the destination MAC address stored.
|
short |
getEtherType()
Gets the etherType stored.
|
byte[] |
getSourceMACAddress()
Gets the source MAC address stored.
|
boolean |
isBroadcast() |
boolean |
isMulticast() |
Ethernet |
setDestinationMACAddress(byte[] destinationMACAddress)
Sets the destination MAC address for the current Ethernet object instance.
|
Ethernet |
setEtherType(short etherType)
Sets the etherType for the current Ethernet object instance.
|
void |
setHeaderField(String headerField,
byte[] readValue) |
Ethernet |
setSourceMACAddress(byte[] sourceMACAddress)
Sets the source MAC address for the current Ethernet object instance.
|
deserialize, equals, getfieldnumBits, getfieldOffset, getHeaderSize, getParent, getPayload, getRawPayload, hashCode, isCorrupted, postDeserializeCustomOperation, postSerializeCustomOperation, serialize, setParent, setPayload, setRawPayload, toString
public Ethernet()
public Ethernet(boolean writeAccess)
public void setHeaderField(String headerField, byte[] readValue)
setHeaderField
in class Packet
public byte[] getDestinationMACAddress()
public byte[] getSourceMACAddress()
public short getEtherType()
public boolean isBroadcast()
public boolean isMulticast()
public Ethernet setDestinationMACAddress(byte[] destinationMACAddress)
destinationMACAddress
- the destinationMACAddress to setpublic Ethernet setSourceMACAddress(byte[] sourceMACAddress)
sourceMACAddress
- the sourceMACAddress to setpublic Ethernet setEtherType(short etherType)
etherType
- the etherType to setCopyright © 2019 OpenDaylight. All rights reserved.