mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
#129 add TODO to figure out how to fetch MAC address of a local IPv6 address
This commit is contained in:
parent
eb9b90e9b3
commit
56e6df90de
@ -4,6 +4,7 @@ import com.sun.jna.Memory;
|
||||
import com.sun.jna.Pointer;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
|
||||
import static net.azib.ipscan.core.net.WinIpHlp.toIpAddr;
|
||||
@ -13,6 +14,8 @@ public class WinMACFetcher extends MACFetcher {
|
||||
@Inject public WinMACFetcher() {}
|
||||
|
||||
@Override public String resolveMAC(InetAddress address) {
|
||||
if (!(address instanceof Inet4Address)) return null; // TODO IPv6 support
|
||||
|
||||
Pointer pmac = new Memory(8);
|
||||
Pointer plen = new Memory(4);
|
||||
plen.setInt(0, 8);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user