Class Ethernet
- java.lang.Object
-
- org.opendaylight.openflowplugin.libraries.liblldp.Packet
-
- org.opendaylight.openflowplugin.libraries.liblldp.Ethernet
-
public class Ethernet extends Packet
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
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
-
-
-
-
Method Detail
-
setHeaderField
public void setHeaderField(String headerField, byte[] readValue)
- 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
public Ethernet setDestinationMACAddress(byte[] destinationMACAddress)
Sets the destination MAC address for the current Ethernet object instance.- Parameters:
destinationMACAddress
- the destinationMACAddress to set
-
setSourceMACAddress
public Ethernet setSourceMACAddress(byte[] sourceMACAddress)
Sets the source MAC address for the current Ethernet object instance.- Parameters:
sourceMACAddress
- the sourceMACAddress to set
-
setEtherType
public Ethernet setEtherType(short etherType)
Sets the etherType for the current Ethernet object instance.- Parameters:
etherType
- the etherType to set
-
-