Class ArpUtils
- java.lang.Object
-
- org.apache.plc4x.java.utils.rawsockets.netty.utils.ArpUtils
-
public class ArpUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ArpUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<org.pcap4j.util.MacAddress>resolveMacAddress(org.pcap4j.core.PcapNetworkInterface nif, InetSocketAddress remoteAddress, InetSocketAddress localAddress, org.pcap4j.util.MacAddress localMacAddress)Used to get the mac address for a given IP address.static Set<InetAddress>scanNetworkDevice(org.pcap4j.core.PcapNetworkInterface nif)Scans the network for alive IP addresses.
-
-
-
Method Detail
-
scanNetworkDevice
public static Set<InetAddress> scanNetworkDevice(org.pcap4j.core.PcapNetworkInterface nif)
Scans the network for alive IP addresses.- Parameters:
nif- network device- Returns:
- ip address
-
resolveMacAddress
public static Optional<org.pcap4j.util.MacAddress> resolveMacAddress(org.pcap4j.core.PcapNetworkInterface nif, InetSocketAddress remoteAddress, InetSocketAddress localAddress, org.pcap4j.util.MacAddress localMacAddress)
Used to get the mac address for a given IP address.- Parameters:
nif- network deviceremoteAddress- remote ip address that we want to get the mac address forlocalAddress- local ip address of the device asking the questionlocalMacAddress- local mac address of the device asking the question- Returns:
- optional that possibly contains the mac address we were looking for.
-
-