Class Ethernet
java.lang.Object
org.opendaylight.openflowplugin.libraries.liblldp.Packet
org.opendaylight.openflowplugin.libraries.liblldp.Ethernet
Class that represents the Ethernet frame objects.
-
Field Summary
Fields inherited from class org.opendaylight.openflowplugin.libraries.liblldp.Packet
corrupted, hdrFieldCoordMap, hdrFieldsMap, parent, payload, payloadFactory, rawPayload, writeAccess
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Gets the destination MAC address stored.short
Gets the etherType stored.byte[]
Gets the source MAC address stored.boolean
boolean
setDestinationMACAddress
(byte[] destinationMACAddress) Sets the destination MAC address for the current Ethernet object instance.setEtherType
(short etherType) Sets the etherType for the current Ethernet object instance.void
setHeaderField
(String headerField, byte[] readValue) setSourceMACAddress
(byte[] sourceMACAddress) Sets the source MAC address for the current Ethernet object instance.Methods inherited from class org.opendaylight.openflowplugin.libraries.liblldp.Packet
deserialize, equals, getfieldnumBits, getfieldOffset, getHeaderSize, getParent, getPayload, getRawPayload, hashCode, isCorrupted, postDeserializeCustomOperation, postSerializeCustomOperation, serialize, setParent, setPayload, setRawPayload, toString
-
Constructor Details
-
Ethernet
public Ethernet()Default constructor that creates and sets the HashMap. -
Ethernet
public Ethernet(boolean writeAccess) Constructor that sets the access level for the packet and creates and sets the HashMap.
-
-
Method Details
-
setHeaderField
- Overrides:
setHeaderField
in classPacket
-
getDestinationMACAddress
public byte[] getDestinationMACAddress()Gets the destination MAC address stored.- Returns:
- byte[] - the destinationMACAddress
-
getSourceMACAddress
public byte[] getSourceMACAddress()Gets the source MAC address stored.- Returns:
- byte[] - the sourceMACAddress
-
getEtherType
public short getEtherType()Gets the etherType stored.- Returns:
- short - the etherType
-
isBroadcast
public boolean isBroadcast() -
isMulticast
public boolean isMulticast() -
setDestinationMACAddress
Sets the destination MAC address for the current Ethernet object instance.- Parameters:
destinationMACAddress
- the destinationMACAddress to set
-
setSourceMACAddress
Sets the source MAC address for the current Ethernet object instance.- Parameters:
sourceMACAddress
- the sourceMACAddress to set
-
setEtherType
Sets the etherType for the current Ethernet object instance.- Parameters:
etherType
- the etherType to set
-