blob: a500ff4c235f856e0c516a802494a335417c57f9 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
Thomas Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Thomas Vachuska781d18b2014-10-27 10:31:25 -070015 */
Jonathan Hart2da1e602015-02-18 19:09:24 -080016package org.onosproject.routing.config;
Jonathan Hartdc711bd2014-10-15 11:24:23 -070017
Pavlin Radoslavov2020eac2015-01-06 17:26:10 -080018import org.onlab.packet.IpAddress;
Pingping Line28ae4c2015-03-13 11:37:03 -070019import org.onlab.packet.IpPrefix;
Pingping Linc9e16bf2015-04-10 14:42:41 -070020import org.onlab.packet.MacAddress;
Brian O'Connorabafb502014-12-02 22:26:20 -080021import org.onosproject.net.ConnectPoint;
Jonathan Hart90a02c22015-02-13 11:52:07 -080022
23import java.util.Map;
24import java.util.Set;
Jonathan Hartdc711bd2014-10-15 11:24:23 -070025
26/**
Jonathan Hart90a02c22015-02-13 11:52:07 -080027 * Provides information about the routing configuration.
Jonathan Hartdc711bd2014-10-15 11:24:23 -070028 */
Jonathan Hart90a02c22015-02-13 11:52:07 -080029public interface RoutingConfigurationService {
30
31 /**
32 * Gets the list of BGP speakers inside the SDN network.
33 *
34 * @return the map of BGP speaker names to BGP speaker objects
35 */
36 public Map<String, BgpSpeaker> getBgpSpeakers();
37
38 /**
39 * Gets the list of configured BGP peers.
40 *
41 * @return the map from peer IP address to BgpPeer object
42 */
43 public Map<IpAddress, BgpPeer> getBgpPeers();
44
Jonathan Hartdc711bd2014-10-15 11:24:23 -070045 /**
Pingping Linc9e16bf2015-04-10 14:42:41 -070046 * Gets the MAC address configured for virtual gateway in SDN network.
47 *
48 * @return the MAC address of virtual gateway
49 */
50 public MacAddress getVirtualGatewayMacAddress();
51
52 /**
53 * Evaluates whether an IP address is a virtual gateway IP address.
54 *
55 * @param ipAddress the IP address to evaluate
56 * @return true if the IP address is a virtual gateway address, otherwise false
57 */
58 public boolean isVirtualGatewayIpAddress(IpAddress ipAddress);
59
60 /**
Pingping Line28ae4c2015-03-13 11:37:03 -070061 * Evaluates whether an IP address belongs to local SDN network.
62 *
63 * @param ipAddress the IP address to evaluate
64 * @return true if the IP address belongs to local SDN network, otherwise false
65 */
66 public boolean isIpAddressLocal(IpAddress ipAddress);
67
68 /**
69 * Evaluates whether an IP prefix belongs to local SDN network.
70 *
71 * @param ipPrefix the IP prefix to evaluate
72 * @return true if the IP prefix belongs to local SDN network, otherwise false
73 */
74 public boolean isIpPrefixLocal(IpPrefix ipPrefix);
75
76 /**
Jonathan Hartdc711bd2014-10-15 11:24:23 -070077 * Retrieves the entire set of interfaces in the network.
78 *
79 * @return the set of interfaces
80 */
81 Set<Interface> getInterfaces();
82
83 /**
84 * Retrieves the interface associated with the given connect point.
85 *
86 * @param connectPoint the connect point to retrieve interface information
87 * for
88 * @return the interface
89 */
90 Interface getInterface(ConnectPoint connectPoint);
91
92 /**
93 * Retrieves the interface that matches the given IP address. Matching
94 * means that the IP address is in one of the interface's assigned subnets.
95 *
96 * @param ipAddress IP address to match
97 * @return the matching interface
98 */
99 Interface getMatchingInterface(IpAddress ipAddress);
Jonathan Hart90a02c22015-02-13 11:52:07 -0800100
Jonathan Hartdc711bd2014-10-15 11:24:23 -0700101}