Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | /** |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 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 | **/ |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 17 | |
Jonathan Hart | 23701d1 | 2014-04-03 10:45:48 -0700 | [diff] [blame] | 18 | package net.onrc.onos.core.linkdiscovery; |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 19 | |
| 20 | import java.util.Map; |
| 21 | import java.util.Set; |
| 22 | |
| 23 | import net.floodlightcontroller.core.module.IFloodlightService; |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 24 | |
| 25 | |
| 26 | public 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 Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 34 | * Returns link type of a given link. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 35 | * |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 36 | * @param info |
Jonathan Hart | 99ff20a | 2014-06-15 16:53:00 -0700 | [diff] [blame] | 37 | * @return the link type |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 38 | */ |
| 39 | public ILinkDiscovery.LinkType getLinkType(Link lt, LinkInfo info); |
| 40 | |
| 41 | /** |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 42 | * Returns an unmodifiable map from switch id to a set of all links with it |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 43 | * as an endpoint. |
| 44 | */ |
| 45 | public Map<Long, Set<Link>> getSwitchLinks(); |
| 46 | |
| 47 | /** |
Ray Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 48 | * Adds a listener to listen for ILinkDiscoveryService messages. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 49 | * |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 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 | /** |
Ray Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 60 | * Adds a switch port to suppress lldp set. |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 61 | */ |
Pavlin Radoslavov | 7d21c0a | 2014-04-10 10:32:59 -0700 | [diff] [blame] | 62 | public void addToSuppressLLDPs(long sw, short port); |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 63 | |
| 64 | /** |
Ray Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 65 | * Removes a switch port from suppress lldp set. |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 66 | */ |
Pavlin Radoslavov | 7d21c0a | 2014-04-10 10:32:59 -0700 | [diff] [blame] | 67 | public void removeFromSuppressLLDPs(long sw, short port); |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 68 | |
| 69 | /** |
Ray Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 70 | * Get the set of quarantined ports on a switch. |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 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. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 81 | * |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 82 | * @param autoPortFastFeature |
| 83 | */ |
| 84 | public void setAutoPortFastFeature(boolean autoPortFastFeature); |
| 85 | } |