byte[] targetIPByte = targetIP.getAddress();
ARP arp = createARP(ARP.REQUEST, getControllerMAC(), senderIP, targetHardwareAddress, targetIPByte);
- byte[] destMACAddress = NetUtils.BroadcastMACAddr;
+ byte[] destMACAddress = NetUtils.getBroadcastMACAddr();
Ethernet ethernet = createEthernet(getControllerMAC(), destMACAddress, arp);
// TODO For now send port-by-port, see how to optimize to
/**
* Constant holding the broadcast MAC address
*/
- public static final byte[] BroadcastMACAddr = {-1, -1, -1, -1, -1, -1};
+ private static final byte[] BroadcastMACAddr = {-1, -1, -1, -1, -1, -1};
/**
* Converts a 4 bytes array into an integer number
/**
* Returns Broadcast MAC Address
*
- * @return the byte array containing broadcaset mac address
+ * @return the byte array containing broadcast mac address
*/
public static byte[] getBroadcastMACAddr() {
return Arrays.copyOf(BroadcastMACAddr, BroadcastMACAddr.length);