blob: 0f14dd6e863585dbb7e16d31f70a524fdeece34b [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 {
13 //public Collection<Interface> getInterfaces();
14 public boolean isInterfaceAddress(InetAddress address);
15 public boolean inConnectedNetwork(InetAddress address);
16 public boolean fromExternalNetwork(long inDpid, short inPort);
17
18 /**
19 * Retrieves the {@link Interface} object for the interface that packets
20 * to dstIpAddress will be sent out of. Returns null if dstIpAddress is not
21 * in a directly connected network, or if no interfaces are configured.
22 * @param dstIpAddress Destination IP address that we want to match to
23 * an outgoing interface
24 * @return The {@link Interface} object if found, null if not
25 */
26 public Interface getOutgoingInterface(InetAddress dstIpAddress);
27
28 /**
29 * Returns whether this controller has a layer 3 configuration
30 * (i.e. interfaces and IP addresses)
31 * @return True if IP addresses are configured, false if not
32 */
33 public boolean hasLayer3Configuration();
34
35 public MACAddress getRouterMacAddress();
36}