Condividi tramite


NetworkInterface.GetByInetAddress(InetAddress) Method

Definition

Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.

[Android.Runtime.Register("getByInetAddress", "(Ljava/net/InetAddress;)Ljava/net/NetworkInterface;", "")]
public static Java.Net.NetworkInterface? GetByInetAddress (Java.Net.InetAddress? addr);
[<Android.Runtime.Register("getByInetAddress", "(Ljava/net/InetAddress;)Ljava/net/NetworkInterface;", "")>]
static member GetByInetAddress : Java.Net.InetAddress -> Java.Net.NetworkInterface

Parameters

addr
InetAddress

The InetAddress to search with.

Returns

A NetworkInterface or null if there is no network interface with the specified IP address.

Attributes

Exceptions

if an error occurs.

if address == null.

Remarks

Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.

If the specified IP address is bound to multiple network interfaces it is not defined which network interface is returned.

Java documentation for java.net.NetworkInterface.getByInetAddress(java.net.InetAddress).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to