Packet.HeaderField
Constructor and Description |
---|
Ethernet() |
Modifier and Type | Method and Description |
---|---|
Ethernet |
clone()
Return a deep copy of this packet.
|
byte[] |
getDestinationMACAddress()
Gets the destination MAC address stored.
|
short |
getEtherType()
Gets the etherType 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 |
setEtherType(short type)
Sets the etherType for the current Ethernet object.
|
protected void |
setHeaderField(String name,
byte[] value)
Stores the value of fields read from data stream.
|
Ethernet |
setSourceMACAddress(byte[] mac)
Sets the source MAC address for the current Ethernet object.
|
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 short getEtherType()
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 Ethernet setEtherType(short type)
type
- The Ethernet type.public int getHeaderSize()
getHeaderSize
in class Packet
protected Map<String,Packet.HeaderField> getHeaderFormat()
getHeaderFormat
in class Packet
protected void setHeaderField(String name, byte[] value)
setHeaderField
in class Packet
name
- The name of the header field.value
- The value to be associated with the specified header
field. null
cannot be specified.Copyright © 2017 OpenDaylight. All rights reserved.