blob: 081101ec04d190832ca8f311b8fcbc03af16e751 [file] [log] [blame]
Jonathan Hart7804bea2014-01-07 10:50:52 -08001package net.onrc.onos.ofcontroller.proxyarp;
2
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
TeruU7feef8a2014-04-03 00:15:49 -070018 protected ArpReplyNotification() {}
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070019 /**
20 * Class constructor.
21 * @param targetAddress IP address received from the ARP reply
22 * @param targetMacAddress MAC address received from the ARP reply
23 */
TeruU7feef8a2014-04-03 00:15:49 -070024 public ArpReplyNotification(int targetAddress,
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070025 MACAddress targetMacAddress) {
26 this.targetAddress = targetAddress;
27 this.targetMacAddress = targetMacAddress;
28 }
29
30 /**
31 * Returns the IP address of the ARP reply.
32 * @return the IP address
33 */
TeruU7feef8a2014-04-03 00:15:49 -070034 public int getTargetAddress() {
Jonathan Hart7c9a2fb2014-03-27 09:51:41 -070035 return targetAddress;
36 }
37
38 /**
39 * Returns the MAC address of the ARP reply.
40 * @return the MAC address
41 */
42 public MACAddress getTargetMacAddress() {
43 return targetMacAddress;
44 }
Jonathan Hart7804bea2014-01-07 10:50:52 -080045
46}