alshabib | b7b4063 | 2014-09-28 21:30:00 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.proxyarp; |
| 2 | |
| 3 | import org.onlab.packet.Ethernet; |
| 4 | import org.onlab.packet.IpPrefix; |
| 5 | |
| 6 | /** |
| 7 | * Service for processing arp requests on behalf of applications. |
| 8 | */ |
tom | f5d85d4 | 2014-10-02 05:27:56 -0700 | [diff] [blame] | 9 | // TODO: move to the peer host package |
alshabib | b7b4063 | 2014-09-28 21:30:00 -0700 | [diff] [blame] | 10 | public interface ProxyArpService { |
| 11 | |
| 12 | /** |
| 13 | * Returns whether this particular ip address is known to the system. |
| 14 | * |
tom | 44179d6 | 2014-10-02 05:31:25 -0700 | [diff] [blame^] | 15 | * @param addr a ip address |
alshabib | b7b4063 | 2014-09-28 21:30:00 -0700 | [diff] [blame] | 16 | * @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 | * |
tom | 44179d6 | 2014-10-02 05:31:25 -0700 | [diff] [blame^] | 24 | * @param eth an arp request |
alshabib | b7b4063 | 2014-09-28 21:30:00 -0700 | [diff] [blame] | 25 | */ |
alshabib | b5522ff | 2014-09-29 19:20:00 -0700 | [diff] [blame] | 26 | 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. |
tom | 44179d6 | 2014-10-02 05:31:25 -0700 | [diff] [blame^] | 31 | * |
alshabib | b5522ff | 2014-09-29 19:20:00 -0700 | [diff] [blame] | 32 | * @param eth an ethernet frame containing an ARP request. |
| 33 | */ |
| 34 | void forward(Ethernet eth); |
alshabib | b7b4063 | 2014-09-28 21:30:00 -0700 | [diff] [blame] | 35 | |
| 36 | } |