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 all ONOS instances to broadcast this packet out the edge of |
| 8 | * the network. The edge is defined as any port that doesn't have a link to |
| 9 | * another switch. The one exception is the port that the packet was received |
| 10 | * on. |
| 11 | * |
| 12 | */ |
| 13 | public class BroadcastPacketOutNotification extends |
| 14 | PacketOutNotification { |
| 15 | |
| 16 | private static final long serialVersionUID = 1L; |
| 17 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame] | 18 | private final InetAddress address; |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 19 | private final long inSwitch; |
| 20 | private final short inPort; |
| 21 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame] | 22 | public BroadcastPacketOutNotification(byte[] packet, InetAddress address, |
| 23 | long inSwitch, short inPort) { |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 24 | super(packet); |
| 25 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame] | 26 | this.address = address; |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 27 | this.inSwitch = inSwitch; |
| 28 | this.inPort = inPort; |
| 29 | } |
| 30 | |
| 31 | public long getInSwitch() { |
| 32 | return inSwitch; |
| 33 | } |
| 34 | |
| 35 | public short getInPort() { |
| 36 | return inPort; |
| 37 | } |
| 38 | |
Naoki Shiota | 78e403c | 2014-02-20 17:13:36 -0800 | [diff] [blame] | 39 | public InetAddress getTargetAddress() { |
| 40 | return address; |
| 41 | } |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 42 | } |