根据IP获取对应端口MAC

版权声明:巴啦啦小魔仙乌卡拉卡,变身---------------------------------------xiner https://blog.csdn.net/zhengsaisai/article/details/88991359
// 根据ip获取对应mac
String mac = "";
String ip = "192.168.0.194":
InetAddress address = InetAddress.getByName(ip);
mac = NetUtil.getMacAddress(address);
mac = mac.replace("-", ":").toLowerCase();

猜你喜欢

转载自blog.csdn.net/zhengsaisai/article/details/88991359