Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.sdnip; |
| 2 | |
| 3 | import java.util.Set; |
| 4 | |
| 5 | import org.onlab.onos.net.ConnectPoint; |
| 6 | import org.onlab.onos.sdnip.config.Interface; |
| 7 | import org.onlab.packet.IpAddress; |
| 8 | |
| 9 | /** |
| 10 | * Provides information about the interfaces in the network. |
| 11 | */ |
| 12 | public interface InterfaceService { |
| 13 | /** |
| 14 | * Retrieves the entire set of interfaces in the network. |
| 15 | * |
| 16 | * @return the set of interfaces |
| 17 | */ |
| 18 | Set<Interface> getInterfaces(); |
| 19 | |
| 20 | /** |
| 21 | * Retrieves the interface associated with the given connect point. |
| 22 | * |
| 23 | * @param connectPoint the connect point to retrieve interface information |
| 24 | * for |
| 25 | * @return the interface |
| 26 | */ |
| 27 | Interface getInterface(ConnectPoint connectPoint); |
| 28 | |
| 29 | /** |
| 30 | * Retrieves the interface that matches the given IP address. Matching |
| 31 | * means that the IP address is in one of the interface's assigned subnets. |
| 32 | * |
| 33 | * @param ipAddress IP address to match |
| 34 | * @return the matching interface |
| 35 | */ |
| 36 | Interface getMatchingInterface(IpAddress ipAddress); |
| 37 | } |