blob: 41455927f798646c40f66e66a52d3cb223441695 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001/**
2* Copyright 2011, Big Switch Networks, Inc.
3* Originally created by David Erickson, Stanford University
4*
5* Licensed under the Apache License, Version 2.0 (the "License"); you may
6* not use this file except in compliance with the License. You may obtain
7* a copy of the License at
8*
9* http://www.apache.org/licenses/LICENSE-2.0
10*
11* Unless required by applicable law or agreed to in writing, software
12* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14* License for the specific language governing permissions and limitations
15* under the License.
16**/
17
18package net.floodlightcontroller.linkdiscovery;
19
20import java.util.Map;
21import java.util.Set;
22
23import net.floodlightcontroller.core.module.IFloodlightService;
24import net.floodlightcontroller.routing.Link;
25import net.floodlightcontroller.topology.NodePortTuple;
26
27
28public interface ILinkDiscoveryService extends IFloodlightService {
29 /**
30 * Retrieves a map of all known link connections between OpenFlow switches
31 * and the associated info (valid time, port states) for the link.
32 */
33 public Map<Link, LinkInfo> getLinks();
34
35 /**
36 * Returns link type of a given link
37 * @param info
38 * @return
39 */
40 public ILinkDiscovery.LinkType getLinkType(Link lt, LinkInfo info);
41
42 /**
43 * Returns an unmodifiable map from switch id to a set of all links with it
44 * as an endpoint.
45 */
46 public Map<Long, Set<Link>> getSwitchLinks();
47
48 /**
49 * Adds a listener to listen for ILinkDiscoveryService messages
50 * @param listener The listener that wants the notifications
51 */
52 public void addListener(ILinkDiscoveryListener listener);
53
54 /**
55 * Retrieves a set of all switch ports on which lldps are suppressed.
56 */
57 public Set<NodePortTuple> getSuppressLLDPsInfo();
58
59 /**
60 * Adds a switch port to suppress lldp set
61 */
62 public void AddToSuppressLLDPs(long sw, short port);
63
64 /**
65 * Removes a switch port from suppress lldp set
66 */
67 public void RemoveFromSuppressLLDPs(long sw, short port);
68
69 /**
70 * Get the set of quarantined ports on a switch
71 */
72 public Set<Short> getQuarantinedPorts(long sw);
73
74 /**
75 * Get the status of auto port fast feature.
76 */
77 public boolean isAutoPortFastFeature();
78
79 /**
80 * Set the state for auto port fast feature.
81 * @param autoPortFastFeature
82 */
83 public void setAutoPortFastFeature(boolean autoPortFastFeature);
84}