InterfaceAddress.NetworkPrefixLength Property

Definition

Returns the network prefix length for this address.

public virtual short NetworkPrefixLength { [Android.Runtime.Register("getNetworkPrefixLength", "()S", "GetGetNetworkPrefixLengthHandler")] get; }
[<get: Android.Runtime.Register("getNetworkPrefixLength", "()S", "GetGetNetworkPrefixLengthHandler")>]
member this.NetworkPrefixLength : int16

Property Value

a short representing the prefix length for the subnet of that address.

Attributes

Remarks

Returns the network prefix length for this address. This is also known as the subnet mask in the context of IPv4 addresses. Typical IPv4 values would be 8 (255.0.0.0), 16 (255.255.0.0) or 24 (255.255.255.0).

Typical IPv6 values would be 128 (::1/128) or 10 (fe80::203:baff:fe27:1243/10)

Java documentation for java.net.InterfaceAddress.getNetworkPrefixLength().

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