Class LLDP

  • All Implemented Interfaces:
    IPacket
    Direct Known Subclasses:
    ONOSLLDP

    public class LLDP
    extends BasePacket
    Representation of an LLDP Packet.
    • Constructor Detail

      • LLDP

        public LLDP()
    • 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
      • setTtl

        public LLDP setTtl​(LLDPTLV ttl)
        Parameters:
        ttl - the ttl to set
        Returns:
        this
      • getOptionalTLVList

        public List<LLDPTLV> getOptionalTLVList()
        Returns:
        the optionalTLVList
      • setOptionalTLVList

        public LLDP setOptionalTLVList​(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: IPacket
        Sets all payloads parent packet if applicable, then serializes this packet and all payloads.
        Returns:
        a byte[] containing this packet and payloads
      • deserializer

        public static Deserializer<LLDP> deserializer()
        Deserializer function for LLDP packets.
        Returns:
        deserializer function