Class LinkLayerNeighborRecord

java.lang.Object
org.netxms.client.topology.LinkLayerNeighborRecord

public class LinkLayerNeighborRecord extends Object
Link layer neighbor as reported by single data source (driver, LLDP, CDP, NDP, STP, FDB), together with result of its resolution to objects. Fields not provided by the source are empty.
  • Constructor Details

    • LinkLayerNeighborRecord

      public LinkLayerNeighborRecord(NXCPMessage msg, long baseId)
      Create record from NXCP message.
      Parameters:
      msg - NXCP message
      baseId - base field ID
  • Method Details

    • getSource

      public LinkLayerDataSource getSource()
      Get data source that reported this neighbor.
      Returns:
      data source
    • getProtocol

      public LinkLayerDiscoveryProtocol getProtocol()
      Get discovery protocol.
      Returns:
      discovery protocol
    • isPointToPoint

      public boolean isPointToPoint()
      Check if link is point-to-point.
      Returns:
      true if link is point-to-point
    • getLocalPort

      public int getLocalPort()
      Get local port as reported by the source: LLDP local port number, interface index (driver, agent LLDP, CDP, FDB), bridge port (STP), or slot in high 16 bits and port in low 16 bits (NDP).
      Returns:
      local port as reported by the source
    • getLocalPortName

      public String getLocalPortName()
      Get local interface name as reported by the source (agent LLDP only).
      Returns:
      local interface name or empty string
    • getRemoteChassisIdSubtype

      public int getRemoteChassisIdSubtype()
      Get LLDP chassis ID subtype.
      Returns:
      LLDP chassis ID subtype
    • getRemoteChassisId

      public String getRemoteChassisId()
      Get remote chassis ID in text form (MAC or IP address, text, or hex string for binary values). For STP records this is designated bridge ID as priority/MAC.
      Returns:
      remote chassis ID or empty string
    • getRemotePortIdSubtype

      public int getRemotePortIdSubtype()
      Get LLDP port ID subtype.
      Returns:
      LLDP port ID subtype
    • getRemotePortId

      public String getRemotePortId()
      Get remote port ID in text form.
      Returns:
      remote port ID or empty string
    • getRemotePortNumber

      public int getRemotePortNumber()
      Get remote port number: designated port (STP), slot in high 16 bits and port in low 16 bits (NDP), or interface index (driver).
      Returns:
      remote port number or 0
    • getRemotePortName

      public String getRemotePortName()
      Get remote port name: port description (LLDP), device port (CDP), or interface name (driver).
      Returns:
      remote port name or empty string
    • getRemoteSystemName

      public String getRemoteSystemName()
      Get remote system name: system name (LLDP), device ID (CDP), or system or DNS name (driver).
      Returns:
      remote system name or empty string
    • getRemoteSystemDescription

      public String getRemoteSystemDescription()
      Get remote system description: system description (LLDP) or platform (CDP).
      Returns:
      remote system description or empty string
    • getRemoteIpAddress

      public InetAddress getRemoteIpAddress()
      Get remote IP address (CDP, NDP, driver).
      Returns:
      remote IP address or null
    • getRemoteMacAddress

      public MacAddress getRemoteMacAddress()
      Get remote MAC address (FDB, driver), or MAC address part of designated bridge ID (STP).
      Returns:
      remote MAC address or null
    • getLocalIfIndex

      public int getLocalIfIndex()
      Get index of resolved local interface.
      Returns:
      index of resolved local interface or 0 if not resolved
    • getLocalInterfaceId

      public long getLocalInterfaceId()
      Get ID of resolved local interface object.
      Returns:
      ID of resolved local interface object or 0
    • getRemoteObjectId

      public long getRemoteObjectId()
      Get ID of node or access point this record was resolved to.
      Returns:
      remote object ID or 0 if not resolved
    • getRemoteIfIndex

      public int getRemoteIfIndex()
      Get index of resolved remote interface.
      Returns:
      index of resolved remote interface or 0
    • getRemoteInterfaceId

      public long getRemoteInterfaceId()
      Get ID of resolved remote interface object.
      Returns:
      ID of resolved remote interface object or 0
    • isSelected

      public boolean isSelected()
      Check if this record was selected into neighbor list used for topology.
      Returns:
      true if this record was selected