Class ONOSLLDP

  • All Implemented Interfaces:
    IPacket

    public class ONOSLLDP
    extends LLDP
    ONOS LLDP containing organizational TLV for ONOS device discovery.
    • Constructor Detail

      • ONOSLLDP

        public ONOSLLDP​(byte... subtype)
    • Method Detail

      • setName

        public void setName​(String name)
      • setDevice

        public void setDevice​(String device)
      • setDomainInfo

        public void setDomainInfo​(String domainId)
      • setChassisId

        public void setChassisId​(ChassisId chassisId)
      • setPortId

        public void setPortId​(int portNumber)
      • setPortName

        public void setPortName​(String portName)
      • setTimestamp

        public void setTimestamp​(long timestamp)
      • setSig

        public void setSig​(byte[] sig)
      • getDomainTLV

        public LLDPOrganizationalTLV getDomainTLV()
        Gets the TLV associated with remote probing. This TLV will be null if remote probing is disabled.
        Returns:
        A TLV containing domain ID, or null.
      • getPortDescTLV

        public LLDPTLV getPortDescTLV()
      • getNameString

        public String getNameString()
      • getDeviceString

        public String getDeviceString()
      • getDomainString

        public String getDomainString()
      • getPortDescString

        public String getPortDescString()
      • getPort

        public Integer getPort()
      • getPortNameString

        public String getPortNameString()
      • getChassisIdByMac

        public MacAddress getChassisIdByMac()
      • getTtlBySeconds

        public short getTtlBySeconds()
      • getTimestamp

        public long getTimestamp()
      • getSig

        public byte[] getSig()
      • parseONOSLLDP

        public static ONOSLLDP parseONOSLLDP​(Ethernet eth)
        Given an ethernet packet, determines if this is an LLDP from ONOS and returns the device the LLDP came from.
        Parameters:
        eth - an ethernet packet
        Returns:
        a the lldp packet or null
      • parseLLDP

        public static ONOSLLDP parseLLDP​(Ethernet eth)
        Given an ethernet packet, returns the device the LLDP came from.
        Parameters:
        eth - an ethernet packet
        Returns:
        a the lldp packet or null
      • onosLLDP

        @Deprecated
        public static ONOSLLDP onosLLDP​(String deviceId,
                                        ChassisId chassisId,
                                        int portNum)
        Deprecated.
        since 1.15. Insecure, do not use.
        Creates a link probe for link discovery/verification.
        Parameters:
        deviceId - The device ID as a String
        chassisId - The chassis ID of the device
        portNum - Port number of port to send probe out of
        Returns:
        ONOSLLDP probe message
      • onosSecureLLDP

        public static ONOSLLDP onosSecureLLDP​(String deviceId,
                                              ChassisId chassisId,
                                              int portNum,
                                              String secret)
        Creates a link probe for link discovery/verification.
        Parameters:
        deviceId - The device ID as a String
        chassisId - The chassis ID of the device
        portNum - Port number of port to send probe out of
        secret - LLDP secret
        Returns:
        ONOSLLDP probe message
      • onosLLDP

        @Deprecated
        public static ONOSLLDP onosLLDP​(String deviceId,
                                        ChassisId chassisId,
                                        int portNum,
                                        String portDesc)
        Deprecated.
        since 1.15. Insecure, do not use.
        Creates a link probe for link discovery/verification.
        Parameters:
        deviceId - The device ID as a String
        chassisId - The chassis ID of the device
        portNum - Port number of port to send probe out of
        portDesc - Port description of port to send probe out of
        Returns:
        ONOSLLDP probe message
      • onosSecureLLDP

        public static ONOSLLDP onosSecureLLDP​(String deviceId,
                                              ChassisId chassisId,
                                              int portNum,
                                              String portDesc,
                                              String secret)
        Creates a link probe for link discovery/verification.
        Parameters:
        deviceId - The device ID as a String
        chassisId - The chassis ID of the device
        portNum - Port number of port to send probe out of
        portDesc - Port description of port to send probe out of
        secret - LLDP secret
        Returns:
        ONOSLLDP probe message
      • verify

        public static boolean verify​(ONOSLLDP probe,
                                     String secret,
                                     long maxDelay)