Pingping Lin | e28ae4c | 2015-03-13 11:37:03 -0700 | [diff] [blame] | 1 | /* |
Jonathan Hart | bb782be | 2017-02-09 17:45:49 -0800 | [diff] [blame] | 2 | * Copyright 2017-present Open Networking Laboratory |
Pingping Lin | e28ae4c | 2015-03-13 11:37:03 -0700 | [diff] [blame] | 3 | * |
| 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 |
| 7 | * |
| 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. |
| 15 | */ |
Jonathan Hart | bb782be | 2017-02-09 17:45:49 -0800 | [diff] [blame] | 16 | package org.onosproject.reactive.routing; |
Pingping Lin | e28ae4c | 2015-03-13 11:37:03 -0700 | [diff] [blame] | 17 | |
| 18 | import org.onlab.packet.IpAddress; |
| 19 | import org.onlab.packet.IpPrefix; |
| 20 | import org.onlab.packet.MacAddress; |
| 21 | import org.onosproject.net.ConnectPoint; |
| 22 | |
| 23 | /** |
| 24 | * An interface to process intent requests. |
| 25 | */ |
| 26 | public interface IntentRequestListener { |
| 27 | |
| 28 | /** |
| 29 | * Sets up connectivity for packet from Internet to a host in local |
| 30 | * SDN network. |
| 31 | * |
| 32 | * @param dstIpAddress IP address of destination host in local SDN network |
| 33 | */ |
| 34 | void setUpConnectivityInternetToHost(IpAddress dstIpAddress); |
| 35 | |
| 36 | /** |
| 37 | * Sets up the connectivity for two hosts in local SDN network. |
| 38 | * |
| 39 | * @param dstIpAddress the destination IP address |
| 40 | * @param srcIpAddress the source IP address |
| 41 | * @param srcMacAddress the source MAC address |
| 42 | * @param srcConnectPoint the connectPoint of the source host |
| 43 | */ |
| 44 | void setUpConnectivityHostToHost(IpAddress dstIpAddress, |
| 45 | IpAddress srcIpAddress, |
| 46 | MacAddress srcMacAddress, |
| 47 | ConnectPoint srcConnectPoint); |
| 48 | |
| 49 | /** |
Jonathan Hart | 9a426f8 | 2015-09-03 15:43:13 +0200 | [diff] [blame] | 50 | * Sets up connectivity for packet from a local host to the Internet. |
| 51 | * |
| 52 | * @param hostIp IP address of the local host |
| 53 | * @param prefix external IP prefix that the host is talking to |
| 54 | * @param nextHopIpAddress IP address of the next hop router for the prefix |
| 55 | */ |
| 56 | void setUpConnectivityHostToInternet(IpAddress hostIp, IpPrefix prefix, |
| 57 | IpAddress nextHopIpAddress); |
| 58 | |
| 59 | /** |
Pingping Lin | e28ae4c | 2015-03-13 11:37:03 -0700 | [diff] [blame] | 60 | * Adds one new ingress connect point into ingress points of an existing |
| 61 | * intent and resubmits the new intent. |
| 62 | * <p> |
| 63 | * If there is already an intent for an IP prefix in the system, we do not |
| 64 | * need to create a new one, we only need to update this existing intent by |
| 65 | * adding more ingress points. |
| 66 | * </p> |
| 67 | * |
| 68 | * @param ipPrefix the IP prefix used to search the existing |
| 69 | * MultiPointToSinglePointIntent |
| 70 | * @param ingressConnectPoint the ingress connect point to be added into |
| 71 | * the exiting intent |
| 72 | */ |
| 73 | void updateExistingMp2pIntent(IpPrefix ipPrefix, |
| 74 | ConnectPoint ingressConnectPoint); |
| 75 | |
| 76 | /** |
| 77 | * Checks whether there is a MultiPointToSinglePointIntent in memory for a |
| 78 | * given IP prefix. |
| 79 | * |
| 80 | * @param ipPrefix the IP prefix used to search the existing |
| 81 | * MultiPointToSinglePointIntent |
| 82 | * @return true if there is a MultiPointToSinglePointIntent, otherwise false |
| 83 | */ |
| 84 | boolean mp2pIntentExists(IpPrefix ipPrefix); |
| 85 | |
| 86 | } |