Provides utility methods for working with IP addresses and ranges.
More...
|
| static bool | IsLocal ([NotNull] this IPAddress addr) |
| | Checks whether an IP address may belong to LAN or localhost (192.168.0.0/16, 10.0.0.0/24, or 127.0.0.0/24).
|
| |
| static uint | AsUInt ([NotNull] this IPAddress thisAddr) |
| | Represents an IPv4 address as an unsigned integer.
|
| |
| static int | AsInt ([NotNull] this IPAddress thisAddr) |
| | Represents an IPv4 address as a signed integer.
|
| |
| static bool | IsIP ([NotNull] string ipString) |
| | Checks to see if the specified string is a valid IPv4 address.
|
| |
| static bool | Match ([NotNull] this IPAddress thisAddr, uint otherAddr, uint mask) |
| |
| static IPAddress | RangeMin ([NotNull] this IPAddress thisAddr, byte range) |
| | Finds the starting IPv4 address of the given address range.
|
| |
| static IPAddress | RangeMax ([NotNull] this IPAddress thisAddr, byte range) |
| | Finds the ending IPv4 address of the given address range.
|
| |
| static uint | NetMask (byte range) |
| | Creates an IPv4 mask for the given CIDR range.
|
| |
Provides utility methods for working with IP addresses and ranges.
| static int fCraft.IPAddressUtil.AsInt |
( |
[NotNull] this IPAddress |
thisAddr | ) |
|
|
static |
Represents an IPv4 address as a signed integer.
- Exceptions
-
| ArgumentNullException | thisAddr is null. |
| static uint fCraft.IPAddressUtil.AsUInt |
( |
[NotNull] this IPAddress |
thisAddr | ) |
|
|
static |
Represents an IPv4 address as an unsigned integer.
- Exceptions
-
| ArgumentNullException | thisAddr is null. |
| static bool fCraft.IPAddressUtil.IsIP |
( |
[NotNull] string |
ipString | ) |
|
|
static |
Checks to see if the specified string is a valid IPv4 address.
- Parameters
-
| ipString | String representation of the IPv4 address. |
- Returns
- Whether or not the string is a valid IPv4 address.
| static bool fCraft.IPAddressUtil.IsLocal |
( |
[NotNull] this IPAddress |
addr | ) |
|
|
static |
Checks whether an IP address may belong to LAN or localhost (192.168.0.0/16, 10.0.0.0/24, or 127.0.0.0/24).
- Parameters
-
| addr | IPv4 address to check. |
- Returns
- True if given IP is local; otherwise false.
- Exceptions
-
| ArgumentNullException | addr is null. |
| static bool fCraft.IPAddressUtil.Match |
( |
[NotNull] this IPAddress |
thisAddr, |
|
|
uint |
otherAddr, |
|
|
uint |
mask |
|
) |
| |
|
static |
| static uint fCraft.IPAddressUtil.NetMask |
( |
byte |
range | ) |
|
|
static |
Creates an IPv4 mask for the given CIDR range.
- Exceptions
-
| ArgumentOutOfRangeException | range is over 32 |
| static IPAddress fCraft.IPAddressUtil.RangeMax |
( |
[NotNull] this IPAddress |
thisAddr, |
|
|
byte |
range |
|
) |
| |
|
static |
Finds the ending IPv4 address of the given address range.
- Exceptions
-
| ArgumentNullException | thisAddr is null |
| ArgumentOutOfRangeException | range is over 32 |
| static IPAddress fCraft.IPAddressUtil.RangeMin |
( |
[NotNull] this IPAddress |
thisAddr, |
|
|
byte |
range |
|
) |
| |
|
static |
Finds the starting IPv4 address of the given address range.
- Exceptions
-
| ArgumentNullException | thisAddr is null |
| ArgumentOutOfRangeException | range is over 32 |
The documentation for this class was generated from the following file: