Jonathan Hart | 1f75cae | 2014-04-09 17:24:09 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.packet; |
| 2 | |
| 3 | import net.onrc.onos.core.packet.Ethernet; |
| 4 | import net.onrc.onos.core.topology.Port; |
| 5 | import net.onrc.onos.core.topology.Switch; |
| 6 | |
Jonathan Hart | e6e6373 | 2014-04-16 14:29:49 -0700 | [diff] [blame] | 7 | /** |
| 8 | * An object that wishes to receive notifications of packets received from the |
| 9 | * network. |
| 10 | */ |
Jonathan Hart | 1f75cae | 2014-04-09 17:24:09 -0700 | [diff] [blame] | 11 | public interface IPacketListener { |
Jonathan Hart | e6e6373 | 2014-04-16 14:29:49 -0700 | [diff] [blame] | 12 | /** |
| 13 | * Called to notify the object that a packet has been received and pass the |
| 14 | * payload of the packet to the listener module. |
| 15 | * |
| 16 | * @param sw the switch the packet was received from |
| 17 | * @param inPort the port the packet was received from |
| 18 | * @param payload the payload of the packet |
| 19 | */ |
Jonathan Hart | 1f75cae | 2014-04-09 17:24:09 -0700 | [diff] [blame] | 20 | public void receive(Switch sw, Port inPort, Ethernet payload); |
| 21 | } |