public class LLDP extends Packet
Modifier and Type | Field and Description |
---|---|
static byte[] |
LLDP_MULTICAST_MAC |
corrupted, hdrFieldCoordMap, hdrFieldsMap, parent, payload, payloadClass, rawPayload, writeAccess
Constructor and Description |
---|
LLDP()
Default constructor that creates the tlvList LinkedHashMap.
|
LLDP(boolean writeAccess)
Constructor that creates the tlvList LinkedHashMap and sets the write access for the same.
|
Modifier and Type | Method and Description |
---|---|
LLDP |
addCustomTLV(LLDPTLV customTLV) |
Packet |
deserialize(byte[] data,
int bitOffset,
int size)
This method deserializes the data bits obtained from the wire into the
respective header and payload which are of type Packet.
|
LLDPTLV |
getChassisId()
Returns the chassisId TLV.
|
LLDPTLV |
getCustomTLV(CustomTLVKey key) |
Iterable<LLDPTLV> |
getCustomTlvList()
Returns the customTlvList.
|
LLDPTLV |
getManagementAddress()
Return the ManagementAddress TLV.
|
Iterable<LLDPTLV> |
getOptionalTLVList()
Returns the optionalTLVList.
|
LLDPTLV |
getPortDesc()
Return the PortDesc TLV.
|
LLDPTLV |
getPortId()
Returns the portId TLV.
|
LLDPTLV |
getSystemCapabilities()
Return the SystemCapabilities TLV.
|
LLDPTLV |
getSystemDesc()
Return the SystemDesc TLV.
|
LLDPTLV |
getSystemNameId()
Returns the SystemName TLV.
|
LLDPTLV |
getTLV(String type)
Gets the full LLDPTLV.
|
LLDPTLV |
getTtl()
Return the ttl TLV.
|
byte[] |
serialize()
This method serializes the header and payload from the respective
packet class, into a single stream of bytes to be sent on the wire.
|
LLDP |
setChassisId(LLDPTLV chassisId) |
LLDP |
setManagementAddress(LLDPTLV managementAddress) |
LLDP |
setOptionalTLVList(List<LLDPTLV> optionalTLVList) |
LLDP |
setPortDesc(LLDPTLV portDesc) |
LLDP |
setPortId(LLDPTLV portId) |
LLDP |
setSystemCapabilities(LLDPTLV systemCapabilities) |
LLDP |
setSystemDesc(LLDPTLV systemDesc) |
LLDP |
setSystemNameId(LLDPTLV systemNameId) |
void |
setTLV(String type,
LLDPTLV tlv)
Sets the LLDPTLV for a type.
|
LLDP |
setTtl(LLDPTLV ttl) |
equals, getfieldnumBits, getfieldOffset, getHeaderSize, getParent, getPayload, getRawPayload, hashCode, isCorrupted, postDeserializeCustomOperation, postSerializeCustomOperation, setHeaderField, setParent, setPayload, setRawPayload, toString
public LLDP()
public LLDP(boolean writeAccess)
public LLDPTLV getTLV(String type)
type
- description of the type of TLVpublic LLDPTLV getCustomTLV(CustomTLVKey key)
public void setTLV(String type, LLDPTLV tlv)
type
- description of the type of TLVtlv
- tlv to setpublic LLDPTLV getChassisId()
public LLDPTLV getSystemNameId()
public LLDPTLV getPortId()
public LLDPTLV getTtl()
public LLDPTLV getSystemDesc()
public LLDPTLV getPortDesc()
public LLDPTLV getSystemCapabilities()
public LLDPTLV getManagementAddress()
public Packet deserialize(byte[] data, int bitOffset, int size) throws PacketException
Packet
deserialize
in class Packet
data
- - data from wire to deserializebitOffset
- bit position where packet header starts in data
arraysize
- size of packet in bitsPacketException
- if deserialization failspublic byte[] serialize() throws PacketException
Packet
serialize
in class Packet
PacketException
- if serialization failsCopyright © 2020 OpenDaylight. All rights reserved.