blob: 6df930ec5d79f729993b04d6c833cd6239152db1 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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 Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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 Vachuska781d18b2014-10-27 10:31:25 -070015 */
Jonathan Hartdc711bd2014-10-15 11:24:23 -070016package org.onlab.onos.sdnip;
17
18import java.util.Set;
19
20import org.onlab.onos.net.ConnectPoint;
21import org.onlab.onos.sdnip.config.Interface;
22import org.onlab.packet.IpAddress;
23
24/**
25 * Provides information about the interfaces in the network.
26 */
27public 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}