Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.proxyarp; |
| 2 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame^] | 3 | import java.net.InetAddress; |
| 4 | |
| 5 | // TODO This class is too generic to be handled by ProxyArpService. |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 6 | /** |
| 7 | * Notification to another ONOS instance to send a packet out a single port. |
| 8 | * |
| 9 | */ |
| 10 | public class SinglePacketOutNotification extends PacketOutNotification { |
| 11 | |
| 12 | private static final long serialVersionUID = 1L; |
| 13 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame^] | 14 | private final InetAddress address; |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 15 | private final long outSwitch; |
| 16 | private final short outPort; |
| 17 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame^] | 18 | public SinglePacketOutNotification(byte[] packet, InetAddress address, |
| 19 | long outSwitch, short outPort) { |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 20 | super(packet); |
| 21 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame^] | 22 | this.address = address; |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 23 | this.outSwitch = outSwitch; |
| 24 | this.outPort = outPort; |
| 25 | } |
| 26 | |
| 27 | public long getOutSwitch() { |
| 28 | return outSwitch; |
| 29 | } |
| 30 | |
| 31 | public short getOutPort() { |
| 32 | return outPort; |
| 33 | } |
| 34 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame^] | 35 | public InetAddress getTargetAddress() { |
| 36 | return address; |
| 37 | } |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 38 | } |