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​(java.lang.String name)
      • setDevice

        public void setDevice​(java.lang.String device)
      • setDomainInfo

        public void setDomainInfo​(java.lang.String domainId)
      • setChassisId

        public void setChassisId​(ChassisId chassisId)
      • setPortId

        public void setPortId​(int portNumber)
      • setPortName

        public void setPortName​(java.lang.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 java.lang.String getNameString()
      • getDeviceString

        public java.lang.String getDeviceString()
      • getDomainString

        public java.lang.String getDomainString()
      • getPortDescString

        public java.lang.String getPortDescString()
      • getPort

        public java.lang.Integer getPort()
      • getPortNameString

        public java.lang.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​(java.lang.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​(java.lang.String deviceId,
                                              ChassisId chassisId,
                                              int portNum,
                                              java.lang.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​(java.lang.String deviceId,
                                        ChassisId chassisId,
                                        int portNum,
                                        java.lang.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​(java.lang.String deviceId,
                                              ChassisId chassisId,
                                              int portNum,
                                              java.lang.String portDesc,
                                              java.lang.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,
                                     java.lang.String secret,
                                     long maxDelay)