TeruU | 3c049c4 | 2014-04-15 10:13:25 -0700 | [diff] [blame] | 1 | package net.onrc.onos.apps.proxyarp; |
| 2 | |
| 3 | |
| 4 | /** |
| 5 | * Inter-instance notification that an ARP Cache status has been changed. |
| 6 | */ |
| 7 | public class ArpCacheNotification { |
| 8 | |
| 9 | private byte[] targetAddress; |
| 10 | private byte[] targetMacAddress; |
| 11 | |
| 12 | private ArpCacheNotification() { |
| 13 | targetAddress = null; |
| 14 | targetMacAddress = null; |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Class constructor. |
| 19 | * |
| 20 | * @param targetAddress IP address |
| 21 | * @param targetMacAddress MAC address |
| 22 | */ |
| 23 | public ArpCacheNotification(byte[] targetAddress, |
| 24 | byte[] targetMacAddress) { |
Ray Milkey | 149693c | 2014-05-20 14:58:53 -0700 | [diff] [blame] | 25 | this.targetAddress = targetAddress.clone(); |
| 26 | this.targetMacAddress = targetMacAddress.clone(); |
TeruU | 3c049c4 | 2014-04-15 10:13:25 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Returns the IP address. |
| 31 | * |
| 32 | * @return the IP address |
| 33 | */ |
| 34 | public byte[] getTargetAddress() { |
Ray Milkey | 149693c | 2014-05-20 14:58:53 -0700 | [diff] [blame] | 35 | return targetAddress.clone(); |
TeruU | 3c049c4 | 2014-04-15 10:13:25 -0700 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Returns the MAC address. |
| 40 | * |
| 41 | * @return the MAC address |
| 42 | */ |
| 43 | public byte[] getTargetMacAddress() { |
Ray Milkey | 149693c | 2014-05-20 14:58:53 -0700 | [diff] [blame] | 44 | return targetMacAddress.clone(); |
TeruU | 3c049c4 | 2014-04-15 10:13:25 -0700 | [diff] [blame] | 45 | } |
| 46 | |
| 47 | } |