Package org.onlab.packet
Class LLDP
- java.lang.Object
 - 
- org.onlab.packet.BasePacket
 - 
- org.onlab.packet.LLDP
 
 
 
- 
- All Implemented Interfaces:
 IPacket
- Direct Known Subclasses:
 ONOSLLDP
public class LLDP extends BasePacket
Representation of an LLDP Packet. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static shortCHASSIS_TLV_SIZEstatic byteCHASSIS_TLV_SUBTYPEstatic byteCHASSIS_TLV_TYPEprotected LLDPTLVchassisIdprotected shortethTypeprotected java.util.List<LLDPTLV>optionalTLVListstatic bytePORT_TLV_COMPONENT_SUBTYPEstatic bytePORT_TLV_INTERFACE_NAME_SUBTYPEstatic shortPORT_TLV_SIZEstatic bytePORT_TLV_TYPEprotected LLDPTLVportIdprotected LLDPTLVttlstatic shortTTL_TLV_SIZEstatic byteTTL_TLV_TYPE- 
Fields inherited from class org.onlab.packet.BasePacket
parent, payload 
 - 
 
- 
Constructor Summary
Constructors Constructor Description LLDP() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LLDPaddOptionalTLV(LLDPTLV lldptlv)Adds additional TLV to optionalTLVList.static Deserializer<LLDP>deserializer()Deserializer function for LLDP packets.booleanequals(java.lang.Object obj)LLDPTLVgetChassisId()java.util.List<LLDPTLV>getOptionalTLVList()LLDPTLVgetPortId()LLDPTLVgetTtl()inthashCode()byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.LLDPsetChassisId(LLDPTLV chassis)LLDPsetOptionalTLVList(java.util.List<LLDPTLV> optionalTLVList)LLDPsetPortId(LLDPTLV portId)LLDPsetTtl(LLDPTLV ttl)java.lang.StringtoString()- 
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload 
 - 
 
 - 
 
- 
- 
Field Detail
- 
CHASSIS_TLV_TYPE
public static final byte CHASSIS_TLV_TYPE
- See Also:
 - Constant Field Values
 
 
- 
CHASSIS_TLV_SIZE
public static final short CHASSIS_TLV_SIZE
- See Also:
 - Constant Field Values
 
 
- 
CHASSIS_TLV_SUBTYPE
public static final byte CHASSIS_TLV_SUBTYPE
- See Also:
 - Constant Field Values
 
 
- 
PORT_TLV_TYPE
public static final byte PORT_TLV_TYPE
- See Also:
 - Constant Field Values
 
 
- 
PORT_TLV_SIZE
public static final short PORT_TLV_SIZE
- See Also:
 - Constant Field Values
 
 
- 
PORT_TLV_COMPONENT_SUBTYPE
public static final byte PORT_TLV_COMPONENT_SUBTYPE
- See Also:
 - Constant Field Values
 
 
- 
PORT_TLV_INTERFACE_NAME_SUBTYPE
public static final byte PORT_TLV_INTERFACE_NAME_SUBTYPE
- See Also:
 - Constant Field Values
 
 
- 
TTL_TLV_TYPE
public static final byte TTL_TLV_TYPE
- See Also:
 - Constant Field Values
 
 
- 
TTL_TLV_SIZE
public static final short TTL_TLV_SIZE
- See Also:
 - Constant Field Values
 
 
- 
chassisId
protected LLDPTLV chassisId
 
- 
portId
protected LLDPTLV portId
 
- 
ttl
protected LLDPTLV ttl
 
- 
optionalTLVList
protected java.util.List<LLDPTLV> optionalTLVList
 
- 
ethType
protected short ethType
 
 - 
 
- 
Method Detail
- 
getChassisId
public LLDPTLV getChassisId()
- Returns:
 - the chassisId
 
 
- 
setChassisId
public LLDP setChassisId(LLDPTLV chassis)
- Parameters:
 chassis- the chassisId to set- Returns:
 - this
 
 
- 
getPortId
public LLDPTLV getPortId()
- Returns:
 - the portId
 
 
- 
setPortId
public LLDP setPortId(LLDPTLV portId)
- Parameters:
 portId- the portId to set- Returns:
 - this
 
 
- 
getTtl
public LLDPTLV getTtl()
- Returns:
 - the ttl
 
 
- 
getOptionalTLVList
public java.util.List<LLDPTLV> getOptionalTLVList()
- Returns:
 - the optionalTLVList
 
 
- 
setOptionalTLVList
public LLDP setOptionalTLVList(java.util.List<LLDPTLV> optionalTLVList)
- Parameters:
 optionalTLVList- the optionalTLVList to set- Returns:
 - this
 
 
- 
addOptionalTLV
public LLDP addOptionalTLV(LLDPTLV lldptlv)
Adds additional TLV to optionalTLVList.- Parameters:
 lldptlv- the optional TLV to be added- Returns:
 - this
 
 
- 
serialize
public byte[] serialize()
Description copied from interface:IPacketSets all payloads parent packet if applicable, then serializes this packet and all payloads.- Returns:
 - a byte[] containing this packet and payloads
 
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classBasePacket
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classBasePacket
 
- 
deserializer
public static Deserializer<LLDP> deserializer()
Deserializer function for LLDP packets.- Returns:
 - deserializer function
 
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -