Jonathan Hart | 08ee852 | 2013-09-22 17:34:43 +1200 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.bgproute; |
| 2 | |
| 3 | import java.net.InetAddress; |
| 4 | |
| 5 | import net.floodlightcontroller.util.MACAddress; |
| 6 | |
| 7 | /** |
| 8 | * Provides information about the layer 3 properties of the network. |
| 9 | * This is based on IP addresses configured on ports in the network. |
| 10 | * |
| 11 | */ |
| 12 | public interface ILayer3InfoService { |
Jonathan Hart | 08ee852 | 2013-09-22 17:34:43 +1200 | [diff] [blame] | 13 | public boolean isInterfaceAddress(InetAddress address); |
| 14 | public boolean inConnectedNetwork(InetAddress address); |
| 15 | public boolean fromExternalNetwork(long inDpid, short inPort); |
| 16 | |
| 17 | /** |
| 18 | * Retrieves the {@link Interface} object for the interface that packets |
| 19 | * to dstIpAddress will be sent out of. Returns null if dstIpAddress is not |
| 20 | * in a directly connected network, or if no interfaces are configured. |
| 21 | * @param dstIpAddress Destination IP address that we want to match to |
| 22 | * an outgoing interface |
| 23 | * @return The {@link Interface} object if found, null if not |
| 24 | */ |
| 25 | public Interface getOutgoingInterface(InetAddress dstIpAddress); |
| 26 | |
| 27 | /** |
| 28 | * Returns whether this controller has a layer 3 configuration |
| 29 | * (i.e. interfaces and IP addresses) |
| 30 | * @return True if IP addresses are configured, false if not |
| 31 | */ |
| 32 | public boolean hasLayer3Configuration(); |
| 33 | |
| 34 | public MACAddress getRouterMacAddress(); |
| 35 | } |