The IpAddress type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| Append(array<Byte>[]()[][]) |
Append contents of the byte array to the class value. If class value is length 0, byte array
content is set as the class value.
(Inherited from OctetString.) | |
| Append(String) |
Append string value to the OctetString class. If current class content is length 0, new
string value is set as the value of this class.
Class assumes that string value is UTF8 encoded.
(Inherited from OctetString.) | |
| BuildMaskFromBits |
Build a subnet mask from bit count value
| |
| Clear |
Empty data buffer
(Inherited from OctetString.) | |
| Clone | Clone current object. (Overrides OctetString..::..Clone()()()().) | |
| CompareTo(Object) |
Compare value against IPAddress, byte array, UInt32, IpAddress of OctetString class value.
| |
| CompareTo(array<Byte>[]()[][]) |
IComparable interface implementation. Compare class contents with contents of the byte array.
(Inherited from OctetString.) | |
| CompareTo(OctetString) |
IComparable interface implementation. Compare class contents against another class.
(Inherited from OctetString.) | |
| decode | Decode ASN.1 encoded IP address value. (Overrides OctetString..::..decode(array<Byte>[]()[][], Int32).) | |
| encode | BER encode OctetString variable. (Inherited from OctetString.) | |
| Equals |
Compare 2 IpAddress objects.
(Overrides OctetString..::..Equals(Object).) | |
| Finalize |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetBroadcastAddress |
Returns broadcast address for the objects IP and supplied subnet mask.
Subnet mask validity is not confirmed before performing the new value calculation so
you should make sure parameter is a valid subnet mask by using IsValidMask()()()()
method.
Broadcast address is calculated by changing every bit in the subnet mask that is set to
value 0 into 1 in the address value.
| |
| GetClass |
Return network class of the IP address
| |
| GetEnumerator |
Returns an enumerator that iterates through the OctetString byte collection
(Inherited from OctetString.) | |
| GetHashCode |
Return hash representing the value of this object
(Overrides OctetString..::..GetHashCode()()()().) | |
| GetMaskBits |
Returns number of subnet bits in the mask.
Subnet bits are bits set to value 0 in the subnet mask.
| |
| GetSubnetAddress |
Return subnet address of the IP address in this object and supplied subnet mask
| |
| GetType |
Gets the Type of the current instance.
(Inherited from Object.) | |
| Increment |
Increment IP address contained in the object by specific number and return the result as a new
class.
| |
| Invert |
Inverts IP address value. All 0s are converted to 1s and 1s to 0s
| |
| IsIP |
Check if supplied string contains a valid IP address.
Valid IP address contains 3 full stops (".") and 4 numeric values in range 0 to 255.
| |
| IsValidMask |
Checks if the value of the object is a valid subnet mask.
Subnet mask is a value of consecutive bits with value of 1. If a bit is found with a value of 0
followed (immediately or anywhere else before the end of the value) by a 1, then subnet
mask value is not valid.
| |
| MemberwiseClone |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| NetworkMask |
Returns network mask for the class value
| |
| Reset |
Reset internal buffer to null.
(Inherited from OctetString.) | |
| ReverseByteOrder |
Reverse int value byte order. Static function in IPAddress class doesn't work
the way I expected it (didn't troubleshoot) so here is another implementation.
Reversing byte order is needed because network encoded IP address is presented in big-endian
format. Intel based computers encode values in little-endian form so to perform numerical operations
on received IP address values you will need to convert them from big to little-endian format.
By the same token, if you wish to transmit data using IP address value calculated on the
local system, you will need to convert it to big-endian prior to transmission.
| |
| Set(IPAddress) |
Set class value from the IPAddress argument
| |
| Set(String) | Sets the class value to the IP address parsed from the string parameter. (Overrides OctetString..::..Set(String).) | |
| Set(UInt32) |
Set class value from 32-bit unsigned integer value representation of the IP address value
| |
| Set(Byte) |
Set class value to an array 1 byte long and set the value to the supplied argument.
(Inherited from OctetString.) | |
| Set(array<Byte>[]()[][]) |
Set class value from the argument byte array. If byte array argument is null or length == 0,
internal OctetString buffer is set to null.
(Inherited from OctetString.) | |
| Set(Int32, Byte) |
Set value at specified position to the supplied value
(Inherited from OctetString.) | |
| SetRef |
Set class value to reference of parameter byte array
(Inherited from OctetString.) | |
| ToArray |
Convert the OctetString class to a byte array. Internal class data buffer is *copied* and not passed to the caller.
(Inherited from OctetString.) | |
| ToHexString |
Return string formatted hexadecimal representation of the objects value.
(Inherited from OctetString.) | |
| ToMACAddressString | Utility function to print a MAC address (binary string of 6 byte length. (Inherited from OctetString.) | |
| ToString | Returns the application string as a dotted decimal represented IP address. (Overrides OctetString..::..ToString()()()().) | |
| ToUInt32 |
Network byte order IP address
|
Explicit Interface Implementations
| Name | Description | |
|---|---|---|
| IEnumerable..::..GetEnumerator |
Returns an enumerator that iterates through the OctetString byte collection
(Inherited from OctetString.) |