blob: c5543a209aa368243d9cb7424ab214de131e90ee [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001/**
Ray Milkey269ffb92014-04-03 14:43:30 -07002 * 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 **/
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080017
Jonathan Hart23701d12014-04-03 10:45:48 -070018package net.onrc.onos.core.linkdiscovery;
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080019
20import java.util.Map;
21import java.util.Set;
22
23import net.floodlightcontroller.core.module.IFloodlightService;
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080024
25
26public interface ILinkDiscoveryService extends IFloodlightService {
27 /**
28 * Retrieves a map of all known link connections between OpenFlow switches
29 * and the associated info (valid time, port states) for the link.
30 */
31 public Map<Link, LinkInfo> getLinks();
32
33 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070034 * Returns link type of a given link.
Ray Milkey269ffb92014-04-03 14:43:30 -070035 *
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080036 * @param info
37 * @return
38 */
39 public ILinkDiscovery.LinkType getLinkType(Link lt, LinkInfo info);
40
41 /**
Ray Milkey269ffb92014-04-03 14:43:30 -070042 * Returns an unmodifiable map from switch id to a set of all links with it
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080043 * as an endpoint.
44 */
45 public Map<Long, Set<Link>> getSwitchLinks();
46
47 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070048 * Adds a listener to listen for ILinkDiscoveryService messages.
Ray Milkey269ffb92014-04-03 14:43:30 -070049 *
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080050 * @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 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070060 * Adds a switch port to suppress lldp set.
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080061 */
Pavlin Radoslavov7d21c0a2014-04-10 10:32:59 -070062 public void addToSuppressLLDPs(long sw, short port);
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080063
64 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070065 * Removes a switch port from suppress lldp set.
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080066 */
Pavlin Radoslavov7d21c0a2014-04-10 10:32:59 -070067 public void removeFromSuppressLLDPs(long sw, short port);
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080068
69 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070070 * Get the set of quarantined ports on a switch.
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080071 */
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.
Ray Milkey269ffb92014-04-03 14:43:30 -070081 *
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080082 * @param autoPortFastFeature
83 */
84 public void setAutoPortFastFeature(boolean autoPortFastFeature);
85}