blob: 015a26354b29ae1d174083b43b5da0769731421f [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.proxyarp;
alshabibb7b40632014-09-28 21:30:00 -070017
18import org.onlab.packet.Ethernet;
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080019import org.onlab.packet.IpAddress;
Jonathan Hartf84591d2015-01-16 14:33:43 -080020import org.onosproject.net.ConnectPoint;
21import org.onosproject.net.packet.PacketContext;
alshabibb7b40632014-09-28 21:30:00 -070022
23/**
Jonathan Hart39ee6482015-08-31 16:00:19 +020024 * Service for processing ARP or NDP requests on behalf of applications.
Jonathan Hartc4f681c2016-09-09 07:14:25 -070025 *
26 * @deprecated in Hummingbird release. Use NeighbourResolutionService instead.
alshabibb7b40632014-09-28 21:30:00 -070027 */
tomf5d85d42014-10-02 05:27:56 -070028// TODO: move to the peer host package
Jonathan Hartc4f681c2016-09-09 07:14:25 -070029@Deprecated
alshabibb7b40632014-09-28 21:30:00 -070030public interface ProxyArpService {
31
32 /**
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080033 * Returns whether this particular IP address is known to the system.
alshabibb7b40632014-09-28 21:30:00 -070034 *
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080035 * @param addr an IP address
alshabibb7b40632014-09-28 21:30:00 -070036 * @return true if know, false otherwise
37 */
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080038 boolean isKnown(IpAddress addr);
alshabibb7b40632014-09-28 21:30:00 -070039
40 /**
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080041 * Sends a reply for a given request. If the host is not known then the
42 * arp or neighbor solicitation will be flooded at all edge ports.
alshabibb7b40632014-09-28 21:30:00 -070043 *
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080044 * @param eth an arp or neighbor solicitation request
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -070045 * @param inPort the port the request was received on
alshabibb7b40632014-09-28 21:30:00 -070046 */
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -070047 void reply(Ethernet eth, ConnectPoint inPort);
alshabibb5522ff2014-09-29 19:20:00 -070048
49 /**
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080050 * Forwards an ARP or neighbor solicitation request to its destination.
51 * Floods at the edg the request if the destination is not known.
tom44179d62014-10-02 05:31:25 -070052 *
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080053 * @param eth an ethernet frame containing an ARP or neighbor solicitation
54 * request.
Jonathan Hartf84591d2015-01-16 14:33:43 -080055 * @param inPort the port the request was received on
alshabibb5522ff2014-09-29 19:20:00 -070056 */
Jonathan Hartf84591d2015-01-16 14:33:43 -080057 void forward(Ethernet eth, ConnectPoint inPort);
alshabibb7b40632014-09-28 21:30:00 -070058
alshabibc274c902014-10-03 14:58:27 -070059 /**
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080060 * Handles a arp or neighbor solicitation packet.
61 * Replies to arp or neighbor solicitation requests and forwards request
62 * to the right place.
alshabibc274c902014-10-03 14:58:27 -070063 * @param context the packet context to handle
64 * @return true if handled, false otherwise.
65 */
Kunihiro Ishigurof1bff502015-01-30 15:47:06 -080066 boolean handlePacket(PacketContext context);
alshabibb7b40632014-09-28 21:30:00 -070067}