public class WifiUtils
extends java.lang.Object
Constructor and Description |
---|
WifiUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getIpByMACFromARP(java.lang.String mac)
Tries to resolve the ip address for a given mac address from the ARP cache.
|
static java.lang.String |
getMACbyIpFromARP(java.lang.String ip)
Given an ipv4 ip address, tries to retrieve the MAC of the device to which
this ip is assigned.
|
static void |
logInterfacesAndIpAddresses()
log local ip addresses to log
|
static void |
printARP()
logs the /proc/net/arp file to the log
|
public static void printARP()
public static java.lang.String getIpByMACFromARP(java.lang.String mac)
mac
- the mac address to get the ip forpublic static java.lang.String getMACbyIpFromARP(java.lang.String ip)
ip
- the ipv4 address in the form of x.x.x.xpublic static void logInterfacesAndIpAddresses()