blob: fd67cb0114099a38c8dffc9ef4a9d808cb53c269 [file] [log] [blame]
Jonathan Hart1f75cae2014-04-09 17:24:09 -07001package net.onrc.onos.api.packet;
2
3import net.onrc.onos.core.packet.Ethernet;
4import net.onrc.onos.core.topology.Port;
5import net.onrc.onos.core.topology.Switch;
6
Jonathan Harte6e63732014-04-16 14:29:49 -07007/**
8 * An object that wishes to receive notifications of packets received from the
9 * network.
10 */
Jonathan Hart1f75cae2014-04-09 17:24:09 -070011public interface IPacketListener {
Jonathan Harte6e63732014-04-16 14:29:49 -070012 /**
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 Hart1f75cae2014-04-09 17:24:09 -070020 public void receive(Switch sw, Port inPort, Ethernet payload);
21}