blob: 135c061121593d1a6399943d2bd1c1680c5d8e81 [file] [log] [blame]
Jonathan Hart7804bea2014-01-07 10:50:52 -08001package net.onrc.onos.ofcontroller.proxyarp;
2
Naoki Shiota78e403c2014-02-20 17:13:36 -08003import java.net.InetAddress;
4
5//TODO This class is too generic to be handled by ProxyArpService.
Jonathan Hart7804bea2014-01-07 10:50:52 -08006/**
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 */
13public class BroadcastPacketOutNotification extends
14 PacketOutNotification {
15
16 private static final long serialVersionUID = 1L;
17
Naoki Shiota78e403c2014-02-20 17:13:36 -080018 private final InetAddress address;
Jonathan Hart7804bea2014-01-07 10:50:52 -080019 private final long inSwitch;
20 private final short inPort;
21
Naoki Shiota78e403c2014-02-20 17:13:36 -080022 public BroadcastPacketOutNotification(byte[] packet, InetAddress address,
23 long inSwitch, short inPort) {
Jonathan Hart7804bea2014-01-07 10:50:52 -080024 super(packet);
25
Naoki Shiota78e403c2014-02-20 17:13:36 -080026 this.address = address;
Jonathan Hart7804bea2014-01-07 10:50:52 -080027 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 Shiota78e403c2014-02-20 17:13:36 -080039 public InetAddress getTargetAddress() {
40 return address;
41 }
Jonathan Hart7804bea2014-01-07 10:50:52 -080042}