public static String getMACFromIPAddress(String ip) {
        if (ip == null) {
            return null;
        }

        HashMap<String, String> cache = getAllIPAndMACAddressesInARPCache();
        return cache.get(ip);
    }
Try to extract a hardware MAC address from a given IP address

@param ip - IP address to search for
@return the MAC from the ARP cache or null in format "01:23:45:67:89:ab"
library/src/main/java/com/stealthcopter/networktools/ARPInfo.java