blob: 7bbf4836826080643fe941b15cc016c65a4227f2 [file] [log] [blame]
Jonathan Hartebba1e12013-10-29 11:37:02 -07001package net.onrc.onos.ofcontroller.core.config;
Jonathan Hart08ee8522013-09-22 17:34:43 +12002
3import java.net.InetAddress;
4
5import net.floodlightcontroller.util.MACAddress;
Jonathan Hartebba1e12013-10-29 11:37:02 -07006import net.onrc.onos.ofcontroller.bgproute.Interface;
Jonathan Harta8887642013-10-28 13:46:54 -07007import net.onrc.onos.ofcontroller.core.module.IOnosService;
Jonathan Hart08ee8522013-09-22 17:34:43 +12008
9/**
10 * Provides information about the layer 3 properties of the network.
11 * This is based on IP addresses configured on ports in the network.
12 *
13 */
Jonathan Harta8887642013-10-28 13:46:54 -070014public interface IConfigInfoService extends IOnosService {
Jonathan Hart08ee8522013-09-22 17:34:43 +120015 public boolean isInterfaceAddress(InetAddress address);
16 public boolean inConnectedNetwork(InetAddress address);
17 public boolean fromExternalNetwork(long inDpid, short inPort);
18
19 /**
20 * Retrieves the {@link Interface} object for the interface that packets
21 * to dstIpAddress will be sent out of. Returns null if dstIpAddress is not
22 * in a directly connected network, or if no interfaces are configured.
23 * @param dstIpAddress Destination IP address that we want to match to
24 * an outgoing interface
25 * @return The {@link Interface} object if found, null if not
26 */
27 public Interface getOutgoingInterface(InetAddress dstIpAddress);
28
29 /**
30 * Returns whether this controller has a layer 3 configuration
31 * (i.e. interfaces and IP addresses)
32 * @return True if IP addresses are configured, false if not
33 */
34 public boolean hasLayer3Configuration();
35
36 public MACAddress getRouterMacAddress();
Jonathan Harta8887642013-10-28 13:46:54 -070037
38 /**
39 * We currently have basic vlan support for the situation when the contr
40 * is running within a single vlan. In this case, packets sent from the
41 * controller (e.g. ARP) need to be tagged with that vlan.
42 * @return The vlan id configured in the config file,
43 * or 0 if no vlan is configured.
44 */
45 public short getVlan();
46
47
Jonathan Hart08ee8522013-09-22 17:34:43 +120048}