Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.proxyarp; |
| 2 | |
| 3 | import java.io.Serializable; |
| 4 | import java.net.InetAddress; |
| 5 | |
| 6 | import net.floodlightcontroller.util.MACAddress; |
| 7 | |
Jonathan Hart | 7c9a2fb | 2014-03-27 09:51:41 -0700 | [diff] [blame] | 8 | /** |
| 9 | * Inter-instance notification that an ARP reply has been received. The |
| 10 | * notification contains both the IP address and the MAC address. |
| 11 | */ |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 12 | public class ArpReplyNotification implements Serializable { |
| 13 | |
Jonathan Hart | 7c9a2fb | 2014-03-27 09:51:41 -0700 | [diff] [blame] | 14 | private static final long serialVersionUID = 1L; |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 15 | |
Jonathan Hart | 7c9a2fb | 2014-03-27 09:51:41 -0700 | [diff] [blame] | 16 | private InetAddress targetAddress; |
| 17 | private MACAddress targetMacAddress; |
Jonathan Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 18 | |
Jonathan Hart | 7c9a2fb | 2014-03-27 09:51:41 -0700 | [diff] [blame] | 19 | /** |
| 20 | * Class constructor. |
| 21 | * @param targetAddress IP address received from the ARP reply |
| 22 | * @param targetMacAddress MAC address received from the ARP reply |
| 23 | */ |
| 24 | public ArpReplyNotification(InetAddress targetAddress, |
| 25 | 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 | */ |
| 34 | public InetAddress getTargetAddress() { |
| 35 | 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 Hart | 7804bea | 2014-01-07 10:50:52 -0800 | [diff] [blame] | 45 | |
| 46 | } |