blob: 5f646a400f7999a299928949f08de7e76f146921 [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
Jonathan Harte93aed42013-12-05 18:39:50 -08005import net.floodlightcontroller.core.module.IFloodlightService;
Jonathan Hart08ee8522013-09-22 17:34:43 +12006import net.floodlightcontroller.util.MACAddress;
Jonathan Hart382623d2014-04-03 09:48:11 -07007import net.onrc.onos.apps.bgproute.Interface;
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 Harte93aed42013-12-05 18:39:50 -080014public interface IConfigInfoService extends IFloodlightService {
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}