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 | * |
| 15 | * @param addr |
| 16 | * a ip address |
| 17 | * @return true if know, false otherwise |
| 18 | */ |
| 19 | boolean known(IpPrefix addr); |
| 20 | |
| 21 | /** |
| 22 | * Sends a reply for a given request. If the host is not known then the arp |
| 23 | * will be flooded at all edge ports. |
| 24 | * |
alshabib | b5522ff | 2014-09-29 19:20:00 -0700 | [diff] [blame] | 25 | * @param eth |
alshabib | b7b4063 | 2014-09-28 21:30:00 -0700 | [diff] [blame] | 26 | * an arp request |
| 27 | */ |
alshabib | b5522ff | 2014-09-29 19:20:00 -0700 | [diff] [blame] | 28 | void reply(Ethernet eth); |
| 29 | |
| 30 | /** |
| 31 | * Forwards an ARP request to its destination. Floods at the edge the ARP request if the |
| 32 | * destination is not known. |
| 33 | * @param eth an ethernet frame containing an ARP request. |
| 34 | */ |
| 35 | void forward(Ethernet eth); |
alshabib | b7b4063 | 2014-09-28 21:30:00 -0700 | [diff] [blame] | 36 | |
| 37 | } |