blob: 00ddd68ace97daa0b974c8f3cc126dc76b03e6b1 [file] [log] [blame]
Jonathan Hart08ee8522013-09-22 17:34:43 +12001package net.onrc.onos.ofcontroller.bgproute;
2
3import java.net.InetAddress;
4
5import 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 */
12public interface ILayer3InfoService {
Jonathan Hart08ee8522013-09-22 17:34:43 +120013 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}