public class LLDP extends Packet
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
LLDPMulticastMac |
corrupted, hdrFieldCoordMap, hdrFieldsMap, logger, 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() |
LLDPTLV |
getCustomTLV(CustomTLVKey key) |
Iterable<LLDPTLV> |
getCustomTlvList() |
Iterable<LLDPTLV> |
getOptionalTLVList() |
LLDPTLV |
getPortId() |
LLDPTLV |
getSystemNameId() |
LLDPTLV |
getTLV(String type) |
LLDPTLV |
getTtl() |
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 |
setOptionalTLVList(List<LLDPTLV> optionalTLVList) |
LLDP |
setPortId(LLDPTLV portId) |
LLDP |
setSystemNameId(LLDPTLV systemNameId) |
void |
setTLV(String type,
LLDPTLV tlv) |
LLDP |
setTtl(LLDPTLV ttl) |
equals, getfieldnumBits, getfieldOffset, getHeaderSize, getParent, getPayload, getRawPayload, hashCode, isCorrupted, postDeserializeCustomOperation, postSerializeCustomOperation, setHeaderField, setParent, setPayload, setRawPayload, toStringpublic LLDP()
public LLDP(boolean writeAccess)
public LLDPTLV getTLV(String type)
String - - description of the type of TLVpublic LLDPTLV getCustomTLV(CustomTLVKey key)
public void setTLV(String type, LLDPTLV tlv)
String - - description of the type of TLVLLDPTLV - - tlv to setpublic LLDPTLV getChassisId()
public LLDP setChassisId(LLDPTLV chassisId)
LLDPTLV - - the chassisId to setpublic LLDPTLV getSystemNameId()
public LLDP setSystemNameId(LLDPTLV systemNameId)
LLDPTLV - - the chassisId to setpublic LLDPTLV getPortId()
public LLDP setPortId(LLDPTLV portId)
LLDPTLV - - the portId to setpublic LLDPTLV getTtl()
public LLDP setOptionalTLVList(List<LLDPTLV> optionalTLVList)
optionalTLVList - the optionalTLVList to setpublic LLDP addCustomTLV(LLDPTLV customTLV)
customTLVList - the list of custom TLVs to setpublic Packet deserialize(byte[] data, int bitOffset, int size) throws PacketException
Packetdeserialize in class PacketPacketExceptionpublic byte[] serialize()
throws PacketException
Packetserialize in class PacketPacketExceptionCopyright © 2015. All Rights Reserved.