Свойство | Тип | Описание | |
---|---|---|---|
ClassA | int | ||
ClassB | int | ||
ClassC | int | ||
ClassD | int | ||
ClassE | int | ||
InvalidClass | int |
Метод | Описание | |
---|---|---|
BuildMaskFromBits ( int bits ) : |
Build a subnet mask from bit count value
|
|
Clone ( ) : |
Clone current object.
|
|
CompareTo ( object obj ) : int |
Compare value against IPAddress, byte array, UInt32, IpAddress of OctetString class value.
|
|
Equals ( object obj ) : bool |
Compare 2 IpAddress objects.
|
|
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 IpAddress.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 ( ) : int |
Return network class of the IP address
|
|
GetHashCode ( ) : int |
Return hash representing the value of this object
|
|
GetMaskBits ( ) : int |
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
|
|
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
|
|
IpAddress ( ) : System |
Constructs a default object with a length of zero. See the super class constructor for more details.
|
|
IpAddress ( |
Copy constructor. Constructs a duplicate object based on the passed application string object.
|
|
IpAddress ( OctetString second ) : System |
Copy constructor.
|
|
IpAddress ( System inetAddr ) : System |
Constructor Construct the IpAddress class from supplied IPAddress value. |
|
IpAddress ( |
Constructor Initialize IpAddress class with the IP address value represented as 32-bit unsigned integer value |
|
IpAddress ( byte data ) : System |
Constructs an Application String with the passed data. The data is managed by the base class.
|
|
IpAddress ( string inetAddr ) : System |
Constructs the class and initializes the value to the supplied IP address. See comments in IpAddress.Set(string) method for details.
|
|
IsIP ( string val ) : bool |
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. Written to address slow performance of IPAddress.TryParse |
|
IsValidMask ( ) : bool |
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.
|
|
NetworkMask ( ) : |
Returns network mask for the class value Each IpAddress belongs to one of the 5 classes, A, B, C, D or E. D network class are multicast addresses and E is experimental class. Because D and E are not "real" network classes and as such don't have a network mask, only classes A, B and C will return a valid subnet mask. Classes D and E will return a null reference. |
|
ReverseByteOrder ( uint val ) : uint |
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 ( |
Set class value from the IPAddress argument
|
|
Set ( String value ) : void |
Sets the class value to the IP address parsed from the string parameter. Class value will be set with the parsed dotted decimal IP address in the parameter or if string parameter does not represent an IP address, DNS resolution will be performed. Note: DNS resolution is performed using System.Net.Dns.GetHostEntry(string) and can result in a longer then expected delay in this function. In applications where responsiveness is important, name resolution should be performed using async methods available and result passed to this method. |
|
Set ( |
Set class value from 32-bit unsigned integer value representation of the IP address value
|
|
ToString ( ) : System.String |
Returns the application string as a dotted decimal represented IP address.
|
|
ToUInt32 ( ) : |
Network byte order IP address Convert internal byte array representation of the IP address into a network byte order (most significant byte first) unsigned integer value. To use the returned value in mathematical operations, you will need to change it to host byte order on little endian systems (all i386 compatible systems). To do that, call static method IpAddress.ReverseByteOrder(). |
|
decode ( byte buffer, int offset ) : int |
Decode ASN.1 encoded IP address value.
|
public static BuildMaskFromBits ( int bits ) : |
||
bits | int | Number of subnet mask bits |
Результат |
public CompareTo ( object obj ) : int | ||
obj | object | Type: |
Результат | int |
public Equals ( object obj ) : bool | ||
obj | object | |
Результат | bool |
public GetBroadcastAddress ( |
||
mask | Subnet mask to apply to the object | |
Результат |
public GetSubnetAddress ( |
||
mask | Subnet mask | |
Результат |
public Increment ( |
||
count | Number to increment IP address with | |
Результат |
public IpAddress ( |
||
second | The object to copy. | |
Результат | System |
public IpAddress ( OctetString second ) : System | ||
second | OctetString | The object to copy |
Результат | System |
public IpAddress ( System inetAddr ) : System | ||
inetAddr | System | IP Address to use to initialize the object. |
Результат | System |
public IpAddress ( |
||
inetAddr | 32-bit unsigned integer representation of an IP Address | |
Результат | System |
public IpAddress ( byte data ) : System | ||
data | byte | The application string to manage (UTF-8) /// |
Результат | System |
public IpAddress ( string inetAddr ) : System | ||
inetAddr | string | IP address encoded as a string or host name |
Результат | System |
public static IsIP ( string val ) : bool | ||
val | string | String value |
Результат | bool |
public static ReverseByteOrder ( uint val ) : uint | ||
val | uint | Integer value to reverse |
Результат | uint |
public Set ( |
||
ipaddr | Type: |
|
Результат | void |
public Set ( String value ) : void | ||
value | String | IP address encoded as a string or host name |
Результат | void |
public Set ( |
||
ipvalue | IP address value as 32-bit unsigned integer value | |
Результат | void |
public decode ( byte buffer, int offset ) : int | ||
buffer | byte | BER encoded data buffer |
offset | int | Offset in the array to start parsing from |
Результат | int |