blob: 4ee43c75f5b94d05ea3b71ff1f9b049c0feca5d4 [file] [log] [blame]
alshabibb7b40632014-09-28 21:30:00 -07001package org.onlab.onos.net.proxyarp;
2
3import org.onlab.packet.Ethernet;
4import org.onlab.packet.IpPrefix;
5
6/**
7 * Service for processing arp requests on behalf of applications.
8 */
tomf5d85d42014-10-02 05:27:56 -07009// TODO: move to the peer host package
alshabibb7b40632014-09-28 21:30:00 -070010public interface ProxyArpService {
11
12 /**
13 * Returns whether this particular ip address is known to the system.
14 *
tom44179d62014-10-02 05:31:25 -070015 * @param addr a ip address
alshabibb7b40632014-09-28 21:30:00 -070016 * @return true if know, false otherwise
17 */
18 boolean known(IpPrefix addr);
19
20 /**
21 * Sends a reply for a given request. If the host is not known then the arp
22 * will be flooded at all edge ports.
23 *
tom44179d62014-10-02 05:31:25 -070024 * @param eth an arp request
alshabibb7b40632014-09-28 21:30:00 -070025 */
alshabibb5522ff2014-09-29 19:20:00 -070026 void reply(Ethernet eth);
27
28 /**
29 * Forwards an ARP request to its destination. Floods at the edge the ARP request if the
30 * destination is not known.
tom44179d62014-10-02 05:31:25 -070031 *
alshabibb5522ff2014-09-29 19:20:00 -070032 * @param eth an ethernet frame containing an ARP request.
33 */
34 void forward(Ethernet eth);
alshabibb7b40632014-09-28 21:30:00 -070035
36}