301 lines
12 KiB
C#
301 lines
12 KiB
C#
using System;
|
|
using System.Net.Sockets;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.Net
|
|
{
|
|
/// <summary>Provides an Internet Protocol (IP) address.</summary>
|
|
// Token: 0x02000228 RID: 552
|
|
[Token(Token = "0x2000228")]
|
|
[Serializable]
|
|
public class IPAddress
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Net.IPAddress" /> class with the address specified as an <see cref="T:System.Int64" />.</summary>
|
|
/// <param name="newAddress">The long value of the IP address. For example, the value 0x2414188f in big-endian format would be the IP address "143.24.20.36".</param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="newAddress" /> < 0 or
|
|
/// <paramref name="newAddress" /> > 0x00000000FFFFFFFF</exception>
|
|
// Token: 0x06000DDA RID: 3546 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000DDA")]
|
|
[Address(RVA = "0xB3C7F0", Offset = "0xB3B7F0", VA = "0x180B3C7F0")]
|
|
public IPAddress(long newAddress)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Net.IPAddress" /> class with the address specified as a <see cref="T:System.Byte" /> array and the specified scope identifier.</summary>
|
|
/// <param name="address">The byte array value of the IP address.</param>
|
|
/// <param name="scopeid">The long value of the scope identifier.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="address" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="address" /> contains a bad IP address.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="scopeid" /> < 0 or
|
|
/// <paramref name="scopeid" /> > 0x00000000FFFFFFFF</exception>
|
|
// Token: 0x06000DDB RID: 3547 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000DDB")]
|
|
[Address(RVA = "0xB3C310", Offset = "0xB3B310", VA = "0x180B3C310")]
|
|
public IPAddress(byte[] address, long scopeid)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000DDC RID: 3548 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000DDC")]
|
|
[Address(RVA = "0xB3C4F0", Offset = "0xB3B4F0", VA = "0x180B3C4F0")]
|
|
private IPAddress(ushort[] address, uint scopeid)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.Net.IPAddress" /> class with the address specified as a <see cref="T:System.Byte" /> array.</summary>
|
|
/// <param name="address">The byte array value of the IP address.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="address" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="address" /> contains a bad IP address.</exception>
|
|
// Token: 0x06000DDD RID: 3549 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000DDD")]
|
|
[Address(RVA = "0xB3C5D0", Offset = "0xB3B5D0", VA = "0x180B3C5D0")]
|
|
public IPAddress(byte[] address)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000DDE RID: 3550 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000DDE")]
|
|
[Address(RVA = "0xB3C570", Offset = "0xB3B570", VA = "0x180B3C570")]
|
|
internal IPAddress(int newAddress)
|
|
{
|
|
}
|
|
|
|
/// <summary>Determines whether a string is a valid IP address.</summary>
|
|
/// <param name="ipString">The string to validate.</param>
|
|
/// <param name="address">The <see cref="T:System.Net.IPAddress" /> version of the string.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if <paramref name="ipString" /> was able to be parsed as an IP address; otherwise, <see langword="false" />.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="ipString" /> is null.</exception>
|
|
// Token: 0x06000DDF RID: 3551 RVA: 0x00007038 File Offset: 0x00005238
|
|
[Token(Token = "0x6000DDF")]
|
|
[Address(RVA = "0xB3C050", Offset = "0xB3B050", VA = "0x180B3C050")]
|
|
public static bool TryParse(string ipString, out IPAddress address)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Converts an IP address string to an <see cref="T:System.Net.IPAddress" /> instance.</summary>
|
|
/// <param name="ipString">A string that contains an IP address in dotted-quad notation for IPv4 and in colon-hexadecimal notation for IPv6.</param>
|
|
/// <returns>An <see cref="T:System.Net.IPAddress" /> instance.</returns>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="ipString" /> is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.FormatException">
|
|
/// <paramref name="ipString" /> is not a valid IP address.</exception>
|
|
// Token: 0x06000DE0 RID: 3552 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000DE0")]
|
|
[Address(RVA = "0xB3BD90", Offset = "0xB3AD90", VA = "0x180B3BD90")]
|
|
public static IPAddress Parse(string ipString)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
// Token: 0x06000DE1 RID: 3553 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000DE1")]
|
|
[Address(RVA = "0xB3B810", Offset = "0xB3A810", VA = "0x180B3B810")]
|
|
private static IPAddress InternalParse(string ipString, bool tryParse)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Provides a copy of the <see cref="T:System.Net.IPAddress" /> as an array of bytes.</summary>
|
|
/// <returns>A <see cref="T:System.Byte" /> array.</returns>
|
|
// Token: 0x06000DE2 RID: 3554 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000DE2")]
|
|
[Address(RVA = "0xB3B560", Offset = "0xB3A560", VA = "0x180B3B560")]
|
|
public byte[] GetAddressBytes()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Gets the address family of the IP address.</summary>
|
|
/// <returns>Returns <see cref="F:System.Net.Sockets.AddressFamily.InterNetwork" /> for IPv4 or <see cref="F:System.Net.Sockets.AddressFamily.InterNetworkV6" /> for IPv6.</returns>
|
|
// Token: 0x1700028F RID: 655
|
|
// (get) Token: 0x06000DE3 RID: 3555 RVA: 0x00007050 File Offset: 0x00005250
|
|
[Token(Token = "0x1700028F")]
|
|
public AddressFamily AddressFamily
|
|
{
|
|
[Token(Token = "0x6000DE3")]
|
|
[Address(RVA = "0x470B70", Offset = "0x46FB70", VA = "0x180470B70")]
|
|
get
|
|
{
|
|
return AddressFamily.Unspecified;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the IPv6 address scope identifier.</summary>
|
|
/// <returns>A long integer that specifies the scope of the address.</returns>
|
|
/// <exception cref="T:System.Net.Sockets.SocketException">
|
|
/// <see langword="AddressFamily" /> = <see langword="InterNetwork" />.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="scopeId" /> < 0
|
|
/// -or-
|
|
///
|
|
/// <paramref name="scopeId" /> > 0x00000000FFFFFFFF</exception>
|
|
// Token: 0x17000290 RID: 656
|
|
// (get) Token: 0x06000DE4 RID: 3556 RVA: 0x00007068 File Offset: 0x00005268
|
|
[Token(Token = "0x17000290")]
|
|
public long ScopeId
|
|
{
|
|
[Token(Token = "0x6000DE4")]
|
|
[Address(RVA = "0xB3C890", Offset = "0xB3B890", VA = "0x180B3C890")]
|
|
get
|
|
{
|
|
return 0L;
|
|
}
|
|
}
|
|
|
|
/// <summary>Converts an Internet address to its standard notation.</summary>
|
|
/// <returns>A string that contains the IP address in either IPv4 dotted-quad or in IPv6 colon-hexadecimal notation.</returns>
|
|
/// <exception cref="T:System.Net.Sockets.SocketException">The address family is <see cref="F:System.Net.Sockets.AddressFamily.InterNetworkV6" /> and the address is bad.</exception>
|
|
// Token: 0x06000DE5 RID: 3557 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000DE5")]
|
|
[Address(RVA = "0xB3BDF0", Offset = "0xB3ADF0", VA = "0x180B3BDF0", Slot = "3")]
|
|
public override string ToString()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Indicates whether the specified IP address is the loopback address.</summary>
|
|
/// <param name="address">An IP address.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if <paramref name="address" /> is the loopback address; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x06000DE6 RID: 3558 RVA: 0x00007080 File Offset: 0x00005280
|
|
[Token(Token = "0x6000DE6")]
|
|
[Address(RVA = "0xB3BB60", Offset = "0xB3AB60", VA = "0x180B3BB60")]
|
|
public static bool IsLoopback(IPAddress address)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
// Token: 0x06000DE7 RID: 3559 RVA: 0x00007098 File Offset: 0x00005298
|
|
[Token(Token = "0x6000DE7")]
|
|
[Address(RVA = "0xB3B300", Offset = "0xB3A300", VA = "0x180B3B300")]
|
|
internal bool Equals(object comparandObj, bool compareScopeId)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Compares two IP addresses.</summary>
|
|
/// <param name="comparand">An <see cref="T:System.Net.IPAddress" /> instance to compare to the current instance.</param>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the two addresses are equal; otherwise, <see langword="false" />.</returns>
|
|
// Token: 0x06000DE8 RID: 3560 RVA: 0x000070B0 File Offset: 0x000052B0
|
|
[Token(Token = "0x6000DE8")]
|
|
[Address(RVA = "0xB3B440", Offset = "0xB3A440", VA = "0x180B3B440", Slot = "0")]
|
|
public override bool Equals(object comparand)
|
|
{
|
|
return default(bool);
|
|
}
|
|
|
|
/// <summary>Returns a hash value for an IP address.</summary>
|
|
/// <returns>An integer hash value.</returns>
|
|
// Token: 0x06000DE9 RID: 3561 RVA: 0x000070C8 File Offset: 0x000052C8
|
|
[Token(Token = "0x6000DE9")]
|
|
[Address(RVA = "0xB3B710", Offset = "0xB3A710", VA = "0x180B3B710", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/// <summary>Maps the <see cref="T:System.Net.IPAddress" /> object to an IPv6 address.</summary>
|
|
/// <returns>Returns <see cref="T:System.Net.IPAddress" />.
|
|
/// An IPv6 address.</returns>
|
|
// Token: 0x06000DEA RID: 3562 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6000DEA")]
|
|
[Address(RVA = "0xB3BC60", Offset = "0xB3AC60", VA = "0x180B3BC60")]
|
|
public IPAddress MapToIPv6()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Provides an IP address that indicates that the server must listen for client activity on all network interfaces. This field is read-only.</summary>
|
|
// Token: 0x04000807 RID: 2055
|
|
[Token(Token = "0x4000807")]
|
|
public static readonly IPAddress Any;
|
|
|
|
/// <summary>Provides the IP loopback address. This field is read-only.</summary>
|
|
// Token: 0x04000808 RID: 2056
|
|
[Token(Token = "0x4000808")]
|
|
public static readonly IPAddress Loopback;
|
|
|
|
/// <summary>Provides the IP broadcast address. This field is read-only.</summary>
|
|
// Token: 0x04000809 RID: 2057
|
|
[Token(Token = "0x4000809")]
|
|
public static readonly IPAddress Broadcast;
|
|
|
|
/// <summary>Provides an IP address that indicates that no network interface should be used. This field is read-only.</summary>
|
|
// Token: 0x0400080A RID: 2058
|
|
[Token(Token = "0x400080A")]
|
|
public static readonly IPAddress None;
|
|
|
|
// Token: 0x0400080B RID: 2059
|
|
[Token(Token = "0x400080B")]
|
|
internal const long LoopbackMask = 255L;
|
|
|
|
// Token: 0x0400080C RID: 2060
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400080C")]
|
|
internal long m_Address;
|
|
|
|
// Token: 0x0400080D RID: 2061
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400080D")]
|
|
[NonSerialized]
|
|
internal string m_ToString;
|
|
|
|
/// <summary>The <see cref="M:System.Net.Sockets.Socket.Bind(System.Net.EndPoint)" /> method uses the <see cref="F:System.Net.IPAddress.IPv6Any" /> field to indicate that a <see cref="T:System.Net.Sockets.Socket" /> must listen for client activity on all network interfaces.</summary>
|
|
// Token: 0x0400080E RID: 2062
|
|
[Token(Token = "0x400080E")]
|
|
public static readonly IPAddress IPv6Any;
|
|
|
|
/// <summary>Provides the IP loopback address. This property is read-only.</summary>
|
|
// Token: 0x0400080F RID: 2063
|
|
[Token(Token = "0x400080F")]
|
|
public static readonly IPAddress IPv6Loopback;
|
|
|
|
/// <summary>Provides an IP address that indicates that no network interface should be used. This property is read-only.</summary>
|
|
// Token: 0x04000810 RID: 2064
|
|
[Token(Token = "0x4000810")]
|
|
public static readonly IPAddress IPv6None;
|
|
|
|
// Token: 0x04000811 RID: 2065
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4000811")]
|
|
private AddressFamily m_Family;
|
|
|
|
// Token: 0x04000812 RID: 2066
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4000812")]
|
|
private ushort[] m_Numbers;
|
|
|
|
// Token: 0x04000813 RID: 2067
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4000813")]
|
|
private long m_ScopeId;
|
|
|
|
// Token: 0x04000814 RID: 2068
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4000814")]
|
|
private int m_HashCode;
|
|
|
|
// Token: 0x04000815 RID: 2069
|
|
[Token(Token = "0x4000815")]
|
|
internal const int IPv4AddressBytes = 4;
|
|
|
|
// Token: 0x04000816 RID: 2070
|
|
[Token(Token = "0x4000816")]
|
|
internal const int IPv6AddressBytes = 16;
|
|
|
|
// Token: 0x04000817 RID: 2071
|
|
[Token(Token = "0x4000817")]
|
|
internal const int NumberOfLabels = 8;
|
|
}
|
|
}
|