Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 2 | * Copyright 2014 Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame^] | 16 | package org.onosproject.sdnip; |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 17 | |
| 18 | import java.util.Set; |
| 19 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame^] | 20 | import org.onosproject.net.ConnectPoint; |
| 21 | import org.onosproject.sdnip.config.Interface; |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 22 | import org.onlab.packet.IpAddress; |
| 23 | |
| 24 | /** |
| 25 | * Provides information about the interfaces in the network. |
| 26 | */ |
| 27 | public interface InterfaceService { |
| 28 | /** |
| 29 | * Retrieves the entire set of interfaces in the network. |
| 30 | * |
| 31 | * @return the set of interfaces |
| 32 | */ |
| 33 | Set<Interface> getInterfaces(); |
| 34 | |
| 35 | /** |
| 36 | * Retrieves the interface associated with the given connect point. |
| 37 | * |
| 38 | * @param connectPoint the connect point to retrieve interface information |
| 39 | * for |
| 40 | * @return the interface |
| 41 | */ |
| 42 | Interface getInterface(ConnectPoint connectPoint); |
| 43 | |
| 44 | /** |
| 45 | * Retrieves the interface that matches the given IP address. Matching |
| 46 | * means that the IP address is in one of the interface's assigned subnets. |
| 47 | * |
| 48 | * @param ipAddress IP address to match |
| 49 | * @return the matching interface |
| 50 | */ |
| 51 | Interface getMatchingInterface(IpAddress ipAddress); |
| 52 | } |