Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * 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 Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * 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 Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Jonathan Hart | 2da1e60 | 2015-02-18 19:09:24 -0800 | [diff] [blame] | 16 | package org.onosproject.routing.config; |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 17 | |
Pingping Lin | 9a445c8 | 2016-04-07 11:40:29 -0700 | [diff] [blame] | 18 | import java.util.Set; |
| 19 | |
Pavlin Radoslavov | 2020eac | 2015-01-06 17:26:10 -0800 | [diff] [blame] | 20 | import org.onlab.packet.IpAddress; |
Pingping Lin | e28ae4c | 2015-03-13 11:37:03 -0700 | [diff] [blame] | 21 | import org.onlab.packet.IpPrefix; |
Pingping Lin | c9e16bf | 2015-04-10 14:42:41 -0700 | [diff] [blame] | 22 | import org.onlab.packet.MacAddress; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 23 | import org.onosproject.net.ConnectPoint; |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 24 | |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 25 | /** |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 26 | * Provides information about the routing configuration. |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 27 | */ |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 28 | public interface RoutingConfigurationService { |
| 29 | |
Pingping Lin | 9a445c8 | 2016-04-07 11:40:29 -0700 | [diff] [blame] | 30 | String REACTIVE_ROUTING_APP_ID = "org.onosproject.reactive.routing"; |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 31 | |
Pingping Lin | 9a445c8 | 2016-04-07 11:40:29 -0700 | [diff] [blame] | 32 | Class<ReactiveRoutingConfig> CONFIG_CLASS = ReactiveRoutingConfig.class; |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 33 | |
Pingping Lin | 9a445c8 | 2016-04-07 11:40:29 -0700 | [diff] [blame] | 34 | |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 35 | MacAddress getVirtualGatewayMacAddress(); |
Pingping Lin | c9e16bf | 2015-04-10 14:42:41 -0700 | [diff] [blame] | 36 | |
| 37 | /** |
| 38 | * Evaluates whether an IP address is a virtual gateway IP address. |
| 39 | * |
| 40 | * @param ipAddress the IP address to evaluate |
| 41 | * @return true if the IP address is a virtual gateway address, otherwise false |
| 42 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 43 | boolean isVirtualGatewayIpAddress(IpAddress ipAddress); |
Pingping Lin | c9e16bf | 2015-04-10 14:42:41 -0700 | [diff] [blame] | 44 | |
| 45 | /** |
Pingping Lin | e28ae4c | 2015-03-13 11:37:03 -0700 | [diff] [blame] | 46 | * Evaluates whether an IP address belongs to local SDN network. |
| 47 | * |
| 48 | * @param ipAddress the IP address to evaluate |
| 49 | * @return true if the IP address belongs to local SDN network, otherwise false |
| 50 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 51 | boolean isIpAddressLocal(IpAddress ipAddress); |
Pingping Lin | e28ae4c | 2015-03-13 11:37:03 -0700 | [diff] [blame] | 52 | |
| 53 | /** |
| 54 | * Evaluates whether an IP prefix belongs to local SDN network. |
| 55 | * |
| 56 | * @param ipPrefix the IP prefix to evaluate |
| 57 | * @return true if the IP prefix belongs to local SDN network, otherwise false |
| 58 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 59 | boolean isIpPrefixLocal(IpPrefix ipPrefix); |
Pingping Lin | e28ae4c | 2015-03-13 11:37:03 -0700 | [diff] [blame] | 60 | |
| 61 | /** |
Pingping Lin | 8a52471 | 2015-06-24 14:58:24 -0700 | [diff] [blame] | 62 | * Retrieves the entire set of connect points connected to BGP peers in the |
| 63 | * network. |
| 64 | * |
| 65 | * @return the set of connect points connected to BGP peers |
| 66 | */ |
Jonathan Hart | 4cb3988 | 2015-08-12 23:50:55 -0400 | [diff] [blame] | 67 | Set<ConnectPoint> getBgpPeerConnectPoints(); |
Pingping Lin | 8a52471 | 2015-06-24 14:58:24 -0700 | [diff] [blame] | 68 | |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 69 | |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 70 | } |