net.floodlightcontroller.linkdiscovery
Interface ILinkDiscoveryService

All Superinterfaces:
IFloodlightService
All Known Implementing Classes:
LinkDiscoveryManager

public interface ILinkDiscoveryService
extends IFloodlightService


Method Summary
 void addListener(ILinkDiscoveryListener listener)
          Adds a listener to listen for ILinkDiscoveryService messages
 void addMACToIgnoreList(long mac, int ignoreBits)
          addMACToIgnoreList is a service provided by LinkDiscovery to ignore certain packets early in the packet-in processing chain.
 void AddToSuppressLLDPs(long sw, int port)
          Adds a switch port to suppress lldp set.
 OFPacketOut generateLLDPMessage(long sw, int port, boolean isStandard, boolean isReverse)
          Returns OFPacketOut which contains the LLDP data corresponding to switchport (sw, port).
 LinkInfo getLinkInfo(Link link)
          Retrieves the link info for a given link
 java.util.Map<Link,LinkInfo> getLinks()
          Retrieves a map of all known link connections between OpenFlow switches and the associated info (valid time, port states) for the link.
 ILinkDiscovery.LinkType getLinkType(Link lt, LinkInfo info)
          Returns link type of a given link
 java.util.Map<NodePortTuple,java.util.Set<Link>> getPortLinks()
          Get the map of node-port tuples from link DB
 java.util.Set<java.lang.Integer> getQuarantinedPorts(long sw)
          Get the set of quarantined ports on a switch
 java.util.Set<NodePortTuple> getSuppressLLDPsInfo()
          Retrieves a set of all switch ports on which lldps are suppressed.
 java.util.Map<java.lang.Long,java.util.Set<Link>> getSwitchLinks()
          Returns an unmodifiable map from switch id to a set of all links with it as an endpoint.
 boolean isAutoPortFastFeature()
          Get the status of auto port fast feature.
 boolean isTunnelPort(long sw, int port)
          Returns if a given switchport is a tunnel endpoint or not
 void RemoveFromSuppressLLDPs(long sw, int port)
          Removes a switch port from suppress lldp set
 void setAutoPortFastFeature(boolean autoPortFastFeature)
          Set the state for auto port fast feature.
 

Method Detail

isTunnelPort

boolean isTunnelPort(long sw,
                     int port)
Returns if a given switchport is a tunnel endpoint or not


getLinks

java.util.Map<Link,LinkInfo> getLinks()
Retrieves a map of all known link connections between OpenFlow switches and the associated info (valid time, port states) for the link.


getLinkInfo

LinkInfo getLinkInfo(Link link)
Retrieves the link info for a given link

Parameters:
link - link for which the link info should be returned
Returns:
the link info for the given link

getLinkType

ILinkDiscovery.LinkType getLinkType(Link lt,
                                    LinkInfo info)
Returns link type of a given link

Parameters:
info -
Returns:

generateLLDPMessage

OFPacketOut generateLLDPMessage(long sw,
                                int port,
                                boolean isStandard,
                                boolean isReverse)
Returns OFPacketOut which contains the LLDP data corresponding to switchport (sw, port). PacketOut does not contain actions. PacketOut length includes the minimum length and data length.


getSwitchLinks

java.util.Map<java.lang.Long,java.util.Set<Link>> getSwitchLinks()
Returns an unmodifiable map from switch id to a set of all links with it as an endpoint.


addListener

void addListener(ILinkDiscoveryListener listener)
Adds a listener to listen for ILinkDiscoveryService messages

Parameters:
listener - The listener that wants the notifications

getSuppressLLDPsInfo

java.util.Set<NodePortTuple> getSuppressLLDPsInfo()
Retrieves a set of all switch ports on which lldps are suppressed.


AddToSuppressLLDPs

void AddToSuppressLLDPs(long sw,
                        int port)
Adds a switch port to suppress lldp set. LLDPs and BDDPs will not be sent out, and if any are received on this port then they will be dropped.


RemoveFromSuppressLLDPs

void RemoveFromSuppressLLDPs(long sw,
                             int port)
Removes a switch port from suppress lldp set


getQuarantinedPorts

java.util.Set<java.lang.Integer> getQuarantinedPorts(long sw)
Get the set of quarantined ports on a switch


isAutoPortFastFeature

boolean isAutoPortFastFeature()
Get the status of auto port fast feature.


setAutoPortFastFeature

void setAutoPortFastFeature(boolean autoPortFastFeature)
Set the state for auto port fast feature.

Parameters:
autoPortFastFeature -

getPortLinks

java.util.Map<NodePortTuple,java.util.Set<Link>> getPortLinks()
Get the map of node-port tuples from link DB


addMACToIgnoreList

void addMACToIgnoreList(long mac,
                        int ignoreBits)
addMACToIgnoreList is a service provided by LinkDiscovery to ignore certain packets early in the packet-in processing chain. Since LinkDiscovery is first in the packet-in processing pipeline, it can efficiently drop these packets. Currently these packets are identified only by their source MAC address. Add a MAC address range to ignore list. All packet ins from this range will be dropped - use with care!

Parameters:
mac - The base MAC address that is to be ignored
ignoreBits - The number of LSBs to ignore. A value of 0 will add only one MAC address 'mac' to ignore list. A value of 48 will add ALL MAC addresses to the ignore list. This will cause a drop of ALL packet ins.