blob: 9866359e49362799a51b1c7df5c6f3d885e31380 [file] [log] [blame]
Jonathan Hart0961fe82014-04-03 09:56:25 -07001package net.onrc.onos.apps.proxyarp;
Jonathan Hart7804bea2014-01-07 10:50:52 -08002
3import java.io.Serializable;
Jonathan Hart7804bea2014-01-07 10:50:52 -08004
5import net.floodlightcontroller.util.MACAddress;
6
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -07007/**
8 * Inter-instance notification that an ARP reply has been received. The
9 * notification contains both the IP address and the MAC address.
10 */
Jonathan Hart7804bea2014-01-07 10:50:52 -080011public class ArpReplyNotification implements Serializable {
12
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070013 private static final long serialVersionUID = 1L;
Jonathan Hart7804bea2014-01-07 10:50:52 -080014
TeruU7feef8a2014-04-03 00:15:49 -070015 private int targetAddress;
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070016 private MACAddress targetMacAddress;
Jonathan Hart7804bea2014-01-07 10:50:52 -080017
Ray Milkey269ffb92014-04-03 14:43:30 -070018 protected ArpReplyNotification() {
19 }
20
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070021 /**
22 * Class constructor.
Ray Milkey269ffb92014-04-03 14:43:30 -070023 *
24 * @param targetAddress IP address received from the ARP reply
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070025 * @param targetMacAddress MAC address received from the ARP reply
26 */
TeruU7feef8a2014-04-03 00:15:49 -070027 public ArpReplyNotification(int targetAddress,
Ray Milkey269ffb92014-04-03 14:43:30 -070028 MACAddress targetMacAddress) {
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070029 this.targetAddress = targetAddress;
30 this.targetMacAddress = targetMacAddress;
31 }
32
33 /**
34 * Returns the IP address of the ARP reply.
Ray Milkey269ffb92014-04-03 14:43:30 -070035 *
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070036 * @return the IP address
37 */
TeruU7feef8a2014-04-03 00:15:49 -070038 public int getTargetAddress() {
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070039 return targetAddress;
40 }
41
42 /**
43 * Returns the MAC address of the ARP reply.
Ray Milkey269ffb92014-04-03 14:43:30 -070044 *
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070045 * @return the MAC address
46 */
47 public MACAddress getTargetMacAddress() {
48 return targetMacAddress;
49 }
Jonathan Hart7804bea2014-01-07 10:50:52 -080050
51}