public class NetworkInterface extends Object
Modifier and Type | Field and Description |
---|---|
String |
deviceId
The name of the interface if known (e.g. eth0).
|
String |
deviceName
The name of the hardware if known.
|
InetAddress |
inet4Address
This standard IPv4 address associated with the interface if known.
|
Properties |
inet4Properties
This may be null but if not may include items like "addr", "Bcast" and "Mask".
|
InetAddress |
inet6Address
This standard IPv6 address associated with the interface if known.
|
Properties |
inet6Properties
This may be null but if not may include items like "addr" and "Scope".
|
String |
macAddress
The MAC address associated with the interface if known.
|
Properties |
properties
This may be null but if not may include items that are interface specific.
|
Constructor and Description |
---|
NetworkInterface() |
Modifier and Type | Method and Description |
---|---|
static NetworkInterface[] |
getLocalInterfaces(boolean rescanHardware,
TimeOut timeout) |
static NetworkInterface[] |
getLocalInterfaces(Handle h,
boolean rescanHardware)
Note that the local loopbacks 127.0.0.1 IS included in this list.
|
static void |
main(String[] args) |
public InetAddress inet4Address
public InetAddress inet6Address
public String macAddress
public String deviceId
public String deviceName
public Properties inet4Properties
public Properties inet6Properties
public Properties properties
public static NetworkInterface[] getLocalInterfaces(Handle h, boolean rescanHardware) throws IOException
rescanHardware
- IOException
public static NetworkInterface[] getLocalInterfaces(boolean rescanHardware, TimeOut timeout) throws IOException
IOException
public static void main(String[] args)