2 * Copyright 2015 Open Networking Laboratory
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onosproject.routing;
18 import org.onlab.packet.IpAddress;
19 import org.onlab.packet.IpPrefix;
20 import org.onlab.packet.MacAddress;
21 import org.onosproject.net.ConnectPoint;
24 * An interface to process intent requests.
26 public interface IntentRequestListener {
29 * Sets up connectivity for packet from Internet to a host in local
32 * @param dstIpAddress IP address of destination host in local SDN network
34 void setUpConnectivityInternetToHost(IpAddress dstIpAddress);
37 * Sets up the connectivity for two hosts in local SDN network.
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
44 void setUpConnectivityHostToHost(IpAddress dstIpAddress,
45 IpAddress srcIpAddress,
46 MacAddress srcMacAddress,
47 ConnectPoint srcConnectPoint);
50 * Adds one new ingress connect point into ingress points of an existing
51 * intent and resubmits the new intent.
53 * If there is already an intent for an IP prefix in the system, we do not
54 * need to create a new one, we only need to update this existing intent by
55 * adding more ingress points.
58 * @param ipPrefix the IP prefix used to search the existing
59 * MultiPointToSinglePointIntent
60 * @param ingressConnectPoint the ingress connect point to be added into
63 void updateExistingMp2pIntent(IpPrefix ipPrefix,
64 ConnectPoint ingressConnectPoint);
67 * Checks whether there is a MultiPointToSinglePointIntent in memory for a
70 * @param ipPrefix the IP prefix used to search the existing
71 * MultiPointToSinglePointIntent
72 * @return true if there is a MultiPointToSinglePointIntent, otherwise false
74 boolean mp2pIntentExists(IpPrefix ipPrefix);