scripts
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001C6 RID: 454
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
internal struct AlignmentUnion
|
||||
{
|
||||
// Token: 0x04000D34 RID: 3380
|
||||
[FieldOffset(0)]
|
||||
public ulong Alignment;
|
||||
|
||||
// Token: 0x04000D35 RID: 3381
|
||||
[FieldOffset(0)]
|
||||
public int Length;
|
||||
|
||||
// Token: 0x04000D36 RID: 3382
|
||||
[FieldOffset(4)]
|
||||
public int IfIndex;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies the current state of an IP address.</summary>
|
||||
// Token: 0x02000156 RID: 342
|
||||
public enum DuplicateAddressDetectionState
|
||||
{
|
||||
/// <summary>The address is not valid. A nonvalid address is expired and no longer assigned to an interface; applications should not send data packets to it.</summary>
|
||||
// Token: 0x04000B92 RID: 2962
|
||||
Invalid,
|
||||
/// <summary>The duplicate address detection procedure's evaluation of the address has not completed successfully. Applications should not use the address because it is not yet valid and packets sent to it are discarded.</summary>
|
||||
// Token: 0x04000B93 RID: 2963
|
||||
Tentative,
|
||||
/// <summary>The address is not unique. This address should not be assigned to the network interface.</summary>
|
||||
// Token: 0x04000B94 RID: 2964
|
||||
Duplicate,
|
||||
/// <summary>The address is valid, but it is nearing its lease lifetime and should not be used by applications.</summary>
|
||||
// Token: 0x04000B95 RID: 2965
|
||||
Deprecated,
|
||||
/// <summary>The address is valid and its use is unrestricted.</summary>
|
||||
// Token: 0x04000B96 RID: 2966
|
||||
Preferred
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Represents the IP address of the network gateway. This class cannot be instantiated.</summary>
|
||||
// Token: 0x02000157 RID: 343
|
||||
public abstract class GatewayIPAddressInformation
|
||||
{
|
||||
/// <summary>Get the IP address of the gateway.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.IPAddress" /> object that contains the IP address of the gateway.</returns>
|
||||
// Token: 0x170002E9 RID: 745
|
||||
// (get) Token: 0x06000B9A RID: 2970
|
||||
public abstract IPAddress Address { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Stores a set of <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> types.</summary>
|
||||
// Token: 0x02000159 RID: 345
|
||||
public class GatewayIPAddressInformationCollection : IEnumerable, IEnumerable<GatewayIPAddressInformation>, ICollection<GatewayIPAddressInformation>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformationCollection" /> class.</summary>
|
||||
// Token: 0x06000B9D RID: 2973 RVA: 0x00023B68 File Offset: 0x00021D68
|
||||
protected GatewayIPAddressInformationCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x06000B9E RID: 2974 RVA: 0x00023B7C File Offset: 0x00021D7C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
/// <param name="address">The object to be added to the collection.</param>
|
||||
// Token: 0x06000B9F RID: 2975 RVA: 0x00023B90 File Offset: 0x00021D90
|
||||
public virtual void Add(GatewayIPAddressInformation address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Add(address);
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
// Token: 0x06000BA0 RID: 2976 RVA: 0x00023BC0 File Offset: 0x00021DC0
|
||||
public virtual void Clear()
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Checks whether the collection contains the specified <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> object.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> object exists in the collection; otherwise false.</returns>
|
||||
/// <param name="address">The <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> object to be searched in the collection.</param>
|
||||
// Token: 0x06000BA1 RID: 2977 RVA: 0x00023BE4 File Offset: 0x00021DE4
|
||||
public virtual bool Contains(GatewayIPAddressInformation address)
|
||||
{
|
||||
return this.list.Contains(address);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements in this collection to a one-dimensional array of type <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" />.</summary>
|
||||
/// <param name="array">A one-dimensional array that receives a copy of the collection.</param>
|
||||
/// <param name="offset">The zero-based index in <paramref name="array" /> at which the copy begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="count" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in this <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> is greater than the available space from <paramref name="count" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The elements in this <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000BA2 RID: 2978 RVA: 0x00023BF4 File Offset: 0x00021DF4
|
||||
public virtual void CopyTo(GatewayIPAddressInformation[] array, int offset)
|
||||
{
|
||||
this.list.CopyTo(array, offset);
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x06000BA3 RID: 2979 RVA: 0x00023C04 File Offset: 0x00021E04
|
||||
public virtual IEnumerator<GatewayIPAddressInformation> GetEnumerator()
|
||||
{
|
||||
return ((IEnumerable<GatewayIPAddressInformation>)this.list).GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
||||
/// <param name="address">The object to be removed.</param>
|
||||
// Token: 0x06000BA4 RID: 2980 RVA: 0x00023C14 File Offset: 0x00021E14
|
||||
public virtual bool Remove(GatewayIPAddressInformation address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
return this.list.Remove(address);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> types in this collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that contains the number of <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x170002EB RID: 747
|
||||
// (get) Token: 0x06000BA5 RID: 2981 RVA: 0x00023C44 File Offset: 0x00021E44
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether access to this collection is read-only.</summary>
|
||||
/// <returns>true in all cases.</returns>
|
||||
// Token: 0x170002EC RID: 748
|
||||
// (get) Token: 0x06000BA6 RID: 2982 RVA: 0x00023C54 File Offset: 0x00021E54
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> at the specific index of the collection.</summary>
|
||||
/// <returns>The <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformation" /> at the specific index in the collection.</returns>
|
||||
/// <param name="index">The index of interest.</param>
|
||||
// Token: 0x170002ED RID: 749
|
||||
public virtual GatewayIPAddressInformation this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000B98 RID: 2968
|
||||
private List<GatewayIPAddressInformation> list = new List<GatewayIPAddressInformation>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000158 RID: 344
|
||||
internal class GatewayIPAddressInformationImpl : GatewayIPAddressInformation
|
||||
{
|
||||
// Token: 0x06000B9B RID: 2971 RVA: 0x00023B50 File Offset: 0x00021D50
|
||||
public GatewayIPAddressInformationImpl(IPAddress address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
// Token: 0x170002EA RID: 746
|
||||
// (get) Token: 0x06000B9C RID: 2972 RVA: 0x00023B60 File Offset: 0x00021D60
|
||||
public override IPAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.address;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000B97 RID: 2967
|
||||
private IPAddress address;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Stores a set of <see cref="T:System.Net.IPAddress" /> types.</summary>
|
||||
// Token: 0x0200015C RID: 348
|
||||
public class IPAddressCollection : IEnumerable, ICollection<IPAddress>, IEnumerable<IPAddress>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> class.</summary>
|
||||
// Token: 0x06000BB1 RID: 2993 RVA: 0x00023DFC File Offset: 0x00021FFC
|
||||
protected internal IPAddressCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> types in this collection.</returns>
|
||||
// Token: 0x06000BB2 RID: 2994 RVA: 0x00023E10 File Offset: 0x00022010
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000BB3 RID: 2995 RVA: 0x00023E20 File Offset: 0x00022020
|
||||
internal void SetReadOnly()
|
||||
{
|
||||
if (!this.IsReadOnly)
|
||||
{
|
||||
this.list = ((List<IPAddress>)this.list).AsReadOnly();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
/// <param name="address">The object to be added to the collection.</param>
|
||||
// Token: 0x06000BB4 RID: 2996 RVA: 0x00023E44 File Offset: 0x00022044
|
||||
public virtual void Add(IPAddress address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Add(address);
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
// Token: 0x06000BB5 RID: 2997 RVA: 0x00023E74 File Offset: 0x00022074
|
||||
public virtual void Clear()
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Checks whether the collection contains the specified <see cref="T:System.Net.IPAddress" /> object.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Net.IPAddress" /> object exists in the collection; otherwise, false.</returns>
|
||||
/// <param name="address">The <see cref="T:System.Net.IPAddress" /> object to be searched in the collection.</param>
|
||||
// Token: 0x06000BB6 RID: 2998 RVA: 0x00023E98 File Offset: 0x00022098
|
||||
public virtual bool Contains(IPAddress address)
|
||||
{
|
||||
return this.list.Contains(address);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements in this collection to a one-dimensional array of type <see cref="T:System.Net.IPAddress" />.</summary>
|
||||
/// <param name="array">A one-dimensional array that receives a copy of the collection.</param>
|
||||
/// <param name="offset">The zero-based index in <paramref name="array" /> at which the copy begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="offset" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or-The number of elements in this <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> is greater than the available space from <paramref name="offset" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The elements in this <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000BB7 RID: 2999 RVA: 0x00023EA8 File Offset: 0x000220A8
|
||||
public virtual void CopyTo(IPAddress[] array, int offset)
|
||||
{
|
||||
this.list.CopyTo(array, offset);
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> types in this collection.</returns>
|
||||
// Token: 0x06000BB8 RID: 3000 RVA: 0x00023EB8 File Offset: 0x000220B8
|
||||
public virtual IEnumerator<IPAddress> GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
||||
/// <param name="address">The object to be removed.</param>
|
||||
// Token: 0x06000BB9 RID: 3001 RVA: 0x00023EC8 File Offset: 0x000220C8
|
||||
public virtual bool Remove(IPAddress address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
return this.list.Remove(address);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of <see cref="T:System.Net.IPAddress" /> types in this collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that contains the number of <see cref="T:System.Net.IPAddress" /> types in this collection.</returns>
|
||||
// Token: 0x170002F0 RID: 752
|
||||
// (get) Token: 0x06000BBA RID: 3002 RVA: 0x00023EF8 File Offset: 0x000220F8
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether access to this collection is read-only.</summary>
|
||||
/// <returns>true in all cases.</returns>
|
||||
// Token: 0x170002F1 RID: 753
|
||||
// (get) Token: 0x06000BBB RID: 3003 RVA: 0x00023F08 File Offset: 0x00022108
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Net.IPAddress" /> at the specific index of the collection.</summary>
|
||||
/// <returns>The <see cref="T:System.Net.IPAddress" /> at the specific index in the collection.</returns>
|
||||
/// <param name="index">The index of interest.</param>
|
||||
// Token: 0x170002F2 RID: 754
|
||||
public virtual IPAddress this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000B9D RID: 2973
|
||||
private IList<IPAddress> list = new List<IPAddress>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about a network interface address.</summary>
|
||||
// Token: 0x0200015E RID: 350
|
||||
public abstract class IPAddressInformation
|
||||
{
|
||||
/// <summary>Gets the Internet Protocol (IP) address.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.IPAddress" /> instance that contains the IP address of an interface.</returns>
|
||||
// Token: 0x170002F4 RID: 756
|
||||
// (get) Token: 0x06000BC6 RID: 3014
|
||||
public abstract IPAddress Address { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the Internet Protocol (IP) address is valid to appear in a Domain Name System (DNS) server database.</summary>
|
||||
/// <returns>true if the address can appear in a DNS database; otherwise, false.</returns>
|
||||
// Token: 0x170002F5 RID: 757
|
||||
// (get) Token: 0x06000BC7 RID: 3015
|
||||
public abstract bool IsDnsEligible { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the Internet Protocol (IP) address is transient (a cluster address).</summary>
|
||||
/// <returns>true if the address is transient; otherwise, false.</returns>
|
||||
// Token: 0x170002F6 RID: 758
|
||||
// (get) Token: 0x06000BC8 RID: 3016
|
||||
public abstract bool IsTransient { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Stores a set of <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> types.</summary>
|
||||
// Token: 0x02000160 RID: 352
|
||||
public class IPAddressInformationCollection : IEnumerable, IEnumerable<IPAddressInformation>, ICollection<IPAddressInformation>
|
||||
{
|
||||
// Token: 0x06000BCD RID: 3021 RVA: 0x00024168 File Offset: 0x00022368
|
||||
internal IPAddressInformationCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x06000BCE RID: 3022 RVA: 0x0002417C File Offset: 0x0002237C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
/// <param name="address">The object to be added to the collection.</param>
|
||||
// Token: 0x06000BCF RID: 3023 RVA: 0x00024190 File Offset: 0x00022390
|
||||
public virtual void Add(IPAddressInformation address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Add(address);
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
// Token: 0x06000BD0 RID: 3024 RVA: 0x000241C0 File Offset: 0x000223C0
|
||||
public virtual void Clear()
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Checks whether the collection contains the specified <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> object.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> object exists in the collection; otherwise. false.</returns>
|
||||
/// <param name="address">The <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> object to be searched in the collection.</param>
|
||||
// Token: 0x06000BD1 RID: 3025 RVA: 0x000241E4 File Offset: 0x000223E4
|
||||
public virtual bool Contains(IPAddressInformation address)
|
||||
{
|
||||
return this.list.Contains(address);
|
||||
}
|
||||
|
||||
/// <summary>Copies the collection to the specified array.</summary>
|
||||
/// <param name="array">A one-dimensional array that receives a copy of the collection.</param>
|
||||
/// <param name="offset">The zero-based index in <paramref name="array" /> at which the copy begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="offset" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in this <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> is greater than the available space from <paramref name="offset" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The elements in this <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000BD2 RID: 3026 RVA: 0x000241F4 File Offset: 0x000223F4
|
||||
public virtual void CopyTo(IPAddressInformation[] array, int offset)
|
||||
{
|
||||
this.list.CopyTo(array, offset);
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x06000BD3 RID: 3027 RVA: 0x00024204 File Offset: 0x00022404
|
||||
public virtual IEnumerator<IPAddressInformation> GetEnumerator()
|
||||
{
|
||||
return ((IEnumerable<IPAddressInformation>)this.list).GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
||||
/// <param name="address">The object to be removed.</param>
|
||||
// Token: 0x06000BD4 RID: 3028 RVA: 0x00024214 File Offset: 0x00022414
|
||||
public virtual bool Remove(IPAddressInformation address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
return this.list.Remove(address);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> types in this collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that contains the number of <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x170002FA RID: 762
|
||||
// (get) Token: 0x06000BD5 RID: 3029 RVA: 0x00024244 File Offset: 0x00022444
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether access to this collection is read-only.</summary>
|
||||
/// <returns>true in all cases.</returns>
|
||||
// Token: 0x170002FB RID: 763
|
||||
// (get) Token: 0x06000BD6 RID: 3030 RVA: 0x00024254 File Offset: 0x00022454
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> at the specified index in the collection. </summary>
|
||||
/// <returns>The <see cref="T:System.Net.NetworkInformation.IPAddressInformation" /> at the specified location.</returns>
|
||||
/// <param name="index">The zero-based index of the element.</param>
|
||||
// Token: 0x170002FC RID: 764
|
||||
public virtual IPAddressInformation this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BA3 RID: 2979
|
||||
private List<IPAddressInformation> list = new List<IPAddressInformation>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200015F RID: 351
|
||||
internal class IPAddressInformationImpl : IPAddressInformation
|
||||
{
|
||||
// Token: 0x06000BC9 RID: 3017 RVA: 0x00024130 File Offset: 0x00022330
|
||||
public IPAddressInformationImpl(IPAddress address, bool isDnsEligible, bool isTransient)
|
||||
{
|
||||
this.address = address;
|
||||
this.is_dns_eligible = isDnsEligible;
|
||||
this.is_transient = isTransient;
|
||||
}
|
||||
|
||||
// Token: 0x170002F7 RID: 759
|
||||
// (get) Token: 0x06000BCA RID: 3018 RVA: 0x00024150 File Offset: 0x00022350
|
||||
public override IPAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.address;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002F8 RID: 760
|
||||
// (get) Token: 0x06000BCB RID: 3019 RVA: 0x00024158 File Offset: 0x00022358
|
||||
public override bool IsDnsEligible
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_dns_eligible;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002F9 RID: 761
|
||||
// (get) Token: 0x06000BCC RID: 3020 RVA: 0x00024160 File Offset: 0x00022360
|
||||
[global::System.MonoTODO("Always false on Linux")]
|
||||
public override bool IsTransient
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_transient;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BA0 RID: 2976
|
||||
private IPAddress address;
|
||||
|
||||
// Token: 0x04000BA1 RID: 2977
|
||||
private bool is_dns_eligible;
|
||||
|
||||
// Token: 0x04000BA2 RID: 2978
|
||||
private bool is_transient;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000161 RID: 353
|
||||
internal class IPAddressInformationImplCollection : IPAddressInformationCollection
|
||||
{
|
||||
// Token: 0x06000BD8 RID: 3032 RVA: 0x00024268 File Offset: 0x00022468
|
||||
private IPAddressInformationImplCollection(bool isReadOnly)
|
||||
{
|
||||
this.is_readonly = isReadOnly;
|
||||
}
|
||||
|
||||
// Token: 0x170002FD RID: 765
|
||||
// (get) Token: 0x06000BDA RID: 3034 RVA: 0x00024288 File Offset: 0x00022488
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_readonly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000BDB RID: 3035 RVA: 0x00024290 File Offset: 0x00022490
|
||||
public static IPAddressInformationCollection Win32FromAnycast(IntPtr ptr)
|
||||
{
|
||||
IPAddressInformationImplCollection ipaddressInformationImplCollection = new IPAddressInformationImplCollection(false);
|
||||
IntPtr intPtr = ptr;
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADAPTER_ANYCAST_ADDRESS win32_IP_ADAPTER_ANYCAST_ADDRESS = (Win32_IP_ADAPTER_ANYCAST_ADDRESS)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADAPTER_ANYCAST_ADDRESS));
|
||||
ipaddressInformationImplCollection.Add(new IPAddressInformationImpl(win32_IP_ADAPTER_ANYCAST_ADDRESS.Address.GetIPAddress(), win32_IP_ADAPTER_ANYCAST_ADDRESS.LengthFlags.IsDnsEligible, win32_IP_ADAPTER_ANYCAST_ADDRESS.LengthFlags.IsTransient));
|
||||
intPtr = win32_IP_ADAPTER_ANYCAST_ADDRESS.Next;
|
||||
}
|
||||
ipaddressInformationImplCollection.is_readonly = true;
|
||||
return ipaddressInformationImplCollection;
|
||||
}
|
||||
|
||||
// Token: 0x06000BDC RID: 3036 RVA: 0x00024310 File Offset: 0x00022510
|
||||
public static IPAddressInformationImplCollection LinuxFromAnycast(IList<IPAddress> addresses)
|
||||
{
|
||||
IPAddressInformationImplCollection ipaddressInformationImplCollection = new IPAddressInformationImplCollection(false);
|
||||
foreach (IPAddress ipaddress in addresses)
|
||||
{
|
||||
ipaddressInformationImplCollection.Add(new IPAddressInformationImpl(ipaddress, false, false));
|
||||
}
|
||||
ipaddressInformationImplCollection.is_readonly = true;
|
||||
return ipaddressInformationImplCollection;
|
||||
}
|
||||
|
||||
// Token: 0x04000BA4 RID: 2980
|
||||
public static readonly IPAddressInformationImplCollection Empty = new IPAddressInformationImplCollection(true);
|
||||
|
||||
// Token: 0x04000BA5 RID: 2981
|
||||
private bool is_readonly;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about the network connectivity of the local computer.</summary>
|
||||
// Token: 0x02000162 RID: 354
|
||||
public abstract class IPGlobalProperties
|
||||
{
|
||||
/// <summary>Gets an object that provides information about the local computer's network connectivity and traffic statistics.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.IPGlobalProperties" /> object that contains information about the local computer.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Net.NetworkInformation.NetworkInformationPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Access="Read" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000BDE RID: 3038 RVA: 0x0002438C File Offset: 0x0002258C
|
||||
public static IPGlobalProperties GetIPGlobalProperties()
|
||||
{
|
||||
PlatformID platform = Environment.OSVersion.Platform;
|
||||
if (platform != PlatformID.Unix)
|
||||
{
|
||||
return new Win32IPGlobalProperties();
|
||||
}
|
||||
if (Directory.Exists("/proc"))
|
||||
{
|
||||
MibIPGlobalProperties mibIPGlobalProperties = new MibIPGlobalProperties("/proc");
|
||||
if (File.Exists(mibIPGlobalProperties.StatisticsFile))
|
||||
{
|
||||
return mibIPGlobalProperties;
|
||||
}
|
||||
}
|
||||
if (Directory.Exists("/usr/compat/linux/proc"))
|
||||
{
|
||||
MibIPGlobalProperties mibIPGlobalProperties = new MibIPGlobalProperties("/usr/compat/linux/proc");
|
||||
if (File.Exists(mibIPGlobalProperties.StatisticsFile))
|
||||
{
|
||||
return mibIPGlobalProperties;
|
||||
}
|
||||
}
|
||||
throw new NotSupportedException("This platform is not supported");
|
||||
}
|
||||
|
||||
/// <summary>Returns information about the Internet Protocol version 4 (IPV4) Transmission Control Protocol (TCP) connections on the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.TcpConnectionInformation" /> array that contains objects that describe the active TCP connections, or an empty array if no active TCP connections are detected.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The Win32 function GetTcpTable failed. </exception>
|
||||
// Token: 0x06000BDF RID: 3039
|
||||
public abstract TcpConnectionInformation[] GetActiveTcpConnections();
|
||||
|
||||
/// <summary>Returns endpoint information about the Internet Protocol version 4 (IPV4) Transmission Control Protocol (TCP) listeners on the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.IPEndPoint" /> array that contains objects that describe the active TCP listeners, or an empty array, if no active TCP listeners are detected.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The Win32 function GetTcpTable failed. </exception>
|
||||
// Token: 0x06000BE0 RID: 3040
|
||||
public abstract IPEndPoint[] GetActiveTcpListeners();
|
||||
|
||||
/// <summary>Returns information about the Internet Protocol version 4 (IPv4) User Datagram Protocol (UDP) listeners on the local computer.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.IPEndPoint" /> array that contains objects that describe the UDP listeners, or an empty array if no UDP listeners are detected.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The call to the Win32 function GetUdpTable failed. </exception>
|
||||
// Token: 0x06000BE1 RID: 3041
|
||||
public abstract IPEndPoint[] GetActiveUdpListeners();
|
||||
|
||||
/// <summary>Provides Internet Control Message Protocol (ICMP) version 4 statistical data for the local computer.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IcmpV4Statistics" /> object that provides ICMP version 4 traffic statistics for the local computer.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The Win32 function GetIcmpStatistics failed. </exception>
|
||||
// Token: 0x06000BE2 RID: 3042
|
||||
public abstract IcmpV4Statistics GetIcmpV4Statistics();
|
||||
|
||||
/// <summary>Provides Internet Control Message Protocol (ICMP) version 6 statistical data for the local computer.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IcmpV6Statistics" /> object that provides ICMP version 6 traffic statistics for the local computer.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The Win32 function GetIcmpStatisticsEx failed. </exception>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">The local computer's operating system is not Windows XP or later.</exception>
|
||||
// Token: 0x06000BE3 RID: 3043
|
||||
public abstract IcmpV6Statistics GetIcmpV6Statistics();
|
||||
|
||||
/// <summary>Provides Internet Protocol version 4 (IPv4) statistical data for the local computer.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPGlobalStatistics" /> object that provides IPv4 traffic statistics for the local computer.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The call to the Win32 function GetIpStatistics failed.</exception>
|
||||
// Token: 0x06000BE4 RID: 3044
|
||||
public abstract IPGlobalStatistics GetIPv4GlobalStatistics();
|
||||
|
||||
/// <summary>Provides Internet Protocol version 6 (IPv6) statistical data for the local computer.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPGlobalStatistics" /> object that provides IPv6 traffic statistics for the local computer.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The call to the Win32 function GetIpStatistics failed.</exception>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">The local computer is not running an operating system that supports IPv6. </exception>
|
||||
// Token: 0x06000BE5 RID: 3045
|
||||
public abstract IPGlobalStatistics GetIPv6GlobalStatistics();
|
||||
|
||||
/// <summary>Provides Transmission Control Protocol/Internet Protocol version 4 (TCP/IPv4) statistical data for the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.TcpStatistics" /> object that provides TCP/IPv4 traffic statistics for the local computer.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The call to the Win32 function GetTcpStatistics failed.</exception>
|
||||
// Token: 0x06000BE6 RID: 3046
|
||||
public abstract TcpStatistics GetTcpIPv4Statistics();
|
||||
|
||||
/// <summary>Provides Transmission Control Protocol/Internet Protocol version 6 (TCP/IPv6) statistical data for the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.TcpStatistics" /> object that provides TCP/IPv6 traffic statistics for the local computer.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The call to the Win32 function GetTcpStatistics failed.</exception>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">The local computer is not running an operating system that supports IPv6. </exception>
|
||||
// Token: 0x06000BE7 RID: 3047
|
||||
public abstract TcpStatistics GetTcpIPv6Statistics();
|
||||
|
||||
/// <summary>Provides User Datagram Protocol/Internet Protocol version 4 (UDP/IPv4) statistical data for the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.UdpStatistics" /> object that provides UDP/IPv4 traffic statistics for the local computer.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The call to the Win32 function GetUdpStatistics failed.</exception>
|
||||
// Token: 0x06000BE8 RID: 3048
|
||||
public abstract UdpStatistics GetUdpIPv4Statistics();
|
||||
|
||||
/// <summary>Provides User Datagram Protocol/Internet Protocol version 6 (UDP/IPv6) statistical data for the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.UdpStatistics" /> object that provides UDP/IPv6 traffic statistics for the local computer.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The call to the Win32 function GetUdpStatistics failed.</exception>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">The local computer is not running an operating system that supports IPv6. </exception>
|
||||
// Token: 0x06000BE9 RID: 3049
|
||||
public abstract UdpStatistics GetUdpIPv6Statistics();
|
||||
|
||||
/// <summary>Gets the Dynamic Host Configuration Protocol (DHCP) scope name.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> instance that contains the computer's DHCP scope name.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">A Win32 function call failed. </exception>
|
||||
// Token: 0x170002FE RID: 766
|
||||
// (get) Token: 0x06000BEA RID: 3050
|
||||
public abstract string DhcpScopeName { get; }
|
||||
|
||||
/// <summary>Gets the domain in which the local computer is registered.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> instance that contains the computer's domain name. If the computer does not belong to a domain, returns <see cref="F:System.String.Empty" />.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">A Win32 function call failed. </exception>
|
||||
// Token: 0x170002FF RID: 767
|
||||
// (get) Token: 0x06000BEB RID: 3051
|
||||
public abstract string DomainName { get; }
|
||||
|
||||
/// <summary>Gets the host name for the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> instance that contains the computer's NetBIOS name.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">A Win32 function call failed. </exception>
|
||||
// Token: 0x17000300 RID: 768
|
||||
// (get) Token: 0x06000BEC RID: 3052
|
||||
public abstract string HostName { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that specifies whether the local computer is acting as a Windows Internet Name Service (WINS) proxy.</summary>
|
||||
/// <returns>true if the local computer is a WINS proxy; otherwise, false.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">A Win32 function call failed. </exception>
|
||||
// Token: 0x17000301 RID: 769
|
||||
// (get) Token: 0x06000BED RID: 3053
|
||||
public abstract bool IsWinsProxy { get; }
|
||||
|
||||
/// <summary>Gets the Network Basic Input/Output System (NetBIOS) node type of the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.NetBiosNodeType" /> value.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">A Win32 function call failed. </exception>
|
||||
// Token: 0x17000302 RID: 770
|
||||
// (get) Token: 0x06000BEE RID: 3054
|
||||
public abstract NetBiosNodeType NodeType { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides Internet Protocol (IP) statistical data.</summary>
|
||||
// Token: 0x0200016A RID: 362
|
||||
public abstract class IPGlobalStatistics
|
||||
{
|
||||
/// <summary>Gets the default time-to-live (TTL) value for Internet Protocol (IP) packets.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the TTL.</returns>
|
||||
// Token: 0x17000315 RID: 789
|
||||
// (get) Token: 0x06000C32 RID: 3122
|
||||
public abstract int DefaultTtl { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that specifies whether Internet Protocol (IP) packet forwarding is enabled.</summary>
|
||||
/// <returns>A <see cref="T:System.Boolean" /> value that specifies whether packet forwarding is enabled.</returns>
|
||||
// Token: 0x17000316 RID: 790
|
||||
// (get) Token: 0x06000C33 RID: 3123
|
||||
public abstract bool ForwardingEnabled { get; }
|
||||
|
||||
/// <summary>Gets the number of network interfaces.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value containing the number of network interfaces for the address family used to obtain this <see cref="T:System.Net.NetworkInformation.IPGlobalStatistics" /> instance.</returns>
|
||||
// Token: 0x17000317 RID: 791
|
||||
// (get) Token: 0x06000C34 RID: 3124
|
||||
public abstract int NumberOfInterfaces { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) addresses assigned to the local computer.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that indicates the number of IP addresses assigned to the address family (Internet Protocol version 4 or Internet Protocol version 6) described by this object.</returns>
|
||||
// Token: 0x17000318 RID: 792
|
||||
// (get) Token: 0x06000C35 RID: 3125
|
||||
public abstract int NumberOfIPAddresses { get; }
|
||||
|
||||
/// <summary>Gets the number of routes in the Internet Protocol (IP) routing table.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of routes in the routing table.</returns>
|
||||
// Token: 0x17000319 RID: 793
|
||||
// (get) Token: 0x06000C36 RID: 3126
|
||||
public abstract int NumberOfRoutes { get; }
|
||||
|
||||
/// <summary>Gets the number of outbound Internet Protocol (IP) packets.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of outgoing packets.</returns>
|
||||
// Token: 0x1700031A RID: 794
|
||||
// (get) Token: 0x06000C37 RID: 3127
|
||||
public abstract long OutputPacketRequests { get; }
|
||||
|
||||
/// <summary>Gets the number of routes that have been discarded from the routing table.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of valid routes that have been discarded.</returns>
|
||||
// Token: 0x1700031B RID: 795
|
||||
// (get) Token: 0x06000C38 RID: 3128
|
||||
public abstract long OutputPacketRoutingDiscards { get; }
|
||||
|
||||
/// <summary>Gets the number of transmitted Internet Protocol (IP) packets that have been discarded.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of outgoing packets that have been discarded.</returns>
|
||||
// Token: 0x1700031C RID: 796
|
||||
// (get) Token: 0x06000C39 RID: 3129
|
||||
public abstract long OutputPacketsDiscarded { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets for which the local computer could not determine a route to the destination address.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the number of packets that could not be sent because a route could not be found.</returns>
|
||||
// Token: 0x1700031D RID: 797
|
||||
// (get) Token: 0x06000C3A RID: 3130
|
||||
public abstract long OutputPacketsWithNoRoute { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets that could not be fragmented.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of packets that required fragmentation but had the "Don't Fragment" bit set.</returns>
|
||||
// Token: 0x1700031E RID: 798
|
||||
// (get) Token: 0x06000C3B RID: 3131
|
||||
public abstract long PacketFragmentFailures { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets that required reassembly.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of packet reassemblies required.</returns>
|
||||
// Token: 0x1700031F RID: 799
|
||||
// (get) Token: 0x06000C3C RID: 3132
|
||||
public abstract long PacketReassembliesRequired { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets that were not successfully reassembled.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of packets that could not be reassembled.</returns>
|
||||
// Token: 0x17000320 RID: 800
|
||||
// (get) Token: 0x06000C3D RID: 3133
|
||||
public abstract long PacketReassemblyFailures { get; }
|
||||
|
||||
/// <summary>Gets the maximum amount of time within which all fragments of an Internet Protocol (IP) packet must arrive.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the maximum number of milliseconds within which all fragments of a packet must arrive to avoid being discarded.</returns>
|
||||
// Token: 0x17000321 RID: 801
|
||||
// (get) Token: 0x06000C3E RID: 3134
|
||||
public abstract long PacketReassemblyTimeout { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets fragmented.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of fragmented packets.</returns>
|
||||
// Token: 0x17000322 RID: 802
|
||||
// (get) Token: 0x06000C3F RID: 3135
|
||||
public abstract long PacketsFragmented { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets reassembled.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of fragmented packets that have been successfully reassembled.</returns>
|
||||
// Token: 0x17000323 RID: 803
|
||||
// (get) Token: 0x06000C40 RID: 3136
|
||||
public abstract long PacketsReassembled { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of IP packets received.</returns>
|
||||
// Token: 0x17000324 RID: 804
|
||||
// (get) Token: 0x06000C41 RID: 3137
|
||||
public abstract long ReceivedPackets { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets delivered.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of IP packets delivered.</returns>
|
||||
// Token: 0x17000325 RID: 805
|
||||
// (get) Token: 0x06000C42 RID: 3138
|
||||
public abstract long ReceivedPacketsDelivered { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets that have been received and discarded.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of incoming packets that have been discarded.</returns>
|
||||
// Token: 0x17000326 RID: 806
|
||||
// (get) Token: 0x06000C43 RID: 3139
|
||||
public abstract long ReceivedPacketsDiscarded { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets forwarded.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of forwarded packets.</returns>
|
||||
// Token: 0x17000327 RID: 807
|
||||
// (get) Token: 0x06000C44 RID: 3140
|
||||
public abstract long ReceivedPacketsForwarded { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets with address errors that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of IP packets received with errors in the address portion of the header.</returns>
|
||||
// Token: 0x17000328 RID: 808
|
||||
// (get) Token: 0x06000C45 RID: 3141
|
||||
public abstract long ReceivedPacketsWithAddressErrors { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets with header errors that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of IP packets received and discarded due to errors in the header.</returns>
|
||||
// Token: 0x17000329 RID: 809
|
||||
// (get) Token: 0x06000C46 RID: 3142
|
||||
public abstract long ReceivedPacketsWithHeadersErrors { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Protocol (IP) packets received on the local machine with an unknown protocol in the header.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that indicates the total number of IP packets received with an unknown protocol.</returns>
|
||||
// Token: 0x1700032A RID: 810
|
||||
// (get) Token: 0x06000C47 RID: 3143
|
||||
public abstract long ReceivedPacketsWithUnknownProtocol { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about network interfaces that support Internet Protocol version 4 (IPv4) or Internet Protocol version 6 (IPv6).</summary>
|
||||
// Token: 0x0200016E RID: 366
|
||||
public abstract class IPInterfaceProperties
|
||||
{
|
||||
/// <summary>Provides Internet Protocol version 4 (IPv4) configuration data for this network interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPv4InterfaceProperties" /> object that contains IPv4 configuration data, or null if no data is available for the interface.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The interface does not support the IPv4 protocol.</exception>
|
||||
// Token: 0x06000C78 RID: 3192
|
||||
public abstract IPv4InterfaceProperties GetIPv4Properties();
|
||||
|
||||
/// <summary>Provides Internet Protocol version 6 (IPv6) configuration data for this network interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPv6InterfaceProperties" /> object that contains IPv6 configuration data.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The interface does not support the IPv6 protocol.</exception>
|
||||
// Token: 0x06000C79 RID: 3193
|
||||
public abstract IPv6InterfaceProperties GetIPv6Properties();
|
||||
|
||||
/// <summary>Gets the anycast IP addresses assigned to this interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPAddressInformationCollection" /> that contains the anycast addresses for this interface.</returns>
|
||||
// Token: 0x17000357 RID: 855
|
||||
// (get) Token: 0x06000C7A RID: 3194
|
||||
public abstract IPAddressInformationCollection AnycastAddresses { get; }
|
||||
|
||||
/// <summary>Gets the addresses of Dynamic Host Configuration Protocol (DHCP) servers for this interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> that contains the address information for DHCP servers, or an empty array if no servers are found.</returns>
|
||||
// Token: 0x17000358 RID: 856
|
||||
// (get) Token: 0x06000C7B RID: 3195
|
||||
public abstract IPAddressCollection DhcpServerAddresses { get; }
|
||||
|
||||
/// <summary>Gets the addresses of Domain Name System (DNS) servers for this interface.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> that contains the DNS server addresses.</returns>
|
||||
// Token: 0x17000359 RID: 857
|
||||
// (get) Token: 0x06000C7C RID: 3196
|
||||
public abstract IPAddressCollection DnsAddresses { get; }
|
||||
|
||||
/// <summary>Gets the Domain Name System (DNS) suffix associated with this interface.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the DNS suffix for this interface, or <see cref="F:System.String.Empty" /> if there is no DNS suffix for the interface.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows 2000. </exception>
|
||||
// Token: 0x1700035A RID: 858
|
||||
// (get) Token: 0x06000C7D RID: 3197
|
||||
public abstract string DnsSuffix { get; }
|
||||
|
||||
/// <summary>Gets the network gateway addresses for this interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.GatewayIPAddressInformationCollection" /> that contains the address information for network gateways, or an empty array if no gateways are found.</returns>
|
||||
// Token: 0x1700035B RID: 859
|
||||
// (get) Token: 0x06000C7E RID: 3198
|
||||
public abstract GatewayIPAddressInformationCollection GatewayAddresses { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether NetBt is configured to use DNS name resolution on this interface.</summary>
|
||||
/// <returns>true if NetBt is configured to use DNS name resolution on this interface; otherwise, false.</returns>
|
||||
// Token: 0x1700035C RID: 860
|
||||
// (get) Token: 0x06000C7F RID: 3199
|
||||
public abstract bool IsDnsEnabled { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether this interface is configured to automatically register its IP address information with the Domain Name System (DNS).</summary>
|
||||
/// <returns>true if this interface is configured to automatically register a mapping between its dynamic IP address and static domain names; otherwise, false.</returns>
|
||||
// Token: 0x1700035D RID: 861
|
||||
// (get) Token: 0x06000C80 RID: 3200
|
||||
public abstract bool IsDynamicDnsEnabled { get; }
|
||||
|
||||
/// <summary>Gets the multicast addresses assigned to this interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformationCollection" /> that contains the multicast addresses for this interface.</returns>
|
||||
// Token: 0x1700035E RID: 862
|
||||
// (get) Token: 0x06000C81 RID: 3201
|
||||
public abstract MulticastIPAddressInformationCollection MulticastAddresses { get; }
|
||||
|
||||
/// <summary>Gets the unicast addresses assigned to this interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformationCollection" /> that contains the unicast addresses for this interface.</returns>
|
||||
// Token: 0x1700035F RID: 863
|
||||
// (get) Token: 0x06000C82 RID: 3202
|
||||
public abstract UnicastIPAddressInformationCollection UnicastAddresses { get; }
|
||||
|
||||
/// <summary>Gets the addresses of Windows Internet Name Service (WINS) servers.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPAddressCollection" /> that contains the address information for WINS servers, or an empty array if no servers are found.</returns>
|
||||
// Token: 0x17000360 RID: 864
|
||||
// (get) Token: 0x06000C83 RID: 3203
|
||||
public abstract IPAddressCollection WinsServersAddresses { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Reports the status of sending an Internet Control Message Protocol (ICMP) echo message to a computer.</summary>
|
||||
// Token: 0x02000173 RID: 371
|
||||
public enum IPStatus
|
||||
{
|
||||
/// <summary>The ICMP echo request failed for an unknown reason.</summary>
|
||||
// Token: 0x04000BE9 RID: 3049
|
||||
Unknown = -1,
|
||||
/// <summary>The ICMP echo request succeeded; an ICMP echo reply was received. When you get this status code, the other <see cref="T:System.Net.NetworkInformation.PingReply" /> properties contain valid data.</summary>
|
||||
// Token: 0x04000BEA RID: 3050
|
||||
Success,
|
||||
/// <summary>The ICMP echo request failed because the network that contains the destination computer is not reachable.</summary>
|
||||
// Token: 0x04000BEB RID: 3051
|
||||
DestinationNetworkUnreachable = 11002,
|
||||
/// <summary>The ICMP echo request failed because the destination computer is not reachable.</summary>
|
||||
// Token: 0x04000BEC RID: 3052
|
||||
DestinationHostUnreachable,
|
||||
/// <summary>The ICMP echo request failed because contact with the destination computer is administratively prohibited.</summary>
|
||||
// Token: 0x04000BED RID: 3053
|
||||
DestinationProhibited,
|
||||
/// <summary>The ICMP echo request failed because the destination computer that is specified in an ICMP echo message is not reachable, because it does not support the packet's protocol.</summary>
|
||||
// Token: 0x04000BEE RID: 3054
|
||||
DestinationProtocolUnreachable = 11004,
|
||||
/// <summary>The ICMP echo request failed because the port on the destination computer is not available.</summary>
|
||||
// Token: 0x04000BEF RID: 3055
|
||||
DestinationPortUnreachable,
|
||||
/// <summary>The ICMP echo request failed because of insufficient network resources.</summary>
|
||||
// Token: 0x04000BF0 RID: 3056
|
||||
NoResources,
|
||||
/// <summary>The ICMP echo request failed because it contains an invalid option.</summary>
|
||||
// Token: 0x04000BF1 RID: 3057
|
||||
BadOption,
|
||||
/// <summary>The ICMP echo request failed because of a hardware error.</summary>
|
||||
// Token: 0x04000BF2 RID: 3058
|
||||
HardwareError,
|
||||
/// <summary>The ICMP echo request failed because the packet containing the request is larger than the maximum transmission unit (MTU) of a node (router or gateway) located between the source and destination. The MTU defines the maximum size of a transmittable packet.</summary>
|
||||
// Token: 0x04000BF3 RID: 3059
|
||||
PacketTooBig,
|
||||
/// <summary>The ICMP echo Reply was not received within the allotted time. The default time allowed for replies is 5 seconds. You can change this value using the <see cref="Overload:System.Net.NetworkInformation.Ping.Send" /> or <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> methods that take a <paramref name="timeout" /> parameter.</summary>
|
||||
// Token: 0x04000BF4 RID: 3060
|
||||
TimedOut,
|
||||
/// <summary>The ICMP echo request failed because there is no valid route between the source and destination computers.</summary>
|
||||
// Token: 0x04000BF5 RID: 3061
|
||||
BadRoute = 11012,
|
||||
/// <summary>The ICMP echo request failed because its Time to Live (TTL) value reached zero, causing the forwarding node (router or gateway) to discard the packet.</summary>
|
||||
// Token: 0x04000BF6 RID: 3062
|
||||
TtlExpired,
|
||||
/// <summary>The ICMP echo request failed because the packet was divided into fragments for transmission and all of the fragments were not received within the time allotted for reassembly. RFC 2460 (available at www.ietf.org) specifies 60 seconds as the time limit within which all packet fragments must be received.</summary>
|
||||
// Token: 0x04000BF7 RID: 3063
|
||||
TtlReassemblyTimeExceeded,
|
||||
/// <summary>The ICMP echo request failed because a node (router or gateway) encountered problems while processing the packet header. This is the status if, for example, the header contains invalid field data or an unrecognized option.</summary>
|
||||
// Token: 0x04000BF8 RID: 3064
|
||||
ParameterProblem,
|
||||
/// <summary>The ICMP echo request failed because the packet was discarded. This occurs when the source computer's output queue has insufficient storage space, or when packets arrive at the destination too quickly to be processed.</summary>
|
||||
// Token: 0x04000BF9 RID: 3065
|
||||
SourceQuench,
|
||||
/// <summary>The ICMP echo request failed because the destination IP address cannot receive ICMP echo requests or should never appear in the destination address field of any IP datagram. For example, calling <see cref="Overload:System.Net.NetworkInformation.Ping.Send" /> and specifying IP address "000.0.0.0" returns this status.</summary>
|
||||
// Token: 0x04000BFA RID: 3066
|
||||
BadDestination = 11018,
|
||||
/// <summary>The ICMP echo request failed because the destination computer that is specified in an ICMP echo message is not reachable; the exact cause of problem is unknown.</summary>
|
||||
// Token: 0x04000BFB RID: 3067
|
||||
DestinationUnreachable = 11040,
|
||||
/// <summary>The ICMP echo request failed because its Time to Live (TTL) value reached zero, causing the forwarding node (router or gateway) to discard the packet.</summary>
|
||||
// Token: 0x04000BFC RID: 3068
|
||||
TimeExceeded,
|
||||
/// <summary>The ICMP echo request failed because the header is invalid.</summary>
|
||||
// Token: 0x04000BFD RID: 3069
|
||||
BadHeader,
|
||||
/// <summary>The ICMP echo request failed because the Next Header field does not contain a recognized value. The Next Header field indicates the extension header type (if present) or the protocol above the IP layer, for example, TCP or UDP.</summary>
|
||||
// Token: 0x04000BFE RID: 3070
|
||||
UnrecognizedNextHeader,
|
||||
/// <summary>The ICMP echo request failed because of an ICMP protocol error.</summary>
|
||||
// Token: 0x04000BFF RID: 3071
|
||||
IcmpError,
|
||||
/// <summary>The ICMP echo request failed because the source address and destination address that are specified in an ICMP echo message are not in the same scope. This is typically caused by a router forwarding a packet using an interface that is outside the scope of the source address. Address scopes (link-local, site-local, and global scope) determine where on the network an address is valid.</summary>
|
||||
// Token: 0x04000C00 RID: 3072
|
||||
DestinationScopeMismatch
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about network interfaces that support Internet Protocol version 4 (IPv4).</summary>
|
||||
// Token: 0x02000174 RID: 372
|
||||
public abstract class IPv4InterfaceProperties
|
||||
{
|
||||
/// <summary>Gets the index of the network interface associated with the Internet Protocol version 4 (IPv4) address.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> that contains the index of the IPv4 interface.</returns>
|
||||
// Token: 0x17000375 RID: 885
|
||||
// (get) Token: 0x06000CA5 RID: 3237
|
||||
public abstract int Index { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether this interface has an automatic private IP addressing (APIPA) address.</summary>
|
||||
/// <returns>true if the interface uses an APIPA address; otherwise, false.</returns>
|
||||
// Token: 0x17000376 RID: 886
|
||||
// (get) Token: 0x06000CA6 RID: 3238
|
||||
public abstract bool IsAutomaticPrivateAddressingActive { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether this interface has automatic private IP addressing (APIPA) enabled.</summary>
|
||||
/// <returns>true if the interface uses APIPA; otherwise, false.</returns>
|
||||
// Token: 0x17000377 RID: 887
|
||||
// (get) Token: 0x06000CA7 RID: 3239
|
||||
public abstract bool IsAutomaticPrivateAddressingEnabled { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the interface is configured to use a Dynamic Host Configuration Protocol (DHCP) server to obtain an IP address.</summary>
|
||||
/// <returns>true if the interface is configured to obtain an IP address from a DHCP server; otherwise, false.</returns>
|
||||
// Token: 0x17000378 RID: 888
|
||||
// (get) Token: 0x06000CA8 RID: 3240
|
||||
public abstract bool IsDhcpEnabled { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether this interface can forward (route) packets.</summary>
|
||||
/// <returns>true if this interface routes packets; otherwise false.</returns>
|
||||
// Token: 0x17000379 RID: 889
|
||||
// (get) Token: 0x06000CA9 RID: 3241
|
||||
public abstract bool IsForwardingEnabled { get; }
|
||||
|
||||
/// <summary>Gets the maximum transmission unit (MTU) for this network interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the MTU.</returns>
|
||||
// Token: 0x1700037A RID: 890
|
||||
// (get) Token: 0x06000CAA RID: 3242
|
||||
public abstract int Mtu { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether an interface uses Windows Internet Name Service (WINS).</summary>
|
||||
/// <returns>true if the interface uses WINS; otherwise, false.</returns>
|
||||
// Token: 0x1700037B RID: 891
|
||||
// (get) Token: 0x06000CAB RID: 3243
|
||||
public abstract bool UsesWins { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides statistical data for a network interface on the local computer.</summary>
|
||||
// Token: 0x0200017A RID: 378
|
||||
public abstract class IPv4InterfaceStatistics
|
||||
{
|
||||
/// <summary>Gets the number of bytes that were received on the interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of bytes that were received on the interface.</returns>
|
||||
// Token: 0x1700038C RID: 908
|
||||
// (get) Token: 0x06000CC3 RID: 3267
|
||||
public abstract long BytesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of bytes that were sent on the interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of bytes that were transmitted on the interface.</returns>
|
||||
// Token: 0x1700038D RID: 909
|
||||
// (get) Token: 0x06000CC4 RID: 3268
|
||||
public abstract long BytesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of incoming packets that were discarded.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of discarded incoming packets.</returns>
|
||||
// Token: 0x1700038E RID: 910
|
||||
// (get) Token: 0x06000CC5 RID: 3269
|
||||
public abstract long IncomingPacketsDiscarded { get; }
|
||||
|
||||
/// <summary>Gets the number of incoming packets with errors.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of incoming packets with errors.</returns>
|
||||
// Token: 0x1700038F RID: 911
|
||||
// (get) Token: 0x06000CC6 RID: 3270
|
||||
public abstract long IncomingPacketsWithErrors { get; }
|
||||
|
||||
/// <summary>Gets the number of incoming packets with an unknown protocol.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of incoming packets with an unknown protocol.</returns>
|
||||
// Token: 0x17000390 RID: 912
|
||||
// (get) Token: 0x06000CC7 RID: 3271
|
||||
public abstract long IncomingUnknownProtocolPackets { get; }
|
||||
|
||||
/// <summary>Gets the number of non-unicast packets that were received on the interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of non-unicast packets that were received on the interface.</returns>
|
||||
// Token: 0x17000391 RID: 913
|
||||
// (get) Token: 0x06000CC8 RID: 3272
|
||||
public abstract long NonUnicastPacketsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of non-unicast packets that were sent on the interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of non-unicast packets that were sent on the interface.</returns>
|
||||
// Token: 0x17000392 RID: 914
|
||||
// (get) Token: 0x06000CC9 RID: 3273
|
||||
public abstract long NonUnicastPacketsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of outgoing packets that were discarded.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of discarded outgoing packets.</returns>
|
||||
// Token: 0x17000393 RID: 915
|
||||
// (get) Token: 0x06000CCA RID: 3274
|
||||
public abstract long OutgoingPacketsDiscarded { get; }
|
||||
|
||||
/// <summary>Gets the number of outgoing packets with errors.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of outgoing packets with errors.</returns>
|
||||
// Token: 0x17000394 RID: 916
|
||||
// (get) Token: 0x06000CCB RID: 3275
|
||||
public abstract long OutgoingPacketsWithErrors { get; }
|
||||
|
||||
/// <summary>Gets the length of the output queue.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of packets in the output queue.</returns>
|
||||
// Token: 0x17000395 RID: 917
|
||||
// (get) Token: 0x06000CCC RID: 3276
|
||||
[global::System.MonoTODO("Not implemented for Linux")]
|
||||
public abstract long OutputQueueLength { get; }
|
||||
|
||||
/// <summary>Gets the number of unicast packets that were received on the interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of unicast packets that were received on the interface.</returns>
|
||||
// Token: 0x17000396 RID: 918
|
||||
// (get) Token: 0x06000CCD RID: 3277
|
||||
public abstract long UnicastPacketsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of unicast packets that were sent on the interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of unicast packets that were sent on the interface.</returns>
|
||||
// Token: 0x17000397 RID: 919
|
||||
// (get) Token: 0x06000CCE RID: 3278
|
||||
public abstract long UnicastPacketsSent { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about network interfaces that support Internet Protocol version 6 (IPv6).</summary>
|
||||
// Token: 0x0200017E RID: 382
|
||||
public abstract class IPv6InterfaceProperties
|
||||
{
|
||||
/// <summary>Gets the index of the network interface associated with the Internet Protocol version 6 (IPv6) address.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that contains the index of the IPv6 interface.</returns>
|
||||
// Token: 0x170003BC RID: 956
|
||||
// (get) Token: 0x06000CF8 RID: 3320
|
||||
public abstract int Index { get; }
|
||||
|
||||
/// <summary>Gets the maximum transmission unit (MTU) for this network interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the MTU.</returns>
|
||||
// Token: 0x170003BD RID: 957
|
||||
// (get) Token: 0x06000CF9 RID: 3321
|
||||
public abstract int Mtu { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.</summary>
|
||||
// Token: 0x02000180 RID: 384
|
||||
public abstract class IcmpV4Statistics
|
||||
{
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Address Mask Reply messages that were received.</returns>
|
||||
// Token: 0x170003C0 RID: 960
|
||||
// (get) Token: 0x06000CFE RID: 3326
|
||||
public abstract long AddressMaskRepliesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Reply messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Address Mask Reply messages that were sent.</returns>
|
||||
// Token: 0x170003C1 RID: 961
|
||||
// (get) Token: 0x06000CFF RID: 3327
|
||||
public abstract long AddressMaskRepliesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Address Mask Request messages that were received.</returns>
|
||||
// Token: 0x170003C2 RID: 962
|
||||
// (get) Token: 0x06000D00 RID: 3328
|
||||
public abstract long AddressMaskRequestsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Address Mask Request messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Address Mask Request messages that were sent.</returns>
|
||||
// Token: 0x170003C3 RID: 963
|
||||
// (get) Token: 0x06000D01 RID: 3329
|
||||
public abstract long AddressMaskRequestsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were received because of a packet having an unreachable address in its destination.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Destination Unreachable messages that were received.</returns>
|
||||
// Token: 0x170003C4 RID: 964
|
||||
// (get) Token: 0x06000D02 RID: 3330
|
||||
public abstract long DestinationUnreachableMessagesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were sent because of a packet having an unreachable address in its destination.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Destination Unreachable messages sent.</returns>
|
||||
// Token: 0x170003C5 RID: 965
|
||||
// (get) Token: 0x06000D03 RID: 3331
|
||||
public abstract long DestinationUnreachableMessagesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP Echo Reply messages that were received.</returns>
|
||||
// Token: 0x170003C6 RID: 966
|
||||
// (get) Token: 0x06000D04 RID: 3332
|
||||
public abstract long EchoRepliesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Reply messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP Echo Reply messages that were sent.</returns>
|
||||
// Token: 0x170003C7 RID: 967
|
||||
// (get) Token: 0x06000D05 RID: 3333
|
||||
public abstract long EchoRepliesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP Echo Request messages that were received.</returns>
|
||||
// Token: 0x170003C8 RID: 968
|
||||
// (get) Token: 0x06000D06 RID: 3334
|
||||
public abstract long EchoRequestsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Echo Request messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP Echo Request messages that were sent.</returns>
|
||||
// Token: 0x170003C9 RID: 969
|
||||
// (get) Token: 0x06000D07 RID: 3335
|
||||
public abstract long EchoRequestsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP error messages that were received.</returns>
|
||||
// Token: 0x170003CA RID: 970
|
||||
// (get) Token: 0x06000D08 RID: 3336
|
||||
public abstract long ErrorsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) error messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP error messages that were sent.</returns>
|
||||
// Token: 0x170003CB RID: 971
|
||||
// (get) Token: 0x06000D09 RID: 3337
|
||||
public abstract long ErrorsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMPv4 messages that were received.</returns>
|
||||
// Token: 0x170003CC RID: 972
|
||||
// (get) Token: 0x06000D0A RID: 3338
|
||||
public abstract long MessagesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMPv4 messages that were sent.</returns>
|
||||
// Token: 0x170003CD RID: 973
|
||||
// (get) Token: 0x06000D0B RID: 3339
|
||||
public abstract long MessagesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Parameter Problem messages that were received.</returns>
|
||||
// Token: 0x170003CE RID: 974
|
||||
// (get) Token: 0x06000D0C RID: 3340
|
||||
public abstract long ParameterProblemsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Parameter Problem messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Parameter Problem messages that were sent.</returns>
|
||||
// Token: 0x170003CF RID: 975
|
||||
// (get) Token: 0x06000D0D RID: 3341
|
||||
public abstract long ParameterProblemsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Redirect messages that were received.</returns>
|
||||
// Token: 0x170003D0 RID: 976
|
||||
// (get) Token: 0x06000D0E RID: 3342
|
||||
public abstract long RedirectsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Redirect messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Redirect messages that were sent.</returns>
|
||||
// Token: 0x170003D1 RID: 977
|
||||
// (get) Token: 0x06000D0F RID: 3343
|
||||
public abstract long RedirectsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Source Quench messages that were received.</returns>
|
||||
// Token: 0x170003D2 RID: 978
|
||||
// (get) Token: 0x06000D10 RID: 3344
|
||||
public abstract long SourceQuenchesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Source Quench messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Source Quench messages that were sent.</returns>
|
||||
// Token: 0x170003D3 RID: 979
|
||||
// (get) Token: 0x06000D11 RID: 3345
|
||||
public abstract long SourceQuenchesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Time Exceeded messages that were received.</returns>
|
||||
// Token: 0x170003D4 RID: 980
|
||||
// (get) Token: 0x06000D12 RID: 3346
|
||||
public abstract long TimeExceededMessagesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Time Exceeded messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Time Exceeded messages that were sent.</returns>
|
||||
// Token: 0x170003D5 RID: 981
|
||||
// (get) Token: 0x06000D13 RID: 3347
|
||||
public abstract long TimeExceededMessagesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Timestamp Reply messages that were received.</returns>
|
||||
// Token: 0x170003D6 RID: 982
|
||||
// (get) Token: 0x06000D14 RID: 3348
|
||||
public abstract long TimestampRepliesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Reply messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Timestamp Reply messages that were sent.</returns>
|
||||
// Token: 0x170003D7 RID: 983
|
||||
// (get) Token: 0x06000D15 RID: 3349
|
||||
public abstract long TimestampRepliesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Timestamp Request messages that were received.</returns>
|
||||
// Token: 0x170003D8 RID: 984
|
||||
// (get) Token: 0x06000D16 RID: 3350
|
||||
public abstract long TimestampRequestsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 4 (ICMPv4) Timestamp Request messages that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Timestamp Request messages that were sent.</returns>
|
||||
// Token: 0x170003D9 RID: 985
|
||||
// (get) Token: 0x06000D17 RID: 3351
|
||||
public abstract long TimestampRequestsSent { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000187 RID: 391
|
||||
internal class IcmpV6MessageTypes
|
||||
{
|
||||
// Token: 0x04000C20 RID: 3104
|
||||
public const int DestinationUnreachable = 1;
|
||||
|
||||
// Token: 0x04000C21 RID: 3105
|
||||
public const int PacketTooBig = 2;
|
||||
|
||||
// Token: 0x04000C22 RID: 3106
|
||||
public const int TimeExceeded = 3;
|
||||
|
||||
// Token: 0x04000C23 RID: 3107
|
||||
public const int ParameterProblem = 4;
|
||||
|
||||
// Token: 0x04000C24 RID: 3108
|
||||
public const int EchoRequest = 128;
|
||||
|
||||
// Token: 0x04000C25 RID: 3109
|
||||
public const int EchoReply = 129;
|
||||
|
||||
// Token: 0x04000C26 RID: 3110
|
||||
public const int GroupMembershipQuery = 130;
|
||||
|
||||
// Token: 0x04000C27 RID: 3111
|
||||
public const int GroupMembershipReport = 131;
|
||||
|
||||
// Token: 0x04000C28 RID: 3112
|
||||
public const int GroupMembershipReduction = 132;
|
||||
|
||||
// Token: 0x04000C29 RID: 3113
|
||||
public const int RouterSolicitation = 133;
|
||||
|
||||
// Token: 0x04000C2A RID: 3114
|
||||
public const int RouterAdvertisement = 134;
|
||||
|
||||
// Token: 0x04000C2B RID: 3115
|
||||
public const int NeighborSolicitation = 135;
|
||||
|
||||
// Token: 0x04000C2C RID: 3116
|
||||
public const int NeighborAdvertisement = 136;
|
||||
|
||||
// Token: 0x04000C2D RID: 3117
|
||||
public const int Redirect = 137;
|
||||
|
||||
// Token: 0x04000C2E RID: 3118
|
||||
public const int RouterRenumbering = 138;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides Internet Control Message Protocol for Internet Protocol version 6 (ICMPv6) statistical data for the local computer.</summary>
|
||||
// Token: 0x02000185 RID: 389
|
||||
public abstract class IcmpV6Statistics
|
||||
{
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) messages received because of a packet having an unreachable address in its destination.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Destination Unreachable messages received.</returns>
|
||||
// Token: 0x1700040E RID: 1038
|
||||
// (get) Token: 0x06000D50 RID: 3408
|
||||
public abstract long DestinationUnreachableMessagesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) messages sent because of a packet having an unreachable address in its destination.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Destination Unreachable messages sent.</returns>
|
||||
// Token: 0x1700040F RID: 1039
|
||||
// (get) Token: 0x06000D51 RID: 3409
|
||||
public abstract long DestinationUnreachableMessagesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Echo Reply messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP Echo Reply messages received.</returns>
|
||||
// Token: 0x17000410 RID: 1040
|
||||
// (get) Token: 0x06000D52 RID: 3410
|
||||
public abstract long EchoRepliesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Echo Reply messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP Echo Reply messages sent.</returns>
|
||||
// Token: 0x17000411 RID: 1041
|
||||
// (get) Token: 0x06000D53 RID: 3411
|
||||
public abstract long EchoRepliesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Echo Request messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP Echo Request messages received.</returns>
|
||||
// Token: 0x17000412 RID: 1042
|
||||
// (get) Token: 0x06000D54 RID: 3412
|
||||
public abstract long EchoRequestsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Echo Request messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of number of ICMP Echo Request messages sent.</returns>
|
||||
// Token: 0x17000413 RID: 1043
|
||||
// (get) Token: 0x06000D55 RID: 3413
|
||||
public abstract long EchoRequestsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) error messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP error messages received.</returns>
|
||||
// Token: 0x17000414 RID: 1044
|
||||
// (get) Token: 0x06000D56 RID: 3414
|
||||
public abstract long ErrorsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) error messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP error messages sent.</returns>
|
||||
// Token: 0x17000415 RID: 1045
|
||||
// (get) Token: 0x06000D57 RID: 3415
|
||||
public abstract long ErrorsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Group management Protocol (IGMP) Group Membership Query messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Group Membership Query messages received.</returns>
|
||||
// Token: 0x17000416 RID: 1046
|
||||
// (get) Token: 0x06000D58 RID: 3416
|
||||
public abstract long MembershipQueriesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Group management Protocol (IGMP) Group Membership Query messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Group Membership Query messages sent.</returns>
|
||||
// Token: 0x17000417 RID: 1047
|
||||
// (get) Token: 0x06000D59 RID: 3417
|
||||
public abstract long MembershipQueriesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Group Management Protocol (IGMP) Group Membership Reduction messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Group Membership Reduction messages received.</returns>
|
||||
// Token: 0x17000418 RID: 1048
|
||||
// (get) Token: 0x06000D5A RID: 3418
|
||||
public abstract long MembershipReductionsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Group Management Protocol (IGMP) Group Membership Reduction messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Group Membership Reduction messages sent.</returns>
|
||||
// Token: 0x17000419 RID: 1049
|
||||
// (get) Token: 0x06000D5B RID: 3419
|
||||
public abstract long MembershipReductionsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Group Management Protocol (IGMP) Group Membership Report messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Group Membership Report messages received.</returns>
|
||||
// Token: 0x1700041A RID: 1050
|
||||
// (get) Token: 0x06000D5C RID: 3420
|
||||
public abstract long MembershipReportsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Group Management Protocol (IGMP) Group Membership Report messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Group Membership Report messages sent.</returns>
|
||||
// Token: 0x1700041B RID: 1051
|
||||
// (get) Token: 0x06000D5D RID: 3421
|
||||
public abstract long MembershipReportsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMPv6 messages received.</returns>
|
||||
// Token: 0x1700041C RID: 1052
|
||||
// (get) Token: 0x06000D5E RID: 3422
|
||||
public abstract long MessagesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMPv6 messages sent.</returns>
|
||||
// Token: 0x1700041D RID: 1053
|
||||
// (get) Token: 0x06000D5F RID: 3423
|
||||
public abstract long MessagesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Advertisement messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Neighbor Advertisement messages received.</returns>
|
||||
// Token: 0x1700041E RID: 1054
|
||||
// (get) Token: 0x06000D60 RID: 3424
|
||||
public abstract long NeighborAdvertisementsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Advertisement messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Neighbor Advertisement messages sent.</returns>
|
||||
// Token: 0x1700041F RID: 1055
|
||||
// (get) Token: 0x06000D61 RID: 3425
|
||||
public abstract long NeighborAdvertisementsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Solicitation messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Neighbor Solicitation messages received.</returns>
|
||||
// Token: 0x17000420 RID: 1056
|
||||
// (get) Token: 0x06000D62 RID: 3426
|
||||
public abstract long NeighborSolicitsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Solicitation messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Neighbor Solicitation messages sent.</returns>
|
||||
// Token: 0x17000421 RID: 1057
|
||||
// (get) Token: 0x06000D63 RID: 3427
|
||||
public abstract long NeighborSolicitsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Packet Too Big messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Packet Too Big messages received.</returns>
|
||||
// Token: 0x17000422 RID: 1058
|
||||
// (get) Token: 0x06000D64 RID: 3428
|
||||
public abstract long PacketTooBigMessagesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Packet Too Big messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Packet Too Big messages sent.</returns>
|
||||
// Token: 0x17000423 RID: 1059
|
||||
// (get) Token: 0x06000D65 RID: 3429
|
||||
public abstract long PacketTooBigMessagesSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Parameter Problem messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Parameter Problem messages received.</returns>
|
||||
// Token: 0x17000424 RID: 1060
|
||||
// (get) Token: 0x06000D66 RID: 3430
|
||||
public abstract long ParameterProblemsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Parameter Problem messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Parameter Problem messages sent.</returns>
|
||||
// Token: 0x17000425 RID: 1061
|
||||
// (get) Token: 0x06000D67 RID: 3431
|
||||
public abstract long ParameterProblemsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Redirect messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Redirect messages received.</returns>
|
||||
// Token: 0x17000426 RID: 1062
|
||||
// (get) Token: 0x06000D68 RID: 3432
|
||||
public abstract long RedirectsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Redirect messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Redirect messages sent.</returns>
|
||||
// Token: 0x17000427 RID: 1063
|
||||
// (get) Token: 0x06000D69 RID: 3433
|
||||
public abstract long RedirectsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Router Advertisement messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Router Advertisement messages received.</returns>
|
||||
// Token: 0x17000428 RID: 1064
|
||||
// (get) Token: 0x06000D6A RID: 3434
|
||||
public abstract long RouterAdvertisementsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Router Advertisement messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Router Advertisement messages sent.</returns>
|
||||
// Token: 0x17000429 RID: 1065
|
||||
// (get) Token: 0x06000D6B RID: 3435
|
||||
public abstract long RouterAdvertisementsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Router Solicitation messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Router Solicitation messages received.</returns>
|
||||
// Token: 0x1700042A RID: 1066
|
||||
// (get) Token: 0x06000D6C RID: 3436
|
||||
public abstract long RouterSolicitsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Router Solicitation messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of Router Solicitation messages sent.</returns>
|
||||
// Token: 0x1700042B RID: 1067
|
||||
// (get) Token: 0x06000D6D RID: 3437
|
||||
public abstract long RouterSolicitsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Time Exceeded messages received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Time Exceeded messages received.</returns>
|
||||
// Token: 0x1700042C RID: 1068
|
||||
// (get) Token: 0x06000D6E RID: 3438
|
||||
public abstract long TimeExceededMessagesReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Time Exceeded messages sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of ICMP Time Exceeded messages sent.</returns>
|
||||
// Token: 0x1700042D RID: 1069
|
||||
// (get) Token: 0x06000D6F RID: 3439
|
||||
public abstract long TimeExceededMessagesSent { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000191 RID: 401
|
||||
internal enum LinuxArpHardware
|
||||
{
|
||||
// Token: 0x04000C50 RID: 3152
|
||||
ETHER = 1,
|
||||
// Token: 0x04000C51 RID: 3153
|
||||
EETHER,
|
||||
// Token: 0x04000C52 RID: 3154
|
||||
PRONET = 4,
|
||||
// Token: 0x04000C53 RID: 3155
|
||||
ATM = 19,
|
||||
// Token: 0x04000C54 RID: 3156
|
||||
SLIP = 256,
|
||||
// Token: 0x04000C55 RID: 3157
|
||||
PPP = 512,
|
||||
// Token: 0x04000C56 RID: 3158
|
||||
LOOPBACK = 772,
|
||||
// Token: 0x04000C57 RID: 3159
|
||||
FDDI = 774,
|
||||
// Token: 0x04000C58 RID: 3160
|
||||
TUNNEL = 768,
|
||||
// Token: 0x04000C59 RID: 3161
|
||||
TUNNEL6
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200015B RID: 347
|
||||
internal class LinuxGatewayIPAddressInformationCollection : GatewayIPAddressInformationCollection
|
||||
{
|
||||
// Token: 0x06000BAD RID: 2989 RVA: 0x00023D64 File Offset: 0x00021F64
|
||||
private LinuxGatewayIPAddressInformationCollection(bool isReadOnly)
|
||||
{
|
||||
this.is_readonly = isReadOnly;
|
||||
}
|
||||
|
||||
// Token: 0x06000BAE RID: 2990 RVA: 0x00023D74 File Offset: 0x00021F74
|
||||
public LinuxGatewayIPAddressInformationCollection(IPAddressCollection col)
|
||||
{
|
||||
foreach (IPAddress ipaddress in col)
|
||||
{
|
||||
this.Add(new GatewayIPAddressInformationImpl(ipaddress));
|
||||
}
|
||||
this.is_readonly = true;
|
||||
}
|
||||
|
||||
// Token: 0x170002EF RID: 751
|
||||
// (get) Token: 0x06000BB0 RID: 2992 RVA: 0x00023DF4 File Offset: 0x00021FF4
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_readonly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000B9B RID: 2971
|
||||
public static readonly LinuxGatewayIPAddressInformationCollection Empty = new LinuxGatewayIPAddressInformationCollection(true);
|
||||
|
||||
// Token: 0x04000B9C RID: 2972
|
||||
private bool is_readonly;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000170 RID: 368
|
||||
internal class LinuxIPInterfaceProperties : UnixIPInterfaceProperties
|
||||
{
|
||||
// Token: 0x06000C93 RID: 3219 RVA: 0x00025B24 File Offset: 0x00023D24
|
||||
public LinuxIPInterfaceProperties(LinuxNetworkInterface iface, List<IPAddress> addresses)
|
||||
: base(iface, addresses)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000C94 RID: 3220 RVA: 0x00025B30 File Offset: 0x00023D30
|
||||
public override IPv4InterfaceProperties GetIPv4Properties()
|
||||
{
|
||||
if (this.ipv4iface_properties == null)
|
||||
{
|
||||
this.ipv4iface_properties = new LinuxIPv4InterfaceProperties(this.iface as LinuxNetworkInterface);
|
||||
}
|
||||
return this.ipv4iface_properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000176 RID: 374
|
||||
internal sealed class LinuxIPv4InterfaceProperties : UnixIPv4InterfaceProperties
|
||||
{
|
||||
// Token: 0x06000CB2 RID: 3250 RVA: 0x00025E1C File Offset: 0x0002401C
|
||||
public LinuxIPv4InterfaceProperties(LinuxNetworkInterface iface)
|
||||
: base(iface)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000381 RID: 897
|
||||
// (get) Token: 0x06000CB3 RID: 3251 RVA: 0x00025E28 File Offset: 0x00024028
|
||||
public override bool IsForwardingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
string text = "/proc/sys/net/ipv4/conf/" + this.iface.Name + "/forwarding";
|
||||
if (File.Exists(text))
|
||||
{
|
||||
string text2 = NetworkInterface.ReadLine(text);
|
||||
return text2 != "0";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000382 RID: 898
|
||||
// (get) Token: 0x06000CB4 RID: 3252 RVA: 0x00025E70 File Offset: 0x00024070
|
||||
public override int Mtu
|
||||
{
|
||||
get
|
||||
{
|
||||
string text = (this.iface as LinuxNetworkInterface).IfacePath + "mtu";
|
||||
int num = 0;
|
||||
if (File.Exists(text))
|
||||
{
|
||||
string text2 = NetworkInterface.ReadLine(text);
|
||||
try
|
||||
{
|
||||
num = int.Parse(text2);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200017C RID: 380
|
||||
internal class LinuxIPv4InterfaceStatistics : IPv4InterfaceStatistics
|
||||
{
|
||||
// Token: 0x06000CDC RID: 3292 RVA: 0x000260B0 File Offset: 0x000242B0
|
||||
public LinuxIPv4InterfaceStatistics(LinuxNetworkInterface parent)
|
||||
{
|
||||
this.linux = parent;
|
||||
}
|
||||
|
||||
// Token: 0x06000CDD RID: 3293 RVA: 0x000260C0 File Offset: 0x000242C0
|
||||
private long Read(string file)
|
||||
{
|
||||
long num;
|
||||
try
|
||||
{
|
||||
num = long.Parse(NetworkInterface.ReadLine(this.linux.IfacePath + file));
|
||||
}
|
||||
catch
|
||||
{
|
||||
num = 0L;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x170003A4 RID: 932
|
||||
// (get) Token: 0x06000CDE RID: 3294 RVA: 0x00026120 File Offset: 0x00024320
|
||||
public override long BytesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/rx_bytes");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A5 RID: 933
|
||||
// (get) Token: 0x06000CDF RID: 3295 RVA: 0x00026130 File Offset: 0x00024330
|
||||
public override long BytesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/tx_bytes");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A6 RID: 934
|
||||
// (get) Token: 0x06000CE0 RID: 3296 RVA: 0x00026140 File Offset: 0x00024340
|
||||
public override long IncomingPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/rx_dropped");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A7 RID: 935
|
||||
// (get) Token: 0x06000CE1 RID: 3297 RVA: 0x00026150 File Offset: 0x00024350
|
||||
public override long IncomingPacketsWithErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/rx_errors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A8 RID: 936
|
||||
// (get) Token: 0x06000CE2 RID: 3298 RVA: 0x00026160 File Offset: 0x00024360
|
||||
public override long IncomingUnknownProtocolPackets
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A9 RID: 937
|
||||
// (get) Token: 0x06000CE3 RID: 3299 RVA: 0x00026164 File Offset: 0x00024364
|
||||
public override long NonUnicastPacketsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/multicast");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003AA RID: 938
|
||||
// (get) Token: 0x06000CE4 RID: 3300 RVA: 0x00026174 File Offset: 0x00024374
|
||||
public override long NonUnicastPacketsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/multicast");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003AB RID: 939
|
||||
// (get) Token: 0x06000CE5 RID: 3301 RVA: 0x00026184 File Offset: 0x00024384
|
||||
public override long OutgoingPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/tx_dropped");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003AC RID: 940
|
||||
// (get) Token: 0x06000CE6 RID: 3302 RVA: 0x00026194 File Offset: 0x00024394
|
||||
public override long OutgoingPacketsWithErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/tx_errors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003AD RID: 941
|
||||
// (get) Token: 0x06000CE7 RID: 3303 RVA: 0x000261A4 File Offset: 0x000243A4
|
||||
public override long OutputQueueLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1024L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003AE RID: 942
|
||||
// (get) Token: 0x06000CE8 RID: 3304 RVA: 0x000261AC File Offset: 0x000243AC
|
||||
public override long UnicastPacketsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/rx_packets");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003AF RID: 943
|
||||
// (get) Token: 0x06000CE9 RID: 3305 RVA: 0x000261BC File Offset: 0x000243BC
|
||||
public override long UnicastPacketsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Read("statistics/tx_packets");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C0A RID: 3082
|
||||
private LinuxNetworkInterface linux;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,299 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001A4 RID: 420
|
||||
internal class LinuxNetworkInterface : UnixNetworkInterface
|
||||
{
|
||||
// Token: 0x06000DFF RID: 3583 RVA: 0x00027130 File Offset: 0x00025330
|
||||
private LinuxNetworkInterface(string name)
|
||||
: base(name)
|
||||
{
|
||||
this.iface_path = "/sys/class/net/" + name + "/";
|
||||
this.iface_operstate_path = this.iface_path + "operstate";
|
||||
this.iface_flags_path = this.iface_path + "flags";
|
||||
}
|
||||
|
||||
// Token: 0x06000E00 RID: 3584 RVA: 0x00027188 File Offset: 0x00025388
|
||||
static LinuxNetworkInterface()
|
||||
{
|
||||
LinuxNetworkInterface.InitializeInterfaceAddresses();
|
||||
}
|
||||
|
||||
// Token: 0x17000492 RID: 1170
|
||||
// (get) Token: 0x06000E01 RID: 3585 RVA: 0x00027190 File Offset: 0x00025390
|
||||
internal string IfacePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.iface_path;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E02 RID: 3586
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void InitializeInterfaceAddresses();
|
||||
|
||||
// Token: 0x06000E03 RID: 3587
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern int GetInterfaceAddresses(out IntPtr ifap);
|
||||
|
||||
// Token: 0x06000E04 RID: 3588
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void FreeInterfaceAddresses(IntPtr ifap);
|
||||
|
||||
// Token: 0x06000E05 RID: 3589 RVA: 0x00027198 File Offset: 0x00025398
|
||||
public static NetworkInterface[] ImplGetAllNetworkInterfaces()
|
||||
{
|
||||
Dictionary<string, LinuxNetworkInterface> dictionary = new Dictionary<string, LinuxNetworkInterface>();
|
||||
IntPtr intPtr;
|
||||
if (LinuxNetworkInterface.GetInterfaceAddresses(out intPtr) != 0)
|
||||
{
|
||||
throw new SystemException("getifaddrs() failed");
|
||||
}
|
||||
try
|
||||
{
|
||||
IntPtr intPtr2 = intPtr;
|
||||
int num = 0;
|
||||
while (intPtr2 != IntPtr.Zero)
|
||||
{
|
||||
ifaddrs ifaddrs = (ifaddrs)Marshal.PtrToStructure(intPtr2, typeof(ifaddrs));
|
||||
IPAddress ipaddress = IPAddress.None;
|
||||
string text = ifaddrs.ifa_name;
|
||||
int num2 = -1;
|
||||
byte[] array = null;
|
||||
NetworkInterfaceType networkInterfaceType = NetworkInterfaceType.Unknown;
|
||||
if (ifaddrs.ifa_addr != IntPtr.Zero)
|
||||
{
|
||||
sockaddr_in sockaddr_in = (sockaddr_in)Marshal.PtrToStructure(ifaddrs.ifa_addr, typeof(sockaddr_in));
|
||||
if (sockaddr_in.sin_family == 10)
|
||||
{
|
||||
sockaddr_in6 sockaddr_in2 = (sockaddr_in6)Marshal.PtrToStructure(ifaddrs.ifa_addr, typeof(sockaddr_in6));
|
||||
ipaddress = new IPAddress(sockaddr_in2.sin6_addr.u6_addr8, (long)((ulong)sockaddr_in2.sin6_scope_id));
|
||||
}
|
||||
else if (sockaddr_in.sin_family == 2)
|
||||
{
|
||||
ipaddress = new IPAddress((long)((ulong)sockaddr_in.sin_addr));
|
||||
}
|
||||
else if (sockaddr_in.sin_family == 17)
|
||||
{
|
||||
sockaddr_ll sockaddr_ll = (sockaddr_ll)Marshal.PtrToStructure(ifaddrs.ifa_addr, typeof(sockaddr_ll));
|
||||
if ((int)sockaddr_ll.sll_halen > sockaddr_ll.sll_addr.Length)
|
||||
{
|
||||
Console.Error.WriteLine("Got a bad hardware address length for an AF_PACKET {0} {1}", sockaddr_ll.sll_halen, sockaddr_ll.sll_addr.Length);
|
||||
intPtr2 = ifaddrs.ifa_next;
|
||||
continue;
|
||||
}
|
||||
array = new byte[(int)sockaddr_ll.sll_halen];
|
||||
Array.Copy(sockaddr_ll.sll_addr, 0, array, 0, array.Length);
|
||||
num2 = sockaddr_ll.sll_ifindex;
|
||||
int sll_hatype = (int)sockaddr_ll.sll_hatype;
|
||||
if (Enum.IsDefined(typeof(LinuxArpHardware), sll_hatype))
|
||||
{
|
||||
LinuxArpHardware linuxArpHardware = (LinuxArpHardware)sll_hatype;
|
||||
switch (linuxArpHardware)
|
||||
{
|
||||
case LinuxArpHardware.TUNNEL:
|
||||
break;
|
||||
case LinuxArpHardware.TUNNEL6:
|
||||
break;
|
||||
default:
|
||||
switch (linuxArpHardware)
|
||||
{
|
||||
case LinuxArpHardware.ETHER:
|
||||
break;
|
||||
case LinuxArpHardware.EETHER:
|
||||
break;
|
||||
default:
|
||||
if (linuxArpHardware == LinuxArpHardware.ATM)
|
||||
{
|
||||
networkInterfaceType = NetworkInterfaceType.Atm;
|
||||
goto IL_27D;
|
||||
}
|
||||
if (linuxArpHardware == LinuxArpHardware.SLIP)
|
||||
{
|
||||
networkInterfaceType = NetworkInterfaceType.Slip;
|
||||
goto IL_27D;
|
||||
}
|
||||
if (linuxArpHardware != LinuxArpHardware.PPP)
|
||||
{
|
||||
goto IL_27D;
|
||||
}
|
||||
networkInterfaceType = NetworkInterfaceType.Ppp;
|
||||
goto IL_27D;
|
||||
case LinuxArpHardware.PRONET:
|
||||
networkInterfaceType = NetworkInterfaceType.TokenRing;
|
||||
goto IL_27D;
|
||||
}
|
||||
networkInterfaceType = NetworkInterfaceType.Ethernet;
|
||||
goto IL_27D;
|
||||
case LinuxArpHardware.LOOPBACK:
|
||||
networkInterfaceType = NetworkInterfaceType.Loopback;
|
||||
array = null;
|
||||
goto IL_27D;
|
||||
case LinuxArpHardware.FDDI:
|
||||
networkInterfaceType = NetworkInterfaceType.Fddi;
|
||||
goto IL_27D;
|
||||
}
|
||||
networkInterfaceType = NetworkInterfaceType.Tunnel;
|
||||
}
|
||||
}
|
||||
}
|
||||
IL_27D:
|
||||
LinuxNetworkInterface linuxNetworkInterface = null;
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
string text2 = "\0";
|
||||
int num3;
|
||||
num = (num3 = num + 1);
|
||||
text = text2 + num3.ToString();
|
||||
}
|
||||
if (!dictionary.TryGetValue(text, out linuxNetworkInterface))
|
||||
{
|
||||
linuxNetworkInterface = new LinuxNetworkInterface(text);
|
||||
dictionary.Add(text, linuxNetworkInterface);
|
||||
}
|
||||
if (!ipaddress.Equals(IPAddress.None))
|
||||
{
|
||||
linuxNetworkInterface.AddAddress(ipaddress);
|
||||
}
|
||||
if (array != null || networkInterfaceType == NetworkInterfaceType.Loopback)
|
||||
{
|
||||
if (networkInterfaceType == NetworkInterfaceType.Ethernet && Directory.Exists(linuxNetworkInterface.IfacePath + "wireless"))
|
||||
{
|
||||
networkInterfaceType = NetworkInterfaceType.Wireless80211;
|
||||
}
|
||||
linuxNetworkInterface.SetLinkLayerInfo(num2, array, networkInterfaceType);
|
||||
}
|
||||
intPtr2 = ifaddrs.ifa_next;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
LinuxNetworkInterface.FreeInterfaceAddresses(intPtr);
|
||||
}
|
||||
NetworkInterface[] array2 = new NetworkInterface[dictionary.Count];
|
||||
int num4 = 0;
|
||||
foreach (NetworkInterface networkInterface in dictionary.Values)
|
||||
{
|
||||
array2[num4] = networkInterface;
|
||||
num4++;
|
||||
}
|
||||
return array2;
|
||||
}
|
||||
|
||||
// Token: 0x06000E06 RID: 3590 RVA: 0x0002757C File Offset: 0x0002577C
|
||||
public override IPInterfaceProperties GetIPProperties()
|
||||
{
|
||||
if (this.ipproperties == null)
|
||||
{
|
||||
this.ipproperties = new LinuxIPInterfaceProperties(this, this.addresses);
|
||||
}
|
||||
return this.ipproperties;
|
||||
}
|
||||
|
||||
// Token: 0x06000E07 RID: 3591 RVA: 0x000275A4 File Offset: 0x000257A4
|
||||
public override IPv4InterfaceStatistics GetIPv4Statistics()
|
||||
{
|
||||
if (this.ipv4stats == null)
|
||||
{
|
||||
this.ipv4stats = new LinuxIPv4InterfaceStatistics(this);
|
||||
}
|
||||
return this.ipv4stats;
|
||||
}
|
||||
|
||||
// Token: 0x17000493 RID: 1171
|
||||
// (get) Token: 0x06000E08 RID: 3592 RVA: 0x000275C4 File Offset: 0x000257C4
|
||||
public override OperationalStatus OperationalStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!Directory.Exists(this.iface_path))
|
||||
{
|
||||
return OperationalStatus.Unknown;
|
||||
}
|
||||
try
|
||||
{
|
||||
string text = NetworkInterface.ReadLine(this.iface_operstate_path);
|
||||
string text2 = text;
|
||||
switch (text2)
|
||||
{
|
||||
case "unknown":
|
||||
return OperationalStatus.Unknown;
|
||||
case "notpresent":
|
||||
return OperationalStatus.NotPresent;
|
||||
case "down":
|
||||
return OperationalStatus.Down;
|
||||
case "lowerlayerdown":
|
||||
return OperationalStatus.LowerLayerDown;
|
||||
case "testing":
|
||||
return OperationalStatus.Testing;
|
||||
case "dormant":
|
||||
return OperationalStatus.Dormant;
|
||||
case "up":
|
||||
return OperationalStatus.Up;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
return OperationalStatus.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000494 RID: 1172
|
||||
// (get) Token: 0x06000E09 RID: 3593 RVA: 0x00027700 File Offset: 0x00025900
|
||||
public override bool SupportsMulticast
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!Directory.Exists(this.iface_path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bool flag;
|
||||
try
|
||||
{
|
||||
string text = NetworkInterface.ReadLine(this.iface_flags_path);
|
||||
if (text.Length > 2 && text[0] == '0' && text[1] == 'x')
|
||||
{
|
||||
text = text.Substring(2);
|
||||
}
|
||||
ulong num = ulong.Parse(text, NumberStyles.HexNumber);
|
||||
flag = (num & 4096UL) == 4096UL;
|
||||
}
|
||||
catch
|
||||
{
|
||||
flag = false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C9A RID: 3226
|
||||
private const int AF_INET = 2;
|
||||
|
||||
// Token: 0x04000C9B RID: 3227
|
||||
private const int AF_INET6 = 10;
|
||||
|
||||
// Token: 0x04000C9C RID: 3228
|
||||
private const int AF_PACKET = 17;
|
||||
|
||||
// Token: 0x04000C9D RID: 3229
|
||||
private NetworkInterfaceType type;
|
||||
|
||||
// Token: 0x04000C9E RID: 3230
|
||||
private string iface_path;
|
||||
|
||||
// Token: 0x04000C9F RID: 3231
|
||||
private string iface_operstate_path;
|
||||
|
||||
// Token: 0x04000CA0 RID: 3232
|
||||
private string iface_flags_path;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001C2 RID: 450
|
||||
internal class LinuxUnicastIPAddressInformation : UnicastIPAddressInformation
|
||||
{
|
||||
// Token: 0x06000EC3 RID: 3779 RVA: 0x00029430 File Offset: 0x00027630
|
||||
public LinuxUnicastIPAddressInformation(IPAddress address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
// Token: 0x170004FD RID: 1277
|
||||
// (get) Token: 0x06000EC4 RID: 3780 RVA: 0x00029440 File Offset: 0x00027640
|
||||
public override IPAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.address;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004FE RID: 1278
|
||||
// (get) Token: 0x06000EC5 RID: 3781 RVA: 0x00029448 File Offset: 0x00027648
|
||||
public override bool IsDnsEligible
|
||||
{
|
||||
get
|
||||
{
|
||||
byte[] addressBytes = this.address.GetAddressBytes();
|
||||
return addressBytes[0] != 169 || addressBytes[1] != 254;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004FF RID: 1279
|
||||
// (get) Token: 0x06000EC6 RID: 3782 RVA: 0x00029480 File Offset: 0x00027680
|
||||
[global::System.MonoTODO("Always returns false")]
|
||||
public override bool IsTransient
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000500 RID: 1280
|
||||
// (get) Token: 0x06000EC7 RID: 3783 RVA: 0x00029484 File Offset: 0x00027684
|
||||
public override long AddressPreferredLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000501 RID: 1281
|
||||
// (get) Token: 0x06000EC8 RID: 3784 RVA: 0x0002948C File Offset: 0x0002768C
|
||||
public override long AddressValidLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000502 RID: 1282
|
||||
// (get) Token: 0x06000EC9 RID: 3785 RVA: 0x00029494 File Offset: 0x00027694
|
||||
public override long DhcpLeaseLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000503 RID: 1283
|
||||
// (get) Token: 0x06000ECA RID: 3786 RVA: 0x0002949C File Offset: 0x0002769C
|
||||
public override DuplicateAddressDetectionState DuplicateAddressDetectionState
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000504 RID: 1284
|
||||
// (get) Token: 0x06000ECB RID: 3787 RVA: 0x000294A4 File Offset: 0x000276A4
|
||||
public override IPAddress IPv4Mask
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000505 RID: 1285
|
||||
// (get) Token: 0x06000ECC RID: 3788 RVA: 0x000294AC File Offset: 0x000276AC
|
||||
public override PrefixOrigin PrefixOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000506 RID: 1286
|
||||
// (get) Token: 0x06000ECD RID: 3789 RVA: 0x000294B4 File Offset: 0x000276B4
|
||||
public override SuffixOrigin SuffixOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D23 RID: 3363
|
||||
private IPAddress address;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000198 RID: 408
|
||||
internal enum MacOsArpHardware
|
||||
{
|
||||
// Token: 0x04000C77 RID: 3191
|
||||
ETHER = 6,
|
||||
// Token: 0x04000C78 RID: 3192
|
||||
ATM = 37,
|
||||
// Token: 0x04000C79 RID: 3193
|
||||
SLIP = 28,
|
||||
// Token: 0x04000C7A RID: 3194
|
||||
PPP = 23,
|
||||
// Token: 0x04000C7B RID: 3195
|
||||
LOOPBACK,
|
||||
// Token: 0x04000C7C RID: 3196
|
||||
FDDI = 15
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000171 RID: 369
|
||||
internal class MacOsIPInterfaceProperties : UnixIPInterfaceProperties
|
||||
{
|
||||
// Token: 0x06000C95 RID: 3221 RVA: 0x00025B5C File Offset: 0x00023D5C
|
||||
public MacOsIPInterfaceProperties(MacOsNetworkInterface iface, List<IPAddress> addresses)
|
||||
: base(iface, addresses)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000C96 RID: 3222 RVA: 0x00025B68 File Offset: 0x00023D68
|
||||
public override IPv4InterfaceProperties GetIPv4Properties()
|
||||
{
|
||||
if (this.ipv4iface_properties == null)
|
||||
{
|
||||
this.ipv4iface_properties = new MacOsIPv4InterfaceProperties(this.iface as MacOsNetworkInterface);
|
||||
}
|
||||
return this.ipv4iface_properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000177 RID: 375
|
||||
internal sealed class MacOsIPv4InterfaceProperties : UnixIPv4InterfaceProperties
|
||||
{
|
||||
// Token: 0x06000CB5 RID: 3253 RVA: 0x00025EDC File Offset: 0x000240DC
|
||||
public MacOsIPv4InterfaceProperties(MacOsNetworkInterface iface)
|
||||
: base(iface)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000383 RID: 899
|
||||
// (get) Token: 0x06000CB6 RID: 3254 RVA: 0x00025EE8 File Offset: 0x000240E8
|
||||
public override bool IsForwardingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000384 RID: 900
|
||||
// (get) Token: 0x06000CB7 RID: 3255 RVA: 0x00025EEC File Offset: 0x000240EC
|
||||
public override int Mtu
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200017D RID: 381
|
||||
internal class MacOsIPv4InterfaceStatistics : IPv4InterfaceStatistics
|
||||
{
|
||||
// Token: 0x06000CEA RID: 3306 RVA: 0x000261CC File Offset: 0x000243CC
|
||||
public MacOsIPv4InterfaceStatistics(MacOsNetworkInterface parent)
|
||||
{
|
||||
this.macos = parent;
|
||||
}
|
||||
|
||||
// Token: 0x170003B0 RID: 944
|
||||
// (get) Token: 0x06000CEB RID: 3307 RVA: 0x000261DC File Offset: 0x000243DC
|
||||
public override long BytesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B1 RID: 945
|
||||
// (get) Token: 0x06000CEC RID: 3308 RVA: 0x000261E0 File Offset: 0x000243E0
|
||||
public override long BytesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B2 RID: 946
|
||||
// (get) Token: 0x06000CED RID: 3309 RVA: 0x000261E4 File Offset: 0x000243E4
|
||||
public override long IncomingPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B3 RID: 947
|
||||
// (get) Token: 0x06000CEE RID: 3310 RVA: 0x000261E8 File Offset: 0x000243E8
|
||||
public override long IncomingPacketsWithErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B4 RID: 948
|
||||
// (get) Token: 0x06000CEF RID: 3311 RVA: 0x000261EC File Offset: 0x000243EC
|
||||
public override long IncomingUnknownProtocolPackets
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B5 RID: 949
|
||||
// (get) Token: 0x06000CF0 RID: 3312 RVA: 0x000261F0 File Offset: 0x000243F0
|
||||
public override long NonUnicastPacketsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B6 RID: 950
|
||||
// (get) Token: 0x06000CF1 RID: 3313 RVA: 0x000261F4 File Offset: 0x000243F4
|
||||
public override long NonUnicastPacketsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B7 RID: 951
|
||||
// (get) Token: 0x06000CF2 RID: 3314 RVA: 0x000261F8 File Offset: 0x000243F8
|
||||
public override long OutgoingPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B8 RID: 952
|
||||
// (get) Token: 0x06000CF3 RID: 3315 RVA: 0x000261FC File Offset: 0x000243FC
|
||||
public override long OutgoingPacketsWithErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003B9 RID: 953
|
||||
// (get) Token: 0x06000CF4 RID: 3316 RVA: 0x00026200 File Offset: 0x00024400
|
||||
public override long OutputQueueLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003BA RID: 954
|
||||
// (get) Token: 0x06000CF5 RID: 3317 RVA: 0x00026204 File Offset: 0x00024404
|
||||
public override long UnicastPacketsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003BB RID: 955
|
||||
// (get) Token: 0x06000CF6 RID: 3318 RVA: 0x00026208 File Offset: 0x00024408
|
||||
public override long UnicastPacketsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C0B RID: 3083
|
||||
private MacOsNetworkInterface macos;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.NetworkInformation.MacOsStructs;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001A5 RID: 421
|
||||
internal class MacOsNetworkInterface : UnixNetworkInterface
|
||||
{
|
||||
// Token: 0x06000E0A RID: 3594 RVA: 0x000277AC File Offset: 0x000259AC
|
||||
private MacOsNetworkInterface(string name)
|
||||
: base(name)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000E0B RID: 3595
|
||||
[DllImport("libc")]
|
||||
private static extern int getifaddrs(out IntPtr ifap);
|
||||
|
||||
// Token: 0x06000E0C RID: 3596
|
||||
[DllImport("libc")]
|
||||
private static extern void freeifaddrs(IntPtr ifap);
|
||||
|
||||
// Token: 0x06000E0D RID: 3597 RVA: 0x000277B8 File Offset: 0x000259B8
|
||||
public static NetworkInterface[] ImplGetAllNetworkInterfaces()
|
||||
{
|
||||
Dictionary<string, MacOsNetworkInterface> dictionary = new Dictionary<string, MacOsNetworkInterface>();
|
||||
IntPtr intPtr;
|
||||
if (MacOsNetworkInterface.getifaddrs(out intPtr) != 0)
|
||||
{
|
||||
throw new SystemException("getifaddrs() failed");
|
||||
}
|
||||
try
|
||||
{
|
||||
IntPtr intPtr2 = intPtr;
|
||||
while (intPtr2 != IntPtr.Zero)
|
||||
{
|
||||
global::System.Net.NetworkInformation.MacOsStructs.ifaddrs ifaddrs = (global::System.Net.NetworkInformation.MacOsStructs.ifaddrs)Marshal.PtrToStructure(intPtr2, typeof(global::System.Net.NetworkInformation.MacOsStructs.ifaddrs));
|
||||
IPAddress ipaddress = IPAddress.None;
|
||||
string ifa_name = ifaddrs.ifa_name;
|
||||
int num = -1;
|
||||
byte[] array = null;
|
||||
NetworkInterfaceType networkInterfaceType = NetworkInterfaceType.Unknown;
|
||||
if (ifaddrs.ifa_addr != IntPtr.Zero)
|
||||
{
|
||||
global::System.Net.NetworkInformation.MacOsStructs.sockaddr sockaddr = (global::System.Net.NetworkInformation.MacOsStructs.sockaddr)Marshal.PtrToStructure(ifaddrs.ifa_addr, typeof(global::System.Net.NetworkInformation.MacOsStructs.sockaddr));
|
||||
if (sockaddr.sa_family == 30)
|
||||
{
|
||||
global::System.Net.NetworkInformation.MacOsStructs.sockaddr_in6 sockaddr_in = (global::System.Net.NetworkInformation.MacOsStructs.sockaddr_in6)Marshal.PtrToStructure(ifaddrs.ifa_addr, typeof(global::System.Net.NetworkInformation.MacOsStructs.sockaddr_in6));
|
||||
ipaddress = new IPAddress(sockaddr_in.sin6_addr.u6_addr8, (long)((ulong)sockaddr_in.sin6_scope_id));
|
||||
}
|
||||
else if (sockaddr.sa_family == 2)
|
||||
{
|
||||
ipaddress = new IPAddress((long)((ulong)((global::System.Net.NetworkInformation.MacOsStructs.sockaddr_in)Marshal.PtrToStructure(ifaddrs.ifa_addr, typeof(global::System.Net.NetworkInformation.MacOsStructs.sockaddr_in))).sin_addr));
|
||||
}
|
||||
else if (sockaddr.sa_family == 18)
|
||||
{
|
||||
global::System.Net.NetworkInformation.MacOsStructs.sockaddr_dl sockaddr_dl = (global::System.Net.NetworkInformation.MacOsStructs.sockaddr_dl)Marshal.PtrToStructure(ifaddrs.ifa_addr, typeof(global::System.Net.NetworkInformation.MacOsStructs.sockaddr_dl));
|
||||
array = new byte[(int)sockaddr_dl.sdl_alen];
|
||||
Array.Copy(sockaddr_dl.sdl_data, (int)sockaddr_dl.sdl_nlen, array, 0, Math.Min(array.Length, sockaddr_dl.sdl_data.Length - (int)sockaddr_dl.sdl_nlen));
|
||||
num = (int)sockaddr_dl.sdl_index;
|
||||
int sdl_type = (int)sockaddr_dl.sdl_type;
|
||||
if (Enum.IsDefined(typeof(MacOsArpHardware), sdl_type))
|
||||
{
|
||||
MacOsArpHardware macOsArpHardware = (MacOsArpHardware)sdl_type;
|
||||
switch (macOsArpHardware)
|
||||
{
|
||||
case MacOsArpHardware.PPP:
|
||||
networkInterfaceType = NetworkInterfaceType.Ppp;
|
||||
break;
|
||||
case MacOsArpHardware.LOOPBACK:
|
||||
networkInterfaceType = NetworkInterfaceType.Loopback;
|
||||
array = null;
|
||||
break;
|
||||
default:
|
||||
if (macOsArpHardware != MacOsArpHardware.ETHER)
|
||||
{
|
||||
if (macOsArpHardware != MacOsArpHardware.FDDI)
|
||||
{
|
||||
if (macOsArpHardware == MacOsArpHardware.ATM)
|
||||
{
|
||||
networkInterfaceType = NetworkInterfaceType.Atm;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
networkInterfaceType = NetworkInterfaceType.Fddi;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
networkInterfaceType = NetworkInterfaceType.Ethernet;
|
||||
}
|
||||
break;
|
||||
case MacOsArpHardware.SLIP:
|
||||
networkInterfaceType = NetworkInterfaceType.Slip;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
MacOsNetworkInterface macOsNetworkInterface = null;
|
||||
if (!dictionary.TryGetValue(ifa_name, out macOsNetworkInterface))
|
||||
{
|
||||
macOsNetworkInterface = new MacOsNetworkInterface(ifa_name);
|
||||
dictionary.Add(ifa_name, macOsNetworkInterface);
|
||||
}
|
||||
if (!ipaddress.Equals(IPAddress.None))
|
||||
{
|
||||
macOsNetworkInterface.AddAddress(ipaddress);
|
||||
}
|
||||
if (array != null || networkInterfaceType == NetworkInterfaceType.Loopback)
|
||||
{
|
||||
macOsNetworkInterface.SetLinkLayerInfo(num, array, networkInterfaceType);
|
||||
}
|
||||
intPtr2 = ifaddrs.ifa_next;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
MacOsNetworkInterface.freeifaddrs(intPtr);
|
||||
}
|
||||
NetworkInterface[] array2 = new NetworkInterface[dictionary.Count];
|
||||
int num2 = 0;
|
||||
foreach (NetworkInterface networkInterface in dictionary.Values)
|
||||
{
|
||||
array2[num2] = networkInterface;
|
||||
num2++;
|
||||
}
|
||||
return array2;
|
||||
}
|
||||
|
||||
// Token: 0x06000E0E RID: 3598 RVA: 0x00027AF4 File Offset: 0x00025CF4
|
||||
public override IPInterfaceProperties GetIPProperties()
|
||||
{
|
||||
if (this.ipproperties == null)
|
||||
{
|
||||
this.ipproperties = new MacOsIPInterfaceProperties(this, this.addresses);
|
||||
}
|
||||
return this.ipproperties;
|
||||
}
|
||||
|
||||
// Token: 0x06000E0F RID: 3599 RVA: 0x00027B1C File Offset: 0x00025D1C
|
||||
public override IPv4InterfaceStatistics GetIPv4Statistics()
|
||||
{
|
||||
if (this.ipv4stats == null)
|
||||
{
|
||||
this.ipv4stats = new MacOsIPv4InterfaceStatistics(this);
|
||||
}
|
||||
return this.ipv4stats;
|
||||
}
|
||||
|
||||
// Token: 0x17000495 RID: 1173
|
||||
// (get) Token: 0x06000E10 RID: 3600 RVA: 0x00027B3C File Offset: 0x00025D3C
|
||||
public override OperationalStatus OperationalStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return OperationalStatus.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000496 RID: 1174
|
||||
// (get) Token: 0x06000E11 RID: 3601 RVA: 0x00027B40 File Offset: 0x00025D40
|
||||
public override bool SupportsMulticast
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000CA2 RID: 3234
|
||||
private const int AF_INET = 2;
|
||||
|
||||
// Token: 0x04000CA3 RID: 3235
|
||||
private const int AF_INET6 = 30;
|
||||
|
||||
// Token: 0x04000CA4 RID: 3236
|
||||
private const int AF_LINK = 18;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation.MacOsStructs
|
||||
{
|
||||
// Token: 0x02000192 RID: 402
|
||||
internal struct ifaddrs
|
||||
{
|
||||
// Token: 0x04000C5A RID: 3162
|
||||
public IntPtr ifa_next;
|
||||
|
||||
// Token: 0x04000C5B RID: 3163
|
||||
public string ifa_name;
|
||||
|
||||
// Token: 0x04000C5C RID: 3164
|
||||
public uint ifa_flags;
|
||||
|
||||
// Token: 0x04000C5D RID: 3165
|
||||
public IntPtr ifa_addr;
|
||||
|
||||
// Token: 0x04000C5E RID: 3166
|
||||
public IntPtr ifa_netmask;
|
||||
|
||||
// Token: 0x04000C5F RID: 3167
|
||||
public IntPtr ifa_dstaddr;
|
||||
|
||||
// Token: 0x04000C60 RID: 3168
|
||||
public IntPtr ifa_data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation.MacOsStructs
|
||||
{
|
||||
// Token: 0x02000195 RID: 405
|
||||
internal struct in6_addr
|
||||
{
|
||||
// Token: 0x04000C67 RID: 3175
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[] u6_addr8;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation.MacOsStructs
|
||||
{
|
||||
// Token: 0x02000193 RID: 403
|
||||
internal struct sockaddr
|
||||
{
|
||||
// Token: 0x04000C61 RID: 3169
|
||||
public byte sa_len;
|
||||
|
||||
// Token: 0x04000C62 RID: 3170
|
||||
public byte sa_family;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation.MacOsStructs
|
||||
{
|
||||
// Token: 0x02000197 RID: 407
|
||||
internal struct sockaddr_dl
|
||||
{
|
||||
// Token: 0x04000C6E RID: 3182
|
||||
public byte sdl_len;
|
||||
|
||||
// Token: 0x04000C6F RID: 3183
|
||||
public byte sdl_family;
|
||||
|
||||
// Token: 0x04000C70 RID: 3184
|
||||
public ushort sdl_index;
|
||||
|
||||
// Token: 0x04000C71 RID: 3185
|
||||
public byte sdl_type;
|
||||
|
||||
// Token: 0x04000C72 RID: 3186
|
||||
public byte sdl_nlen;
|
||||
|
||||
// Token: 0x04000C73 RID: 3187
|
||||
public byte sdl_alen;
|
||||
|
||||
// Token: 0x04000C74 RID: 3188
|
||||
public byte sdl_slen;
|
||||
|
||||
// Token: 0x04000C75 RID: 3189
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
|
||||
public byte[] sdl_data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation.MacOsStructs
|
||||
{
|
||||
// Token: 0x02000194 RID: 404
|
||||
internal struct sockaddr_in
|
||||
{
|
||||
// Token: 0x04000C63 RID: 3171
|
||||
public byte sin_len;
|
||||
|
||||
// Token: 0x04000C64 RID: 3172
|
||||
public byte sin_family;
|
||||
|
||||
// Token: 0x04000C65 RID: 3173
|
||||
public ushort sin_port;
|
||||
|
||||
// Token: 0x04000C66 RID: 3174
|
||||
public uint sin_addr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation.MacOsStructs
|
||||
{
|
||||
// Token: 0x02000196 RID: 406
|
||||
internal struct sockaddr_in6
|
||||
{
|
||||
// Token: 0x04000C68 RID: 3176
|
||||
public byte sin6_len;
|
||||
|
||||
// Token: 0x04000C69 RID: 3177
|
||||
public byte sin6_family;
|
||||
|
||||
// Token: 0x04000C6A RID: 3178
|
||||
public ushort sin6_port;
|
||||
|
||||
// Token: 0x04000C6B RID: 3179
|
||||
public uint sin6_flowinfo;
|
||||
|
||||
// Token: 0x04000C6C RID: 3180
|
||||
public in6_addr sin6_addr;
|
||||
|
||||
// Token: 0x04000C6D RID: 3181
|
||||
public uint sin6_scope_id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,357 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000163 RID: 355
|
||||
internal class MibIPGlobalProperties : IPGlobalProperties
|
||||
{
|
||||
// Token: 0x06000BEF RID: 3055 RVA: 0x0002441C File Offset: 0x0002261C
|
||||
public MibIPGlobalProperties(string procDir)
|
||||
{
|
||||
this.StatisticsFile = Path.Combine(procDir, "net/snmp");
|
||||
this.StatisticsFileIPv6 = Path.Combine(procDir, "net/snmp6");
|
||||
this.TcpFile = Path.Combine(procDir, "net/tcp");
|
||||
this.Tcp6File = Path.Combine(procDir, "net/tcp6");
|
||||
this.UdpFile = Path.Combine(procDir, "net/udp");
|
||||
this.Udp6File = Path.Combine(procDir, "net/udp6");
|
||||
}
|
||||
|
||||
// Token: 0x06000BF1 RID: 3057
|
||||
[DllImport("libc")]
|
||||
private static extern int gethostname([MarshalAs(UnmanagedType.LPArray, SizeConst = 0, SizeParamIndex = 1)] byte[] name, int len);
|
||||
|
||||
// Token: 0x06000BF2 RID: 3058
|
||||
[DllImport("libc")]
|
||||
private static extern int getdomainname([MarshalAs(UnmanagedType.LPArray, SizeConst = 0, SizeParamIndex = 1)] byte[] name, int len);
|
||||
|
||||
// Token: 0x06000BF3 RID: 3059 RVA: 0x000244B0 File Offset: 0x000226B0
|
||||
private global::System.Collections.Specialized.StringDictionary GetProperties4(string item)
|
||||
{
|
||||
string statisticsFile = this.StatisticsFile;
|
||||
string text = item + ": ";
|
||||
global::System.Collections.Specialized.StringDictionary stringDictionary2;
|
||||
using (StreamReader streamReader = new StreamReader(statisticsFile, Encoding.ASCII))
|
||||
{
|
||||
string[] array = null;
|
||||
string[] array2 = null;
|
||||
string text2 = string.Empty;
|
||||
for (;;)
|
||||
{
|
||||
text2 = streamReader.ReadLine();
|
||||
if (!string.IsNullOrEmpty(text2))
|
||||
{
|
||||
if (text2.Length > text.Length && string.CompareOrdinal(text2, 0, text, 0, text.Length) == 0)
|
||||
{
|
||||
if (array != null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
array = text2.Substring(text.Length).Split(new char[] { ' ' });
|
||||
}
|
||||
}
|
||||
if (streamReader.EndOfStream)
|
||||
{
|
||||
goto IL_E2;
|
||||
}
|
||||
}
|
||||
if (array2 != null)
|
||||
{
|
||||
throw this.CreateException(statisticsFile, string.Format("Found duplicate line for values for the same item '{0}'", item));
|
||||
}
|
||||
array2 = text2.Substring(text.Length).Split(new char[] { ' ' });
|
||||
IL_E2:
|
||||
if (array2 == null)
|
||||
{
|
||||
throw this.CreateException(statisticsFile, string.Format("No corresponding line was not found for '{0}'", item));
|
||||
}
|
||||
if (array.Length != array2.Length)
|
||||
{
|
||||
throw this.CreateException(statisticsFile, string.Format("The counts in the header line and the value line do not match for '{0}'", item));
|
||||
}
|
||||
global::System.Collections.Specialized.StringDictionary stringDictionary = new global::System.Collections.Specialized.StringDictionary();
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
stringDictionary[array[i]] = array2[i];
|
||||
}
|
||||
stringDictionary2 = stringDictionary;
|
||||
}
|
||||
return stringDictionary2;
|
||||
}
|
||||
|
||||
// Token: 0x06000BF4 RID: 3060 RVA: 0x00024640 File Offset: 0x00022840
|
||||
private global::System.Collections.Specialized.StringDictionary GetProperties6(string item)
|
||||
{
|
||||
if (!File.Exists(this.StatisticsFileIPv6))
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
string statisticsFileIPv = this.StatisticsFileIPv6;
|
||||
global::System.Collections.Specialized.StringDictionary stringDictionary2;
|
||||
using (StreamReader streamReader = new StreamReader(statisticsFileIPv, Encoding.ASCII))
|
||||
{
|
||||
global::System.Collections.Specialized.StringDictionary stringDictionary = new global::System.Collections.Specialized.StringDictionary();
|
||||
string text = string.Empty;
|
||||
for (;;)
|
||||
{
|
||||
text = streamReader.ReadLine();
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
if (text.Length > item.Length && string.CompareOrdinal(text, 0, item, 0, item.Length) == 0)
|
||||
{
|
||||
int num = text.IndexOfAny(MibIPGlobalProperties.wsChars, item.Length);
|
||||
if (num < 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
stringDictionary[text.Substring(item.Length, num - item.Length)] = text.Substring(num + 1).Trim(MibIPGlobalProperties.wsChars);
|
||||
}
|
||||
}
|
||||
if (streamReader.EndOfStream)
|
||||
{
|
||||
goto Block_7;
|
||||
}
|
||||
}
|
||||
throw this.CreateException(statisticsFileIPv, null);
|
||||
Block_7:
|
||||
stringDictionary2 = stringDictionary;
|
||||
}
|
||||
return stringDictionary2;
|
||||
}
|
||||
|
||||
// Token: 0x06000BF5 RID: 3061 RVA: 0x00024764 File Offset: 0x00022964
|
||||
private Exception CreateException(string file, string msg)
|
||||
{
|
||||
return new InvalidOperationException(string.Format("Unsupported (unexpected) '{0}' file format. ", file) + msg);
|
||||
}
|
||||
|
||||
// Token: 0x06000BF6 RID: 3062 RVA: 0x0002477C File Offset: 0x0002297C
|
||||
private IPEndPoint[] GetLocalAddresses(List<string[]> list)
|
||||
{
|
||||
IPEndPoint[] array = new IPEndPoint[list.Count];
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
array[i] = this.ToEndpoint(list[i][1]);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06000BF7 RID: 3063 RVA: 0x000247BC File Offset: 0x000229BC
|
||||
private IPEndPoint ToEndpoint(string s)
|
||||
{
|
||||
int num = s.IndexOf(':');
|
||||
int num2 = int.Parse(s.Substring(num + 1), NumberStyles.HexNumber);
|
||||
if (s.Length == 13)
|
||||
{
|
||||
return new IPEndPoint(long.Parse(s.Substring(0, num), NumberStyles.HexNumber), num2);
|
||||
}
|
||||
byte[] array = new byte[16];
|
||||
int num3 = 0;
|
||||
while (num3 << 1 < num)
|
||||
{
|
||||
array[num3] = byte.Parse(s.Substring(num3 << 1, 2), NumberStyles.HexNumber);
|
||||
num3++;
|
||||
}
|
||||
return new IPEndPoint(new IPAddress(array), num2);
|
||||
}
|
||||
|
||||
// Token: 0x06000BF8 RID: 3064 RVA: 0x0002484C File Offset: 0x00022A4C
|
||||
private void GetRows(string file, List<string[]> list)
|
||||
{
|
||||
if (!File.Exists(file))
|
||||
{
|
||||
return;
|
||||
}
|
||||
using (StreamReader streamReader = new StreamReader(file, Encoding.ASCII))
|
||||
{
|
||||
streamReader.ReadLine();
|
||||
while (!streamReader.EndOfStream)
|
||||
{
|
||||
string[] array = streamReader.ReadLine().Split(MibIPGlobalProperties.wsChars, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (array.Length < 4)
|
||||
{
|
||||
throw this.CreateException(file, null);
|
||||
}
|
||||
list.Add(array);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000BF9 RID: 3065 RVA: 0x000248E4 File Offset: 0x00022AE4
|
||||
public override TcpConnectionInformation[] GetActiveTcpConnections()
|
||||
{
|
||||
List<string[]> list = new List<string[]>();
|
||||
this.GetRows(this.TcpFile, list);
|
||||
this.GetRows(this.Tcp6File, list);
|
||||
TcpConnectionInformation[] array = new TcpConnectionInformation[list.Count];
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
IPEndPoint ipendPoint = this.ToEndpoint(list[i][1]);
|
||||
IPEndPoint ipendPoint2 = this.ToEndpoint(list[i][2]);
|
||||
TcpState tcpState = (TcpState)int.Parse(list[i][3], NumberStyles.HexNumber);
|
||||
array[i] = new TcpConnectionInformationImpl(ipendPoint, ipendPoint2, tcpState);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06000BFA RID: 3066 RVA: 0x00024978 File Offset: 0x00022B78
|
||||
public override IPEndPoint[] GetActiveTcpListeners()
|
||||
{
|
||||
List<string[]> list = new List<string[]>();
|
||||
this.GetRows(this.TcpFile, list);
|
||||
this.GetRows(this.Tcp6File, list);
|
||||
return this.GetLocalAddresses(list);
|
||||
}
|
||||
|
||||
// Token: 0x06000BFB RID: 3067 RVA: 0x000249AC File Offset: 0x00022BAC
|
||||
public override IPEndPoint[] GetActiveUdpListeners()
|
||||
{
|
||||
List<string[]> list = new List<string[]>();
|
||||
this.GetRows(this.UdpFile, list);
|
||||
this.GetRows(this.Udp6File, list);
|
||||
return this.GetLocalAddresses(list);
|
||||
}
|
||||
|
||||
// Token: 0x06000BFC RID: 3068 RVA: 0x000249E0 File Offset: 0x00022BE0
|
||||
public override IcmpV4Statistics GetIcmpV4Statistics()
|
||||
{
|
||||
return new MibIcmpV4Statistics(this.GetProperties4("Icmp"));
|
||||
}
|
||||
|
||||
// Token: 0x06000BFD RID: 3069 RVA: 0x000249F4 File Offset: 0x00022BF4
|
||||
public override IcmpV6Statistics GetIcmpV6Statistics()
|
||||
{
|
||||
return new MibIcmpV6Statistics(this.GetProperties6("Icmp6"));
|
||||
}
|
||||
|
||||
// Token: 0x06000BFE RID: 3070 RVA: 0x00024A08 File Offset: 0x00022C08
|
||||
public override IPGlobalStatistics GetIPv4GlobalStatistics()
|
||||
{
|
||||
return new MibIPGlobalStatistics(this.GetProperties4("Ip"));
|
||||
}
|
||||
|
||||
// Token: 0x06000BFF RID: 3071 RVA: 0x00024A1C File Offset: 0x00022C1C
|
||||
public override IPGlobalStatistics GetIPv6GlobalStatistics()
|
||||
{
|
||||
return new MibIPGlobalStatistics(this.GetProperties6("Ip6"));
|
||||
}
|
||||
|
||||
// Token: 0x06000C00 RID: 3072 RVA: 0x00024A30 File Offset: 0x00022C30
|
||||
public override TcpStatistics GetTcpIPv4Statistics()
|
||||
{
|
||||
return new MibTcpStatistics(this.GetProperties4("Tcp"));
|
||||
}
|
||||
|
||||
// Token: 0x06000C01 RID: 3073 RVA: 0x00024A44 File Offset: 0x00022C44
|
||||
public override TcpStatistics GetTcpIPv6Statistics()
|
||||
{
|
||||
return new MibTcpStatistics(this.GetProperties4("Tcp"));
|
||||
}
|
||||
|
||||
// Token: 0x06000C02 RID: 3074 RVA: 0x00024A58 File Offset: 0x00022C58
|
||||
public override UdpStatistics GetUdpIPv4Statistics()
|
||||
{
|
||||
return new MibUdpStatistics(this.GetProperties4("Udp"));
|
||||
}
|
||||
|
||||
// Token: 0x06000C03 RID: 3075 RVA: 0x00024A6C File Offset: 0x00022C6C
|
||||
public override UdpStatistics GetUdpIPv6Statistics()
|
||||
{
|
||||
return new MibUdpStatistics(this.GetProperties6("Udp6"));
|
||||
}
|
||||
|
||||
// Token: 0x17000303 RID: 771
|
||||
// (get) Token: 0x06000C04 RID: 3076 RVA: 0x00024A80 File Offset: 0x00022C80
|
||||
public override string DhcpScopeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000304 RID: 772
|
||||
// (get) Token: 0x06000C05 RID: 3077 RVA: 0x00024A88 File Offset: 0x00022C88
|
||||
public override string DomainName
|
||||
{
|
||||
get
|
||||
{
|
||||
byte[] array = new byte[256];
|
||||
if (MibIPGlobalProperties.getdomainname(array, 256) != 0)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
int num = Array.IndexOf<byte>(array, 0);
|
||||
return Encoding.ASCII.GetString(array, 0, (num >= 0) ? num : 256);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000305 RID: 773
|
||||
// (get) Token: 0x06000C06 RID: 3078 RVA: 0x00024ADC File Offset: 0x00022CDC
|
||||
public override string HostName
|
||||
{
|
||||
get
|
||||
{
|
||||
byte[] array = new byte[256];
|
||||
if (MibIPGlobalProperties.gethostname(array, 256) != 0)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
int num = Array.IndexOf<byte>(array, 0);
|
||||
return Encoding.ASCII.GetString(array, 0, (num >= 0) ? num : 256);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000306 RID: 774
|
||||
// (get) Token: 0x06000C07 RID: 3079 RVA: 0x00024B30 File Offset: 0x00022D30
|
||||
public override bool IsWinsProxy
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000307 RID: 775
|
||||
// (get) Token: 0x06000C08 RID: 3080 RVA: 0x00024B34 File Offset: 0x00022D34
|
||||
public override NetBiosNodeType NodeType
|
||||
{
|
||||
get
|
||||
{
|
||||
return NetBiosNodeType.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BA6 RID: 2982
|
||||
public const string ProcDir = "/proc";
|
||||
|
||||
// Token: 0x04000BA7 RID: 2983
|
||||
public const string CompatProcDir = "/usr/compat/linux/proc";
|
||||
|
||||
// Token: 0x04000BA8 RID: 2984
|
||||
public readonly string StatisticsFile;
|
||||
|
||||
// Token: 0x04000BA9 RID: 2985
|
||||
public readonly string StatisticsFileIPv6;
|
||||
|
||||
// Token: 0x04000BAA RID: 2986
|
||||
public readonly string TcpFile;
|
||||
|
||||
// Token: 0x04000BAB RID: 2987
|
||||
public readonly string Tcp6File;
|
||||
|
||||
// Token: 0x04000BAC RID: 2988
|
||||
public readonly string UdpFile;
|
||||
|
||||
// Token: 0x04000BAD RID: 2989
|
||||
public readonly string Udp6File;
|
||||
|
||||
// Token: 0x04000BAE RID: 2990
|
||||
private static readonly char[] wsChars = new char[] { ' ', '\t' };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200016B RID: 363
|
||||
internal class MibIPGlobalStatistics : IPGlobalStatistics
|
||||
{
|
||||
// Token: 0x06000C48 RID: 3144 RVA: 0x0002527C File Offset: 0x0002347C
|
||||
public MibIPGlobalStatistics(global::System.Collections.Specialized.StringDictionary dic)
|
||||
{
|
||||
this.dic = dic;
|
||||
}
|
||||
|
||||
// Token: 0x06000C49 RID: 3145 RVA: 0x0002528C File Offset: 0x0002348C
|
||||
private long Get(string name)
|
||||
{
|
||||
return (this.dic[name] == null) ? 0L : long.Parse(this.dic[name], NumberFormatInfo.InvariantInfo);
|
||||
}
|
||||
|
||||
// Token: 0x1700032B RID: 811
|
||||
// (get) Token: 0x06000C4A RID: 3146 RVA: 0x000252C8 File Offset: 0x000234C8
|
||||
public override int DefaultTtl
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.Get("DefaultTTL");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700032C RID: 812
|
||||
// (get) Token: 0x06000C4B RID: 3147 RVA: 0x000252D8 File Offset: 0x000234D8
|
||||
public override bool ForwardingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("Forwarding") != 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700032D RID: 813
|
||||
// (get) Token: 0x06000C4C RID: 3148 RVA: 0x000252EC File Offset: 0x000234EC
|
||||
public override int NumberOfInterfaces
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.Get("NumIf");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700032E RID: 814
|
||||
// (get) Token: 0x06000C4D RID: 3149 RVA: 0x000252FC File Offset: 0x000234FC
|
||||
public override int NumberOfIPAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.Get("NumAddr");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700032F RID: 815
|
||||
// (get) Token: 0x06000C4E RID: 3150 RVA: 0x0002530C File Offset: 0x0002350C
|
||||
public override int NumberOfRoutes
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.Get("NumRoutes");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000330 RID: 816
|
||||
// (get) Token: 0x06000C4F RID: 3151 RVA: 0x0002531C File Offset: 0x0002351C
|
||||
public override long OutputPacketRequests
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutRequests");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000331 RID: 817
|
||||
// (get) Token: 0x06000C50 RID: 3152 RVA: 0x0002532C File Offset: 0x0002352C
|
||||
public override long OutputPacketRoutingDiscards
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("RoutingDiscards");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000332 RID: 818
|
||||
// (get) Token: 0x06000C51 RID: 3153 RVA: 0x0002533C File Offset: 0x0002353C
|
||||
public override long OutputPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutDiscards");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000333 RID: 819
|
||||
// (get) Token: 0x06000C52 RID: 3154 RVA: 0x0002534C File Offset: 0x0002354C
|
||||
public override long OutputPacketsWithNoRoute
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutNoRoutes");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000334 RID: 820
|
||||
// (get) Token: 0x06000C53 RID: 3155 RVA: 0x0002535C File Offset: 0x0002355C
|
||||
public override long PacketFragmentFailures
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("FragFails");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000335 RID: 821
|
||||
// (get) Token: 0x06000C54 RID: 3156 RVA: 0x0002536C File Offset: 0x0002356C
|
||||
public override long PacketReassembliesRequired
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("ReasmReqds");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000336 RID: 822
|
||||
// (get) Token: 0x06000C55 RID: 3157 RVA: 0x0002537C File Offset: 0x0002357C
|
||||
public override long PacketReassemblyFailures
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("ReasmFails");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000337 RID: 823
|
||||
// (get) Token: 0x06000C56 RID: 3158 RVA: 0x0002538C File Offset: 0x0002358C
|
||||
public override long PacketReassemblyTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("ReasmTimeout");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000338 RID: 824
|
||||
// (get) Token: 0x06000C57 RID: 3159 RVA: 0x0002539C File Offset: 0x0002359C
|
||||
public override long PacketsFragmented
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("FragOks");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000339 RID: 825
|
||||
// (get) Token: 0x06000C58 RID: 3160 RVA: 0x000253AC File Offset: 0x000235AC
|
||||
public override long PacketsReassembled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("ReasmOks");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700033A RID: 826
|
||||
// (get) Token: 0x06000C59 RID: 3161 RVA: 0x000253BC File Offset: 0x000235BC
|
||||
public override long ReceivedPackets
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InReceives");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700033B RID: 827
|
||||
// (get) Token: 0x06000C5A RID: 3162 RVA: 0x000253CC File Offset: 0x000235CC
|
||||
public override long ReceivedPacketsDelivered
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InDelivers");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700033C RID: 828
|
||||
// (get) Token: 0x06000C5B RID: 3163 RVA: 0x000253DC File Offset: 0x000235DC
|
||||
public override long ReceivedPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InDiscards");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700033D RID: 829
|
||||
// (get) Token: 0x06000C5C RID: 3164 RVA: 0x000253EC File Offset: 0x000235EC
|
||||
public override long ReceivedPacketsForwarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("ForwDatagrams");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700033E RID: 830
|
||||
// (get) Token: 0x06000C5D RID: 3165 RVA: 0x000253FC File Offset: 0x000235FC
|
||||
public override long ReceivedPacketsWithAddressErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InAddrErrors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700033F RID: 831
|
||||
// (get) Token: 0x06000C5E RID: 3166 RVA: 0x0002540C File Offset: 0x0002360C
|
||||
public override long ReceivedPacketsWithHeadersErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InHdrErrors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000340 RID: 832
|
||||
// (get) Token: 0x06000C5F RID: 3167 RVA: 0x0002541C File Offset: 0x0002361C
|
||||
public override long ReceivedPacketsWithUnknownProtocol
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InUnknownProtos");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BC3 RID: 3011
|
||||
private global::System.Collections.Specialized.StringDictionary dic;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000181 RID: 385
|
||||
internal class MibIcmpV4Statistics : IcmpV4Statistics
|
||||
{
|
||||
// Token: 0x06000D18 RID: 3352 RVA: 0x0002624C File Offset: 0x0002444C
|
||||
public MibIcmpV4Statistics(global::System.Collections.Specialized.StringDictionary dic)
|
||||
{
|
||||
this.dic = dic;
|
||||
}
|
||||
|
||||
// Token: 0x06000D19 RID: 3353 RVA: 0x0002625C File Offset: 0x0002445C
|
||||
private long Get(string name)
|
||||
{
|
||||
return (this.dic[name] == null) ? 0L : long.Parse(this.dic[name], NumberFormatInfo.InvariantInfo);
|
||||
}
|
||||
|
||||
// Token: 0x170003DA RID: 986
|
||||
// (get) Token: 0x06000D1A RID: 3354 RVA: 0x00026298 File Offset: 0x00024498
|
||||
public override long AddressMaskRepliesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InAddrMaskReps");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003DB RID: 987
|
||||
// (get) Token: 0x06000D1B RID: 3355 RVA: 0x000262A8 File Offset: 0x000244A8
|
||||
public override long AddressMaskRepliesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutAddrMaskReps");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003DC RID: 988
|
||||
// (get) Token: 0x06000D1C RID: 3356 RVA: 0x000262B8 File Offset: 0x000244B8
|
||||
public override long AddressMaskRequestsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InAddrMasks");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003DD RID: 989
|
||||
// (get) Token: 0x06000D1D RID: 3357 RVA: 0x000262C8 File Offset: 0x000244C8
|
||||
public override long AddressMaskRequestsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutAddrMasks");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003DE RID: 990
|
||||
// (get) Token: 0x06000D1E RID: 3358 RVA: 0x000262D8 File Offset: 0x000244D8
|
||||
public override long DestinationUnreachableMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InDestUnreachs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003DF RID: 991
|
||||
// (get) Token: 0x06000D1F RID: 3359 RVA: 0x000262E8 File Offset: 0x000244E8
|
||||
public override long DestinationUnreachableMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutDestUnreachs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E0 RID: 992
|
||||
// (get) Token: 0x06000D20 RID: 3360 RVA: 0x000262F8 File Offset: 0x000244F8
|
||||
public override long EchoRepliesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InEchoReps");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E1 RID: 993
|
||||
// (get) Token: 0x06000D21 RID: 3361 RVA: 0x00026308 File Offset: 0x00024508
|
||||
public override long EchoRepliesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutEchoReps");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E2 RID: 994
|
||||
// (get) Token: 0x06000D22 RID: 3362 RVA: 0x00026318 File Offset: 0x00024518
|
||||
public override long EchoRequestsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InEchos");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E3 RID: 995
|
||||
// (get) Token: 0x06000D23 RID: 3363 RVA: 0x00026328 File Offset: 0x00024528
|
||||
public override long EchoRequestsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutEchos");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E4 RID: 996
|
||||
// (get) Token: 0x06000D24 RID: 3364 RVA: 0x00026338 File Offset: 0x00024538
|
||||
public override long ErrorsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InErrors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E5 RID: 997
|
||||
// (get) Token: 0x06000D25 RID: 3365 RVA: 0x00026348 File Offset: 0x00024548
|
||||
public override long ErrorsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutErrors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E6 RID: 998
|
||||
// (get) Token: 0x06000D26 RID: 3366 RVA: 0x00026358 File Offset: 0x00024558
|
||||
public override long MessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InMsgs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E7 RID: 999
|
||||
// (get) Token: 0x06000D27 RID: 3367 RVA: 0x00026368 File Offset: 0x00024568
|
||||
public override long MessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutMsgs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E8 RID: 1000
|
||||
// (get) Token: 0x06000D28 RID: 3368 RVA: 0x00026378 File Offset: 0x00024578
|
||||
public override long ParameterProblemsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InParmProbs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003E9 RID: 1001
|
||||
// (get) Token: 0x06000D29 RID: 3369 RVA: 0x00026388 File Offset: 0x00024588
|
||||
public override long ParameterProblemsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutParmProbs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003EA RID: 1002
|
||||
// (get) Token: 0x06000D2A RID: 3370 RVA: 0x00026398 File Offset: 0x00024598
|
||||
public override long RedirectsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InRedirects");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003EB RID: 1003
|
||||
// (get) Token: 0x06000D2B RID: 3371 RVA: 0x000263A8 File Offset: 0x000245A8
|
||||
public override long RedirectsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutRedirects");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003EC RID: 1004
|
||||
// (get) Token: 0x06000D2C RID: 3372 RVA: 0x000263B8 File Offset: 0x000245B8
|
||||
public override long SourceQuenchesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InSrcQuenchs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003ED RID: 1005
|
||||
// (get) Token: 0x06000D2D RID: 3373 RVA: 0x000263C8 File Offset: 0x000245C8
|
||||
public override long SourceQuenchesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutSrcQuenchs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003EE RID: 1006
|
||||
// (get) Token: 0x06000D2E RID: 3374 RVA: 0x000263D8 File Offset: 0x000245D8
|
||||
public override long TimeExceededMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InTimeExcds");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003EF RID: 1007
|
||||
// (get) Token: 0x06000D2F RID: 3375 RVA: 0x000263E8 File Offset: 0x000245E8
|
||||
public override long TimeExceededMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutTimeExcds");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F0 RID: 1008
|
||||
// (get) Token: 0x06000D30 RID: 3376 RVA: 0x000263F8 File Offset: 0x000245F8
|
||||
public override long TimestampRepliesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InTimestampReps");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F1 RID: 1009
|
||||
// (get) Token: 0x06000D31 RID: 3377 RVA: 0x00026408 File Offset: 0x00024608
|
||||
public override long TimestampRepliesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutTimestampReps");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F2 RID: 1010
|
||||
// (get) Token: 0x06000D32 RID: 3378 RVA: 0x00026418 File Offset: 0x00024618
|
||||
public override long TimestampRequestsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InTimestamps");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F3 RID: 1011
|
||||
// (get) Token: 0x06000D33 RID: 3379 RVA: 0x00026428 File Offset: 0x00024628
|
||||
public override long TimestampRequestsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutTimestamps");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C0D RID: 3085
|
||||
private global::System.Collections.Specialized.StringDictionary dic;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,345 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000186 RID: 390
|
||||
internal class MibIcmpV6Statistics : IcmpV6Statistics
|
||||
{
|
||||
// Token: 0x06000D70 RID: 3440 RVA: 0x00026610 File Offset: 0x00024810
|
||||
public MibIcmpV6Statistics(global::System.Collections.Specialized.StringDictionary dic)
|
||||
{
|
||||
this.dic = dic;
|
||||
}
|
||||
|
||||
// Token: 0x06000D71 RID: 3441 RVA: 0x00026620 File Offset: 0x00024820
|
||||
private long Get(string name)
|
||||
{
|
||||
return (this.dic[name] == null) ? 0L : long.Parse(this.dic[name], NumberFormatInfo.InvariantInfo);
|
||||
}
|
||||
|
||||
// Token: 0x1700042E RID: 1070
|
||||
// (get) Token: 0x06000D72 RID: 3442 RVA: 0x0002665C File Offset: 0x0002485C
|
||||
public override long DestinationUnreachableMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InDestUnreachs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700042F RID: 1071
|
||||
// (get) Token: 0x06000D73 RID: 3443 RVA: 0x0002666C File Offset: 0x0002486C
|
||||
public override long DestinationUnreachableMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutDestUnreachs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000430 RID: 1072
|
||||
// (get) Token: 0x06000D74 RID: 3444 RVA: 0x0002667C File Offset: 0x0002487C
|
||||
public override long EchoRepliesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InEchoReplies");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000431 RID: 1073
|
||||
// (get) Token: 0x06000D75 RID: 3445 RVA: 0x0002668C File Offset: 0x0002488C
|
||||
public override long EchoRepliesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutEchoReplies");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000432 RID: 1074
|
||||
// (get) Token: 0x06000D76 RID: 3446 RVA: 0x0002669C File Offset: 0x0002489C
|
||||
public override long EchoRequestsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InEchos");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000433 RID: 1075
|
||||
// (get) Token: 0x06000D77 RID: 3447 RVA: 0x000266AC File Offset: 0x000248AC
|
||||
public override long EchoRequestsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutEchos");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000434 RID: 1076
|
||||
// (get) Token: 0x06000D78 RID: 3448 RVA: 0x000266BC File Offset: 0x000248BC
|
||||
public override long ErrorsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InErrors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000435 RID: 1077
|
||||
// (get) Token: 0x06000D79 RID: 3449 RVA: 0x000266CC File Offset: 0x000248CC
|
||||
public override long ErrorsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutErrors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000436 RID: 1078
|
||||
// (get) Token: 0x06000D7A RID: 3450 RVA: 0x000266DC File Offset: 0x000248DC
|
||||
public override long MembershipQueriesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InGroupMembQueries");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000437 RID: 1079
|
||||
// (get) Token: 0x06000D7B RID: 3451 RVA: 0x000266EC File Offset: 0x000248EC
|
||||
public override long MembershipQueriesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutGroupMembQueries");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000438 RID: 1080
|
||||
// (get) Token: 0x06000D7C RID: 3452 RVA: 0x000266FC File Offset: 0x000248FC
|
||||
public override long MembershipReductionsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InGroupMembReductiions");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000439 RID: 1081
|
||||
// (get) Token: 0x06000D7D RID: 3453 RVA: 0x0002670C File Offset: 0x0002490C
|
||||
public override long MembershipReductionsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutGroupMembReductiions");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700043A RID: 1082
|
||||
// (get) Token: 0x06000D7E RID: 3454 RVA: 0x0002671C File Offset: 0x0002491C
|
||||
public override long MembershipReportsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InGroupMembRespons");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700043B RID: 1083
|
||||
// (get) Token: 0x06000D7F RID: 3455 RVA: 0x0002672C File Offset: 0x0002492C
|
||||
public override long MembershipReportsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutGroupMembRespons");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700043C RID: 1084
|
||||
// (get) Token: 0x06000D80 RID: 3456 RVA: 0x0002673C File Offset: 0x0002493C
|
||||
public override long MessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InMsgs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700043D RID: 1085
|
||||
// (get) Token: 0x06000D81 RID: 3457 RVA: 0x0002674C File Offset: 0x0002494C
|
||||
public override long MessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutMsgs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700043E RID: 1086
|
||||
// (get) Token: 0x06000D82 RID: 3458 RVA: 0x0002675C File Offset: 0x0002495C
|
||||
public override long NeighborAdvertisementsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InNeighborAdvertisements");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700043F RID: 1087
|
||||
// (get) Token: 0x06000D83 RID: 3459 RVA: 0x0002676C File Offset: 0x0002496C
|
||||
public override long NeighborAdvertisementsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutNeighborAdvertisements");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000440 RID: 1088
|
||||
// (get) Token: 0x06000D84 RID: 3460 RVA: 0x0002677C File Offset: 0x0002497C
|
||||
public override long NeighborSolicitsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InNeighborSolicits");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000441 RID: 1089
|
||||
// (get) Token: 0x06000D85 RID: 3461 RVA: 0x0002678C File Offset: 0x0002498C
|
||||
public override long NeighborSolicitsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutNeighborSolicits");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000442 RID: 1090
|
||||
// (get) Token: 0x06000D86 RID: 3462 RVA: 0x0002679C File Offset: 0x0002499C
|
||||
public override long PacketTooBigMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InPktTooBigs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000443 RID: 1091
|
||||
// (get) Token: 0x06000D87 RID: 3463 RVA: 0x000267AC File Offset: 0x000249AC
|
||||
public override long PacketTooBigMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutPktTooBigs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000444 RID: 1092
|
||||
// (get) Token: 0x06000D88 RID: 3464 RVA: 0x000267BC File Offset: 0x000249BC
|
||||
public override long ParameterProblemsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InParmProblems");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000445 RID: 1093
|
||||
// (get) Token: 0x06000D89 RID: 3465 RVA: 0x000267CC File Offset: 0x000249CC
|
||||
public override long ParameterProblemsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutParmProblems");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000446 RID: 1094
|
||||
// (get) Token: 0x06000D8A RID: 3466 RVA: 0x000267DC File Offset: 0x000249DC
|
||||
public override long RedirectsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InRedirects");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000447 RID: 1095
|
||||
// (get) Token: 0x06000D8B RID: 3467 RVA: 0x000267EC File Offset: 0x000249EC
|
||||
public override long RedirectsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutRedirects");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000448 RID: 1096
|
||||
// (get) Token: 0x06000D8C RID: 3468 RVA: 0x000267FC File Offset: 0x000249FC
|
||||
public override long RouterAdvertisementsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InRouterAdvertisements");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000449 RID: 1097
|
||||
// (get) Token: 0x06000D8D RID: 3469 RVA: 0x0002680C File Offset: 0x00024A0C
|
||||
public override long RouterAdvertisementsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutRouterAdvertisements");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700044A RID: 1098
|
||||
// (get) Token: 0x06000D8E RID: 3470 RVA: 0x0002681C File Offset: 0x00024A1C
|
||||
public override long RouterSolicitsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InRouterSolicits");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700044B RID: 1099
|
||||
// (get) Token: 0x06000D8F RID: 3471 RVA: 0x0002682C File Offset: 0x00024A2C
|
||||
public override long RouterSolicitsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutRouterSolicits");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700044C RID: 1100
|
||||
// (get) Token: 0x06000D90 RID: 3472 RVA: 0x0002683C File Offset: 0x00024A3C
|
||||
public override long TimeExceededMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InTimeExcds");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700044D RID: 1101
|
||||
// (get) Token: 0x06000D91 RID: 3473 RVA: 0x0002684C File Offset: 0x00024A4C
|
||||
public override long TimeExceededMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutTimeExcds");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C1F RID: 3103
|
||||
private global::System.Collections.Specialized.StringDictionary dic;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001B9 RID: 441
|
||||
internal class MibTcpStatistics : TcpStatistics
|
||||
{
|
||||
// Token: 0x06000E7E RID: 3710 RVA: 0x00028F9C File Offset: 0x0002719C
|
||||
public MibTcpStatistics(global::System.Collections.Specialized.StringDictionary dic)
|
||||
{
|
||||
this.dic = dic;
|
||||
}
|
||||
|
||||
// Token: 0x06000E7F RID: 3711 RVA: 0x00028FAC File Offset: 0x000271AC
|
||||
private long Get(string name)
|
||||
{
|
||||
return (this.dic[name] == null) ? 0L : long.Parse(this.dic[name], NumberFormatInfo.InvariantInfo);
|
||||
}
|
||||
|
||||
// Token: 0x170004C1 RID: 1217
|
||||
// (get) Token: 0x06000E80 RID: 3712 RVA: 0x00028FE8 File Offset: 0x000271E8
|
||||
public override long ConnectionsAccepted
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("PassiveOpens");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004C2 RID: 1218
|
||||
// (get) Token: 0x06000E81 RID: 3713 RVA: 0x00028FF8 File Offset: 0x000271F8
|
||||
public override long ConnectionsInitiated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("ActiveOpens");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004C3 RID: 1219
|
||||
// (get) Token: 0x06000E82 RID: 3714 RVA: 0x00029008 File Offset: 0x00027208
|
||||
public override long CumulativeConnections
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("NumConns");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004C4 RID: 1220
|
||||
// (get) Token: 0x06000E83 RID: 3715 RVA: 0x00029018 File Offset: 0x00027218
|
||||
public override long CurrentConnections
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("CurrEstab");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004C5 RID: 1221
|
||||
// (get) Token: 0x06000E84 RID: 3716 RVA: 0x00029028 File Offset: 0x00027228
|
||||
public override long ErrorsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InErrs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004C6 RID: 1222
|
||||
// (get) Token: 0x06000E85 RID: 3717 RVA: 0x00029038 File Offset: 0x00027238
|
||||
public override long FailedConnectionAttempts
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("AttemptFails");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004C7 RID: 1223
|
||||
// (get) Token: 0x06000E86 RID: 3718 RVA: 0x00029048 File Offset: 0x00027248
|
||||
public override long MaximumConnections
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("MaxConn");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004C8 RID: 1224
|
||||
// (get) Token: 0x06000E87 RID: 3719 RVA: 0x00029058 File Offset: 0x00027258
|
||||
public override long MaximumTransmissionTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("RtoMax");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004C9 RID: 1225
|
||||
// (get) Token: 0x06000E88 RID: 3720 RVA: 0x00029068 File Offset: 0x00027268
|
||||
public override long MinimumTransmissionTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("RtoMin");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004CA RID: 1226
|
||||
// (get) Token: 0x06000E89 RID: 3721 RVA: 0x00029078 File Offset: 0x00027278
|
||||
public override long ResetConnections
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("EstabResets");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004CB RID: 1227
|
||||
// (get) Token: 0x06000E8A RID: 3722 RVA: 0x00029088 File Offset: 0x00027288
|
||||
public override long ResetsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutRsts");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004CC RID: 1228
|
||||
// (get) Token: 0x06000E8B RID: 3723 RVA: 0x00029098 File Offset: 0x00027298
|
||||
public override long SegmentsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InSegs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004CD RID: 1229
|
||||
// (get) Token: 0x06000E8C RID: 3724 RVA: 0x000290A8 File Offset: 0x000272A8
|
||||
public override long SegmentsResent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("RetransSegs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004CE RID: 1230
|
||||
// (get) Token: 0x06000E8D RID: 3725 RVA: 0x000290B8 File Offset: 0x000272B8
|
||||
public override long SegmentsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutSegs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D09 RID: 3337
|
||||
private global::System.Collections.Specialized.StringDictionary dic;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001BD RID: 445
|
||||
internal class MibUdpStatistics : UdpStatistics
|
||||
{
|
||||
// Token: 0x06000EA3 RID: 3747 RVA: 0x000291C0 File Offset: 0x000273C0
|
||||
public MibUdpStatistics(global::System.Collections.Specialized.StringDictionary dic)
|
||||
{
|
||||
this.dic = dic;
|
||||
}
|
||||
|
||||
// Token: 0x06000EA4 RID: 3748 RVA: 0x000291D0 File Offset: 0x000273D0
|
||||
private long Get(string name)
|
||||
{
|
||||
return (this.dic[name] == null) ? 0L : long.Parse(this.dic[name], NumberFormatInfo.InvariantInfo);
|
||||
}
|
||||
|
||||
// Token: 0x170004E2 RID: 1250
|
||||
// (get) Token: 0x06000EA5 RID: 3749 RVA: 0x0002920C File Offset: 0x0002740C
|
||||
public override long DatagramsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InDatagrams");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004E3 RID: 1251
|
||||
// (get) Token: 0x06000EA6 RID: 3750 RVA: 0x0002921C File Offset: 0x0002741C
|
||||
public override long DatagramsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("OutDatagrams");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004E4 RID: 1252
|
||||
// (get) Token: 0x06000EA7 RID: 3751 RVA: 0x0002922C File Offset: 0x0002742C
|
||||
public override long IncomingDatagramsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("NoPorts");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004E5 RID: 1253
|
||||
// (get) Token: 0x06000EA8 RID: 3752 RVA: 0x0002923C File Offset: 0x0002743C
|
||||
public override long IncomingDatagramsWithErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get("InErrors");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004E6 RID: 1254
|
||||
// (get) Token: 0x06000EA9 RID: 3753 RVA: 0x0002924C File Offset: 0x0002744C
|
||||
public override int UdpListeners
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.Get("NumAddrs");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D1A RID: 3354
|
||||
private global::System.Collections.Specialized.StringDictionary dic;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about a network interface's multicast address.</summary>
|
||||
// Token: 0x02000199 RID: 409
|
||||
public abstract class MulticastIPAddressInformation : IPAddressInformation
|
||||
{
|
||||
/// <summary>Gets the number of seconds remaining during which this address is the preferred address.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the number of seconds left for this address to remain preferred.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x1700046E RID: 1134
|
||||
// (get) Token: 0x06000DB5 RID: 3509
|
||||
public abstract long AddressPreferredLifetime { get; }
|
||||
|
||||
/// <summary>Gets the number of seconds remaining during which this address is valid.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the number of seconds left for this address to remain assigned.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x1700046F RID: 1135
|
||||
// (get) Token: 0x06000DB6 RID: 3510
|
||||
public abstract long AddressValidLifetime { get; }
|
||||
|
||||
/// <summary>Specifies the amount of time remaining on the Dynamic Host Configuration Protocol (DHCP) lease for this IP address.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that contains the number of seconds remaining before the computer must release the <see cref="T:System.Net.IPAddress" /> instance.</returns>
|
||||
// Token: 0x17000470 RID: 1136
|
||||
// (get) Token: 0x06000DB7 RID: 3511
|
||||
public abstract long DhcpLeaseLifetime { get; }
|
||||
|
||||
/// <summary>Gets a value that indicates the state of the duplicate address detection algorithm.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Net.NetworkInformation.DuplicateAddressDetectionState" /> values that indicates the progress of the algorithm in determining the uniqueness of this IP address.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x17000471 RID: 1137
|
||||
// (get) Token: 0x06000DB8 RID: 3512
|
||||
public abstract DuplicateAddressDetectionState DuplicateAddressDetectionState { get; }
|
||||
|
||||
/// <summary>Gets a value that identifies the source of a Multicast Internet Protocol (IP) address prefix.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Net.NetworkInformation.PrefixOrigin" /> values that identifies how the prefix information was obtained.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x17000472 RID: 1138
|
||||
// (get) Token: 0x06000DB9 RID: 3513
|
||||
public abstract PrefixOrigin PrefixOrigin { get; }
|
||||
|
||||
/// <summary>Gets a value that identifies the source of a Multicast Internet Protocol (IP) address suffix.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Net.NetworkInformation.SuffixOrigin" /> values that identifies how the suffix information was obtained.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x17000473 RID: 1139
|
||||
// (get) Token: 0x06000DBA RID: 3514
|
||||
public abstract SuffixOrigin SuffixOrigin { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Stores a set of <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> types.</summary>
|
||||
// Token: 0x0200019B RID: 411
|
||||
public class MulticastIPAddressInformationCollection : IEnumerable, IEnumerable<MulticastIPAddressInformation>, ICollection<MulticastIPAddressInformation>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformationCollection" /> class.</summary>
|
||||
// Token: 0x06000DC5 RID: 3525 RVA: 0x00026B3C File Offset: 0x00024D3C
|
||||
protected internal MulticastIPAddressInformationCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x06000DC6 RID: 3526 RVA: 0x00026B50 File Offset: 0x00024D50
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because the collection is read-only and elements cannot be added to the collection.</summary>
|
||||
/// <param name="address">The object to be added to the collection.</param>
|
||||
// Token: 0x06000DC7 RID: 3527 RVA: 0x00026B64 File Offset: 0x00024D64
|
||||
public virtual void Add(MulticastIPAddressInformation address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Add(address);
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because the collection is read-only and elements cannot be removed.</summary>
|
||||
// Token: 0x06000DC8 RID: 3528 RVA: 0x00026B94 File Offset: 0x00024D94
|
||||
public virtual void Clear()
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Checks whether the collection contains the specified <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> object.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> object exists in the collection; otherwise, false.</returns>
|
||||
/// <param name="address">The <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> object to be searched in the collection.</param>
|
||||
// Token: 0x06000DC9 RID: 3529 RVA: 0x00026BB8 File Offset: 0x00024DB8
|
||||
public virtual bool Contains(MulticastIPAddressInformation address)
|
||||
{
|
||||
return this.list.Contains(address);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements in this collection to a one-dimensional array of type <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" />.</summary>
|
||||
/// <param name="array">A one-dimensional array that receives a copy of the collection.</param>
|
||||
/// <param name="offset">The zero-based index in <paramref name="array" /> at which the copy begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="count" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in this <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> is greater than the available space from <paramref name="count" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The elements in this <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000DCA RID: 3530 RVA: 0x00026BC8 File Offset: 0x00024DC8
|
||||
public virtual void CopyTo(MulticastIPAddressInformation[] array, int offset)
|
||||
{
|
||||
this.list.CopyTo(array, offset);
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x06000DCB RID: 3531 RVA: 0x00026BD8 File Offset: 0x00024DD8
|
||||
public virtual IEnumerator<MulticastIPAddressInformation> GetEnumerator()
|
||||
{
|
||||
return ((IEnumerable<MulticastIPAddressInformation>)this.list).GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because the collection is read-only and elements cannot be removed.</summary>
|
||||
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
||||
/// <param name="address">The object to be removed.</param>
|
||||
// Token: 0x06000DCC RID: 3532 RVA: 0x00026BE8 File Offset: 0x00024DE8
|
||||
public virtual bool Remove(MulticastIPAddressInformation address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
return this.list.Remove(address);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> types in this collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that contains the number of <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x1700047D RID: 1149
|
||||
// (get) Token: 0x06000DCD RID: 3533 RVA: 0x00026C18 File Offset: 0x00024E18
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether access to this collection is read-only.</summary>
|
||||
/// <returns>true in all cases.</returns>
|
||||
// Token: 0x1700047E RID: 1150
|
||||
// (get) Token: 0x06000DCE RID: 3534 RVA: 0x00026C28 File Offset: 0x00024E28
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> at the specific index of the collection.</summary>
|
||||
/// <returns>The <see cref="T:System.Net.NetworkInformation.MulticastIPAddressInformation" /> at the specific index in the collection.</returns>
|
||||
/// <param name="index">The index of interest.</param>
|
||||
// Token: 0x1700047F RID: 1151
|
||||
public virtual MulticastIPAddressInformation this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C80 RID: 3200
|
||||
private List<MulticastIPAddressInformation> list = new List<MulticastIPAddressInformation>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200019A RID: 410
|
||||
internal class MulticastIPAddressInformationImpl : MulticastIPAddressInformation
|
||||
{
|
||||
// Token: 0x06000DBB RID: 3515 RVA: 0x00026AEC File Offset: 0x00024CEC
|
||||
public MulticastIPAddressInformationImpl(IPAddress address, bool isDnsEligible, bool isTransient)
|
||||
{
|
||||
this.address = address;
|
||||
this.is_dns_eligible = isDnsEligible;
|
||||
this.is_transient = isTransient;
|
||||
}
|
||||
|
||||
// Token: 0x17000474 RID: 1140
|
||||
// (get) Token: 0x06000DBC RID: 3516 RVA: 0x00026B0C File Offset: 0x00024D0C
|
||||
public override IPAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.address;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000475 RID: 1141
|
||||
// (get) Token: 0x06000DBD RID: 3517 RVA: 0x00026B14 File Offset: 0x00024D14
|
||||
public override bool IsDnsEligible
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_dns_eligible;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000476 RID: 1142
|
||||
// (get) Token: 0x06000DBE RID: 3518 RVA: 0x00026B1C File Offset: 0x00024D1C
|
||||
public override bool IsTransient
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_transient;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000477 RID: 1143
|
||||
// (get) Token: 0x06000DBF RID: 3519 RVA: 0x00026B24 File Offset: 0x00024D24
|
||||
public override long AddressPreferredLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000478 RID: 1144
|
||||
// (get) Token: 0x06000DC0 RID: 3520 RVA: 0x00026B28 File Offset: 0x00024D28
|
||||
public override long AddressValidLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000479 RID: 1145
|
||||
// (get) Token: 0x06000DC1 RID: 3521 RVA: 0x00026B2C File Offset: 0x00024D2C
|
||||
public override long DhcpLeaseLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700047A RID: 1146
|
||||
// (get) Token: 0x06000DC2 RID: 3522 RVA: 0x00026B30 File Offset: 0x00024D30
|
||||
public override DuplicateAddressDetectionState DuplicateAddressDetectionState
|
||||
{
|
||||
get
|
||||
{
|
||||
return DuplicateAddressDetectionState.Invalid;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700047B RID: 1147
|
||||
// (get) Token: 0x06000DC3 RID: 3523 RVA: 0x00026B34 File Offset: 0x00024D34
|
||||
public override PrefixOrigin PrefixOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return PrefixOrigin.Other;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700047C RID: 1148
|
||||
// (get) Token: 0x06000DC4 RID: 3524 RVA: 0x00026B38 File Offset: 0x00024D38
|
||||
public override SuffixOrigin SuffixOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return SuffixOrigin.Other;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C7D RID: 3197
|
||||
private IPAddress address;
|
||||
|
||||
// Token: 0x04000C7E RID: 3198
|
||||
private bool is_dns_eligible;
|
||||
|
||||
// Token: 0x04000C7F RID: 3199
|
||||
private bool is_transient;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200019C RID: 412
|
||||
internal class MulticastIPAddressInformationImplCollection : MulticastIPAddressInformationCollection
|
||||
{
|
||||
// Token: 0x06000DD0 RID: 3536 RVA: 0x00026C3C File Offset: 0x00024E3C
|
||||
private MulticastIPAddressInformationImplCollection(bool isReadOnly)
|
||||
{
|
||||
this.is_readonly = isReadOnly;
|
||||
}
|
||||
|
||||
// Token: 0x17000480 RID: 1152
|
||||
// (get) Token: 0x06000DD2 RID: 3538 RVA: 0x00026C5C File Offset: 0x00024E5C
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_readonly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000DD3 RID: 3539 RVA: 0x00026C64 File Offset: 0x00024E64
|
||||
public static MulticastIPAddressInformationCollection Win32FromMulticast(IntPtr ptr)
|
||||
{
|
||||
MulticastIPAddressInformationImplCollection multicastIPAddressInformationImplCollection = new MulticastIPAddressInformationImplCollection(false);
|
||||
IntPtr intPtr = ptr;
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADAPTER_MULTICAST_ADDRESS win32_IP_ADAPTER_MULTICAST_ADDRESS = (Win32_IP_ADAPTER_MULTICAST_ADDRESS)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADAPTER_MULTICAST_ADDRESS));
|
||||
multicastIPAddressInformationImplCollection.Add(new MulticastIPAddressInformationImpl(win32_IP_ADAPTER_MULTICAST_ADDRESS.Address.GetIPAddress(), win32_IP_ADAPTER_MULTICAST_ADDRESS.LengthFlags.IsDnsEligible, win32_IP_ADAPTER_MULTICAST_ADDRESS.LengthFlags.IsTransient));
|
||||
intPtr = win32_IP_ADAPTER_MULTICAST_ADDRESS.Next;
|
||||
}
|
||||
multicastIPAddressInformationImplCollection.is_readonly = true;
|
||||
return multicastIPAddressInformationImplCollection;
|
||||
}
|
||||
|
||||
// Token: 0x06000DD4 RID: 3540 RVA: 0x00026CE4 File Offset: 0x00024EE4
|
||||
public static MulticastIPAddressInformationImplCollection LinuxFromList(List<IPAddress> addresses)
|
||||
{
|
||||
MulticastIPAddressInformationImplCollection multicastIPAddressInformationImplCollection = new MulticastIPAddressInformationImplCollection(false);
|
||||
foreach (IPAddress ipaddress in addresses)
|
||||
{
|
||||
multicastIPAddressInformationImplCollection.Add(new MulticastIPAddressInformationImpl(ipaddress, true, false));
|
||||
}
|
||||
multicastIPAddressInformationImplCollection.is_readonly = true;
|
||||
return multicastIPAddressInformationImplCollection;
|
||||
}
|
||||
|
||||
// Token: 0x04000C81 RID: 3201
|
||||
public static readonly MulticastIPAddressInformationImplCollection Empty = new MulticastIPAddressInformationImplCollection(true);
|
||||
|
||||
// Token: 0x04000C82 RID: 3202
|
||||
private bool is_readonly;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies the Network Basic Input/Output System (NetBIOS) node type.</summary>
|
||||
// Token: 0x0200019D RID: 413
|
||||
public enum NetBiosNodeType
|
||||
{
|
||||
/// <summary>An unknown node type.</summary>
|
||||
// Token: 0x04000C84 RID: 3204
|
||||
Unknown,
|
||||
/// <summary>A broadcast node.</summary>
|
||||
// Token: 0x04000C85 RID: 3205
|
||||
Broadcast,
|
||||
/// <summary>A peer-to-peer node.</summary>
|
||||
// Token: 0x04000C86 RID: 3206
|
||||
Peer2Peer,
|
||||
/// <summary>A mixed node.</summary>
|
||||
// Token: 0x04000C87 RID: 3207
|
||||
Mixed = 4,
|
||||
/// <summary>A hybrid node.</summary>
|
||||
// Token: 0x04000C88 RID: 3208
|
||||
Hybrid = 8
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>References one or more methods to be called when the address of a network interface changes.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">An <see cref="T:System.EventArgs" /> object that contains data about the event. </param>
|
||||
// Token: 0x0200032E RID: 814
|
||||
// (Invoke) Token: 0x06001C91 RID: 7313
|
||||
public delegate void NetworkAddressChangedEventHandler(object sender, EventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>References one or more methods to be called when the availability of the network changes.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">An <see cref="T:System.EventArgs" /> object that contains data about the event.</param>
|
||||
// Token: 0x0200032F RID: 815
|
||||
// (Invoke) Token: 0x06001C95 RID: 7317
|
||||
public delegate void NetworkAvailabilityChangedEventHandler(object sender, NetworkAvailabilityEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged" /> event.</summary>
|
||||
// Token: 0x0200019E RID: 414
|
||||
public class NetworkAvailabilityEventArgs : EventArgs
|
||||
{
|
||||
// Token: 0x06000DD5 RID: 3541 RVA: 0x00026D5C File Offset: 0x00024F5C
|
||||
internal NetworkAvailabilityEventArgs(bool available)
|
||||
{
|
||||
this.available = available;
|
||||
}
|
||||
|
||||
/// <summary>Gets the current status of the network connection.</summary>
|
||||
/// <returns>true if the network is available; otherwise, false.</returns>
|
||||
// Token: 0x17000481 RID: 1153
|
||||
// (get) Token: 0x06000DD6 RID: 3542 RVA: 0x00026D6C File Offset: 0x00024F6C
|
||||
public bool IsAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.available;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C89 RID: 3209
|
||||
private bool available;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Allows applications to receive notification when the Internet Protocol (IP) address of a network interface, also called a network card or adapter, changes.</summary>
|
||||
// Token: 0x0200019F RID: 415
|
||||
public sealed class NetworkChange
|
||||
{
|
||||
// Token: 0x06000DD7 RID: 3543 RVA: 0x00026D74 File Offset: 0x00024F74
|
||||
private NetworkChange()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Occurs when the IP address of a network interface changes.</summary>
|
||||
// Token: 0x14000023 RID: 35
|
||||
// (add) Token: 0x06000DD8 RID: 3544 RVA: 0x00026D7C File Offset: 0x00024F7C
|
||||
// (remove) Token: 0x06000DD9 RID: 3545 RVA: 0x00026D94 File Offset: 0x00024F94
|
||||
public static event NetworkAddressChangedEventHandler NetworkAddressChanged;
|
||||
|
||||
/// <summary>Occurs when the availability of the network changes.</summary>
|
||||
// Token: 0x14000024 RID: 36
|
||||
// (add) Token: 0x06000DDA RID: 3546 RVA: 0x00026DAC File Offset: 0x00024FAC
|
||||
// (remove) Token: 0x06000DDB RID: 3547 RVA: 0x00026DC4 File Offset: 0x00024FC4
|
||||
public static event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies permission to access information about network interfaces and traffic statistics.</summary>
|
||||
// Token: 0x020001A0 RID: 416
|
||||
[Flags]
|
||||
public enum NetworkInformationAccess
|
||||
{
|
||||
/// <summary>No access to network information.</summary>
|
||||
// Token: 0x04000C8D RID: 3213
|
||||
None = 0,
|
||||
/// <summary>Read access to network information.</summary>
|
||||
// Token: 0x04000C8E RID: 3214
|
||||
Read = 1,
|
||||
/// <summary>Ping access to network information.</summary>
|
||||
// Token: 0x04000C8F RID: 3215
|
||||
Ping = 4
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>The exception that is thrown when an error occurs while retrieving network information.</summary>
|
||||
// Token: 0x020001A1 RID: 417
|
||||
[Serializable]
|
||||
public class NetworkInformationException : Exception
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.NetworkInformationException" /> class.</summary>
|
||||
// Token: 0x06000DDC RID: 3548 RVA: 0x00026DDC File Offset: 0x00024FDC
|
||||
public NetworkInformationException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.NetworkInformationException" /> class with the specified error code.</summary>
|
||||
/// <param name="errorCode">A Win32 error code. </param>
|
||||
// Token: 0x06000DDD RID: 3549 RVA: 0x00026DE4 File Offset: 0x00024FE4
|
||||
public NetworkInformationException(int errorCode)
|
||||
{
|
||||
this.error_code = errorCode;
|
||||
}
|
||||
|
||||
/// <summary>Gets the Win32 error code for this exception.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that contains the Win32 error code.</returns>
|
||||
// Token: 0x17000482 RID: 1154
|
||||
// (get) Token: 0x06000DDE RID: 3550 RVA: 0x00026DF4 File Offset: 0x00024FF4
|
||||
public int ErrorCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.error_code;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C90 RID: 3216
|
||||
private int error_code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides configuration and statistical information for a network interface.</summary>
|
||||
// Token: 0x020001A2 RID: 418
|
||||
public abstract class NetworkInterface
|
||||
{
|
||||
// Token: 0x06000DE1 RID: 3553
|
||||
[DllImport("libc")]
|
||||
private static extern int uname(IntPtr buf);
|
||||
|
||||
/// <summary>Returns objects that describe the network interfaces on the local computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.NetworkInterface" /> array that contains objects that describe the available network interfaces, or an empty array if no interfaces are detected.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">A Windows system function call failed. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// <IPermission class="System.Net.NetworkInformation.NetworkInformationPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Access="Read" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000DE2 RID: 3554 RVA: 0x00026E24 File Offset: 0x00025024
|
||||
[global::System.MonoTODO("Only works on Linux and Windows")]
|
||||
public static NetworkInterface[] GetAllNetworkInterfaces()
|
||||
{
|
||||
if (NetworkInterface.runningOnUnix)
|
||||
{
|
||||
bool flag = false;
|
||||
IntPtr intPtr = Marshal.AllocHGlobal(8192);
|
||||
if (NetworkInterface.uname(intPtr) == 0)
|
||||
{
|
||||
string text = Marshal.PtrToStringAnsi(intPtr);
|
||||
if (text == "Darwin")
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
Marshal.FreeHGlobal(intPtr);
|
||||
try
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
return MacOsNetworkInterface.ImplGetAllNetworkInterfaces();
|
||||
}
|
||||
return LinuxNetworkInterface.ImplGetAllNetworkInterfaces();
|
||||
}
|
||||
catch (SystemException ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new NetworkInterface[0];
|
||||
}
|
||||
}
|
||||
if (Environment.OSVersion.Version >= NetworkInterface.windowsVer51)
|
||||
{
|
||||
return Win32NetworkInterface2.ImplGetAllNetworkInterfaces();
|
||||
}
|
||||
return new NetworkInterface[0];
|
||||
}
|
||||
|
||||
/// <summary>Indicates whether any network connection is available.</summary>
|
||||
/// <returns>true if a network connection is available; otherwise, false.</returns>
|
||||
// Token: 0x06000DE3 RID: 3555 RVA: 0x00026F0C File Offset: 0x0002510C
|
||||
[global::System.MonoTODO("Always returns true")]
|
||||
public static bool GetIsNetworkAvailable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06000DE4 RID: 3556 RVA: 0x00026F10 File Offset: 0x00025110
|
||||
internal static string ReadLine(string path)
|
||||
{
|
||||
string text;
|
||||
using (FileStream fileStream = File.OpenRead(path))
|
||||
{
|
||||
using (StreamReader streamReader = new StreamReader(fileStream))
|
||||
{
|
||||
text = streamReader.ReadLine();
|
||||
}
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
/// <summary>Gets the index of the IPv4 loopback interface.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> that contains the index for the IPv4 loopback interface.</returns>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.NetworkInformationException">This property is not valid on computers running only Ipv6.</exception>
|
||||
// Token: 0x17000483 RID: 1155
|
||||
// (get) Token: 0x06000DE5 RID: 3557 RVA: 0x00026F90 File Offset: 0x00025190
|
||||
[global::System.MonoTODO("Only works on Linux. Returns 0 on other systems.")]
|
||||
public static int LoopbackInterfaceIndex
|
||||
{
|
||||
get
|
||||
{
|
||||
if (NetworkInterface.runningOnUnix)
|
||||
{
|
||||
try
|
||||
{
|
||||
return UnixNetworkInterface.IfNameToIndex("lo");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that describes the configuration of this network interface.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPInterfaceProperties" /> object that describes this network interface.</returns>
|
||||
// Token: 0x06000DE6 RID: 3558
|
||||
public abstract IPInterfaceProperties GetIPProperties();
|
||||
|
||||
/// <summary>Gets the IPv4 statistics.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPv4InterfaceStatistics" /> object.</returns>
|
||||
// Token: 0x06000DE7 RID: 3559
|
||||
public abstract IPv4InterfaceStatistics GetIPv4Statistics();
|
||||
|
||||
/// <summary>Returns the Media Access Control (MAC) or physical address for this adapter.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PhysicalAddress" /> object that contains the physical address.</returns>
|
||||
// Token: 0x06000DE8 RID: 3560
|
||||
public abstract PhysicalAddress GetPhysicalAddress();
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the interface supports the specified protocol.</summary>
|
||||
/// <returns>true if the specified protocol is supported; otherwise, false.</returns>
|
||||
/// <param name="networkInterfaceComponent">A <see cref="T:System.Net.NetworkInformation.NetworkInterfaceComponent" /> value.</param>
|
||||
// Token: 0x06000DE9 RID: 3561
|
||||
public abstract bool Supports(NetworkInterfaceComponent networkInterfaceComponent);
|
||||
|
||||
/// <summary>Gets the description of the interface.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that describes this interface.</returns>
|
||||
// Token: 0x17000484 RID: 1156
|
||||
// (get) Token: 0x06000DEA RID: 3562
|
||||
public abstract string Description { get; }
|
||||
|
||||
/// <summary>Gets the identifier of the network adapter.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the identifier.</returns>
|
||||
// Token: 0x17000485 RID: 1157
|
||||
// (get) Token: 0x06000DEB RID: 3563
|
||||
public abstract string Id { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the network interface is set to only receive data packets.</summary>
|
||||
/// <returns>true if the interface only receives network traffic; otherwise, false.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x17000486 RID: 1158
|
||||
// (get) Token: 0x06000DEC RID: 3564
|
||||
public abstract bool IsReceiveOnly { get; }
|
||||
|
||||
/// <summary>Gets the name of the network adapter.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the adapter name.</returns>
|
||||
// Token: 0x17000487 RID: 1159
|
||||
// (get) Token: 0x06000DED RID: 3565
|
||||
public abstract string Name { get; }
|
||||
|
||||
/// <summary>Gets the interface type.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.NetworkInterfaceType" /> value that specifies the network interface type.</returns>
|
||||
// Token: 0x17000488 RID: 1160
|
||||
// (get) Token: 0x06000DEE RID: 3566
|
||||
public abstract NetworkInterfaceType NetworkInterfaceType { get; }
|
||||
|
||||
/// <summary>Gets the current operational state of the network connection.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Net.NetworkInformation.OperationalStatus" /> values.</returns>
|
||||
// Token: 0x17000489 RID: 1161
|
||||
// (get) Token: 0x06000DEF RID: 3567
|
||||
public abstract OperationalStatus OperationalStatus { get; }
|
||||
|
||||
/// <summary>Gets the speed of the network interface.</summary>
|
||||
/// <returns>A <see cref="T:System.Int64" /> value that specifies the speed in bits per second.</returns>
|
||||
// Token: 0x1700048A RID: 1162
|
||||
// (get) Token: 0x06000DF0 RID: 3568
|
||||
public abstract long Speed { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the network interface is enabled to receive multicast packets.</summary>
|
||||
/// <returns>true if the interface receives multicast packets; otherwise, false.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x1700048B RID: 1163
|
||||
// (get) Token: 0x06000DF1 RID: 3569
|
||||
public abstract bool SupportsMulticast { get; }
|
||||
|
||||
// Token: 0x04000C91 RID: 3217
|
||||
private static Version windowsVer51 = new Version(5, 1);
|
||||
|
||||
// Token: 0x04000C92 RID: 3218
|
||||
internal static readonly bool runningOnUnix = Environment.OSVersion.Platform == PlatformID.Unix;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies the Internet Protocol versions that are supported by a network interface.</summary>
|
||||
// Token: 0x020001A7 RID: 423
|
||||
public enum NetworkInterfaceComponent
|
||||
{
|
||||
/// <summary>Internet Protocol version 4.</summary>
|
||||
// Token: 0x04000CAB RID: 3243
|
||||
IPv4,
|
||||
/// <summary>Internet Protocol version 6.</summary>
|
||||
// Token: 0x04000CAC RID: 3244
|
||||
IPv6
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies types of network interfaces.</summary>
|
||||
// Token: 0x020001A8 RID: 424
|
||||
public enum NetworkInterfaceType
|
||||
{
|
||||
/// <summary>The interface type is not known.</summary>
|
||||
// Token: 0x04000CAE RID: 3246
|
||||
Unknown = 1,
|
||||
/// <summary>The network interface uses an Ethernet connection. Ethernet is defined in IEEE standard 802.3.</summary>
|
||||
// Token: 0x04000CAF RID: 3247
|
||||
Ethernet = 6,
|
||||
/// <summary>The network interface uses a Token-Ring connection. Token-Ring is defined in IEEE standard 802.5.</summary>
|
||||
// Token: 0x04000CB0 RID: 3248
|
||||
TokenRing = 9,
|
||||
/// <summary>The network interface uses a Fiber Distributed Data Interface (FDDI) connection. FDDI is a set of standards for data transmission on fiber optic lines in a local area network.</summary>
|
||||
// Token: 0x04000CB1 RID: 3249
|
||||
Fddi = 15,
|
||||
/// <summary>The network interface uses a basic rate interface Integrated Services Digital Network (ISDN) connection. ISDN is a set of standards for data transmission over telephone lines.</summary>
|
||||
// Token: 0x04000CB2 RID: 3250
|
||||
BasicIsdn = 20,
|
||||
/// <summary>The network interface uses a primary rate interface Integrated Services Digital Network (ISDN) connection. ISDN is a set of standards for data transmission over telephone lines.</summary>
|
||||
// Token: 0x04000CB3 RID: 3251
|
||||
PrimaryIsdn,
|
||||
/// <summary>The network interface uses a Point-To-Point protocol (PPP) connection. PPP is a protocol for data transmission using a serial device.</summary>
|
||||
// Token: 0x04000CB4 RID: 3252
|
||||
Ppp = 23,
|
||||
/// <summary>The network interface is a loopback adapter. Such interfaces are often used for testing; no traffic is sent over the wire.</summary>
|
||||
// Token: 0x04000CB5 RID: 3253
|
||||
Loopback,
|
||||
/// <summary>The network interface uses an Ethernet 3 megabit/second connection. This version of Ethernet is defined in IETF RFC 895.</summary>
|
||||
// Token: 0x04000CB6 RID: 3254
|
||||
Ethernet3Megabit = 26,
|
||||
/// <summary>The network interface uses a Serial Line Internet Protocol (SLIP) connection. SLIP is defined in IETF RFC 1055.</summary>
|
||||
// Token: 0x04000CB7 RID: 3255
|
||||
Slip = 28,
|
||||
/// <summary>The network interface uses asynchronous transfer mode (ATM) for data transmission.</summary>
|
||||
// Token: 0x04000CB8 RID: 3256
|
||||
Atm = 37,
|
||||
/// <summary>The network interface uses a modem.</summary>
|
||||
// Token: 0x04000CB9 RID: 3257
|
||||
GenericModem = 48,
|
||||
/// <summary>The network interface uses a Fast Ethernet connection over twisted pair and provides a data rate of 100 megabits per second. This type of connection is also known as 100Base-T.</summary>
|
||||
// Token: 0x04000CBA RID: 3258
|
||||
FastEthernetT = 62,
|
||||
/// <summary>The network interface uses a connection configured for ISDN and the X.25 protocol. X.25 allows computers on public networks to communicate using an intermediary computer.</summary>
|
||||
// Token: 0x04000CBB RID: 3259
|
||||
Isdn,
|
||||
/// <summary>The network interface uses a Fast Ethernet connection over optical fiber and provides a data rate of 100 megabits per second. This type of connection is also known as 100Base-FX.</summary>
|
||||
// Token: 0x04000CBC RID: 3260
|
||||
FastEthernetFx = 69,
|
||||
/// <summary>The network interface uses a wireless LAN connection (IEEE 802.11 standard).</summary>
|
||||
// Token: 0x04000CBD RID: 3261
|
||||
Wireless80211 = 71,
|
||||
/// <summary>The network interface uses an Asymmetric Digital Subscriber Line (ADSL).</summary>
|
||||
// Token: 0x04000CBE RID: 3262
|
||||
AsymmetricDsl = 94,
|
||||
/// <summary>The network interface uses a Rate Adaptive Digital Subscriber Line (RADSL).</summary>
|
||||
// Token: 0x04000CBF RID: 3263
|
||||
RateAdaptDsl,
|
||||
/// <summary>The network interface uses a Symmetric Digital Subscriber Line (SDSL).</summary>
|
||||
// Token: 0x04000CC0 RID: 3264
|
||||
SymmetricDsl,
|
||||
/// <summary>The network interface uses a Very High Data Rate Digital Subscriber Line (VDSL).</summary>
|
||||
// Token: 0x04000CC1 RID: 3265
|
||||
VeryHighSpeedDsl,
|
||||
/// <summary>The network interface uses the Internet Protocol (IP) in combination with asynchronous transfer mode (ATM) for data transmission.</summary>
|
||||
// Token: 0x04000CC2 RID: 3266
|
||||
IPOverAtm = 114,
|
||||
/// <summary>The network interface uses a gigabit Ethernet connection and provides a data rate of 1,000 megabits per second (1 gigabit per second).</summary>
|
||||
// Token: 0x04000CC3 RID: 3267
|
||||
GigabitEthernet = 117,
|
||||
/// <summary>The network interface uses a tunnel connection.</summary>
|
||||
// Token: 0x04000CC4 RID: 3268
|
||||
Tunnel = 131,
|
||||
/// <summary>The network interface uses a Multirate Digital Subscriber Line.</summary>
|
||||
// Token: 0x04000CC5 RID: 3269
|
||||
MultiRateSymmetricDsl = 143,
|
||||
/// <summary>The network interface uses a High Performance Serial Bus.</summary>
|
||||
// Token: 0x04000CC6 RID: 3270
|
||||
HighPerformanceSerialBus
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies the operational state of a network interface.</summary>
|
||||
// Token: 0x020001A9 RID: 425
|
||||
public enum OperationalStatus
|
||||
{
|
||||
/// <summary>The network interface is up; it can transmit data packets.</summary>
|
||||
// Token: 0x04000CC8 RID: 3272
|
||||
Up = 1,
|
||||
/// <summary>The network interface is unable to transmit data packets.</summary>
|
||||
// Token: 0x04000CC9 RID: 3273
|
||||
Down,
|
||||
/// <summary>The network interface is running tests.</summary>
|
||||
// Token: 0x04000CCA RID: 3274
|
||||
Testing,
|
||||
/// <summary>The network interface status is not known.</summary>
|
||||
// Token: 0x04000CCB RID: 3275
|
||||
Unknown,
|
||||
/// <summary>The network interface is not in a condition to transmit data packets; it is waiting for an external event.</summary>
|
||||
// Token: 0x04000CCC RID: 3276
|
||||
Dormant,
|
||||
/// <summary>The network interface is unable to transmit data packets because of a missing component, typically a hardware component.</summary>
|
||||
// Token: 0x04000CCD RID: 3277
|
||||
NotPresent,
|
||||
/// <summary>The network interface is unable to transmit data packets because it runs on top of one or more other interfaces, and at least one of these "lower layer" interfaces is down.</summary>
|
||||
// Token: 0x04000CCE RID: 3278
|
||||
LowerLayerDown
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides the Media Access Control (MAC) address for a network interface (adapter).</summary>
|
||||
// Token: 0x020001AA RID: 426
|
||||
public class PhysicalAddress
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PhysicalAddress" /> class. </summary>
|
||||
/// <param name="address">A <see cref="T:System.Byte" /> array containing the address.</param>
|
||||
// Token: 0x06000E26 RID: 3622 RVA: 0x00027F0C File Offset: 0x0002610C
|
||||
public PhysicalAddress(byte[] address)
|
||||
{
|
||||
this.bytes = address;
|
||||
}
|
||||
|
||||
// Token: 0x06000E28 RID: 3624 RVA: 0x00027F30 File Offset: 0x00026130
|
||||
internal static PhysicalAddress ParseEthernet(string address)
|
||||
{
|
||||
if (address == null)
|
||||
{
|
||||
return PhysicalAddress.None;
|
||||
}
|
||||
string[] array = address.Split(new char[] { ':' });
|
||||
byte[] array2 = new byte[array.Length];
|
||||
int num = 0;
|
||||
foreach (string text in array)
|
||||
{
|
||||
array2[num++] = byte.Parse(text, NumberStyles.HexNumber);
|
||||
}
|
||||
return new PhysicalAddress(array2);
|
||||
}
|
||||
|
||||
/// <summary>Parses the specified <see cref="T:System.String" /> and stores its contents as the address bytes of the <see cref="T:System.Net.NetworkInformation.PhysicalAddress" /> returned by this method.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PhysicalAddress" /> instance with the specified address.</returns>
|
||||
/// <param name="address">A <see cref="T:System.String" /> containing the address that will be used to initialize the <see cref="T:System.Net.NetworkInformation.PhysicalAddress" /> instance returned by this method.</param>
|
||||
/// <exception cref="T:System.FormatException">The <paramref name="address" /> parameter contains an illegal hardware address. This exception also occurs if the <paramref name="address" /> parameter contains a string in the incorrect format.</exception>
|
||||
// Token: 0x06000E29 RID: 3625 RVA: 0x00027FA0 File Offset: 0x000261A0
|
||||
public static PhysicalAddress Parse(string address)
|
||||
{
|
||||
if (address == null)
|
||||
{
|
||||
return PhysicalAddress.None;
|
||||
}
|
||||
if (address == string.Empty)
|
||||
{
|
||||
throw new FormatException("An invalid physical address was specified.");
|
||||
}
|
||||
string[] array = address.Split(new char[] { '-' });
|
||||
if (array.Length == 1)
|
||||
{
|
||||
if (address.Length != 12)
|
||||
{
|
||||
throw new FormatException("An invalid physical address was specified.");
|
||||
}
|
||||
array = new string[6];
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
array[i] = address.Substring(i * 2, 2);
|
||||
}
|
||||
}
|
||||
if (array.Length == 6)
|
||||
{
|
||||
foreach (string text in array)
|
||||
{
|
||||
if (text.Length > 2)
|
||||
{
|
||||
throw new FormatException("An invalid physical address was specified.");
|
||||
}
|
||||
if (text.Length < 2)
|
||||
{
|
||||
throw new IndexOutOfRangeException("An invalid physical address was specified.");
|
||||
}
|
||||
}
|
||||
byte[] array3 = new byte[6];
|
||||
for (int k = 0; k < 6; k++)
|
||||
{
|
||||
byte b = (byte)(PhysicalAddress.GetValue(array[k][0]) << 4);
|
||||
b += PhysicalAddress.GetValue(array[k][1]);
|
||||
array3[k] = b;
|
||||
}
|
||||
return new PhysicalAddress(array3);
|
||||
}
|
||||
throw new FormatException("An invalid physical address was specified.");
|
||||
}
|
||||
|
||||
// Token: 0x06000E2A RID: 3626 RVA: 0x000280EC File Offset: 0x000262EC
|
||||
private static byte GetValue(char c)
|
||||
{
|
||||
if (c >= '0' && c <= '9')
|
||||
{
|
||||
return (byte)(c - '0');
|
||||
}
|
||||
if (c >= 'a' && c <= 'f')
|
||||
{
|
||||
return (byte)(c - 'a' + '\n');
|
||||
}
|
||||
if (c >= 'A' && c <= 'F')
|
||||
{
|
||||
return (byte)(c - 'A' + '\n');
|
||||
}
|
||||
throw new FormatException("Invalid physical address.");
|
||||
}
|
||||
|
||||
/// <summary>Compares two <see cref="T:System.Net.NetworkInformation.PhysicalAddress" /> instances.</summary>
|
||||
/// <returns>true if this instance and the specified instance contain the same address; otherwise false.</returns>
|
||||
/// <param name="comparand">The <see cref="T:System.Net.NetworkInformation.PhysicalAddress" /> to compare to the current instance.</param>
|
||||
// Token: 0x06000E2B RID: 3627 RVA: 0x0002814C File Offset: 0x0002634C
|
||||
public override bool Equals(object comparand)
|
||||
{
|
||||
PhysicalAddress physicalAddress = comparand as PhysicalAddress;
|
||||
if (physicalAddress == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this.bytes.Length != physicalAddress.bytes.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < this.bytes.Length; i++)
|
||||
{
|
||||
if (this.bytes[i] != physicalAddress.bytes[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash value of a physical address.</summary>
|
||||
/// <returns>An integer hash value.</returns>
|
||||
// Token: 0x06000E2C RID: 3628 RVA: 0x000281B0 File Offset: 0x000263B0
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return ((int)this.bytes[5] << 8) ^ (int)this.bytes[4] ^ ((int)this.bytes[3] << 24) ^ ((int)this.bytes[2] << 16) ^ ((int)this.bytes[1] << 8) ^ (int)this.bytes[0];
|
||||
}
|
||||
|
||||
/// <summary>Returns the address of the current instance.</summary>
|
||||
/// <returns>A <see cref="T:System.Byte" /> array containing the address.</returns>
|
||||
// Token: 0x06000E2D RID: 3629 RVA: 0x000281FC File Offset: 0x000263FC
|
||||
public byte[] GetAddressBytes()
|
||||
{
|
||||
return this.bytes;
|
||||
}
|
||||
|
||||
/// <summary>Returns the <see cref="T:System.String" /> representation of the address of this instance.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> containing the address contained in this instance.</returns>
|
||||
// Token: 0x06000E2E RID: 3630 RVA: 0x00028204 File Offset: 0x00026404
|
||||
public override string ToString()
|
||||
{
|
||||
if (this.bytes == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
foreach (byte b in this.bytes)
|
||||
{
|
||||
stringBuilder.AppendFormat("{0:X2}", b);
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x04000CCF RID: 3279
|
||||
private const int numberOfBytes = 6;
|
||||
|
||||
/// <summary>Returns a new <see cref="T:System.Net.NetworkInformation.PhysicalAddress" /> instance with a zero length address. This field is read-only.</summary>
|
||||
// Token: 0x04000CD0 RID: 3280
|
||||
public static readonly PhysicalAddress None = new PhysicalAddress(new byte[0]);
|
||||
|
||||
// Token: 0x04000CD1 RID: 3281
|
||||
private byte[] bytes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,894 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Allows an application to determine whether a remote computer is accessible over the network.</summary>
|
||||
// Token: 0x020001AB RID: 427
|
||||
[global::System.MonoTODO("IPv6 support is missing")]
|
||||
public class Ping : global::System.ComponentModel.Component, IDisposable
|
||||
{
|
||||
// Token: 0x06000E30 RID: 3632 RVA: 0x00028268 File Offset: 0x00026468
|
||||
static Ping()
|
||||
{
|
||||
if (Environment.OSVersion.Platform == PlatformID.Unix)
|
||||
{
|
||||
Ping.CheckLinuxCapabilities();
|
||||
if (!Ping.canSendPrivileged && WindowsIdentity.GetCurrent().Name == "root")
|
||||
{
|
||||
Ping.canSendPrivileged = true;
|
||||
}
|
||||
foreach (string text in Ping.PingBinPaths)
|
||||
{
|
||||
if (File.Exists(text))
|
||||
{
|
||||
Ping.PingBinPath = text;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Ping.canSendPrivileged = true;
|
||||
}
|
||||
if (Ping.PingBinPath == null)
|
||||
{
|
||||
Ping.PingBinPath = "/bin/ping";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Occurs when an asynchronous operation to send an Internet Control Message Protocol (ICMP) echo message and receive the corresponding ICMP echo reply message completes or is canceled.</summary>
|
||||
// Token: 0x14000025 RID: 37
|
||||
// (add) Token: 0x06000E31 RID: 3633 RVA: 0x0002833C File Offset: 0x0002653C
|
||||
// (remove) Token: 0x06000E32 RID: 3634 RVA: 0x00028358 File Offset: 0x00026558
|
||||
public event PingCompletedEventHandler PingCompleted;
|
||||
|
||||
/// <summary>Releases all resources used by instances of the <see cref="T:System.Net.NetworkInformation.Ping" /> class.</summary>
|
||||
// Token: 0x06000E33 RID: 3635 RVA: 0x00028374 File Offset: 0x00026574
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000E34 RID: 3636
|
||||
[DllImport("libc")]
|
||||
private static extern int capget(ref Ping.cap_user_header_t header, ref Ping.cap_user_data_t data);
|
||||
|
||||
// Token: 0x06000E35 RID: 3637 RVA: 0x00028378 File Offset: 0x00026578
|
||||
private static void CheckLinuxCapabilities()
|
||||
{
|
||||
try
|
||||
{
|
||||
Ping.cap_user_header_t cap_user_header_t = default(Ping.cap_user_header_t);
|
||||
Ping.cap_user_data_t cap_user_data_t = default(Ping.cap_user_data_t);
|
||||
cap_user_header_t.version = 537333798U;
|
||||
int num = -1;
|
||||
try
|
||||
{
|
||||
num = Ping.capget(ref cap_user_header_t, ref cap_user_data_t);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
Ping.canSendPrivileged = (cap_user_data_t.effective & 8192U) != 0U;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Ping.canSendPrivileged = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Raises the <see cref="E:System.Net.NetworkInformation.Ping.PingCompleted" /> event.</summary>
|
||||
/// <param name="e">A <see cref="T:System.Net.NetworkInformation.PingCompletedEventArgs" /> object that contains event data.</param>
|
||||
// Token: 0x06000E36 RID: 3638 RVA: 0x00028424 File Offset: 0x00026624
|
||||
protected void OnPingCompleted(PingCompletedEventArgs e)
|
||||
{
|
||||
if (this.PingCompleted != null)
|
||||
{
|
||||
this.PingCompleted(this, e);
|
||||
}
|
||||
this.user_async_state = null;
|
||||
this.worker = null;
|
||||
}
|
||||
|
||||
/// <summary>Attempts to send an Internet Control Message Protocol (ICMP) echo message to the computer that has the specified <see cref="T:System.Net.IPAddress" />, and receive a corresponding ICMP echo reply message from that computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that provides information about the ICMP echo reply message, if one was received, or describes the reason for the failure if no message was received.</returns>
|
||||
/// <param name="address">An <see cref="T:System.Net.IPAddress" /> that identifies the computer that is the destination for the ICMP echo message.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Net.SocketPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000E37 RID: 3639 RVA: 0x00028458 File Offset: 0x00026658
|
||||
public PingReply Send(IPAddress address)
|
||||
{
|
||||
return this.Send(address, 4000);
|
||||
}
|
||||
|
||||
/// <summary>Attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the computer that has the specified <see cref="T:System.Net.IPAddress" />, and receive a corresponding ICMP echo reply message from that computer. This method allows you to specify a time-out value for the operation. </summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that provides information about the ICMP echo reply message if one was received, or provides the reason for the failure if no message was received.</returns>
|
||||
/// <param name="address">An <see cref="T:System.Net.IPAddress" /> that identifies the computer that is the destination for the ICMP echo message.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
// Token: 0x06000E38 RID: 3640 RVA: 0x00028468 File Offset: 0x00026668
|
||||
public PingReply Send(IPAddress address, int timeout)
|
||||
{
|
||||
return this.Send(address, timeout, Ping.default_buffer);
|
||||
}
|
||||
|
||||
/// <summary>Attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the computer that has the specified <see cref="T:System.Net.IPAddress" />, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that provides information about the ICMP echo reply message, if one was received, or provides the reason for the failure, if no message was received. The method will return <see cref="F:System.Net.NetworkInformation.IPStatus.PacketTooBig" /> if the packet exceeds the Maximum Transmission Unit (MTU).</returns>
|
||||
/// <param name="address">An <see cref="T:System.Net.IPAddress" /> that identifies the computer that is the destination for the ICMP echo message.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that contains data to be sent with the ICMP echo message and returned in the ICMP echo reply message. The array cannot contain more than 65,500 bytes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.-or-<paramref name="buffer" /> is null, or the <paramref name="buffer" /> size is greater than 65500 bytes.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="address" /> is not a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The size of <paramref name="buffer" /> exceeds 65500 bytes.</exception>
|
||||
// Token: 0x06000E39 RID: 3641 RVA: 0x00028478 File Offset: 0x00026678
|
||||
public PingReply Send(IPAddress address, int timeout, byte[] buffer)
|
||||
{
|
||||
return this.Send(address, timeout, buffer, new PingOptions());
|
||||
}
|
||||
|
||||
/// <summary>Attempts to send an Internet Control Message Protocol (ICMP) echo message to the specified computer, and receive a corresponding ICMP echo reply message from that computer.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that provides information about the ICMP echo reply message, if one was received, or provides the reason for the failure, if no message was received.</returns>
|
||||
/// <param name="hostNameOrAddress">A <see cref="T:System.String" /> that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="hostNameOrAddress" /> is null or is an empty string ("").</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Net.SocketPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000E3A RID: 3642 RVA: 0x00028488 File Offset: 0x00026688
|
||||
public PingReply Send(string hostNameOrAddress)
|
||||
{
|
||||
return this.Send(hostNameOrAddress, 4000);
|
||||
}
|
||||
|
||||
/// <summary>Attempts to send an Internet Control Message Protocol (ICMP) echo message to the specified computer, and receive a corresponding ICMP echo reply message from that computer. This method allows you to specify a time-out value for the operation.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that provides information about the ICMP echo reply message if one was received, or provides the reason for the failure if no message was received.</returns>
|
||||
/// <param name="hostNameOrAddress">A <see cref="T:System.String" /> that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="hostNameOrAddress" /> is null or is an empty string ("").</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
// Token: 0x06000E3B RID: 3643 RVA: 0x00028498 File Offset: 0x00026698
|
||||
public PingReply Send(string hostNameOrAddress, int timeout)
|
||||
{
|
||||
return this.Send(hostNameOrAddress, timeout, Ping.default_buffer);
|
||||
}
|
||||
|
||||
/// <summary>Attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the specified computer, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that provides information about the ICMP echo reply message if one was received, or provides the reason for the failure if no message was received.</returns>
|
||||
/// <param name="hostNameOrAddress">A <see cref="T:System.String" /> that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that contains data to be sent with the ICMP echo message and returned in the ICMP echo reply message. The array cannot contain more than 65,500 bytes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="hostNameOrAddress" /> is null or is an empty string ("").-or-<paramref name="buffer" /> is null, or the <paramref name="buffer" /> size is greater than 65500 bytes.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="hostNameOrAddress" /> could not be resolved to a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The size of <paramref name="buffer" /> exceeds 65500 bytes.</exception>
|
||||
// Token: 0x06000E3C RID: 3644 RVA: 0x000284A8 File Offset: 0x000266A8
|
||||
public PingReply Send(string hostNameOrAddress, int timeout, byte[] buffer)
|
||||
{
|
||||
return this.Send(hostNameOrAddress, timeout, buffer, new PingOptions());
|
||||
}
|
||||
|
||||
/// <summary>Attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the specified computer, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation and control fragmentation and Time-to-Live values for the ICMP packet.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that provides information about the ICMP echo reply message if one was received, or provides the reason for the failure if no message was received.</returns>
|
||||
/// <param name="hostNameOrAddress">A <see cref="T:System.String" /> that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that contains data to be sent with the ICMP echo message and returned in the ICMP echo reply message. The array cannot contain more than 65,500 bytes.</param>
|
||||
/// <param name="options">A <see cref="T:System.Net.NetworkInformation.PingOptions" /> object used to control fragmentation and Time-to-Live values for the ICMP echo message packet.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="hostNameOrAddress" /> is null or is a zero length string.-or-<paramref name="buffer" /> is null, or the <paramref name="buffer" /> size is greater than 65500 bytes.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="hostNameOrAddress" /> could not be resolved to a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The size of <paramref name="buffer" /> exceeds 65500 bytes.</exception>
|
||||
// Token: 0x06000E3D RID: 3645 RVA: 0x000284B8 File Offset: 0x000266B8
|
||||
public PingReply Send(string hostNameOrAddress, int timeout, byte[] buffer, PingOptions options)
|
||||
{
|
||||
IPAddress[] hostAddresses = Dns.GetHostAddresses(hostNameOrAddress);
|
||||
return this.Send(hostAddresses[0], timeout, buffer, options);
|
||||
}
|
||||
|
||||
// Token: 0x06000E3E RID: 3646 RVA: 0x000284DC File Offset: 0x000266DC
|
||||
private static IPAddress GetNonLoopbackIP()
|
||||
{
|
||||
foreach (IPAddress ipaddress in Dns.GetHostByName(Dns.GetHostName()).AddressList)
|
||||
{
|
||||
if (!IPAddress.IsLoopback(ipaddress))
|
||||
{
|
||||
return ipaddress;
|
||||
}
|
||||
}
|
||||
throw new InvalidOperationException("Could not resolve non-loopback IP address for localhost");
|
||||
}
|
||||
|
||||
/// <summary>Attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the computer that has the specified <see cref="T:System.Net.IPAddress" /> and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation and control fragmentation and Time-to-Live values for the ICMP echo message packet.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that provides information about the ICMP echo reply message, if one was received, or provides the reason for the failure, if no message was received. The method will return <see cref="F:System.Net.NetworkInformation.IPStatus.PacketTooBig" /> if the packet exceeds the Maximum Transmission Unit (MTU).</returns>
|
||||
/// <param name="address">An <see cref="T:System.Net.IPAddress" /> that identifies the computer that is the destination for the ICMP echo message.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that contains data to be sent with the ICMP echo message and returned in the ICMP echo reply message. The array cannot contain more than 65,500 bytes.</param>
|
||||
/// <param name="options">A <see cref="T:System.Net.NetworkInformation.PingOptions" /> object used to control fragmentation and Time-to-Live values for the ICMP echo message packet.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.-or-<paramref name="buffer" /> is null, or the <paramref name="buffer" /> size is greater than 65500 bytes.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="address" /> is not a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The size of <paramref name="buffer" /> exceeds 65500 bytes.</exception>
|
||||
// Token: 0x06000E3F RID: 3647 RVA: 0x00028528 File Offset: 0x00026728
|
||||
public PingReply Send(IPAddress address, int timeout, byte[] buffer, PingOptions options)
|
||||
{
|
||||
if (address == null)
|
||||
{
|
||||
throw new ArgumentNullException("address");
|
||||
}
|
||||
if (timeout < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("timeout", "timeout must be non-negative integer");
|
||||
}
|
||||
if (buffer == null)
|
||||
{
|
||||
throw new ArgumentNullException("buffer");
|
||||
}
|
||||
if (buffer.Length > 65500)
|
||||
{
|
||||
throw new ArgumentException("buffer");
|
||||
}
|
||||
if (Ping.canSendPrivileged)
|
||||
{
|
||||
return this.SendPrivileged(address, timeout, buffer, options);
|
||||
}
|
||||
return this.SendUnprivileged(address, timeout, buffer, options);
|
||||
}
|
||||
|
||||
// Token: 0x06000E40 RID: 3648 RVA: 0x000285A8 File Offset: 0x000267A8
|
||||
private PingReply SendPrivileged(IPAddress address, int timeout, byte[] buffer, PingOptions options)
|
||||
{
|
||||
IPEndPoint ipendPoint = new IPEndPoint(address, 0);
|
||||
IPEndPoint ipendPoint2 = new IPEndPoint(Ping.GetNonLoopbackIP(), 0);
|
||||
PingReply pingReply;
|
||||
using (global::System.Net.Sockets.Socket socket = new global::System.Net.Sockets.Socket(global::System.Net.Sockets.AddressFamily.InterNetwork, global::System.Net.Sockets.SocketType.Raw, global::System.Net.Sockets.ProtocolType.Icmp))
|
||||
{
|
||||
if (options != null)
|
||||
{
|
||||
socket.DontFragment = options.DontFragment;
|
||||
socket.Ttl = (short)options.Ttl;
|
||||
}
|
||||
socket.SendTimeout = timeout;
|
||||
socket.ReceiveTimeout = timeout;
|
||||
Ping.IcmpMessage icmpMessage = new Ping.IcmpMessage(8, 0, 1, 0, buffer);
|
||||
byte[] array = icmpMessage.GetBytes();
|
||||
socket.SendBufferSize = array.Length;
|
||||
socket.SendTo(array, array.Length, global::System.Net.Sockets.SocketFlags.None, ipendPoint);
|
||||
DateTime now = DateTime.Now;
|
||||
array = new byte[100];
|
||||
int num;
|
||||
long num3;
|
||||
Ping.IcmpMessage icmpMessage2;
|
||||
for (;;)
|
||||
{
|
||||
EndPoint endPoint = ipendPoint2;
|
||||
num = 0;
|
||||
int num2 = socket.ReceiveFrom_nochecks_exc(array, 0, 100, global::System.Net.Sockets.SocketFlags.None, ref endPoint, false, out num);
|
||||
if (num != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
num3 = (long)(DateTime.Now - now).TotalMilliseconds;
|
||||
int num4 = (int)(array[0] & 15) << 2;
|
||||
int num5 = num2 - num4;
|
||||
if (!((IPEndPoint)endPoint).Address.Equals(ipendPoint.Address))
|
||||
{
|
||||
long num6 = (long)timeout - num3;
|
||||
if (num6 <= 0L)
|
||||
{
|
||||
goto Block_7;
|
||||
}
|
||||
socket.ReceiveTimeout = (int)num6;
|
||||
}
|
||||
else
|
||||
{
|
||||
icmpMessage2 = new Ping.IcmpMessage(array, num4, num5);
|
||||
if (icmpMessage2.Identifier == 1 && icmpMessage2.Type != 8)
|
||||
{
|
||||
goto IL_1C9;
|
||||
}
|
||||
long num7 = (long)timeout - num3;
|
||||
if (num7 <= 0L)
|
||||
{
|
||||
goto Block_9;
|
||||
}
|
||||
socket.ReceiveTimeout = (int)num7;
|
||||
}
|
||||
}
|
||||
if (num == 10060)
|
||||
{
|
||||
return new PingReply(null, new byte[0], options, 0L, IPStatus.TimedOut);
|
||||
}
|
||||
throw new NotSupportedException(string.Format("Unexpected socket error during ping request: {0}", num));
|
||||
Block_7:
|
||||
return new PingReply(null, new byte[0], options, 0L, IPStatus.TimedOut);
|
||||
Block_9:
|
||||
return new PingReply(null, new byte[0], options, 0L, IPStatus.TimedOut);
|
||||
IL_1C9:
|
||||
pingReply = new PingReply(address, icmpMessage2.Data, options, num3, icmpMessage2.IPStatus);
|
||||
}
|
||||
return pingReply;
|
||||
}
|
||||
|
||||
// Token: 0x06000E41 RID: 3649 RVA: 0x000287D4 File Offset: 0x000269D4
|
||||
private PingReply SendUnprivileged(IPAddress address, int timeout, byte[] buffer, PingOptions options)
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
global::System.Diagnostics.Process process = new global::System.Diagnostics.Process();
|
||||
string text = this.BuildPingArgs(address, timeout, options);
|
||||
long num = 0L;
|
||||
process.StartInfo.FileName = Ping.PingBinPath;
|
||||
process.StartInfo.Arguments = text;
|
||||
process.StartInfo.CreateNoWindow = true;
|
||||
process.StartInfo.UseShellExecute = false;
|
||||
process.StartInfo.RedirectStandardOutput = true;
|
||||
process.StartInfo.RedirectStandardError = true;
|
||||
DateTime utcNow = DateTime.UtcNow;
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
num = (long)(DateTime.Now - now).TotalMilliseconds;
|
||||
if (!process.WaitForExit(timeout) || (process.HasExited && process.ExitCode == 2))
|
||||
{
|
||||
return new PingReply(address, buffer, options, num, IPStatus.TimedOut);
|
||||
}
|
||||
if (process.ExitCode == 1)
|
||||
{
|
||||
return new PingReply(address, buffer, options, num, IPStatus.TtlExpired);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return new PingReply(address, buffer, options, num, IPStatus.Unknown);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (process != null)
|
||||
{
|
||||
if (!process.HasExited)
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
process.Dispose();
|
||||
}
|
||||
}
|
||||
return new PingReply(address, buffer, options, num, IPStatus.Success);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the computer that has the specified <see cref="T:System.Net.IPAddress" />, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation.</summary>
|
||||
/// <param name="address">An <see cref="T:System.Net.IPAddress" /> that identifies the computer that is the destination for the ICMP echo message.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that contains data to be sent with the ICMP echo message and returned in the ICMP echo reply message. The array cannot contain more than 65,500 bytes.</param>
|
||||
/// <param name="userToken">An object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.-or-<paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="address" /> is not a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The size of <paramref name="buffer" /> exceeds 65500 bytes.</exception>
|
||||
// Token: 0x06000E42 RID: 3650 RVA: 0x00028944 File Offset: 0x00026B44
|
||||
public void SendAsync(IPAddress address, int timeout, byte[] buffer, object userToken)
|
||||
{
|
||||
this.SendAsync(address, 4000, Ping.default_buffer, new PingOptions(), userToken);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message to the computer that has the specified <see cref="T:System.Net.IPAddress" />, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation.</summary>
|
||||
/// <param name="address">An <see cref="T:System.Net.IPAddress" /> that identifies the computer that is the destination for the ICMP echo message.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="userToken">An object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="M:System.Net.NetworkInformation.Ping.SendAsync(System.Net.IPAddress,System.Int32,System.Byte[],System.Object)" /> method is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="address" /> is not a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
// Token: 0x06000E43 RID: 3651 RVA: 0x00028960 File Offset: 0x00026B60
|
||||
public void SendAsync(IPAddress address, int timeout, object userToken)
|
||||
{
|
||||
this.SendAsync(address, 4000, Ping.default_buffer, userToken);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message to the computer that has the specified <see cref="T:System.Net.IPAddress" />, and receive a corresponding ICMP echo reply message from that computer.</summary>
|
||||
/// <param name="address">An <see cref="T:System.Net.IPAddress" /> that identifies the computer that is the destination for the ICMP echo message.</param>
|
||||
/// <param name="userToken">An object that is passed to the method invoked when the asynchronous operation completes. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to the <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> method is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="address" /> is not a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Net.SocketPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000E44 RID: 3652 RVA: 0x00028974 File Offset: 0x00026B74
|
||||
public void SendAsync(IPAddress address, object userToken)
|
||||
{
|
||||
this.SendAsync(address, 4000, userToken);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the specified computer, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation.</summary>
|
||||
/// <param name="hostNameOrAddress">A <see cref="T:System.String" /> that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that contains data to be sent with the ICMP echo message and returned in the ICMP echo reply message. The array cannot contain more than 65,500 bytes.</param>
|
||||
/// <param name="userToken">An object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="hostNameOrAddress" /> is null or is an empty string ("").-or-<paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="hostNameOrAddress" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="hostNameOrAddress" /> could not be resolved to a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The size of <paramref name="buffer" /> exceeds 65500 bytes.</exception>
|
||||
// Token: 0x06000E45 RID: 3653 RVA: 0x00028984 File Offset: 0x00026B84
|
||||
public void SendAsync(string hostNameOrAddress, int timeout, byte[] buffer, object userToken)
|
||||
{
|
||||
this.SendAsync(hostNameOrAddress, timeout, buffer, new PingOptions(), userToken);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the specified computer, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation and control fragmentation and Time-to-Live values for the ICMP packet.</summary>
|
||||
/// <param name="hostNameOrAddress">A <see cref="T:System.String" /> that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.</param>
|
||||
/// <param name="timeout">A <see cref="T:System.Byte" /> array that contains data to be sent with the ICMP echo message and returned in the ICMP echo reply message. The array cannot contain more than 65,500 bytes.</param>
|
||||
/// <param name="buffer">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="options">A <see cref="T:System.Net.NetworkInformation.PingOptions" /> object used to control fragmentation and Time-to-Live values for the ICMP echo message packet.</param>
|
||||
/// <param name="userToken">An object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="hostNameOrAddress" /> is null or is an empty string ("").-or-<paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="hostNameOrAddress" /> could not be resolved to a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The size of <paramref name="buffer" /> exceeds 65500 bytes.</exception>
|
||||
// Token: 0x06000E46 RID: 3654 RVA: 0x00028998 File Offset: 0x00026B98
|
||||
public void SendAsync(string hostNameOrAddress, int timeout, byte[] buffer, PingOptions options, object userToken)
|
||||
{
|
||||
IPAddress ipaddress = Dns.GetHostEntry(hostNameOrAddress).AddressList[0];
|
||||
this.SendAsync(ipaddress, timeout, buffer, options, userToken);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message to the specified computer, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation.</summary>
|
||||
/// <param name="hostNameOrAddress">A <see cref="T:System.String" /> that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.</param>
|
||||
/// <param name="timeout">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="userToken">An object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="hostNameOrAddress" /> is null or is an empty string ("").</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="hostNameOrAddress" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="hostNameOrAddress" /> could not be resolved to a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
// Token: 0x06000E47 RID: 3655 RVA: 0x000289C0 File Offset: 0x00026BC0
|
||||
public void SendAsync(string hostNameOrAddress, int timeout, object userToken)
|
||||
{
|
||||
this.SendAsync(hostNameOrAddress, timeout, Ping.default_buffer, userToken);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message to the specified computer, and receive a corresponding ICMP echo reply message from that computer.</summary>
|
||||
/// <param name="hostNameOrAddress">A <see cref="T:System.String" /> that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.</param>
|
||||
/// <param name="userToken">An object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="hostNameOrAddress" /> is null or is an empty string ("").</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="M:System.Net.NetworkInformation.Ping.SendAsync(System.String,System.Object)" /> method is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="hostNameOrAddress" /> could not be resolved to a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Net.SocketPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000E48 RID: 3656 RVA: 0x000289D0 File Offset: 0x00026BD0
|
||||
public void SendAsync(string hostNameOrAddress, object userToken)
|
||||
{
|
||||
this.SendAsync(hostNameOrAddress, 4000, userToken);
|
||||
}
|
||||
|
||||
/// <summary>Asynchronously attempts to send an Internet Control Message Protocol (ICMP) echo message with the specified data buffer to the computer that has the specified <see cref="T:System.Net.IPAddress" />, and receive a corresponding ICMP echo reply message from that computer. This overload allows you to specify a time-out value for the operation and control fragmentation and Time-to-Live values for the ICMP echo message packet.</summary>
|
||||
/// <param name="address">An <see cref="T:System.Net.IPAddress" /> that identifies the computer that is the destination for the ICMP echo message.</param>
|
||||
/// <param name="timeout">A <see cref="T:System.Byte" /> array that contains data to be sent with the ICMP echo message and returned in the ICMP echo reply message. The array cannot contain more than 65,500 bytes.</param>
|
||||
/// <param name="buffer">An <see cref="T:System.Int32" /> value that specifies the maximum number of milliseconds (after sending the echo message) to wait for the ICMP echo reply message.</param>
|
||||
/// <param name="options">A <see cref="T:System.Net.NetworkInformation.PingOptions" /> object used to control fragmentation and Time-to-Live values for the ICMP echo message packet.</param>
|
||||
/// <param name="userToken">An object that is passed to the method invoked when the asynchronous operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="address" /> is null.-or-<paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="timeout" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">A call to <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> is in progress.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <paramref name="address" /> is an IPv6 address and the local computer is running an operating system earlier than Windows 2000. </exception>
|
||||
/// <exception cref="T:System.Net.NetworkInformation.PingException">An exception was thrown while sending or receiving the ICMP messages. See the inner exception for the exact exception that was thrown.</exception>
|
||||
/// <exception cref="T:System.Net.Sockets.SocketException">
|
||||
/// <paramref name="address" /> is not a valid IP address.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been disposed.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The size of <paramref name="buffer" /> exceeds 65500 bytes.</exception>
|
||||
// Token: 0x06000E49 RID: 3657 RVA: 0x000289E0 File Offset: 0x00026BE0
|
||||
public void SendAsync(IPAddress address, int timeout, byte[] buffer, PingOptions options, object userToken)
|
||||
{
|
||||
if (this.worker != null)
|
||||
{
|
||||
throw new InvalidOperationException("Another SendAsync operation is in progress");
|
||||
}
|
||||
this.worker = new global::System.ComponentModel.BackgroundWorker();
|
||||
this.worker.DoWork += delegate(object o, global::System.ComponentModel.DoWorkEventArgs ea)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.user_async_state = ea.Argument;
|
||||
ea.Result = this.Send(address, timeout, buffer, options);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ea.Result = ex;
|
||||
}
|
||||
};
|
||||
this.worker.WorkerSupportsCancellation = true;
|
||||
this.worker.RunWorkerCompleted += delegate(object o, global::System.ComponentModel.RunWorkerCompletedEventArgs ea)
|
||||
{
|
||||
this.OnPingCompleted(new PingCompletedEventArgs(ea.Error, ea.Cancelled, this.user_async_state, ea.Result as PingReply));
|
||||
};
|
||||
this.worker.RunWorkerAsync(userToken);
|
||||
}
|
||||
|
||||
/// <summary>Cancels all pending asynchronous requests to send an Internet Control Message Protocol (ICMP) echo message and receives a corresponding ICMP echo reply message.</summary>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000E4A RID: 3658 RVA: 0x00028A80 File Offset: 0x00026C80
|
||||
public void SendAsyncCancel()
|
||||
{
|
||||
if (this.worker == null)
|
||||
{
|
||||
throw new InvalidOperationException("SendAsync operation is not in progress");
|
||||
}
|
||||
this.worker.CancelAsync();
|
||||
}
|
||||
|
||||
// Token: 0x06000E4B RID: 3659 RVA: 0x00028AA4 File Offset: 0x00026CA4
|
||||
private string BuildPingArgs(IPAddress address, int timeout, PingOptions options)
|
||||
{
|
||||
CultureInfo invariantCulture = CultureInfo.InvariantCulture;
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
uint num = Convert.ToUInt32(Math.Floor((double)(timeout + 1000) / 1000.0));
|
||||
bool flag = Environment.OSVersion.Platform == PlatformID.MacOSX;
|
||||
if (!flag)
|
||||
{
|
||||
stringBuilder.AppendFormat(invariantCulture, "-q -n -c {0} -w {1} -t {2} -M ", new object[] { 1, num, options.Ttl });
|
||||
}
|
||||
else
|
||||
{
|
||||
stringBuilder.AppendFormat(invariantCulture, "-q -n -c {0} -t {1} -o -m {2} ", new object[] { 1, num, options.Ttl });
|
||||
}
|
||||
if (!flag)
|
||||
{
|
||||
stringBuilder.Append((!options.DontFragment) ? "dont " : "do ");
|
||||
}
|
||||
else if (options.DontFragment)
|
||||
{
|
||||
stringBuilder.Append("-D ");
|
||||
}
|
||||
stringBuilder.Append(address.ToString());
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x04000CD2 RID: 3282
|
||||
private const int DefaultCount = 1;
|
||||
|
||||
// Token: 0x04000CD3 RID: 3283
|
||||
private const int default_timeout = 4000;
|
||||
|
||||
// Token: 0x04000CD4 RID: 3284
|
||||
private const int identifier = 1;
|
||||
|
||||
// Token: 0x04000CD5 RID: 3285
|
||||
private const uint linux_cap_version = 537333798U;
|
||||
|
||||
// Token: 0x04000CD6 RID: 3286
|
||||
private static readonly string[] PingBinPaths = new string[] { "/bin/ping", "/sbin/ping", "/usr/sbin/ping", "/system/bin/ping" };
|
||||
|
||||
// Token: 0x04000CD7 RID: 3287
|
||||
private static readonly string PingBinPath;
|
||||
|
||||
// Token: 0x04000CD8 RID: 3288
|
||||
private static readonly byte[] default_buffer = new byte[0];
|
||||
|
||||
// Token: 0x04000CD9 RID: 3289
|
||||
private static bool canSendPrivileged;
|
||||
|
||||
// Token: 0x04000CDA RID: 3290
|
||||
private global::System.ComponentModel.BackgroundWorker worker;
|
||||
|
||||
// Token: 0x04000CDB RID: 3291
|
||||
private object user_async_state;
|
||||
|
||||
// Token: 0x020001AC RID: 428
|
||||
private struct cap_user_header_t
|
||||
{
|
||||
// Token: 0x04000CDD RID: 3293
|
||||
public uint version;
|
||||
|
||||
// Token: 0x04000CDE RID: 3294
|
||||
public int pid;
|
||||
}
|
||||
|
||||
// Token: 0x020001AD RID: 429
|
||||
private struct cap_user_data_t
|
||||
{
|
||||
// Token: 0x04000CDF RID: 3295
|
||||
public uint effective;
|
||||
|
||||
// Token: 0x04000CE0 RID: 3296
|
||||
public uint permitted;
|
||||
|
||||
// Token: 0x04000CE1 RID: 3297
|
||||
public uint inheritable;
|
||||
}
|
||||
|
||||
// Token: 0x020001AE RID: 430
|
||||
private class IcmpMessage
|
||||
{
|
||||
// Token: 0x06000E4C RID: 3660 RVA: 0x00028BB0 File Offset: 0x00026DB0
|
||||
public IcmpMessage(byte[] bytes, int offset, int size)
|
||||
{
|
||||
this.bytes = new byte[size];
|
||||
Buffer.BlockCopy(bytes, offset, this.bytes, 0, size);
|
||||
}
|
||||
|
||||
// Token: 0x06000E4D RID: 3661 RVA: 0x00028BD4 File Offset: 0x00026DD4
|
||||
public IcmpMessage(byte type, byte code, short identifier, short sequence, byte[] data)
|
||||
{
|
||||
this.bytes = new byte[data.Length + 8];
|
||||
this.bytes[0] = type;
|
||||
this.bytes[1] = code;
|
||||
this.bytes[4] = (byte)(identifier & 255);
|
||||
this.bytes[5] = (byte)(identifier >> 8);
|
||||
this.bytes[6] = (byte)(sequence & 255);
|
||||
this.bytes[7] = (byte)(sequence >> 8);
|
||||
Buffer.BlockCopy(data, 0, this.bytes, 8, data.Length);
|
||||
ushort num = Ping.IcmpMessage.ComputeChecksum(this.bytes);
|
||||
this.bytes[2] = (byte)(num & 255);
|
||||
this.bytes[3] = (byte)(num >> 8);
|
||||
}
|
||||
|
||||
// Token: 0x1700049F RID: 1183
|
||||
// (get) Token: 0x06000E4E RID: 3662 RVA: 0x00028C80 File Offset: 0x00026E80
|
||||
public byte Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bytes[0];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004A0 RID: 1184
|
||||
// (get) Token: 0x06000E4F RID: 3663 RVA: 0x00028C8C File Offset: 0x00026E8C
|
||||
public byte Code
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bytes[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004A1 RID: 1185
|
||||
// (get) Token: 0x06000E50 RID: 3664 RVA: 0x00028C98 File Offset: 0x00026E98
|
||||
public byte Identifier
|
||||
{
|
||||
get
|
||||
{
|
||||
return (byte)((int)this.bytes[4] + ((int)this.bytes[5] << 8));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004A2 RID: 1186
|
||||
// (get) Token: 0x06000E51 RID: 3665 RVA: 0x00028CB0 File Offset: 0x00026EB0
|
||||
public byte Sequence
|
||||
{
|
||||
get
|
||||
{
|
||||
return (byte)((int)this.bytes[6] + ((int)this.bytes[7] << 8));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004A3 RID: 1187
|
||||
// (get) Token: 0x06000E52 RID: 3666 RVA: 0x00028CC8 File Offset: 0x00026EC8
|
||||
public byte[] Data
|
||||
{
|
||||
get
|
||||
{
|
||||
byte[] array = new byte[this.bytes.Length - 8];
|
||||
Buffer.BlockCopy(this.bytes, 0, array, 0, array.Length);
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E53 RID: 3667 RVA: 0x00028CF8 File Offset: 0x00026EF8
|
||||
public byte[] GetBytes()
|
||||
{
|
||||
return this.bytes;
|
||||
}
|
||||
|
||||
// Token: 0x06000E54 RID: 3668 RVA: 0x00028D00 File Offset: 0x00026F00
|
||||
private static ushort ComputeChecksum(byte[] data)
|
||||
{
|
||||
uint num = 0U;
|
||||
for (int i = 0; i < data.Length; i += 2)
|
||||
{
|
||||
ushort num2 = (ushort)((i + 1 >= data.Length) ? 0 : data[i + 1]);
|
||||
num2 = (ushort)(num2 << 8);
|
||||
num2 += (ushort)data[i];
|
||||
num += (uint)num2;
|
||||
}
|
||||
num = (num >> 16) + (num & 65535U);
|
||||
return (ushort)(~(ushort)num);
|
||||
}
|
||||
|
||||
// Token: 0x170004A4 RID: 1188
|
||||
// (get) Token: 0x06000E55 RID: 3669 RVA: 0x00028D5C File Offset: 0x00026F5C
|
||||
public IPStatus IPStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
byte type = this.Type;
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
return IPStatus.Success;
|
||||
default:
|
||||
switch (type)
|
||||
{
|
||||
case 8:
|
||||
return IPStatus.Success;
|
||||
case 11:
|
||||
{
|
||||
byte code = this.Code;
|
||||
if (code == 0)
|
||||
{
|
||||
return IPStatus.TimeExceeded;
|
||||
}
|
||||
if (code == 1)
|
||||
{
|
||||
return IPStatus.TtlReassemblyTimeExceeded;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
return IPStatus.ParameterProblem;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
switch (this.Code)
|
||||
{
|
||||
case 0:
|
||||
return IPStatus.DestinationNetworkUnreachable;
|
||||
case 1:
|
||||
return IPStatus.DestinationHostUnreachable;
|
||||
case 2:
|
||||
return IPStatus.DestinationProhibited;
|
||||
case 3:
|
||||
return IPStatus.DestinationPortUnreachable;
|
||||
case 4:
|
||||
return IPStatus.BadOption;
|
||||
case 5:
|
||||
return IPStatus.BadRoute;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
return IPStatus.SourceQuench;
|
||||
}
|
||||
return IPStatus.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000CE2 RID: 3298
|
||||
private byte[] bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.Net.NetworkInformation.Ping.PingCompleted" /> event.</summary>
|
||||
// Token: 0x020001AF RID: 431
|
||||
public class PingCompletedEventArgs : global::System.ComponentModel.AsyncCompletedEventArgs
|
||||
{
|
||||
// Token: 0x06000E56 RID: 3670 RVA: 0x00028E3C File Offset: 0x0002703C
|
||||
internal PingCompletedEventArgs(Exception ex, bool cancelled, object userState, PingReply reply)
|
||||
: base(ex, cancelled, userState)
|
||||
{
|
||||
this.reply = reply;
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that contains data that describes an attempt to send an Internet Control Message Protocol (ICMP) echo request message and receive a corresponding ICMP echo reply message.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingReply" /> object that describes the results of the ICMP echo request.</returns>
|
||||
// Token: 0x170004A5 RID: 1189
|
||||
// (get) Token: 0x06000E57 RID: 3671 RVA: 0x00028E50 File Offset: 0x00027050
|
||||
public PingReply Reply
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.reply;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000CE3 RID: 3299
|
||||
private PingReply reply;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Represents the method that will handle the <see cref="E:System.Net.NetworkInformation.Ping.PingCompleted" /> event of a <see cref="T:System.Net.NetworkInformation.Ping" /> object.</summary>
|
||||
/// <param name="sender">The source of the <see cref="E:System.Net.NetworkInformation.Ping.PingCompleted" /> event.</param>
|
||||
/// <param name="e">A <see cref="T:System.Net.NetworkInformation.PingCompletedEventArgs" /> object that contains the event data.</param>
|
||||
// Token: 0x02000330 RID: 816
|
||||
// (Invoke) Token: 0x06001C99 RID: 7321
|
||||
public delegate void PingCompletedEventHandler(object sender, PingCompletedEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>The exception that is thrown when a <see cref="Overload:System.Net.NetworkInformation.Ping.Send" /> or <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> method calls a method that throws an exception.</summary>
|
||||
// Token: 0x020001B0 RID: 432
|
||||
[Serializable]
|
||||
public class PingException : InvalidOperationException
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingException" /> class using the specified message.</summary>
|
||||
/// <param name="message">A <see cref="T:System.String" /> that describes the error.</param>
|
||||
// Token: 0x06000E58 RID: 3672 RVA: 0x00028E58 File Offset: 0x00027058
|
||||
public PingException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingException" /> class using the specified message and inner exception.</summary>
|
||||
/// <param name="message">A <see cref="T:System.String" /> that describes the error.</param>
|
||||
/// <param name="innerException">The exception that causes the current exception.</param>
|
||||
// Token: 0x06000E59 RID: 3673 RVA: 0x00028E64 File Offset: 0x00027064
|
||||
public PingException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingException" /> class with serialized data. </summary>
|
||||
/// <param name="serializationInfo">The object that holds the serialized object data. </param>
|
||||
/// <param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that specifies the contextual information about the source or destination for this serialization.</param>
|
||||
// Token: 0x06000E5A RID: 3674 RVA: 0x00028E70 File Offset: 0x00027070
|
||||
protected PingException(SerializationInfo serializationInfo, StreamingContext streamingContext)
|
||||
: base(serializationInfo, streamingContext)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Used to control how <see cref="T:System.Net.NetworkInformation.Ping" /> data packets are transmitted.</summary>
|
||||
// Token: 0x020001B1 RID: 433
|
||||
public class PingOptions
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingOptions" /> class.</summary>
|
||||
// Token: 0x06000E5B RID: 3675 RVA: 0x00028E7C File Offset: 0x0002707C
|
||||
public PingOptions()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.PingOptions" /> class and sets the Time to Live and fragmentation values.</summary>
|
||||
/// <param name="ttl">An <see cref="T:System.Int32" /> value greater than zero that specifies the number of times that the <see cref="T:System.Net.NetworkInformation.Ping" /> data packets can be forwarded.</param>
|
||||
/// <param name="dontFragment">true to prevent data sent to the remote host from being fragmented; otherwise, false.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="ttl " />is less than or equal to zero.</exception>
|
||||
// Token: 0x06000E5C RID: 3676 RVA: 0x00028E90 File Offset: 0x00027090
|
||||
public PingOptions(int ttl, bool dontFragment)
|
||||
{
|
||||
if (ttl <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Must be greater than zero.", "ttl");
|
||||
}
|
||||
this.ttl = ttl;
|
||||
this.dont_fragment = dontFragment;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a <see cref="T:System.Boolean" /> value that controls fragmentation of the data sent to the remote host.</summary>
|
||||
/// <returns>true if the data cannot be sent in multiple packets; otherwise false. The default is false.</returns>
|
||||
// Token: 0x170004A6 RID: 1190
|
||||
// (get) Token: 0x06000E5D RID: 3677 RVA: 0x00028ED4 File Offset: 0x000270D4
|
||||
// (set) Token: 0x06000E5E RID: 3678 RVA: 0x00028EDC File Offset: 0x000270DC
|
||||
public bool DontFragment
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dont_fragment;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.dont_fragment = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the number of routing nodes that can forward the <see cref="T:System.Net.NetworkInformation.Ping" /> data before it is discarded.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that specifies the number of times the <see cref="T:System.Net.NetworkInformation.Ping" /> data packets can be forwarded. The default is 128.</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The value specified for a set operation is less than or equal to zero.</exception>
|
||||
// Token: 0x170004A7 RID: 1191
|
||||
// (get) Token: 0x06000E5F RID: 3679 RVA: 0x00028EE8 File Offset: 0x000270E8
|
||||
// (set) Token: 0x06000E60 RID: 3680 RVA: 0x00028EF0 File Offset: 0x000270F0
|
||||
public int Ttl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ttl;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ttl = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000CE4 RID: 3300
|
||||
private int ttl = 128;
|
||||
|
||||
// Token: 0x04000CE5 RID: 3301
|
||||
private bool dont_fragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about the status and data resulting from a <see cref="Overload:System.Net.NetworkInformation.Ping.Send" /> or <see cref="Overload:System.Net.NetworkInformation.Ping.SendAsync" /> operation.</summary>
|
||||
// Token: 0x020001B2 RID: 434
|
||||
public class PingReply
|
||||
{
|
||||
// Token: 0x06000E61 RID: 3681 RVA: 0x00028EFC File Offset: 0x000270FC
|
||||
internal PingReply(IPAddress address, byte[] buffer, PingOptions options, long roundtripTime, IPStatus status)
|
||||
{
|
||||
this.address = address;
|
||||
this.buffer = buffer;
|
||||
this.options = options;
|
||||
this.rtt = roundtripTime;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/// <summary>Gets the address of the host that sends the Internet Control Message Protocol (ICMP) echo reply.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.IPAddress" /> containing the destination for the ICMP echo message.</returns>
|
||||
// Token: 0x170004A8 RID: 1192
|
||||
// (get) Token: 0x06000E62 RID: 3682 RVA: 0x00028F2C File Offset: 0x0002712C
|
||||
public IPAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.address;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the buffer of data received in an Internet Control Message Protocol (ICMP) echo reply message.</summary>
|
||||
/// <returns>A <see cref="T:System.Byte" /> array containing the data received in an ICMP echo reply message, or an empty array, if no reply was received.</returns>
|
||||
// Token: 0x170004A9 RID: 1193
|
||||
// (get) Token: 0x06000E63 RID: 3683 RVA: 0x00028F34 File Offset: 0x00027134
|
||||
public byte[] Buffer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.buffer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the options used to transmit the reply to an Internet Control Message Protocol (ICMP) echo request.</summary>
|
||||
/// <returns>A <see cref="T:System.Net.NetworkInformation.PingOptions" /> object that contains the Time to Live (TTL) and the fragmentation directive used for transmitting the reply if <see cref="P:System.Net.NetworkInformation.PingReply.Status" /> is <see cref="F:System.Net.NetworkInformation.IPStatus.Success" />; otherwise, null.</returns>
|
||||
// Token: 0x170004AA RID: 1194
|
||||
// (get) Token: 0x06000E64 RID: 3684 RVA: 0x00028F3C File Offset: 0x0002713C
|
||||
public PingOptions Options
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.options;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of milliseconds taken to send an Internet Control Message Protocol (ICMP) echo request and receive the corresponding ICMP echo reply message.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> that specifies the round trip time, in milliseconds. </returns>
|
||||
// Token: 0x170004AB RID: 1195
|
||||
// (get) Token: 0x06000E65 RID: 3685 RVA: 0x00028F44 File Offset: 0x00027144
|
||||
public long RoundtripTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.rtt;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the status of an attempt to send an Internet Control Message Protocol (ICMP) echo request and receive the corresponding ICMP echo reply message.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.NetworkInformation.IPStatus" /> value indicating the result of the request.</returns>
|
||||
// Token: 0x170004AC RID: 1196
|
||||
// (get) Token: 0x06000E66 RID: 3686 RVA: 0x00028F4C File Offset: 0x0002714C
|
||||
public IPStatus Status
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.status;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000CE6 RID: 3302
|
||||
private IPAddress address;
|
||||
|
||||
// Token: 0x04000CE7 RID: 3303
|
||||
private byte[] buffer;
|
||||
|
||||
// Token: 0x04000CE8 RID: 3304
|
||||
private PingOptions options;
|
||||
|
||||
// Token: 0x04000CE9 RID: 3305
|
||||
private long rtt;
|
||||
|
||||
// Token: 0x04000CEA RID: 3306
|
||||
private IPStatus status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies how an IP address network prefix was located.</summary>
|
||||
// Token: 0x020001B3 RID: 435
|
||||
public enum PrefixOrigin
|
||||
{
|
||||
/// <summary>The prefix was located using an unspecified source.</summary>
|
||||
// Token: 0x04000CEC RID: 3308
|
||||
Other,
|
||||
/// <summary>The prefix was manually configured.</summary>
|
||||
// Token: 0x04000CED RID: 3309
|
||||
Manual,
|
||||
/// <summary>The prefix is a well-known prefix. Well-known prefixes are specified in standard-track Request for Comments (RFC) documents and assigned by the Internet Assigned Numbers Authority (Iana) or an address registry. Such prefixes are reserved for special purposes.</summary>
|
||||
// Token: 0x04000CEE RID: 3310
|
||||
WellKnown,
|
||||
/// <summary>The prefix was supplied by a Dynamic Host Configuration Protocol (DHCP) server.</summary>
|
||||
// Token: 0x04000CEF RID: 3311
|
||||
Dhcp,
|
||||
/// <summary>The prefix was supplied by a router advertisement.</summary>
|
||||
// Token: 0x04000CF0 RID: 3312
|
||||
RouterAdvertisement
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies how an IP address host suffix was located.</summary>
|
||||
// Token: 0x020001B4 RID: 436
|
||||
public enum SuffixOrigin
|
||||
{
|
||||
/// <summary>The suffix was located using an unspecified source.</summary>
|
||||
// Token: 0x04000CF2 RID: 3314
|
||||
Other,
|
||||
/// <summary>The suffix was manually configured.</summary>
|
||||
// Token: 0x04000CF3 RID: 3315
|
||||
Manual,
|
||||
/// <summary>The suffix is a well-known suffix. Well-known suffixes are specified in standard-track Request for Comments (RFC) documents and assigned by the Internet Assigned Numbers Authority (Iana) or an address registry. Such suffixes are reserved for special purposes.</summary>
|
||||
// Token: 0x04000CF4 RID: 3316
|
||||
WellKnown,
|
||||
/// <summary>The suffix was supplied by a Dynamic Host Configuration Protocol (DHCP) server.</summary>
|
||||
// Token: 0x04000CF5 RID: 3317
|
||||
OriginDhcp,
|
||||
/// <summary>The suffix is a link-local suffix.</summary>
|
||||
// Token: 0x04000CF6 RID: 3318
|
||||
LinkLayerAddress,
|
||||
/// <summary>The suffix was randomly assigned.</summary>
|
||||
// Token: 0x04000CF7 RID: 3319
|
||||
Random
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about the Transmission Control Protocol (TCP) connections on the local computer.</summary>
|
||||
// Token: 0x020001B5 RID: 437
|
||||
public abstract class TcpConnectionInformation
|
||||
{
|
||||
/// <summary>Gets the local endpoint of a Transmission Control Protocol (TCP) connection.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.IPEndPoint" /> instance that contains the IP address and port on the local computer.</returns>
|
||||
// Token: 0x170004AD RID: 1197
|
||||
// (get) Token: 0x06000E68 RID: 3688
|
||||
public abstract IPEndPoint LocalEndPoint { get; }
|
||||
|
||||
/// <summary>Gets the remote endpoint of a Transmission Control Protocol (TCP) connection.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.IPEndPoint" /> instance that contains the IP address and port on the remote computer.</returns>
|
||||
// Token: 0x170004AE RID: 1198
|
||||
// (get) Token: 0x06000E69 RID: 3689
|
||||
public abstract IPEndPoint RemoteEndPoint { get; }
|
||||
|
||||
/// <summary>Gets the state of this Transmission Control Protocol (TCP) connection.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Net.NetworkInformation.TcpState" /> enumeration values.</returns>
|
||||
// Token: 0x170004AF RID: 1199
|
||||
// (get) Token: 0x06000E6A RID: 3690
|
||||
public abstract TcpState State { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001B6 RID: 438
|
||||
internal class TcpConnectionInformationImpl : TcpConnectionInformation
|
||||
{
|
||||
// Token: 0x06000E6B RID: 3691 RVA: 0x00028F5C File Offset: 0x0002715C
|
||||
public TcpConnectionInformationImpl(IPEndPoint local, IPEndPoint remote, TcpState state)
|
||||
{
|
||||
this.local = local;
|
||||
this.remote = remote;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
// Token: 0x170004B0 RID: 1200
|
||||
// (get) Token: 0x06000E6C RID: 3692 RVA: 0x00028F7C File Offset: 0x0002717C
|
||||
public override IPEndPoint LocalEndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.local;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004B1 RID: 1201
|
||||
// (get) Token: 0x06000E6D RID: 3693 RVA: 0x00028F84 File Offset: 0x00027184
|
||||
public override IPEndPoint RemoteEndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.remote;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004B2 RID: 1202
|
||||
// (get) Token: 0x06000E6E RID: 3694 RVA: 0x00028F8C File Offset: 0x0002718C
|
||||
public override TcpState State
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.state;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000CF8 RID: 3320
|
||||
private IPEndPoint local;
|
||||
|
||||
// Token: 0x04000CF9 RID: 3321
|
||||
private IPEndPoint remote;
|
||||
|
||||
// Token: 0x04000CFA RID: 3322
|
||||
private TcpState state;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Specifies the states of a Transmission Control Protocol (TCP) connection.</summary>
|
||||
// Token: 0x020001B7 RID: 439
|
||||
public enum TcpState
|
||||
{
|
||||
/// <summary>The TCP connection state is unknown.</summary>
|
||||
// Token: 0x04000CFC RID: 3324
|
||||
Unknown,
|
||||
/// <summary>The TCP connection is closed.</summary>
|
||||
// Token: 0x04000CFD RID: 3325
|
||||
Closed,
|
||||
/// <summary>The local endpoint of the TCP connection is listening for a connection request from any remote endpoint.</summary>
|
||||
// Token: 0x04000CFE RID: 3326
|
||||
Listen,
|
||||
/// <summary>The local endpoint of the TCP connection has sent the remote endpoint a segment header with the synchronize (SYN) control bit set and is waiting for a matching connection request.</summary>
|
||||
// Token: 0x04000CFF RID: 3327
|
||||
SynSent,
|
||||
/// <summary>The local endpoint of the TCP connection has sent and received a connection request and is waiting for an acknowledgment.</summary>
|
||||
// Token: 0x04000D00 RID: 3328
|
||||
SynReceived,
|
||||
/// <summary>The TCP handshake is complete. The connection has been established and data can be sent.</summary>
|
||||
// Token: 0x04000D01 RID: 3329
|
||||
Established,
|
||||
/// <summary>The local endpoint of the TCP connection is waiting for a connection termination request from the remote endpoint or for an acknowledgement of the connection termination request sent previously.</summary>
|
||||
// Token: 0x04000D02 RID: 3330
|
||||
FinWait1,
|
||||
/// <summary>The local endpoint of the TCP connection is waiting for a connection termination request from the remote endpoint.</summary>
|
||||
// Token: 0x04000D03 RID: 3331
|
||||
FinWait2,
|
||||
/// <summary>The local endpoint of the TCP connection is waiting for a connection termination request from the local user.</summary>
|
||||
// Token: 0x04000D04 RID: 3332
|
||||
CloseWait,
|
||||
/// <summary>The local endpoint of the TCP connection is waiting for an acknowledgement of the connection termination request sent previously.</summary>
|
||||
// Token: 0x04000D05 RID: 3333
|
||||
Closing,
|
||||
/// <summary>The local endpoint of the TCP connection is waiting for the final acknowledgement of the connection termination request sent previously.</summary>
|
||||
// Token: 0x04000D06 RID: 3334
|
||||
LastAck,
|
||||
/// <summary>The local endpoint of the TCP connection is waiting for enough time to pass to ensure that the remote endpoint received the acknowledgement of its connection termination request.</summary>
|
||||
// Token: 0x04000D07 RID: 3335
|
||||
TimeWait,
|
||||
/// <summary>The transmission control buffer (TCB) for the TCP connection is being deleted.</summary>
|
||||
// Token: 0x04000D08 RID: 3336
|
||||
DeleteTcb
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides Transmission Control Protocol (TCP) statistical data.</summary>
|
||||
// Token: 0x020001B8 RID: 440
|
||||
public abstract class TcpStatistics
|
||||
{
|
||||
/// <summary>Gets the number of accepted Transmission Control Protocol (TCP) connection requests.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of TCP connection requests accepted.</returns>
|
||||
// Token: 0x170004B3 RID: 1203
|
||||
// (get) Token: 0x06000E70 RID: 3696
|
||||
public abstract long ConnectionsAccepted { get; }
|
||||
|
||||
/// <summary>Gets the number of Transmission Control Protocol (TCP) connection requests made by clients.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of TCP connections initiated by clients.</returns>
|
||||
// Token: 0x170004B4 RID: 1204
|
||||
// (get) Token: 0x06000E71 RID: 3697
|
||||
public abstract long ConnectionsInitiated { get; }
|
||||
|
||||
/// <summary>Specifies the total number of Transmission Control Protocol (TCP) connections established.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of connections established.</returns>
|
||||
// Token: 0x170004B5 RID: 1205
|
||||
// (get) Token: 0x06000E72 RID: 3698
|
||||
public abstract long CumulativeConnections { get; }
|
||||
|
||||
/// <summary>Gets the number of current Transmission Control Protocol (TCP) connections.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of current TCP connections.</returns>
|
||||
// Token: 0x170004B6 RID: 1206
|
||||
// (get) Token: 0x06000E73 RID: 3699
|
||||
public abstract long CurrentConnections { get; }
|
||||
|
||||
/// <summary>Gets the number of Transmission Control Protocol (TCP) errors received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of TCP errors received.</returns>
|
||||
// Token: 0x170004B7 RID: 1207
|
||||
// (get) Token: 0x06000E74 RID: 3700
|
||||
public abstract long ErrorsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of failed Transmission Control Protocol (TCP) connection attempts.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of failed TCP connection attempts.</returns>
|
||||
// Token: 0x170004B8 RID: 1208
|
||||
// (get) Token: 0x06000E75 RID: 3701
|
||||
public abstract long FailedConnectionAttempts { get; }
|
||||
|
||||
/// <summary>Gets the maximum number of supported Transmission Control Protocol (TCP) connections.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of TCP connections that can be supported.</returns>
|
||||
// Token: 0x170004B9 RID: 1209
|
||||
// (get) Token: 0x06000E76 RID: 3702
|
||||
public abstract long MaximumConnections { get; }
|
||||
|
||||
/// <summary>Gets the maximum retransmission time-out value for Transmission Control Protocol (TCP) segments.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the maximum number of milliseconds permitted by a TCP implementation for the retransmission time-out value.</returns>
|
||||
// Token: 0x170004BA RID: 1210
|
||||
// (get) Token: 0x06000E77 RID: 3703
|
||||
public abstract long MaximumTransmissionTimeout { get; }
|
||||
|
||||
/// <summary>Gets the minimum retransmission time-out value for Transmission Control Protocol (TCP) segments.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the minimum number of milliseconds permitted by a TCP implementation for the retransmission time-out value.</returns>
|
||||
// Token: 0x170004BB RID: 1211
|
||||
// (get) Token: 0x06000E78 RID: 3704
|
||||
public abstract long MinimumTransmissionTimeout { get; }
|
||||
|
||||
/// <summary>Gets the number of RST packets received by Transmission Control Protocol (TCP) connections.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of reset TCP connections.</returns>
|
||||
// Token: 0x170004BC RID: 1212
|
||||
// (get) Token: 0x06000E79 RID: 3705
|
||||
public abstract long ResetConnections { get; }
|
||||
|
||||
/// <summary>Gets the number of Transmission Control Protocol (TCP) segments sent with the reset flag set.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of TCP segments sent with the reset flag set.</returns>
|
||||
// Token: 0x170004BD RID: 1213
|
||||
// (get) Token: 0x06000E7A RID: 3706
|
||||
public abstract long ResetsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of Transmission Control Protocol (TCP) segments received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of TCP segments received.</returns>
|
||||
// Token: 0x170004BE RID: 1214
|
||||
// (get) Token: 0x06000E7B RID: 3707
|
||||
public abstract long SegmentsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of Transmission Control Protocol (TCP) segments re-sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of TCP segments retransmitted.</returns>
|
||||
// Token: 0x170004BF RID: 1215
|
||||
// (get) Token: 0x06000E7C RID: 3708
|
||||
public abstract long SegmentsResent { get; }
|
||||
|
||||
/// <summary>Gets the number of Transmission Control Protocol (TCP) segments sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of TCP segments sent.</returns>
|
||||
// Token: 0x170004C0 RID: 1216
|
||||
// (get) Token: 0x06000E7D RID: 3709
|
||||
public abstract long SegmentsSent { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides User Datagram Protocol (UDP) statistical data.</summary>
|
||||
// Token: 0x020001BC RID: 444
|
||||
public abstract class UdpStatistics
|
||||
{
|
||||
/// <summary>Gets the number of User Datagram Protocol (UDP) datagrams that were received.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of datagrams that were delivered to UDP users.</returns>
|
||||
// Token: 0x170004DD RID: 1245
|
||||
// (get) Token: 0x06000E9E RID: 3742
|
||||
public abstract long DatagramsReceived { get; }
|
||||
|
||||
/// <summary>Gets the number of User Datagram Protocol (UDP) datagrams that were sent.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of datagrams that were sent.</returns>
|
||||
// Token: 0x170004DE RID: 1246
|
||||
// (get) Token: 0x06000E9F RID: 3743
|
||||
public abstract long DatagramsSent { get; }
|
||||
|
||||
/// <summary>Gets the number of User Datagram Protocol (UDP) datagrams that were received and discarded because of port errors.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of received UDP datagrams that were discarded because there was no listening application at the destination port.</returns>
|
||||
// Token: 0x170004DF RID: 1247
|
||||
// (get) Token: 0x06000EA0 RID: 3744
|
||||
public abstract long IncomingDatagramsDiscarded { get; }
|
||||
|
||||
/// <summary>Gets the number of User Datagram Protocol (UDP) datagrams that were received and discarded because of errors other than bad port information.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of received UDP datagrams that could not be delivered for reasons other than the lack of an application at the destination port.</returns>
|
||||
// Token: 0x170004E0 RID: 1248
|
||||
// (get) Token: 0x06000EA1 RID: 3745
|
||||
public abstract long IncomingDatagramsWithErrors { get; }
|
||||
|
||||
/// <summary>Gets the number of local endpoints that are listening for User Datagram Protocol (UDP) datagrams.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the total number of sockets that are listening for UDP datagrams.</returns>
|
||||
// Token: 0x170004E1 RID: 1249
|
||||
// (get) Token: 0x06000EA2 RID: 3746
|
||||
public abstract int UdpListeners { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Provides information about a network interface's unicast address.</summary>
|
||||
// Token: 0x020001C0 RID: 448
|
||||
public abstract class UnicastIPAddressInformation : IPAddressInformation
|
||||
{
|
||||
/// <summary>Gets the number of seconds remaining during which this address is the preferred address.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the number of seconds left for this address to remain preferred.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x170004EC RID: 1260
|
||||
// (get) Token: 0x06000EB1 RID: 3761
|
||||
public abstract long AddressPreferredLifetime { get; }
|
||||
|
||||
/// <summary>Gets the number of seconds remaining during which this address is valid.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that specifies the number of seconds left for this address to remain assigned.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x170004ED RID: 1261
|
||||
// (get) Token: 0x06000EB2 RID: 3762
|
||||
public abstract long AddressValidLifetime { get; }
|
||||
|
||||
/// <summary>Specifies the amount of time remaining on the Dynamic Host Configuration Protocol (DHCP) lease for this IP address.</summary>
|
||||
/// <returns>An <see cref="T:System.Int64" /> value that contains the number of seconds remaining before the computer must release the <see cref="T:System.Net.IPAddress" /> instance.</returns>
|
||||
// Token: 0x170004EE RID: 1262
|
||||
// (get) Token: 0x06000EB3 RID: 3763
|
||||
public abstract long DhcpLeaseLifetime { get; }
|
||||
|
||||
/// <summary>Gets a value that indicates the state of the duplicate address detection algorithm.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Net.NetworkInformation.DuplicateAddressDetectionState" /> values that indicates the progress of the algorithm in determining the uniqueness of this IP address.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x170004EF RID: 1263
|
||||
// (get) Token: 0x06000EB4 RID: 3764
|
||||
public abstract DuplicateAddressDetectionState DuplicateAddressDetectionState { get; }
|
||||
|
||||
/// <summary>Gets the IPv4 mask.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.IPAddress" /> object that contains the IPv4 mask.</returns>
|
||||
// Token: 0x170004F0 RID: 1264
|
||||
// (get) Token: 0x06000EB5 RID: 3765
|
||||
public abstract IPAddress IPv4Mask { get; }
|
||||
|
||||
/// <summary>Gets a value that identifies the source of a unicast Internet Protocol (IP) address prefix.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Net.NetworkInformation.PrefixOrigin" /> values that identifies how the prefix information was obtained.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x170004F1 RID: 1265
|
||||
// (get) Token: 0x06000EB6 RID: 3766
|
||||
public abstract PrefixOrigin PrefixOrigin { get; }
|
||||
|
||||
/// <summary>Gets a value that identifies the source of a unicast Internet Protocol (IP) address suffix.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Net.NetworkInformation.SuffixOrigin" /> values that identifies how the suffix information was obtained.</returns>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">This property is not valid on computers running operating systems earlier than Windows XP. </exception>
|
||||
// Token: 0x170004F2 RID: 1266
|
||||
// (get) Token: 0x06000EB7 RID: 3767
|
||||
public abstract SuffixOrigin SuffixOrigin { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
/// <summary>Stores a set of <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types.</summary>
|
||||
// Token: 0x020001C3 RID: 451
|
||||
public class UnicastIPAddressInformationCollection : IEnumerable, IEnumerable<UnicastIPAddressInformation>, ICollection<UnicastIPAddressInformation>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformationCollection" /> class.</summary>
|
||||
// Token: 0x06000ECE RID: 3790 RVA: 0x000294BC File Offset: 0x000276BC
|
||||
protected internal UnicastIPAddressInformationCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x06000ECF RID: 3791 RVA: 0x000294D0 File Offset: 0x000276D0
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
/// <param name="address">The object to be added to the collection.</param>
|
||||
// Token: 0x06000ED0 RID: 3792 RVA: 0x000294E4 File Offset: 0x000276E4
|
||||
public virtual void Add(UnicastIPAddressInformation address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Add(address);
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because this operation is not supported for this collection.</summary>
|
||||
// Token: 0x06000ED1 RID: 3793 RVA: 0x00029514 File Offset: 0x00027714
|
||||
public virtual void Clear()
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
this.list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Checks whether the collection contains the specified <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> object.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> object exists in the collection; otherwise, false.</returns>
|
||||
/// <param name="address">The <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> object to be searched in the collection.</param>
|
||||
// Token: 0x06000ED2 RID: 3794 RVA: 0x00029538 File Offset: 0x00027738
|
||||
public virtual bool Contains(UnicastIPAddressInformation address)
|
||||
{
|
||||
return this.list.Contains(address);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements in this collection to a one-dimensional array of type <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" />.</summary>
|
||||
/// <param name="array">A one-dimensional array that receives a copy of the collection.</param>
|
||||
/// <param name="offset">The zero-based index in <paramref name="array" /> at which the copy begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in this <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformationCollection" /> is greater than the available space from <paramref name="offset" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The elements in this <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformationCollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000ED3 RID: 3795 RVA: 0x00029548 File Offset: 0x00027748
|
||||
public virtual void CopyTo(UnicastIPAddressInformation[] array, int offset)
|
||||
{
|
||||
this.list.CopyTo(array, offset);
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that can be used to iterate through this collection.</summary>
|
||||
/// <returns>An object that implements the <see cref="T:System.Collections.IEnumerator" /> interface and provides access to the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x06000ED4 RID: 3796 RVA: 0x00029558 File Offset: 0x00027758
|
||||
public virtual IEnumerator<UnicastIPAddressInformation> GetEnumerator()
|
||||
{
|
||||
return ((IEnumerable<UnicastIPAddressInformation>)this.list).GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" /> because the collection is read-only and elements cannot be removed.</summary>
|
||||
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
||||
/// <param name="address">The object to be removed.</param>
|
||||
// Token: 0x06000ED5 RID: 3797 RVA: 0x00029568 File Offset: 0x00027768
|
||||
public virtual bool Remove(UnicastIPAddressInformation address)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only.");
|
||||
}
|
||||
return this.list.Remove(address);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that contains the number of <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> types in this collection.</returns>
|
||||
// Token: 0x17000507 RID: 1287
|
||||
// (get) Token: 0x06000ED6 RID: 3798 RVA: 0x00029598 File Offset: 0x00027798
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether access to this collection is read-only.</summary>
|
||||
/// <returns>true in all cases.</returns>
|
||||
// Token: 0x17000508 RID: 1288
|
||||
// (get) Token: 0x06000ED7 RID: 3799 RVA: 0x000295A8 File Offset: 0x000277A8
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> instance at the specified index in the collection.</summary>
|
||||
/// <returns>The <see cref="T:System.Net.NetworkInformation.UnicastIPAddressInformation" /> at the specified location.</returns>
|
||||
/// <param name="index">The zero-based index of the element.</param>
|
||||
// Token: 0x17000509 RID: 1289
|
||||
public virtual UnicastIPAddressInformation this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D24 RID: 3364
|
||||
private List<UnicastIPAddressInformation> list = new List<UnicastIPAddressInformation>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001C4 RID: 452
|
||||
internal class UnicastIPAddressInformationImplCollection : UnicastIPAddressInformationCollection
|
||||
{
|
||||
// Token: 0x06000ED9 RID: 3801 RVA: 0x000295BC File Offset: 0x000277BC
|
||||
private UnicastIPAddressInformationImplCollection(bool isReadOnly)
|
||||
{
|
||||
this.is_readonly = isReadOnly;
|
||||
}
|
||||
|
||||
// Token: 0x1700050A RID: 1290
|
||||
// (get) Token: 0x06000EDB RID: 3803 RVA: 0x000295DC File Offset: 0x000277DC
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_readonly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EDC RID: 3804 RVA: 0x000295E4 File Offset: 0x000277E4
|
||||
public static UnicastIPAddressInformationCollection Win32FromUnicast(int ifIndex, IntPtr ptr)
|
||||
{
|
||||
UnicastIPAddressInformationImplCollection unicastIPAddressInformationImplCollection = new UnicastIPAddressInformationImplCollection(false);
|
||||
IntPtr intPtr = ptr;
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADAPTER_UNICAST_ADDRESS win32_IP_ADAPTER_UNICAST_ADDRESS = (Win32_IP_ADAPTER_UNICAST_ADDRESS)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADAPTER_UNICAST_ADDRESS));
|
||||
unicastIPAddressInformationImplCollection.Add(new Win32UnicastIPAddressInformation(ifIndex, win32_IP_ADAPTER_UNICAST_ADDRESS));
|
||||
intPtr = win32_IP_ADAPTER_UNICAST_ADDRESS.Next;
|
||||
}
|
||||
unicastIPAddressInformationImplCollection.is_readonly = true;
|
||||
return unicastIPAddressInformationImplCollection;
|
||||
}
|
||||
|
||||
// Token: 0x06000EDD RID: 3805 RVA: 0x00029644 File Offset: 0x00027844
|
||||
public static UnicastIPAddressInformationCollection LinuxFromList(List<IPAddress> addresses)
|
||||
{
|
||||
UnicastIPAddressInformationImplCollection unicastIPAddressInformationImplCollection = new UnicastIPAddressInformationImplCollection(false);
|
||||
foreach (IPAddress ipaddress in addresses)
|
||||
{
|
||||
unicastIPAddressInformationImplCollection.Add(new LinuxUnicastIPAddressInformation(ipaddress));
|
||||
}
|
||||
unicastIPAddressInformationImplCollection.is_readonly = true;
|
||||
return unicastIPAddressInformationImplCollection;
|
||||
}
|
||||
|
||||
// Token: 0x04000D25 RID: 3365
|
||||
public static readonly UnicastIPAddressInformationImplCollection Empty = new UnicastIPAddressInformationImplCollection(true);
|
||||
|
||||
// Token: 0x04000D26 RID: 3366
|
||||
private bool is_readonly;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,299 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200016F RID: 367
|
||||
internal abstract class UnixIPInterfaceProperties : IPInterfaceProperties
|
||||
{
|
||||
// Token: 0x06000C84 RID: 3204 RVA: 0x000255A8 File Offset: 0x000237A8
|
||||
public UnixIPInterfaceProperties(UnixNetworkInterface iface, List<IPAddress> addresses)
|
||||
{
|
||||
this.iface = iface;
|
||||
this.addresses = addresses;
|
||||
}
|
||||
|
||||
// Token: 0x06000C86 RID: 3206 RVA: 0x000255E0 File Offset: 0x000237E0
|
||||
public override IPv6InterfaceProperties GetIPv6Properties()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000C87 RID: 3207 RVA: 0x000255E8 File Offset: 0x000237E8
|
||||
private void ParseRouteInfo(string iface)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.gateways = new IPAddressCollection();
|
||||
using (StreamReader streamReader = new StreamReader("/proc/net/route"))
|
||||
{
|
||||
streamReader.ReadLine();
|
||||
string text;
|
||||
while ((text = streamReader.ReadLine()) != null)
|
||||
{
|
||||
text = text.Trim();
|
||||
if (text.Length != 0)
|
||||
{
|
||||
string[] array = text.Split(new char[] { '\t' });
|
||||
if (array.Length >= 3)
|
||||
{
|
||||
string text2 = array[2].Trim();
|
||||
byte[] array2 = new byte[4];
|
||||
if (text2.Length == 8 && iface.Equals(array[0], StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (!byte.TryParse(text2.Substring(i * 2, 2), NumberStyles.HexNumber, null, out array2[3 - i]))
|
||||
{
|
||||
}
|
||||
}
|
||||
IPAddress ipaddress = new IPAddress(array2);
|
||||
if (!ipaddress.Equals(IPAddress.Any))
|
||||
{
|
||||
this.gateways.Add(ipaddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C88 RID: 3208 RVA: 0x00025744 File Offset: 0x00023944
|
||||
private void ParseResolvConf()
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime lastWriteTime = File.GetLastWriteTime("/etc/resolv.conf");
|
||||
if (!(lastWriteTime <= this.last_parse))
|
||||
{
|
||||
this.last_parse = lastWriteTime;
|
||||
this.dns_suffix = string.Empty;
|
||||
this.dns_servers = new IPAddressCollection();
|
||||
using (StreamReader streamReader = new StreamReader("/etc/resolv.conf"))
|
||||
{
|
||||
string text;
|
||||
while ((text = streamReader.ReadLine()) != null)
|
||||
{
|
||||
text = text.Trim();
|
||||
if (text.Length != 0 && text[0] != '#')
|
||||
{
|
||||
global::System.Text.RegularExpressions.Match match = UnixIPInterfaceProperties.ns.Match(text);
|
||||
if (match.Success)
|
||||
{
|
||||
try
|
||||
{
|
||||
string text2 = match.Groups["address"].Value;
|
||||
text2 = text2.Trim();
|
||||
this.dns_servers.Add(IPAddress.Parse(text2));
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
match = UnixIPInterfaceProperties.search.Match(text);
|
||||
if (match.Success)
|
||||
{
|
||||
string text2 = match.Groups["domain"].Value;
|
||||
string[] array = text2.Split(new char[] { ',' });
|
||||
this.dns_suffix = array[0].Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.dns_servers.SetReadOnly();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000361 RID: 865
|
||||
// (get) Token: 0x06000C89 RID: 3209 RVA: 0x00025908 File Offset: 0x00023B08
|
||||
public override IPAddressInformationCollection AnycastAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
List<IPAddress> list = new List<IPAddress>();
|
||||
return IPAddressInformationImplCollection.LinuxFromAnycast(list);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000362 RID: 866
|
||||
// (get) Token: 0x06000C8A RID: 3210 RVA: 0x00025924 File Offset: 0x00023B24
|
||||
[global::System.MonoTODO("Always returns an empty collection.")]
|
||||
public override IPAddressCollection DhcpServerAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
IPAddressCollection ipaddressCollection = new IPAddressCollection();
|
||||
ipaddressCollection.SetReadOnly();
|
||||
return ipaddressCollection;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000363 RID: 867
|
||||
// (get) Token: 0x06000C8B RID: 3211 RVA: 0x00025940 File Offset: 0x00023B40
|
||||
public override IPAddressCollection DnsAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
this.ParseResolvConf();
|
||||
return this.dns_servers;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000364 RID: 868
|
||||
// (get) Token: 0x06000C8C RID: 3212 RVA: 0x00025950 File Offset: 0x00023B50
|
||||
public override string DnsSuffix
|
||||
{
|
||||
get
|
||||
{
|
||||
this.ParseResolvConf();
|
||||
return this.dns_suffix;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000365 RID: 869
|
||||
// (get) Token: 0x06000C8D RID: 3213 RVA: 0x00025960 File Offset: 0x00023B60
|
||||
public override GatewayIPAddressInformationCollection GatewayAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
this.ParseRouteInfo(this.iface.Name.ToString());
|
||||
if (this.gateways.Count > 0)
|
||||
{
|
||||
return new LinuxGatewayIPAddressInformationCollection(this.gateways);
|
||||
}
|
||||
return LinuxGatewayIPAddressInformationCollection.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000366 RID: 870
|
||||
// (get) Token: 0x06000C8E RID: 3214 RVA: 0x000259A8 File Offset: 0x00023BA8
|
||||
[global::System.MonoTODO("Always returns true")]
|
||||
public override bool IsDnsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000367 RID: 871
|
||||
// (get) Token: 0x06000C8F RID: 3215 RVA: 0x000259AC File Offset: 0x00023BAC
|
||||
[global::System.MonoTODO("Always returns false")]
|
||||
public override bool IsDynamicDnsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000368 RID: 872
|
||||
// (get) Token: 0x06000C90 RID: 3216 RVA: 0x000259B0 File Offset: 0x00023BB0
|
||||
public override MulticastIPAddressInformationCollection MulticastAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
List<IPAddress> list = new List<IPAddress>();
|
||||
foreach (IPAddress ipaddress in this.addresses)
|
||||
{
|
||||
byte[] addressBytes = ipaddress.GetAddressBytes();
|
||||
if (addressBytes[0] >= 224 && addressBytes[0] <= 239)
|
||||
{
|
||||
list.Add(ipaddress);
|
||||
}
|
||||
}
|
||||
return MulticastIPAddressInformationImplCollection.LinuxFromList(list);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000369 RID: 873
|
||||
// (get) Token: 0x06000C91 RID: 3217 RVA: 0x00025A44 File Offset: 0x00023C44
|
||||
public override UnicastIPAddressInformationCollection UnicastAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
List<IPAddress> list = new List<IPAddress>();
|
||||
foreach (IPAddress ipaddress in this.addresses)
|
||||
{
|
||||
global::System.Net.Sockets.AddressFamily addressFamily = ipaddress.AddressFamily;
|
||||
if (addressFamily != global::System.Net.Sockets.AddressFamily.InterNetwork)
|
||||
{
|
||||
if (addressFamily == global::System.Net.Sockets.AddressFamily.InterNetworkV6)
|
||||
{
|
||||
if (!ipaddress.IsIPv6Multicast)
|
||||
{
|
||||
list.Add(ipaddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
byte b = ipaddress.GetAddressBytes()[0];
|
||||
if (b < 224 || b > 239)
|
||||
{
|
||||
list.Add(ipaddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
return UnicastIPAddressInformationImplCollection.LinuxFromList(list);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700036A RID: 874
|
||||
// (get) Token: 0x06000C92 RID: 3218 RVA: 0x00025B1C File Offset: 0x00023D1C
|
||||
[global::System.MonoTODO("Always returns an empty collection.")]
|
||||
public override IPAddressCollection WinsServersAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
return new IPAddressCollection();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BDC RID: 3036
|
||||
protected IPv4InterfaceProperties ipv4iface_properties;
|
||||
|
||||
// Token: 0x04000BDD RID: 3037
|
||||
protected UnixNetworkInterface iface;
|
||||
|
||||
// Token: 0x04000BDE RID: 3038
|
||||
private List<IPAddress> addresses;
|
||||
|
||||
// Token: 0x04000BDF RID: 3039
|
||||
private IPAddressCollection dns_servers;
|
||||
|
||||
// Token: 0x04000BE0 RID: 3040
|
||||
private IPAddressCollection gateways;
|
||||
|
||||
// Token: 0x04000BE1 RID: 3041
|
||||
private string dns_suffix;
|
||||
|
||||
// Token: 0x04000BE2 RID: 3042
|
||||
private DateTime last_parse;
|
||||
|
||||
// Token: 0x04000BE3 RID: 3043
|
||||
private static global::System.Text.RegularExpressions.Regex ns = new global::System.Text.RegularExpressions.Regex("\\s*nameserver\\s+(?<address>.*)");
|
||||
|
||||
// Token: 0x04000BE4 RID: 3044
|
||||
private static global::System.Text.RegularExpressions.Regex search = new global::System.Text.RegularExpressions.Regex("\\s*search\\s+(?<domain>.*)");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000175 RID: 373
|
||||
internal abstract class UnixIPv4InterfaceProperties : IPv4InterfaceProperties
|
||||
{
|
||||
// Token: 0x06000CAC RID: 3244 RVA: 0x00025DE8 File Offset: 0x00023FE8
|
||||
public UnixIPv4InterfaceProperties(UnixNetworkInterface iface)
|
||||
{
|
||||
this.iface = iface;
|
||||
}
|
||||
|
||||
// Token: 0x1700037C RID: 892
|
||||
// (get) Token: 0x06000CAD RID: 3245 RVA: 0x00025DF8 File Offset: 0x00023FF8
|
||||
public override int Index
|
||||
{
|
||||
get
|
||||
{
|
||||
return UnixNetworkInterface.IfNameToIndex(this.iface.Name);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700037D RID: 893
|
||||
// (get) Token: 0x06000CAE RID: 3246 RVA: 0x00025E0C File Offset: 0x0002400C
|
||||
public override bool IsAutomaticPrivateAddressingActive
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700037E RID: 894
|
||||
// (get) Token: 0x06000CAF RID: 3247 RVA: 0x00025E10 File Offset: 0x00024010
|
||||
public override bool IsAutomaticPrivateAddressingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700037F RID: 895
|
||||
// (get) Token: 0x06000CB0 RID: 3248 RVA: 0x00025E14 File Offset: 0x00024014
|
||||
public override bool IsDhcpEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000380 RID: 896
|
||||
// (get) Token: 0x06000CB1 RID: 3249 RVA: 0x00025E18 File Offset: 0x00024018
|
||||
public override bool UsesWins
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C01 RID: 3073
|
||||
protected UnixNetworkInterface iface;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001A3 RID: 419
|
||||
internal abstract class UnixNetworkInterface : NetworkInterface
|
||||
{
|
||||
// Token: 0x06000DF2 RID: 3570 RVA: 0x00026FE8 File Offset: 0x000251E8
|
||||
internal UnixNetworkInterface(string name)
|
||||
{
|
||||
this.name = name;
|
||||
this.addresses = new List<IPAddress>();
|
||||
}
|
||||
|
||||
// Token: 0x06000DF3 RID: 3571
|
||||
[DllImport("libc")]
|
||||
private static extern int if_nametoindex(string ifname);
|
||||
|
||||
// Token: 0x06000DF4 RID: 3572 RVA: 0x00027004 File Offset: 0x00025204
|
||||
public static int IfNameToIndex(string ifname)
|
||||
{
|
||||
return UnixNetworkInterface.if_nametoindex(ifname);
|
||||
}
|
||||
|
||||
// Token: 0x06000DF5 RID: 3573 RVA: 0x0002700C File Offset: 0x0002520C
|
||||
internal void AddAddress(IPAddress address)
|
||||
{
|
||||
this.addresses.Add(address);
|
||||
}
|
||||
|
||||
// Token: 0x06000DF6 RID: 3574 RVA: 0x0002701C File Offset: 0x0002521C
|
||||
internal void SetLinkLayerInfo(int index, byte[] macAddress, NetworkInterfaceType type)
|
||||
{
|
||||
this.index = index;
|
||||
this.macAddress = macAddress;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
// Token: 0x06000DF7 RID: 3575 RVA: 0x00027034 File Offset: 0x00025234
|
||||
public override PhysicalAddress GetPhysicalAddress()
|
||||
{
|
||||
if (this.macAddress != null)
|
||||
{
|
||||
return new PhysicalAddress(this.macAddress);
|
||||
}
|
||||
return PhysicalAddress.None;
|
||||
}
|
||||
|
||||
// Token: 0x06000DF8 RID: 3576 RVA: 0x00027054 File Offset: 0x00025254
|
||||
public override bool Supports(NetworkInterfaceComponent networkInterfaceComponent)
|
||||
{
|
||||
bool flag = networkInterfaceComponent == NetworkInterfaceComponent.IPv4;
|
||||
bool flag2 = !flag && networkInterfaceComponent == NetworkInterfaceComponent.IPv6;
|
||||
foreach (IPAddress ipaddress in this.addresses)
|
||||
{
|
||||
if (flag && ipaddress.AddressFamily == global::System.Net.Sockets.AddressFamily.InterNetwork)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (flag2 && ipaddress.AddressFamily == global::System.Net.Sockets.AddressFamily.InterNetworkV6)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x1700048C RID: 1164
|
||||
// (get) Token: 0x06000DF9 RID: 3577 RVA: 0x00027104 File Offset: 0x00025304
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700048D RID: 1165
|
||||
// (get) Token: 0x06000DFA RID: 3578 RVA: 0x0002710C File Offset: 0x0002530C
|
||||
public override string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700048E RID: 1166
|
||||
// (get) Token: 0x06000DFB RID: 3579 RVA: 0x00027114 File Offset: 0x00025314
|
||||
public override bool IsReceiveOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700048F RID: 1167
|
||||
// (get) Token: 0x06000DFC RID: 3580 RVA: 0x00027118 File Offset: 0x00025318
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000490 RID: 1168
|
||||
// (get) Token: 0x06000DFD RID: 3581 RVA: 0x00027120 File Offset: 0x00025320
|
||||
public override NetworkInterfaceType NetworkInterfaceType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000491 RID: 1169
|
||||
// (get) Token: 0x06000DFE RID: 3582 RVA: 0x00027128 File Offset: 0x00025328
|
||||
[global::System.MonoTODO("Parse dmesg?")]
|
||||
public override long Speed
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1000000L;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C93 RID: 3219
|
||||
protected IPv4InterfaceStatistics ipv4stats;
|
||||
|
||||
// Token: 0x04000C94 RID: 3220
|
||||
protected IPInterfaceProperties ipproperties;
|
||||
|
||||
// Token: 0x04000C95 RID: 3221
|
||||
private string name;
|
||||
|
||||
// Token: 0x04000C96 RID: 3222
|
||||
private int index;
|
||||
|
||||
// Token: 0x04000C97 RID: 3223
|
||||
protected List<IPAddress> addresses;
|
||||
|
||||
// Token: 0x04000C98 RID: 3224
|
||||
private byte[] macAddress;
|
||||
|
||||
// Token: 0x04000C99 RID: 3225
|
||||
private NetworkInterfaceType type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200015A RID: 346
|
||||
internal class Win32GatewayIPAddressInformationCollection : GatewayIPAddressInformationCollection
|
||||
{
|
||||
// Token: 0x06000BA8 RID: 2984 RVA: 0x00023C68 File Offset: 0x00021E68
|
||||
private Win32GatewayIPAddressInformationCollection(bool isReadOnly)
|
||||
{
|
||||
this.is_readonly = isReadOnly;
|
||||
}
|
||||
|
||||
// Token: 0x06000BA9 RID: 2985 RVA: 0x00023C78 File Offset: 0x00021E78
|
||||
public Win32GatewayIPAddressInformationCollection(params Win32_IP_ADDR_STRING[] al)
|
||||
{
|
||||
foreach (Win32_IP_ADDR_STRING win32_IP_ADDR_STRING in al)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(win32_IP_ADDR_STRING.IpAddress))
|
||||
{
|
||||
this.Add(new GatewayIPAddressInformationImpl(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress)));
|
||||
this.AddSubsequently(win32_IP_ADDR_STRING.Next);
|
||||
}
|
||||
}
|
||||
this.is_readonly = true;
|
||||
}
|
||||
|
||||
// Token: 0x06000BAB RID: 2987 RVA: 0x00023D00 File Offset: 0x00021F00
|
||||
private void AddSubsequently(IntPtr head)
|
||||
{
|
||||
IntPtr intPtr = head;
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADDR_STRING win32_IP_ADDR_STRING = (Win32_IP_ADDR_STRING)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADDR_STRING));
|
||||
this.Add(new GatewayIPAddressInformationImpl(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress)));
|
||||
intPtr = win32_IP_ADDR_STRING.Next;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002EE RID: 750
|
||||
// (get) Token: 0x06000BAC RID: 2988 RVA: 0x00023D5C File Offset: 0x00021F5C
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_readonly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000B99 RID: 2969
|
||||
public static readonly Win32GatewayIPAddressInformationCollection Empty = new Win32GatewayIPAddressInformationCollection(true);
|
||||
|
||||
// Token: 0x04000B9A RID: 2970
|
||||
private bool is_readonly;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200015D RID: 349
|
||||
internal class Win32IPAddressCollection : IPAddressCollection
|
||||
{
|
||||
// Token: 0x06000BBD RID: 3005 RVA: 0x00023F28 File Offset: 0x00022128
|
||||
private Win32IPAddressCollection()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000BBE RID: 3006 RVA: 0x00023F30 File Offset: 0x00022130
|
||||
public Win32IPAddressCollection(params IntPtr[] heads)
|
||||
{
|
||||
foreach (IntPtr intPtr in heads)
|
||||
{
|
||||
this.AddSubsequentlyString(intPtr);
|
||||
}
|
||||
this.is_readonly = true;
|
||||
}
|
||||
|
||||
// Token: 0x06000BBF RID: 3007 RVA: 0x00023F6C File Offset: 0x0002216C
|
||||
public Win32IPAddressCollection(params Win32_IP_ADDR_STRING[] al)
|
||||
{
|
||||
foreach (Win32_IP_ADDR_STRING win32_IP_ADDR_STRING in al)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(win32_IP_ADDR_STRING.IpAddress))
|
||||
{
|
||||
this.Add(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress));
|
||||
this.AddSubsequentlyString(win32_IP_ADDR_STRING.Next);
|
||||
}
|
||||
}
|
||||
this.is_readonly = true;
|
||||
}
|
||||
|
||||
// Token: 0x06000BC1 RID: 3009 RVA: 0x00024004 File Offset: 0x00022204
|
||||
public static Win32IPAddressCollection FromAnycast(IntPtr ptr)
|
||||
{
|
||||
Win32IPAddressCollection win32IPAddressCollection = new Win32IPAddressCollection();
|
||||
IntPtr intPtr = ptr;
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADAPTER_ANYCAST_ADDRESS win32_IP_ADAPTER_ANYCAST_ADDRESS = (Win32_IP_ADAPTER_ANYCAST_ADDRESS)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADAPTER_ANYCAST_ADDRESS));
|
||||
win32IPAddressCollection.Add(win32_IP_ADAPTER_ANYCAST_ADDRESS.Address.GetIPAddress());
|
||||
intPtr = win32_IP_ADAPTER_ANYCAST_ADDRESS.Next;
|
||||
}
|
||||
win32IPAddressCollection.is_readonly = true;
|
||||
return win32IPAddressCollection;
|
||||
}
|
||||
|
||||
// Token: 0x06000BC2 RID: 3010 RVA: 0x00024068 File Offset: 0x00022268
|
||||
public static Win32IPAddressCollection FromDnsServer(IntPtr ptr)
|
||||
{
|
||||
Win32IPAddressCollection win32IPAddressCollection = new Win32IPAddressCollection();
|
||||
IntPtr intPtr = ptr;
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADAPTER_DNS_SERVER_ADDRESS win32_IP_ADAPTER_DNS_SERVER_ADDRESS = (Win32_IP_ADAPTER_DNS_SERVER_ADDRESS)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADAPTER_DNS_SERVER_ADDRESS));
|
||||
win32IPAddressCollection.Add(win32_IP_ADAPTER_DNS_SERVER_ADDRESS.Address.GetIPAddress());
|
||||
intPtr = win32_IP_ADAPTER_DNS_SERVER_ADDRESS.Next;
|
||||
}
|
||||
win32IPAddressCollection.is_readonly = true;
|
||||
return win32IPAddressCollection;
|
||||
}
|
||||
|
||||
// Token: 0x06000BC3 RID: 3011 RVA: 0x000240CC File Offset: 0x000222CC
|
||||
private void AddSubsequentlyString(IntPtr head)
|
||||
{
|
||||
IntPtr intPtr = head;
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADDR_STRING win32_IP_ADDR_STRING = (Win32_IP_ADDR_STRING)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADDR_STRING));
|
||||
this.Add(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress));
|
||||
intPtr = win32_IP_ADDR_STRING.Next;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002F3 RID: 755
|
||||
// (get) Token: 0x06000BC4 RID: 3012 RVA: 0x00024120 File Offset: 0x00022320
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.is_readonly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000B9E RID: 2974
|
||||
public static readonly Win32IPAddressCollection Empty = new Win32IPAddressCollection(new IntPtr[] { IntPtr.Zero });
|
||||
|
||||
// Token: 0x04000B9F RID: 2975
|
||||
private bool is_readonly;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,504 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000164 RID: 356
|
||||
internal class Win32IPGlobalProperties : IPGlobalProperties
|
||||
{
|
||||
// Token: 0x06000C0A RID: 3082 RVA: 0x00024B40 File Offset: 0x00022D40
|
||||
private unsafe void FillTcpTable(out List<Win32IPGlobalProperties.Win32_MIB_TCPROW> tab4, out List<Win32IPGlobalProperties.Win32_MIB_TCP6ROW> tab6)
|
||||
{
|
||||
tab4 = new List<Win32IPGlobalProperties.Win32_MIB_TCPROW>();
|
||||
int num = 0;
|
||||
Win32IPGlobalProperties.GetTcpTable(null, ref num, true);
|
||||
byte[] array = new byte[num];
|
||||
Win32IPGlobalProperties.GetTcpTable(array, ref num, true);
|
||||
int num2 = Marshal.SizeOf(typeof(Win32IPGlobalProperties.Win32_MIB_TCPROW));
|
||||
fixed (byte* ptr = (ref array != null && array.Length != 0 ? ref array[0] : ref *null))
|
||||
{
|
||||
int num3 = Marshal.ReadInt32((IntPtr)((void*)ptr));
|
||||
for (int i = 0; i < num3; i++)
|
||||
{
|
||||
Win32IPGlobalProperties.Win32_MIB_TCPROW win32_MIB_TCPROW = new Win32IPGlobalProperties.Win32_MIB_TCPROW();
|
||||
Marshal.PtrToStructure((IntPtr)((void*)(ptr + i * num2 + 4)), win32_MIB_TCPROW);
|
||||
tab4.Add(win32_MIB_TCPROW);
|
||||
}
|
||||
}
|
||||
tab6 = new List<Win32IPGlobalProperties.Win32_MIB_TCP6ROW>();
|
||||
if (Environment.OSVersion.Version.Major >= 6)
|
||||
{
|
||||
int num4 = 0;
|
||||
Win32IPGlobalProperties.GetTcp6Table(null, ref num4, true);
|
||||
byte[] array2 = new byte[num4];
|
||||
Win32IPGlobalProperties.GetTcp6Table(array2, ref num4, true);
|
||||
int num5 = Marshal.SizeOf(typeof(Win32IPGlobalProperties.Win32_MIB_TCP6ROW));
|
||||
fixed (byte* ptr2 = (ref array2 != null && array2.Length != 0 ? ref array2[0] : ref *null))
|
||||
{
|
||||
int num6 = Marshal.ReadInt32((IntPtr)((void*)ptr2));
|
||||
for (int j = 0; j < num6; j++)
|
||||
{
|
||||
Win32IPGlobalProperties.Win32_MIB_TCP6ROW win32_MIB_TCP6ROW = new Win32IPGlobalProperties.Win32_MIB_TCP6ROW();
|
||||
Marshal.PtrToStructure((IntPtr)((void*)(ptr2 + j * num5 + 4)), win32_MIB_TCP6ROW);
|
||||
tab6.Add(win32_MIB_TCP6ROW);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C0B RID: 3083 RVA: 0x00024CA8 File Offset: 0x00022EA8
|
||||
private bool IsListenerState(TcpState state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case TcpState.Listen:
|
||||
case TcpState.SynSent:
|
||||
case TcpState.FinWait1:
|
||||
case TcpState.FinWait2:
|
||||
case TcpState.CloseWait:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06000C0C RID: 3084 RVA: 0x00024CE4 File Offset: 0x00022EE4
|
||||
public override TcpConnectionInformation[] GetActiveTcpConnections()
|
||||
{
|
||||
List<Win32IPGlobalProperties.Win32_MIB_TCPROW> list = null;
|
||||
List<Win32IPGlobalProperties.Win32_MIB_TCP6ROW> list2 = null;
|
||||
this.FillTcpTable(out list, out list2);
|
||||
int count = list.Count;
|
||||
TcpConnectionInformation[] array = new TcpConnectionInformation[count + list2.Count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array[i] = list[i].TcpInfo;
|
||||
}
|
||||
for (int j = 0; j < list2.Count; j++)
|
||||
{
|
||||
array[count + j] = list2[j].TcpInfo;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06000C0D RID: 3085 RVA: 0x00024D6C File Offset: 0x00022F6C
|
||||
public override IPEndPoint[] GetActiveTcpListeners()
|
||||
{
|
||||
List<Win32IPGlobalProperties.Win32_MIB_TCPROW> list = null;
|
||||
List<Win32IPGlobalProperties.Win32_MIB_TCP6ROW> list2 = null;
|
||||
this.FillTcpTable(out list, out list2);
|
||||
List<IPEndPoint> list3 = new List<IPEndPoint>();
|
||||
int i = 0;
|
||||
int count = list.Count;
|
||||
while (i < count)
|
||||
{
|
||||
if (this.IsListenerState(list[i].State))
|
||||
{
|
||||
list3.Add(list[i].LocalEndPoint);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
int j = 0;
|
||||
int count2 = list2.Count;
|
||||
while (j < count2)
|
||||
{
|
||||
if (this.IsListenerState(list2[j].State))
|
||||
{
|
||||
list3.Add(list2[j].LocalEndPoint);
|
||||
}
|
||||
j++;
|
||||
}
|
||||
return list3.ToArray();
|
||||
}
|
||||
|
||||
// Token: 0x06000C0E RID: 3086 RVA: 0x00024E24 File Offset: 0x00023024
|
||||
public unsafe override IPEndPoint[] GetActiveUdpListeners()
|
||||
{
|
||||
List<IPEndPoint> list = new List<IPEndPoint>();
|
||||
int num = 0;
|
||||
Win32IPGlobalProperties.GetUdpTable(null, ref num, true);
|
||||
byte[] array = new byte[num];
|
||||
Win32IPGlobalProperties.GetUdpTable(array, ref num, true);
|
||||
int num2 = Marshal.SizeOf(typeof(Win32IPGlobalProperties.Win32_MIB_UDPROW));
|
||||
fixed (byte* ptr = (ref array != null && array.Length != 0 ? ref array[0] : ref *null))
|
||||
{
|
||||
int num3 = Marshal.ReadInt32((IntPtr)((void*)ptr));
|
||||
for (int i = 0; i < num3; i++)
|
||||
{
|
||||
Win32IPGlobalProperties.Win32_MIB_UDPROW win32_MIB_UDPROW = new Win32IPGlobalProperties.Win32_MIB_UDPROW();
|
||||
Marshal.PtrToStructure((IntPtr)((void*)(ptr + i * num2 + 4)), win32_MIB_UDPROW);
|
||||
list.Add(win32_MIB_UDPROW.LocalEndPoint);
|
||||
}
|
||||
}
|
||||
if (Environment.OSVersion.Version.Major >= 6)
|
||||
{
|
||||
int num4 = 0;
|
||||
Win32IPGlobalProperties.GetUdp6Table(null, ref num4, true);
|
||||
byte[] array2 = new byte[num4];
|
||||
Win32IPGlobalProperties.GetUdp6Table(array2, ref num4, true);
|
||||
int num5 = Marshal.SizeOf(typeof(Win32IPGlobalProperties.Win32_MIB_UDP6ROW));
|
||||
fixed (byte* ptr2 = (ref array2 != null && array2.Length != 0 ? ref array2[0] : ref *null))
|
||||
{
|
||||
int num6 = Marshal.ReadInt32((IntPtr)((void*)ptr2));
|
||||
for (int j = 0; j < num6; j++)
|
||||
{
|
||||
Win32IPGlobalProperties.Win32_MIB_UDP6ROW win32_MIB_UDP6ROW = new Win32IPGlobalProperties.Win32_MIB_UDP6ROW();
|
||||
Marshal.PtrToStructure((IntPtr)((void*)(ptr2 + j * num5 + 4)), win32_MIB_UDP6ROW);
|
||||
list.Add(win32_MIB_UDP6ROW.LocalEndPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
// Token: 0x06000C0F RID: 3087 RVA: 0x00024F9C File Offset: 0x0002319C
|
||||
public override IcmpV4Statistics GetIcmpV4Statistics()
|
||||
{
|
||||
if (!global::System.Net.Sockets.Socket.SupportsIPv4)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
Win32_MIBICMPINFO win32_MIBICMPINFO;
|
||||
Win32IPGlobalProperties.GetIcmpStatistics(out win32_MIBICMPINFO, 2);
|
||||
return new Win32IcmpV4Statistics(win32_MIBICMPINFO);
|
||||
}
|
||||
|
||||
// Token: 0x06000C10 RID: 3088 RVA: 0x00024FC8 File Offset: 0x000231C8
|
||||
public override IcmpV6Statistics GetIcmpV6Statistics()
|
||||
{
|
||||
if (!global::System.Net.Sockets.Socket.OSSupportsIPv6)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
Win32_MIB_ICMP_EX win32_MIB_ICMP_EX;
|
||||
Win32IPGlobalProperties.GetIcmpStatisticsEx(out win32_MIB_ICMP_EX, 23);
|
||||
return new Win32IcmpV6Statistics(win32_MIB_ICMP_EX);
|
||||
}
|
||||
|
||||
// Token: 0x06000C11 RID: 3089 RVA: 0x00024FF8 File Offset: 0x000231F8
|
||||
public override IPGlobalStatistics GetIPv4GlobalStatistics()
|
||||
{
|
||||
if (!global::System.Net.Sockets.Socket.SupportsIPv4)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
Win32_MIB_IPSTATS win32_MIB_IPSTATS;
|
||||
Win32IPGlobalProperties.GetIPStatisticsEx(out win32_MIB_IPSTATS, 2);
|
||||
return new Win32IPGlobalStatistics(win32_MIB_IPSTATS);
|
||||
}
|
||||
|
||||
// Token: 0x06000C12 RID: 3090 RVA: 0x00025024 File Offset: 0x00023224
|
||||
public override IPGlobalStatistics GetIPv6GlobalStatistics()
|
||||
{
|
||||
if (!global::System.Net.Sockets.Socket.OSSupportsIPv6)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
Win32_MIB_IPSTATS win32_MIB_IPSTATS;
|
||||
Win32IPGlobalProperties.GetIPStatisticsEx(out win32_MIB_IPSTATS, 23);
|
||||
return new Win32IPGlobalStatistics(win32_MIB_IPSTATS);
|
||||
}
|
||||
|
||||
// Token: 0x06000C13 RID: 3091 RVA: 0x00025054 File Offset: 0x00023254
|
||||
public override TcpStatistics GetTcpIPv4Statistics()
|
||||
{
|
||||
if (!global::System.Net.Sockets.Socket.SupportsIPv4)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
Win32_MIB_TCPSTATS win32_MIB_TCPSTATS;
|
||||
Win32IPGlobalProperties.GetTcpStatisticsEx(out win32_MIB_TCPSTATS, 2);
|
||||
return new Win32TcpStatistics(win32_MIB_TCPSTATS);
|
||||
}
|
||||
|
||||
// Token: 0x06000C14 RID: 3092 RVA: 0x00025080 File Offset: 0x00023280
|
||||
public override TcpStatistics GetTcpIPv6Statistics()
|
||||
{
|
||||
if (!global::System.Net.Sockets.Socket.OSSupportsIPv6)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
Win32_MIB_TCPSTATS win32_MIB_TCPSTATS;
|
||||
Win32IPGlobalProperties.GetTcpStatisticsEx(out win32_MIB_TCPSTATS, 23);
|
||||
return new Win32TcpStatistics(win32_MIB_TCPSTATS);
|
||||
}
|
||||
|
||||
// Token: 0x06000C15 RID: 3093 RVA: 0x000250B0 File Offset: 0x000232B0
|
||||
public override UdpStatistics GetUdpIPv4Statistics()
|
||||
{
|
||||
if (!global::System.Net.Sockets.Socket.SupportsIPv4)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
Win32_MIB_UDPSTATS win32_MIB_UDPSTATS;
|
||||
Win32IPGlobalProperties.GetUdpStatisticsEx(out win32_MIB_UDPSTATS, 2);
|
||||
return new Win32UdpStatistics(win32_MIB_UDPSTATS);
|
||||
}
|
||||
|
||||
// Token: 0x06000C16 RID: 3094 RVA: 0x000250DC File Offset: 0x000232DC
|
||||
public override UdpStatistics GetUdpIPv6Statistics()
|
||||
{
|
||||
if (!global::System.Net.Sockets.Socket.OSSupportsIPv6)
|
||||
{
|
||||
throw new NetworkInformationException();
|
||||
}
|
||||
Win32_MIB_UDPSTATS win32_MIB_UDPSTATS;
|
||||
Win32IPGlobalProperties.GetUdpStatisticsEx(out win32_MIB_UDPSTATS, 23);
|
||||
return new Win32UdpStatistics(win32_MIB_UDPSTATS);
|
||||
}
|
||||
|
||||
// Token: 0x17000308 RID: 776
|
||||
// (get) Token: 0x06000C17 RID: 3095 RVA: 0x0002510C File Offset: 0x0002330C
|
||||
public override string DhcpScopeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32_FIXED_INFO.Instance.ScopeId;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000309 RID: 777
|
||||
// (get) Token: 0x06000C18 RID: 3096 RVA: 0x00025118 File Offset: 0x00023318
|
||||
public override string DomainName
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32_FIXED_INFO.Instance.DomainName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700030A RID: 778
|
||||
// (get) Token: 0x06000C19 RID: 3097 RVA: 0x00025124 File Offset: 0x00023324
|
||||
public override string HostName
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32_FIXED_INFO.Instance.HostName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700030B RID: 779
|
||||
// (get) Token: 0x06000C1A RID: 3098 RVA: 0x00025130 File Offset: 0x00023330
|
||||
public override bool IsWinsProxy
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32_FIXED_INFO.Instance.EnableProxy != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700030C RID: 780
|
||||
// (get) Token: 0x06000C1B RID: 3099 RVA: 0x00025144 File Offset: 0x00023344
|
||||
public override NetBiosNodeType NodeType
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32_FIXED_INFO.Instance.NodeType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C1C RID: 3100
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetTcpTable(byte[] pTcpTable, ref int pdwSize, bool bOrder);
|
||||
|
||||
// Token: 0x06000C1D RID: 3101
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetTcp6Table(byte[] TcpTable, ref int SizePointer, bool Order);
|
||||
|
||||
// Token: 0x06000C1E RID: 3102
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetUdpTable(byte[] pUdpTable, ref int pdwSize, bool bOrder);
|
||||
|
||||
// Token: 0x06000C1F RID: 3103
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetUdp6Table(byte[] Udp6Table, ref int SizePointer, bool Order);
|
||||
|
||||
// Token: 0x06000C20 RID: 3104
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetTcpStatisticsEx(out Win32_MIB_TCPSTATS pStats, int dwFamily);
|
||||
|
||||
// Token: 0x06000C21 RID: 3105
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetUdpStatisticsEx(out Win32_MIB_UDPSTATS pStats, int dwFamily);
|
||||
|
||||
// Token: 0x06000C22 RID: 3106
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetIcmpStatistics(out Win32_MIBICMPINFO pStats, int dwFamily);
|
||||
|
||||
// Token: 0x06000C23 RID: 3107
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetIcmpStatisticsEx(out Win32_MIB_ICMP_EX pStats, int dwFamily);
|
||||
|
||||
// Token: 0x06000C24 RID: 3108
|
||||
[DllImport("Iphlpapi.dll")]
|
||||
private static extern int GetIPStatisticsEx(out Win32_MIB_IPSTATS pStats, int dwFamily);
|
||||
|
||||
// Token: 0x04000BAF RID: 2991
|
||||
public const int AF_INET = 2;
|
||||
|
||||
// Token: 0x04000BB0 RID: 2992
|
||||
public const int AF_INET6 = 23;
|
||||
|
||||
// Token: 0x02000165 RID: 357
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
private struct Win32_IN6_ADDR
|
||||
{
|
||||
// Token: 0x04000BB1 RID: 2993
|
||||
[FieldOffset(0)]
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[] Bytes;
|
||||
}
|
||||
|
||||
// Token: 0x02000166 RID: 358
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private class Win32_MIB_TCPROW
|
||||
{
|
||||
// Token: 0x1700030D RID: 781
|
||||
// (get) Token: 0x06000C26 RID: 3110 RVA: 0x00025158 File Offset: 0x00023358
|
||||
public IPEndPoint LocalEndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return new IPEndPoint((long)((ulong)this.LocalAddr), this.LocalPort);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700030E RID: 782
|
||||
// (get) Token: 0x06000C27 RID: 3111 RVA: 0x0002516C File Offset: 0x0002336C
|
||||
public IPEndPoint RemoteEndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return new IPEndPoint((long)((ulong)this.RemoteAddr), this.RemotePort);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700030F RID: 783
|
||||
// (get) Token: 0x06000C28 RID: 3112 RVA: 0x00025180 File Offset: 0x00023380
|
||||
public TcpConnectionInformation TcpInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return new TcpConnectionInformationImpl(this.LocalEndPoint, this.RemoteEndPoint, this.State);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BB2 RID: 2994
|
||||
public TcpState State;
|
||||
|
||||
// Token: 0x04000BB3 RID: 2995
|
||||
public uint LocalAddr;
|
||||
|
||||
// Token: 0x04000BB4 RID: 2996
|
||||
public int LocalPort;
|
||||
|
||||
// Token: 0x04000BB5 RID: 2997
|
||||
public uint RemoteAddr;
|
||||
|
||||
// Token: 0x04000BB6 RID: 2998
|
||||
public int RemotePort;
|
||||
}
|
||||
|
||||
// Token: 0x02000167 RID: 359
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private class Win32_MIB_TCP6ROW
|
||||
{
|
||||
// Token: 0x17000310 RID: 784
|
||||
// (get) Token: 0x06000C2A RID: 3114 RVA: 0x000251A4 File Offset: 0x000233A4
|
||||
public IPEndPoint LocalEndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return new IPEndPoint(new IPAddress(this.LocalAddr.Bytes, (long)((ulong)this.LocalScopeId)), this.LocalPort);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000311 RID: 785
|
||||
// (get) Token: 0x06000C2B RID: 3115 RVA: 0x000251D4 File Offset: 0x000233D4
|
||||
public IPEndPoint RemoteEndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return new IPEndPoint(new IPAddress(this.RemoteAddr.Bytes, (long)((ulong)this.RemoteScopeId)), this.RemotePort);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000312 RID: 786
|
||||
// (get) Token: 0x06000C2C RID: 3116 RVA: 0x00025204 File Offset: 0x00023404
|
||||
public TcpConnectionInformation TcpInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return new TcpConnectionInformationImpl(this.LocalEndPoint, this.RemoteEndPoint, this.State);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BB7 RID: 2999
|
||||
public TcpState State;
|
||||
|
||||
// Token: 0x04000BB8 RID: 3000
|
||||
public Win32IPGlobalProperties.Win32_IN6_ADDR LocalAddr;
|
||||
|
||||
// Token: 0x04000BB9 RID: 3001
|
||||
public uint LocalScopeId;
|
||||
|
||||
// Token: 0x04000BBA RID: 3002
|
||||
public int LocalPort;
|
||||
|
||||
// Token: 0x04000BBB RID: 3003
|
||||
public Win32IPGlobalProperties.Win32_IN6_ADDR RemoteAddr;
|
||||
|
||||
// Token: 0x04000BBC RID: 3004
|
||||
public uint RemoteScopeId;
|
||||
|
||||
// Token: 0x04000BBD RID: 3005
|
||||
public int RemotePort;
|
||||
}
|
||||
|
||||
// Token: 0x02000168 RID: 360
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private class Win32_MIB_UDPROW
|
||||
{
|
||||
// Token: 0x17000313 RID: 787
|
||||
// (get) Token: 0x06000C2E RID: 3118 RVA: 0x00025228 File Offset: 0x00023428
|
||||
public IPEndPoint LocalEndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return new IPEndPoint((long)((ulong)this.LocalAddr), this.LocalPort);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BBE RID: 3006
|
||||
public uint LocalAddr;
|
||||
|
||||
// Token: 0x04000BBF RID: 3007
|
||||
public int LocalPort;
|
||||
}
|
||||
|
||||
// Token: 0x02000169 RID: 361
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private class Win32_MIB_UDP6ROW
|
||||
{
|
||||
// Token: 0x17000314 RID: 788
|
||||
// (get) Token: 0x06000C30 RID: 3120 RVA: 0x00025244 File Offset: 0x00023444
|
||||
public IPEndPoint LocalEndPoint
|
||||
{
|
||||
get
|
||||
{
|
||||
return new IPEndPoint(new IPAddress(this.LocalAddr.Bytes, (long)((ulong)this.LocalScopeId)), this.LocalPort);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BC0 RID: 3008
|
||||
public Win32IPGlobalProperties.Win32_IN6_ADDR LocalAddr;
|
||||
|
||||
// Token: 0x04000BC1 RID: 3009
|
||||
public uint LocalScopeId;
|
||||
|
||||
// Token: 0x04000BC2 RID: 3010
|
||||
public int LocalPort;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200016C RID: 364
|
||||
internal class Win32IPGlobalStatistics : IPGlobalStatistics
|
||||
{
|
||||
// Token: 0x06000C60 RID: 3168 RVA: 0x0002542C File Offset: 0x0002362C
|
||||
public Win32IPGlobalStatistics(Win32_MIB_IPSTATS info)
|
||||
{
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
// Token: 0x17000341 RID: 833
|
||||
// (get) Token: 0x06000C61 RID: 3169 RVA: 0x0002543C File Offset: 0x0002363C
|
||||
public override int DefaultTtl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.DefaultTTL;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000342 RID: 834
|
||||
// (get) Token: 0x06000C62 RID: 3170 RVA: 0x0002544C File Offset: 0x0002364C
|
||||
public override bool ForwardingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.Forwarding != 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000343 RID: 835
|
||||
// (get) Token: 0x06000C63 RID: 3171 RVA: 0x00025460 File Offset: 0x00023660
|
||||
public override int NumberOfInterfaces
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.NumIf;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000344 RID: 836
|
||||
// (get) Token: 0x06000C64 RID: 3172 RVA: 0x00025470 File Offset: 0x00023670
|
||||
public override int NumberOfIPAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.NumAddr;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000345 RID: 837
|
||||
// (get) Token: 0x06000C65 RID: 3173 RVA: 0x00025480 File Offset: 0x00023680
|
||||
public override int NumberOfRoutes
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.NumRoutes;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000346 RID: 838
|
||||
// (get) Token: 0x06000C66 RID: 3174 RVA: 0x00025490 File Offset: 0x00023690
|
||||
public override long OutputPacketRequests
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.OutRequests);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000347 RID: 839
|
||||
// (get) Token: 0x06000C67 RID: 3175 RVA: 0x000254A0 File Offset: 0x000236A0
|
||||
public override long OutputPacketRoutingDiscards
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.RoutingDiscards);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000348 RID: 840
|
||||
// (get) Token: 0x06000C68 RID: 3176 RVA: 0x000254B0 File Offset: 0x000236B0
|
||||
public override long OutputPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.OutDiscards);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000349 RID: 841
|
||||
// (get) Token: 0x06000C69 RID: 3177 RVA: 0x000254C0 File Offset: 0x000236C0
|
||||
public override long OutputPacketsWithNoRoute
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.OutNoRoutes);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700034A RID: 842
|
||||
// (get) Token: 0x06000C6A RID: 3178 RVA: 0x000254D0 File Offset: 0x000236D0
|
||||
public override long PacketFragmentFailures
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.FragFails);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700034B RID: 843
|
||||
// (get) Token: 0x06000C6B RID: 3179 RVA: 0x000254E0 File Offset: 0x000236E0
|
||||
public override long PacketReassembliesRequired
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.ReasmReqds);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700034C RID: 844
|
||||
// (get) Token: 0x06000C6C RID: 3180 RVA: 0x000254F0 File Offset: 0x000236F0
|
||||
public override long PacketReassemblyFailures
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.ReasmFails);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700034D RID: 845
|
||||
// (get) Token: 0x06000C6D RID: 3181 RVA: 0x00025500 File Offset: 0x00023700
|
||||
public override long PacketReassemblyTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.ReasmTimeout);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700034E RID: 846
|
||||
// (get) Token: 0x06000C6E RID: 3182 RVA: 0x00025510 File Offset: 0x00023710
|
||||
public override long PacketsFragmented
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.FragOks);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700034F RID: 847
|
||||
// (get) Token: 0x06000C6F RID: 3183 RVA: 0x00025520 File Offset: 0x00023720
|
||||
public override long PacketsReassembled
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.ReasmOks);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000350 RID: 848
|
||||
// (get) Token: 0x06000C70 RID: 3184 RVA: 0x00025530 File Offset: 0x00023730
|
||||
public override long ReceivedPackets
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InReceives);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000351 RID: 849
|
||||
// (get) Token: 0x06000C71 RID: 3185 RVA: 0x00025540 File Offset: 0x00023740
|
||||
public override long ReceivedPacketsDelivered
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InDelivers);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000352 RID: 850
|
||||
// (get) Token: 0x06000C72 RID: 3186 RVA: 0x00025550 File Offset: 0x00023750
|
||||
public override long ReceivedPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InDiscards);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000353 RID: 851
|
||||
// (get) Token: 0x06000C73 RID: 3187 RVA: 0x00025560 File Offset: 0x00023760
|
||||
public override long ReceivedPacketsForwarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.ForwDatagrams);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000354 RID: 852
|
||||
// (get) Token: 0x06000C74 RID: 3188 RVA: 0x00025570 File Offset: 0x00023770
|
||||
public override long ReceivedPacketsWithAddressErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InAddrErrors);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000355 RID: 853
|
||||
// (get) Token: 0x06000C75 RID: 3189 RVA: 0x00025580 File Offset: 0x00023780
|
||||
public override long ReceivedPacketsWithHeadersErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InHdrErrors);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000356 RID: 854
|
||||
// (get) Token: 0x06000C76 RID: 3190 RVA: 0x00025590 File Offset: 0x00023790
|
||||
public override long ReceivedPacketsWithUnknownProtocol
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InUnknownProtos);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BC4 RID: 3012
|
||||
private Win32_MIB_IPSTATS info;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000172 RID: 370
|
||||
internal class Win32IPInterfaceProperties2 : IPInterfaceProperties
|
||||
{
|
||||
// Token: 0x06000C97 RID: 3223 RVA: 0x00025B94 File Offset: 0x00023D94
|
||||
public Win32IPInterfaceProperties2(Win32_IP_ADAPTER_ADDRESSES addr, Win32_MIB_IFROW mib4, Win32_MIB_IFROW mib6)
|
||||
{
|
||||
this.addr = addr;
|
||||
this.mib4 = mib4;
|
||||
this.mib6 = mib6;
|
||||
}
|
||||
|
||||
// Token: 0x06000C98 RID: 3224 RVA: 0x00025BB4 File Offset: 0x00023DB4
|
||||
public override IPv4InterfaceProperties GetIPv4Properties()
|
||||
{
|
||||
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
||||
return (adapterInfoByIndex == null) ? null : new Win32IPv4InterfaceProperties(adapterInfoByIndex, this.mib4);
|
||||
}
|
||||
|
||||
// Token: 0x06000C99 RID: 3225 RVA: 0x00025BF0 File Offset: 0x00023DF0
|
||||
public override IPv6InterfaceProperties GetIPv6Properties()
|
||||
{
|
||||
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib6.Index);
|
||||
return (adapterInfoByIndex == null) ? null : new Win32IPv6InterfaceProperties(this.mib6);
|
||||
}
|
||||
|
||||
// Token: 0x1700036B RID: 875
|
||||
// (get) Token: 0x06000C9A RID: 3226 RVA: 0x00025C28 File Offset: 0x00023E28
|
||||
public override IPAddressInformationCollection AnycastAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
return IPAddressInformationImplCollection.Win32FromAnycast(this.addr.FirstAnycastAddress);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700036C RID: 876
|
||||
// (get) Token: 0x06000C9B RID: 3227 RVA: 0x00025C3C File Offset: 0x00023E3C
|
||||
public override IPAddressCollection DhcpServerAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
||||
return (adapterInfoByIndex == null) ? Win32IPAddressCollection.Empty : new Win32IPAddressCollection(new Win32_IP_ADDR_STRING[] { adapterInfoByIndex.DhcpServer });
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700036D RID: 877
|
||||
// (get) Token: 0x06000C9C RID: 3228 RVA: 0x00025C8C File Offset: 0x00023E8C
|
||||
public override IPAddressCollection DnsAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32IPAddressCollection.FromDnsServer(this.addr.FirstDnsServerAddress);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700036E RID: 878
|
||||
// (get) Token: 0x06000C9D RID: 3229 RVA: 0x00025CA0 File Offset: 0x00023EA0
|
||||
public override string DnsSuffix
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.addr.DnsSuffix;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700036F RID: 879
|
||||
// (get) Token: 0x06000C9E RID: 3230 RVA: 0x00025CB0 File Offset: 0x00023EB0
|
||||
public override GatewayIPAddressInformationCollection GatewayAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
||||
return (adapterInfoByIndex == null) ? Win32GatewayIPAddressInformationCollection.Empty : new Win32GatewayIPAddressInformationCollection(new Win32_IP_ADDR_STRING[] { adapterInfoByIndex.GatewayList });
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000370 RID: 880
|
||||
// (get) Token: 0x06000C9F RID: 3231 RVA: 0x00025D00 File Offset: 0x00023F00
|
||||
public override bool IsDnsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32_FIXED_INFO.Instance.EnableDns != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000371 RID: 881
|
||||
// (get) Token: 0x06000CA0 RID: 3232 RVA: 0x00025D14 File Offset: 0x00023F14
|
||||
public override bool IsDynamicDnsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.addr.DdnsEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000372 RID: 882
|
||||
// (get) Token: 0x06000CA1 RID: 3233 RVA: 0x00025D24 File Offset: 0x00023F24
|
||||
public override MulticastIPAddressInformationCollection MulticastAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
return MulticastIPAddressInformationImplCollection.Win32FromMulticast(this.addr.FirstMulticastAddress);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000373 RID: 883
|
||||
// (get) Token: 0x06000CA2 RID: 3234 RVA: 0x00025D38 File Offset: 0x00023F38
|
||||
public override UnicastIPAddressInformationCollection UnicastAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
||||
return (adapterInfoByIndex == null) ? UnicastIPAddressInformationImplCollection.Empty : UnicastIPAddressInformationImplCollection.Win32FromUnicast((int)adapterInfoByIndex.Index, this.addr.FirstUnicastAddress);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000374 RID: 884
|
||||
// (get) Token: 0x06000CA3 RID: 3235 RVA: 0x00025D80 File Offset: 0x00023F80
|
||||
public override IPAddressCollection WinsServersAddresses
|
||||
{
|
||||
get
|
||||
{
|
||||
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.mib4.Index);
|
||||
return (adapterInfoByIndex == null) ? Win32IPAddressCollection.Empty : new Win32IPAddressCollection(new Win32_IP_ADDR_STRING[] { adapterInfoByIndex.PrimaryWinsServer, adapterInfoByIndex.SecondaryWinsServer });
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000BE5 RID: 3045
|
||||
private readonly Win32_IP_ADAPTER_ADDRESSES addr;
|
||||
|
||||
// Token: 0x04000BE6 RID: 3046
|
||||
private readonly Win32_MIB_IFROW mib4;
|
||||
|
||||
// Token: 0x04000BE7 RID: 3047
|
||||
private readonly Win32_MIB_IFROW mib6;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000178 RID: 376
|
||||
internal sealed class Win32IPv4InterfaceProperties : IPv4InterfaceProperties
|
||||
{
|
||||
// Token: 0x06000CB8 RID: 3256 RVA: 0x00025EF0 File Offset: 0x000240F0
|
||||
public Win32IPv4InterfaceProperties(Win32_IP_ADAPTER_INFO ainfo, Win32_MIB_IFROW mib)
|
||||
{
|
||||
this.ainfo = ainfo;
|
||||
this.mib = mib;
|
||||
int num = 0;
|
||||
Win32IPv4InterfaceProperties.GetPerAdapterInfo(mib.Index, null, ref num);
|
||||
this.painfo = new Win32_IP_PER_ADAPTER_INFO();
|
||||
int perAdapterInfo = Win32IPv4InterfaceProperties.GetPerAdapterInfo(mib.Index, this.painfo, ref num);
|
||||
if (perAdapterInfo != 0)
|
||||
{
|
||||
throw new NetworkInformationException(perAdapterInfo);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000CB9 RID: 3257
|
||||
[DllImport("iphlpapi.dll")]
|
||||
private static extern int GetPerAdapterInfo(int IfIndex, Win32_IP_PER_ADAPTER_INFO pPerAdapterInfo, ref int pOutBufLen);
|
||||
|
||||
// Token: 0x17000385 RID: 901
|
||||
// (get) Token: 0x06000CBA RID: 3258 RVA: 0x00025F50 File Offset: 0x00024150
|
||||
public override int Index
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mib.Index;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000386 RID: 902
|
||||
// (get) Token: 0x06000CBB RID: 3259 RVA: 0x00025F60 File Offset: 0x00024160
|
||||
public override bool IsAutomaticPrivateAddressingActive
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.painfo.AutoconfigActive != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000387 RID: 903
|
||||
// (get) Token: 0x06000CBC RID: 3260 RVA: 0x00025F74 File Offset: 0x00024174
|
||||
public override bool IsAutomaticPrivateAddressingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.painfo.AutoconfigEnabled != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000388 RID: 904
|
||||
// (get) Token: 0x06000CBD RID: 3261 RVA: 0x00025F88 File Offset: 0x00024188
|
||||
public override bool IsDhcpEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ainfo.DhcpEnabled != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000389 RID: 905
|
||||
// (get) Token: 0x06000CBE RID: 3262 RVA: 0x00025F9C File Offset: 0x0002419C
|
||||
public override bool IsForwardingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return Win32_FIXED_INFO.Instance.EnableRouting != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700038A RID: 906
|
||||
// (get) Token: 0x06000CBF RID: 3263 RVA: 0x00025FB0 File Offset: 0x000241B0
|
||||
public override int Mtu
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mib.Mtu;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700038B RID: 907
|
||||
// (get) Token: 0x06000CC0 RID: 3264 RVA: 0x00025FC0 File Offset: 0x000241C0
|
||||
public override bool UsesWins
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ainfo.HaveWins;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C02 RID: 3074
|
||||
private Win32_IP_ADAPTER_INFO ainfo;
|
||||
|
||||
// Token: 0x04000C03 RID: 3075
|
||||
private Win32_IP_PER_ADAPTER_INFO painfo;
|
||||
|
||||
// Token: 0x04000C04 RID: 3076
|
||||
private Win32_MIB_IFROW mib;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200017B RID: 379
|
||||
internal class Win32IPv4InterfaceStatistics : IPv4InterfaceStatistics
|
||||
{
|
||||
// Token: 0x06000CCF RID: 3279 RVA: 0x00025FE0 File Offset: 0x000241E0
|
||||
public Win32IPv4InterfaceStatistics(Win32_MIB_IFROW info)
|
||||
{
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
// Token: 0x17000398 RID: 920
|
||||
// (get) Token: 0x06000CD0 RID: 3280 RVA: 0x00025FF0 File Offset: 0x000241F0
|
||||
public override long BytesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.InOctets;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000399 RID: 921
|
||||
// (get) Token: 0x06000CD1 RID: 3281 RVA: 0x00026000 File Offset: 0x00024200
|
||||
public override long BytesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.OutOctets;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700039A RID: 922
|
||||
// (get) Token: 0x06000CD2 RID: 3282 RVA: 0x00026010 File Offset: 0x00024210
|
||||
public override long IncomingPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.InDiscards;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700039B RID: 923
|
||||
// (get) Token: 0x06000CD3 RID: 3283 RVA: 0x00026020 File Offset: 0x00024220
|
||||
public override long IncomingPacketsWithErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.InErrors;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700039C RID: 924
|
||||
// (get) Token: 0x06000CD4 RID: 3284 RVA: 0x00026030 File Offset: 0x00024230
|
||||
public override long IncomingUnknownProtocolPackets
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.InUnknownProtos;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700039D RID: 925
|
||||
// (get) Token: 0x06000CD5 RID: 3285 RVA: 0x00026040 File Offset: 0x00024240
|
||||
public override long NonUnicastPacketsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.InNUcastPkts;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700039E RID: 926
|
||||
// (get) Token: 0x06000CD6 RID: 3286 RVA: 0x00026050 File Offset: 0x00024250
|
||||
public override long NonUnicastPacketsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.OutNUcastPkts;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700039F RID: 927
|
||||
// (get) Token: 0x06000CD7 RID: 3287 RVA: 0x00026060 File Offset: 0x00024260
|
||||
public override long OutgoingPacketsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.OutDiscards;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A0 RID: 928
|
||||
// (get) Token: 0x06000CD8 RID: 3288 RVA: 0x00026070 File Offset: 0x00024270
|
||||
public override long OutgoingPacketsWithErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.OutErrors;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A1 RID: 929
|
||||
// (get) Token: 0x06000CD9 RID: 3289 RVA: 0x00026080 File Offset: 0x00024280
|
||||
public override long OutputQueueLength
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.OutQLen;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A2 RID: 930
|
||||
// (get) Token: 0x06000CDA RID: 3290 RVA: 0x00026090 File Offset: 0x00024290
|
||||
public override long UnicastPacketsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.InUcastPkts;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003A3 RID: 931
|
||||
// (get) Token: 0x06000CDB RID: 3291 RVA: 0x000260A0 File Offset: 0x000242A0
|
||||
public override long UnicastPacketsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)this.info.OutUcastPkts;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C09 RID: 3081
|
||||
private Win32_MIB_IFROW info;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x0200017F RID: 383
|
||||
internal class Win32IPv6InterfaceProperties : IPv6InterfaceProperties
|
||||
{
|
||||
// Token: 0x06000CFA RID: 3322 RVA: 0x00026214 File Offset: 0x00024414
|
||||
public Win32IPv6InterfaceProperties(Win32_MIB_IFROW mib)
|
||||
{
|
||||
this.mib = mib;
|
||||
}
|
||||
|
||||
// Token: 0x170003BE RID: 958
|
||||
// (get) Token: 0x06000CFB RID: 3323 RVA: 0x00026224 File Offset: 0x00024424
|
||||
public override int Index
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mib.Index;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003BF RID: 959
|
||||
// (get) Token: 0x06000CFC RID: 3324 RVA: 0x00026234 File Offset: 0x00024434
|
||||
public override int Mtu
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mib.Mtu;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C0C RID: 3084
|
||||
private Win32_MIB_IFROW mib;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,281 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000182 RID: 386
|
||||
internal class Win32IcmpV4Statistics : IcmpV4Statistics
|
||||
{
|
||||
// Token: 0x06000D34 RID: 3380 RVA: 0x00026438 File Offset: 0x00024638
|
||||
public Win32IcmpV4Statistics(Win32_MIBICMPINFO info)
|
||||
{
|
||||
this.iin = info.InStats;
|
||||
this.iout = info.OutStats;
|
||||
}
|
||||
|
||||
// Token: 0x170003F4 RID: 1012
|
||||
// (get) Token: 0x06000D35 RID: 3381 RVA: 0x00026468 File Offset: 0x00024668
|
||||
public override long AddressMaskRepliesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.AddrMaskReps);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F5 RID: 1013
|
||||
// (get) Token: 0x06000D36 RID: 3382 RVA: 0x00026478 File Offset: 0x00024678
|
||||
public override long AddressMaskRepliesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.AddrMaskReps);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F6 RID: 1014
|
||||
// (get) Token: 0x06000D37 RID: 3383 RVA: 0x00026488 File Offset: 0x00024688
|
||||
public override long AddressMaskRequestsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.AddrMasks);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F7 RID: 1015
|
||||
// (get) Token: 0x06000D38 RID: 3384 RVA: 0x00026498 File Offset: 0x00024698
|
||||
public override long AddressMaskRequestsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.AddrMasks);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F8 RID: 1016
|
||||
// (get) Token: 0x06000D39 RID: 3385 RVA: 0x000264A8 File Offset: 0x000246A8
|
||||
public override long DestinationUnreachableMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.DestUnreachs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003F9 RID: 1017
|
||||
// (get) Token: 0x06000D3A RID: 3386 RVA: 0x000264B8 File Offset: 0x000246B8
|
||||
public override long DestinationUnreachableMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.DestUnreachs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003FA RID: 1018
|
||||
// (get) Token: 0x06000D3B RID: 3387 RVA: 0x000264C8 File Offset: 0x000246C8
|
||||
public override long EchoRepliesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.EchoReps);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003FB RID: 1019
|
||||
// (get) Token: 0x06000D3C RID: 3388 RVA: 0x000264D8 File Offset: 0x000246D8
|
||||
public override long EchoRepliesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.EchoReps);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003FC RID: 1020
|
||||
// (get) Token: 0x06000D3D RID: 3389 RVA: 0x000264E8 File Offset: 0x000246E8
|
||||
public override long EchoRequestsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Echos);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003FD RID: 1021
|
||||
// (get) Token: 0x06000D3E RID: 3390 RVA: 0x000264F8 File Offset: 0x000246F8
|
||||
public override long EchoRequestsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Echos);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003FE RID: 1022
|
||||
// (get) Token: 0x06000D3F RID: 3391 RVA: 0x00026508 File Offset: 0x00024708
|
||||
public override long ErrorsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Errors);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170003FF RID: 1023
|
||||
// (get) Token: 0x06000D40 RID: 3392 RVA: 0x00026518 File Offset: 0x00024718
|
||||
public override long ErrorsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Errors);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000400 RID: 1024
|
||||
// (get) Token: 0x06000D41 RID: 3393 RVA: 0x00026528 File Offset: 0x00024728
|
||||
public override long MessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Msgs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000401 RID: 1025
|
||||
// (get) Token: 0x06000D42 RID: 3394 RVA: 0x00026538 File Offset: 0x00024738
|
||||
public override long MessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Msgs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000402 RID: 1026
|
||||
// (get) Token: 0x06000D43 RID: 3395 RVA: 0x00026548 File Offset: 0x00024748
|
||||
public override long ParameterProblemsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.ParmProbs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000403 RID: 1027
|
||||
// (get) Token: 0x06000D44 RID: 3396 RVA: 0x00026558 File Offset: 0x00024758
|
||||
public override long ParameterProblemsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.ParmProbs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000404 RID: 1028
|
||||
// (get) Token: 0x06000D45 RID: 3397 RVA: 0x00026568 File Offset: 0x00024768
|
||||
public override long RedirectsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Redirects);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000405 RID: 1029
|
||||
// (get) Token: 0x06000D46 RID: 3398 RVA: 0x00026578 File Offset: 0x00024778
|
||||
public override long RedirectsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Redirects);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000406 RID: 1030
|
||||
// (get) Token: 0x06000D47 RID: 3399 RVA: 0x00026588 File Offset: 0x00024788
|
||||
public override long SourceQuenchesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.SrcQuenchs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000407 RID: 1031
|
||||
// (get) Token: 0x06000D48 RID: 3400 RVA: 0x00026598 File Offset: 0x00024798
|
||||
public override long SourceQuenchesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.SrcQuenchs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000408 RID: 1032
|
||||
// (get) Token: 0x06000D49 RID: 3401 RVA: 0x000265A8 File Offset: 0x000247A8
|
||||
public override long TimeExceededMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.TimeExcds);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000409 RID: 1033
|
||||
// (get) Token: 0x06000D4A RID: 3402 RVA: 0x000265B8 File Offset: 0x000247B8
|
||||
public override long TimeExceededMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.TimeExcds);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700040A RID: 1034
|
||||
// (get) Token: 0x06000D4B RID: 3403 RVA: 0x000265C8 File Offset: 0x000247C8
|
||||
public override long TimestampRepliesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.TimestampReps);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700040B RID: 1035
|
||||
// (get) Token: 0x06000D4C RID: 3404 RVA: 0x000265D8 File Offset: 0x000247D8
|
||||
public override long TimestampRepliesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.TimestampReps);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700040C RID: 1036
|
||||
// (get) Token: 0x06000D4D RID: 3405 RVA: 0x000265E8 File Offset: 0x000247E8
|
||||
public override long TimestampRequestsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Timestamps);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700040D RID: 1037
|
||||
// (get) Token: 0x06000D4E RID: 3406 RVA: 0x000265F8 File Offset: 0x000247F8
|
||||
public override long TimestampRequestsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Timestamps);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C0E RID: 3086
|
||||
private Win32_MIBICMPSTATS iin;
|
||||
|
||||
// Token: 0x04000C0F RID: 3087
|
||||
private Win32_MIBICMPSTATS iout;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,341 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000188 RID: 392
|
||||
internal class Win32IcmpV6Statistics : IcmpV6Statistics
|
||||
{
|
||||
// Token: 0x06000D93 RID: 3475 RVA: 0x00026864 File Offset: 0x00024A64
|
||||
public Win32IcmpV6Statistics(Win32_MIB_ICMP_EX info)
|
||||
{
|
||||
this.iin = info.InStats;
|
||||
this.iout = info.OutStats;
|
||||
}
|
||||
|
||||
// Token: 0x1700044E RID: 1102
|
||||
// (get) Token: 0x06000D94 RID: 3476 RVA: 0x00026894 File Offset: 0x00024A94
|
||||
public override long DestinationUnreachableMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700044F RID: 1103
|
||||
// (get) Token: 0x06000D95 RID: 3477 RVA: 0x000268A4 File Offset: 0x00024AA4
|
||||
public override long DestinationUnreachableMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000450 RID: 1104
|
||||
// (get) Token: 0x06000D96 RID: 3478 RVA: 0x000268B4 File Offset: 0x00024AB4
|
||||
public override long EchoRepliesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[129]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000451 RID: 1105
|
||||
// (get) Token: 0x06000D97 RID: 3479 RVA: 0x000268C8 File Offset: 0x00024AC8
|
||||
public override long EchoRepliesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[129]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000452 RID: 1106
|
||||
// (get) Token: 0x06000D98 RID: 3480 RVA: 0x000268DC File Offset: 0x00024ADC
|
||||
public override long EchoRequestsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[128]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000453 RID: 1107
|
||||
// (get) Token: 0x06000D99 RID: 3481 RVA: 0x000268F0 File Offset: 0x00024AF0
|
||||
public override long EchoRequestsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[128]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000454 RID: 1108
|
||||
// (get) Token: 0x06000D9A RID: 3482 RVA: 0x00026904 File Offset: 0x00024B04
|
||||
public override long ErrorsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Errors);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000455 RID: 1109
|
||||
// (get) Token: 0x06000D9B RID: 3483 RVA: 0x00026914 File Offset: 0x00024B14
|
||||
public override long ErrorsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Errors);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000456 RID: 1110
|
||||
// (get) Token: 0x06000D9C RID: 3484 RVA: 0x00026924 File Offset: 0x00024B24
|
||||
public override long MembershipQueriesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[130]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000457 RID: 1111
|
||||
// (get) Token: 0x06000D9D RID: 3485 RVA: 0x00026938 File Offset: 0x00024B38
|
||||
public override long MembershipQueriesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[130]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000458 RID: 1112
|
||||
// (get) Token: 0x06000D9E RID: 3486 RVA: 0x0002694C File Offset: 0x00024B4C
|
||||
public override long MembershipReductionsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[132]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000459 RID: 1113
|
||||
// (get) Token: 0x06000D9F RID: 3487 RVA: 0x00026960 File Offset: 0x00024B60
|
||||
public override long MembershipReductionsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[132]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700045A RID: 1114
|
||||
// (get) Token: 0x06000DA0 RID: 3488 RVA: 0x00026974 File Offset: 0x00024B74
|
||||
public override long MembershipReportsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[131]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700045B RID: 1115
|
||||
// (get) Token: 0x06000DA1 RID: 3489 RVA: 0x00026988 File Offset: 0x00024B88
|
||||
public override long MembershipReportsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[131]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700045C RID: 1116
|
||||
// (get) Token: 0x06000DA2 RID: 3490 RVA: 0x0002699C File Offset: 0x00024B9C
|
||||
public override long MessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Msgs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700045D RID: 1117
|
||||
// (get) Token: 0x06000DA3 RID: 3491 RVA: 0x000269AC File Offset: 0x00024BAC
|
||||
public override long MessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Msgs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700045E RID: 1118
|
||||
// (get) Token: 0x06000DA4 RID: 3492 RVA: 0x000269BC File Offset: 0x00024BBC
|
||||
public override long NeighborAdvertisementsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[136]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700045F RID: 1119
|
||||
// (get) Token: 0x06000DA5 RID: 3493 RVA: 0x000269D0 File Offset: 0x00024BD0
|
||||
public override long NeighborAdvertisementsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[136]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000460 RID: 1120
|
||||
// (get) Token: 0x06000DA6 RID: 3494 RVA: 0x000269E4 File Offset: 0x00024BE4
|
||||
public override long NeighborSolicitsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[135]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000461 RID: 1121
|
||||
// (get) Token: 0x06000DA7 RID: 3495 RVA: 0x000269F8 File Offset: 0x00024BF8
|
||||
public override long NeighborSolicitsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[135]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000462 RID: 1122
|
||||
// (get) Token: 0x06000DA8 RID: 3496 RVA: 0x00026A0C File Offset: 0x00024C0C
|
||||
public override long PacketTooBigMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[2]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000463 RID: 1123
|
||||
// (get) Token: 0x06000DA9 RID: 3497 RVA: 0x00026A1C File Offset: 0x00024C1C
|
||||
public override long PacketTooBigMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[2]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000464 RID: 1124
|
||||
// (get) Token: 0x06000DAA RID: 3498 RVA: 0x00026A2C File Offset: 0x00024C2C
|
||||
public override long ParameterProblemsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[4]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000465 RID: 1125
|
||||
// (get) Token: 0x06000DAB RID: 3499 RVA: 0x00026A3C File Offset: 0x00024C3C
|
||||
public override long ParameterProblemsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[4]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000466 RID: 1126
|
||||
// (get) Token: 0x06000DAC RID: 3500 RVA: 0x00026A4C File Offset: 0x00024C4C
|
||||
public override long RedirectsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[137]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000467 RID: 1127
|
||||
// (get) Token: 0x06000DAD RID: 3501 RVA: 0x00026A60 File Offset: 0x00024C60
|
||||
public override long RedirectsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[137]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000468 RID: 1128
|
||||
// (get) Token: 0x06000DAE RID: 3502 RVA: 0x00026A74 File Offset: 0x00024C74
|
||||
public override long RouterAdvertisementsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[134]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000469 RID: 1129
|
||||
// (get) Token: 0x06000DAF RID: 3503 RVA: 0x00026A88 File Offset: 0x00024C88
|
||||
public override long RouterAdvertisementsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[134]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700046A RID: 1130
|
||||
// (get) Token: 0x06000DB0 RID: 3504 RVA: 0x00026A9C File Offset: 0x00024C9C
|
||||
public override long RouterSolicitsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[133]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700046B RID: 1131
|
||||
// (get) Token: 0x06000DB1 RID: 3505 RVA: 0x00026AB0 File Offset: 0x00024CB0
|
||||
public override long RouterSolicitsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[133]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700046C RID: 1132
|
||||
// (get) Token: 0x06000DB2 RID: 3506 RVA: 0x00026AC4 File Offset: 0x00024CC4
|
||||
public override long TimeExceededMessagesReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iin.Counts[3]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700046D RID: 1133
|
||||
// (get) Token: 0x06000DB3 RID: 3507 RVA: 0x00026AD4 File Offset: 0x00024CD4
|
||||
public override long TimeExceededMessagesSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.iout.Counts[3]);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000C2F RID: 3119
|
||||
private Win32_MIBICMPSTATS_EX iin;
|
||||
|
||||
// Token: 0x04000C30 RID: 3120
|
||||
private Win32_MIBICMPSTATS_EX iout;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001CB RID: 459
|
||||
internal struct Win32LengthFlagsUnion
|
||||
{
|
||||
// Token: 0x1700050F RID: 1295
|
||||
// (get) Token: 0x06000EE7 RID: 3815 RVA: 0x00029784 File Offset: 0x00027984
|
||||
public bool IsDnsEligible
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.Flags & 1U) != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000510 RID: 1296
|
||||
// (get) Token: 0x06000EE8 RID: 3816 RVA: 0x00029794 File Offset: 0x00027994
|
||||
public bool IsTransient
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.Flags & 2U) != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D81 RID: 3457
|
||||
private const int IP_ADAPTER_ADDRESS_DNS_ELIGIBLE = 1;
|
||||
|
||||
// Token: 0x04000D82 RID: 3458
|
||||
private const int IP_ADAPTER_ADDRESS_TRANSIENT = 2;
|
||||
|
||||
// Token: 0x04000D83 RID: 3459
|
||||
public uint Length;
|
||||
|
||||
// Token: 0x04000D84 RID: 3460
|
||||
public uint Flags;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001A6 RID: 422
|
||||
internal class Win32NetworkInterface2 : NetworkInterface
|
||||
{
|
||||
// Token: 0x06000E12 RID: 3602 RVA: 0x00027B44 File Offset: 0x00025D44
|
||||
private Win32NetworkInterface2(Win32_IP_ADAPTER_ADDRESSES addr)
|
||||
{
|
||||
this.addr = addr;
|
||||
this.mib4 = default(Win32_MIB_IFROW);
|
||||
this.mib4.Index = addr.Alignment.IfIndex;
|
||||
if (Win32NetworkInterface2.GetIfEntry(ref this.mib4) != 0)
|
||||
{
|
||||
this.mib4.Index = -1;
|
||||
}
|
||||
this.mib6 = default(Win32_MIB_IFROW);
|
||||
this.mib6.Index = addr.Ipv6IfIndex;
|
||||
if (Win32NetworkInterface2.GetIfEntry(ref this.mib6) != 0)
|
||||
{
|
||||
this.mib6.Index = -1;
|
||||
}
|
||||
this.ip4stats = new Win32IPv4InterfaceStatistics(this.mib4);
|
||||
this.ip_if_props = new Win32IPInterfaceProperties2(addr, this.mib4, this.mib6);
|
||||
}
|
||||
|
||||
// Token: 0x06000E13 RID: 3603
|
||||
[DllImport("iphlpapi.dll", SetLastError = true)]
|
||||
private static extern int GetAdaptersInfo(byte[] info, ref int size);
|
||||
|
||||
// Token: 0x06000E14 RID: 3604
|
||||
[DllImport("iphlpapi.dll", SetLastError = true)]
|
||||
private static extern int GetAdaptersAddresses(uint family, uint flags, IntPtr reserved, byte[] info, ref int size);
|
||||
|
||||
// Token: 0x06000E15 RID: 3605
|
||||
[DllImport("iphlpapi.dll", SetLastError = true)]
|
||||
private static extern int GetIfEntry(ref Win32_MIB_IFROW row);
|
||||
|
||||
// Token: 0x06000E16 RID: 3606 RVA: 0x00027C04 File Offset: 0x00025E04
|
||||
public static NetworkInterface[] ImplGetAllNetworkInterfaces()
|
||||
{
|
||||
Win32_IP_ADAPTER_ADDRESSES[] adaptersAddresses = Win32NetworkInterface2.GetAdaptersAddresses();
|
||||
NetworkInterface[] array = new NetworkInterface[adaptersAddresses.Length];
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
array[i] = new Win32NetworkInterface2(adaptersAddresses[i]);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06000E17 RID: 3607 RVA: 0x00027C40 File Offset: 0x00025E40
|
||||
public static Win32_IP_ADAPTER_INFO GetAdapterInfoByIndex(int index)
|
||||
{
|
||||
foreach (Win32_IP_ADAPTER_INFO win32_IP_ADAPTER_INFO in Win32NetworkInterface2.GetAdaptersInfo())
|
||||
{
|
||||
if ((ulong)win32_IP_ADAPTER_INFO.Index == (ulong)((long)index))
|
||||
{
|
||||
return win32_IP_ADAPTER_INFO;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x06000E18 RID: 3608 RVA: 0x00027C7C File Offset: 0x00025E7C
|
||||
private unsafe static Win32_IP_ADAPTER_INFO[] GetAdaptersInfo()
|
||||
{
|
||||
byte[] array = null;
|
||||
int num = 0;
|
||||
Win32NetworkInterface2.GetAdaptersInfo(array, ref num);
|
||||
array = new byte[num];
|
||||
int adaptersInfo = Win32NetworkInterface2.GetAdaptersInfo(array, ref num);
|
||||
if (adaptersInfo != 0)
|
||||
{
|
||||
throw new NetworkInformationException(adaptersInfo);
|
||||
}
|
||||
List<Win32_IP_ADAPTER_INFO> list = new List<Win32_IP_ADAPTER_INFO>();
|
||||
fixed (byte* ptr = (ref array != null && array.Length != 0 ? ref array[0] : ref *null))
|
||||
{
|
||||
IntPtr intPtr = (IntPtr)((void*)ptr);
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADAPTER_INFO win32_IP_ADAPTER_INFO = new Win32_IP_ADAPTER_INFO();
|
||||
Marshal.PtrToStructure(intPtr, win32_IP_ADAPTER_INFO);
|
||||
list.Add(win32_IP_ADAPTER_INFO);
|
||||
intPtr = win32_IP_ADAPTER_INFO.Next;
|
||||
}
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
// Token: 0x06000E19 RID: 3609 RVA: 0x00027D24 File Offset: 0x00025F24
|
||||
private unsafe static Win32_IP_ADAPTER_ADDRESSES[] GetAdaptersAddresses()
|
||||
{
|
||||
byte[] array = null;
|
||||
int num = 0;
|
||||
Win32NetworkInterface2.GetAdaptersAddresses(0U, 0U, IntPtr.Zero, array, ref num);
|
||||
array = new byte[num];
|
||||
int adaptersAddresses = Win32NetworkInterface2.GetAdaptersAddresses(0U, 0U, IntPtr.Zero, array, ref num);
|
||||
if (adaptersAddresses != 0)
|
||||
{
|
||||
throw new NetworkInformationException(adaptersAddresses);
|
||||
}
|
||||
List<Win32_IP_ADAPTER_ADDRESSES> list = new List<Win32_IP_ADAPTER_ADDRESSES>();
|
||||
fixed (byte* ptr = (ref array != null && array.Length != 0 ? ref array[0] : ref *null))
|
||||
{
|
||||
IntPtr intPtr = (IntPtr)((void*)ptr);
|
||||
while (intPtr != IntPtr.Zero)
|
||||
{
|
||||
Win32_IP_ADAPTER_ADDRESSES win32_IP_ADAPTER_ADDRESSES = new Win32_IP_ADAPTER_ADDRESSES();
|
||||
Marshal.PtrToStructure(intPtr, win32_IP_ADAPTER_ADDRESSES);
|
||||
list.Add(win32_IP_ADAPTER_ADDRESSES);
|
||||
intPtr = win32_IP_ADAPTER_ADDRESSES.Next;
|
||||
}
|
||||
}
|
||||
return list.ToArray();
|
||||
}
|
||||
|
||||
// Token: 0x06000E1A RID: 3610 RVA: 0x00027DD8 File Offset: 0x00025FD8
|
||||
public override IPInterfaceProperties GetIPProperties()
|
||||
{
|
||||
return this.ip_if_props;
|
||||
}
|
||||
|
||||
// Token: 0x06000E1B RID: 3611 RVA: 0x00027DE0 File Offset: 0x00025FE0
|
||||
public override IPv4InterfaceStatistics GetIPv4Statistics()
|
||||
{
|
||||
return this.ip4stats;
|
||||
}
|
||||
|
||||
// Token: 0x06000E1C RID: 3612 RVA: 0x00027DE8 File Offset: 0x00025FE8
|
||||
public override PhysicalAddress GetPhysicalAddress()
|
||||
{
|
||||
byte[] array = new byte[this.addr.PhysicalAddressLength];
|
||||
Array.Copy(this.addr.PhysicalAddress, 0, array, 0, array.Length);
|
||||
return new PhysicalAddress(array);
|
||||
}
|
||||
|
||||
// Token: 0x06000E1D RID: 3613 RVA: 0x00027E24 File Offset: 0x00026024
|
||||
public override bool Supports(NetworkInterfaceComponent networkInterfaceComponent)
|
||||
{
|
||||
if (networkInterfaceComponent != NetworkInterfaceComponent.IPv4)
|
||||
{
|
||||
return networkInterfaceComponent == NetworkInterfaceComponent.IPv6 && this.mib6.Index >= 0;
|
||||
}
|
||||
return this.mib4.Index >= 0;
|
||||
}
|
||||
|
||||
// Token: 0x17000497 RID: 1175
|
||||
// (get) Token: 0x06000E1E RID: 3614 RVA: 0x00027E6C File Offset: 0x0002606C
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.addr.Description;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000498 RID: 1176
|
||||
// (get) Token: 0x06000E1F RID: 3615 RVA: 0x00027E7C File Offset: 0x0002607C
|
||||
public override string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.addr.AdapterName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000499 RID: 1177
|
||||
// (get) Token: 0x06000E20 RID: 3616 RVA: 0x00027E8C File Offset: 0x0002608C
|
||||
public override bool IsReceiveOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.addr.IsReceiveOnly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700049A RID: 1178
|
||||
// (get) Token: 0x06000E21 RID: 3617 RVA: 0x00027E9C File Offset: 0x0002609C
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.addr.FriendlyName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700049B RID: 1179
|
||||
// (get) Token: 0x06000E22 RID: 3618 RVA: 0x00027EAC File Offset: 0x000260AC
|
||||
public override NetworkInterfaceType NetworkInterfaceType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.addr.IfType;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700049C RID: 1180
|
||||
// (get) Token: 0x06000E23 RID: 3619 RVA: 0x00027EBC File Offset: 0x000260BC
|
||||
public override OperationalStatus OperationalStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.addr.OperStatus;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700049D RID: 1181
|
||||
// (get) Token: 0x06000E24 RID: 3620 RVA: 0x00027ECC File Offset: 0x000260CC
|
||||
public override long Speed
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)((this.mib6.Index < 0) ? this.mib4.Speed : this.mib6.Speed));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700049E RID: 1182
|
||||
// (get) Token: 0x06000E25 RID: 3621 RVA: 0x00027EFC File Offset: 0x000260FC
|
||||
public override bool SupportsMulticast
|
||||
{
|
||||
get
|
||||
{
|
||||
return !this.addr.NoMulticast;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000CA5 RID: 3237
|
||||
private Win32_IP_ADAPTER_ADDRESSES addr;
|
||||
|
||||
// Token: 0x04000CA6 RID: 3238
|
||||
private Win32_MIB_IFROW mib4;
|
||||
|
||||
// Token: 0x04000CA7 RID: 3239
|
||||
private Win32_MIB_IFROW mib6;
|
||||
|
||||
// Token: 0x04000CA8 RID: 3240
|
||||
private Win32IPv4InterfaceStatistics ip4stats;
|
||||
|
||||
// Token: 0x04000CA9 RID: 3241
|
||||
private IPInterfaceProperties ip_if_props;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001BA RID: 442
|
||||
internal class Win32TcpStatistics : TcpStatistics
|
||||
{
|
||||
// Token: 0x06000E8E RID: 3726 RVA: 0x000290C8 File Offset: 0x000272C8
|
||||
public Win32TcpStatistics(Win32_MIB_TCPSTATS info)
|
||||
{
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
// Token: 0x170004CF RID: 1231
|
||||
// (get) Token: 0x06000E8F RID: 3727 RVA: 0x000290D8 File Offset: 0x000272D8
|
||||
public override long ConnectionsAccepted
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.PassiveOpens);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D0 RID: 1232
|
||||
// (get) Token: 0x06000E90 RID: 3728 RVA: 0x000290E8 File Offset: 0x000272E8
|
||||
public override long ConnectionsInitiated
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.ActiveOpens);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D1 RID: 1233
|
||||
// (get) Token: 0x06000E91 RID: 3729 RVA: 0x000290F8 File Offset: 0x000272F8
|
||||
public override long CumulativeConnections
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.NumConns);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D2 RID: 1234
|
||||
// (get) Token: 0x06000E92 RID: 3730 RVA: 0x00029108 File Offset: 0x00027308
|
||||
public override long CurrentConnections
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.CurrEstab);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D3 RID: 1235
|
||||
// (get) Token: 0x06000E93 RID: 3731 RVA: 0x00029118 File Offset: 0x00027318
|
||||
public override long ErrorsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InErrs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D4 RID: 1236
|
||||
// (get) Token: 0x06000E94 RID: 3732 RVA: 0x00029128 File Offset: 0x00027328
|
||||
public override long FailedConnectionAttempts
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.AttemptFails);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D5 RID: 1237
|
||||
// (get) Token: 0x06000E95 RID: 3733 RVA: 0x00029138 File Offset: 0x00027338
|
||||
public override long MaximumConnections
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.MaxConn);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D6 RID: 1238
|
||||
// (get) Token: 0x06000E96 RID: 3734 RVA: 0x00029148 File Offset: 0x00027348
|
||||
public override long MaximumTransmissionTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.RtoMax);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D7 RID: 1239
|
||||
// (get) Token: 0x06000E97 RID: 3735 RVA: 0x00029158 File Offset: 0x00027358
|
||||
public override long MinimumTransmissionTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.RtoMin);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D8 RID: 1240
|
||||
// (get) Token: 0x06000E98 RID: 3736 RVA: 0x00029168 File Offset: 0x00027368
|
||||
public override long ResetConnections
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.EstabResets);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004D9 RID: 1241
|
||||
// (get) Token: 0x06000E99 RID: 3737 RVA: 0x00029178 File Offset: 0x00027378
|
||||
public override long ResetsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.OutRsts);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004DA RID: 1242
|
||||
// (get) Token: 0x06000E9A RID: 3738 RVA: 0x00029188 File Offset: 0x00027388
|
||||
public override long SegmentsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InSegs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004DB RID: 1243
|
||||
// (get) Token: 0x06000E9B RID: 3739 RVA: 0x00029198 File Offset: 0x00027398
|
||||
public override long SegmentsResent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.RetransSegs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004DC RID: 1244
|
||||
// (get) Token: 0x06000E9C RID: 3740 RVA: 0x000291A8 File Offset: 0x000273A8
|
||||
public override long SegmentsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.OutSegs);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D0A RID: 3338
|
||||
private Win32_MIB_TCPSTATS info;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001BE RID: 446
|
||||
internal class Win32UdpStatistics : UdpStatistics
|
||||
{
|
||||
// Token: 0x06000EAA RID: 3754 RVA: 0x0002925C File Offset: 0x0002745C
|
||||
public Win32UdpStatistics(Win32_MIB_UDPSTATS info)
|
||||
{
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
// Token: 0x170004E7 RID: 1255
|
||||
// (get) Token: 0x06000EAB RID: 3755 RVA: 0x0002926C File Offset: 0x0002746C
|
||||
public override long DatagramsReceived
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InDatagrams);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004E8 RID: 1256
|
||||
// (get) Token: 0x06000EAC RID: 3756 RVA: 0x0002927C File Offset: 0x0002747C
|
||||
public override long DatagramsSent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.OutDatagrams);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004E9 RID: 1257
|
||||
// (get) Token: 0x06000EAD RID: 3757 RVA: 0x0002928C File Offset: 0x0002748C
|
||||
public override long IncomingDatagramsDiscarded
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.NoPorts);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004EA RID: 1258
|
||||
// (get) Token: 0x06000EAE RID: 3758 RVA: 0x0002929C File Offset: 0x0002749C
|
||||
public override long IncomingDatagramsWithErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.InErrors);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004EB RID: 1259
|
||||
// (get) Token: 0x06000EAF RID: 3759 RVA: 0x000292AC File Offset: 0x000274AC
|
||||
public override int UdpListeners
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.NumAddrs;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D1B RID: 3355
|
||||
private Win32_MIB_UDPSTATS info;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001C1 RID: 449
|
||||
internal class Win32UnicastIPAddressInformation : UnicastIPAddressInformation
|
||||
{
|
||||
// Token: 0x06000EB8 RID: 3768 RVA: 0x000292C4 File Offset: 0x000274C4
|
||||
public Win32UnicastIPAddressInformation(int ifIndex, Win32_IP_ADAPTER_UNICAST_ADDRESS info)
|
||||
{
|
||||
this.if_index = ifIndex;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
// Token: 0x170004F3 RID: 1267
|
||||
// (get) Token: 0x06000EB9 RID: 3769 RVA: 0x000292DC File Offset: 0x000274DC
|
||||
public override IPAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.Address.GetIPAddress();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004F4 RID: 1268
|
||||
// (get) Token: 0x06000EBA RID: 3770 RVA: 0x000292F0 File Offset: 0x000274F0
|
||||
public override bool IsDnsEligible
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.LengthFlags.IsDnsEligible;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004F5 RID: 1269
|
||||
// (get) Token: 0x06000EBB RID: 3771 RVA: 0x00029304 File Offset: 0x00027504
|
||||
public override bool IsTransient
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.LengthFlags.IsTransient;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004F6 RID: 1270
|
||||
// (get) Token: 0x06000EBC RID: 3772 RVA: 0x00029318 File Offset: 0x00027518
|
||||
public override long AddressPreferredLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.PreferredLifetime);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004F7 RID: 1271
|
||||
// (get) Token: 0x06000EBD RID: 3773 RVA: 0x00029328 File Offset: 0x00027528
|
||||
public override long AddressValidLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.ValidLifetime);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004F8 RID: 1272
|
||||
// (get) Token: 0x06000EBE RID: 3774 RVA: 0x00029338 File Offset: 0x00027538
|
||||
public override long DhcpLeaseLifetime
|
||||
{
|
||||
get
|
||||
{
|
||||
return (long)((ulong)this.info.LeaseLifetime);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004F9 RID: 1273
|
||||
// (get) Token: 0x06000EBF RID: 3775 RVA: 0x00029348 File Offset: 0x00027548
|
||||
public override DuplicateAddressDetectionState DuplicateAddressDetectionState
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.DadState;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004FA RID: 1274
|
||||
// (get) Token: 0x06000EC0 RID: 3776 RVA: 0x00029358 File Offset: 0x00027558
|
||||
public override IPAddress IPv4Mask
|
||||
{
|
||||
get
|
||||
{
|
||||
Win32_IP_ADAPTER_INFO adapterInfoByIndex = Win32NetworkInterface2.GetAdapterInfoByIndex(this.if_index);
|
||||
if (adapterInfoByIndex == null)
|
||||
{
|
||||
throw new Exception("huh? " + this.if_index);
|
||||
}
|
||||
if (this.Address == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string text = this.Address.ToString();
|
||||
Win32_IP_ADDR_STRING win32_IP_ADDR_STRING = adapterInfoByIndex.IpAddressList;
|
||||
while (!(win32_IP_ADDR_STRING.IpAddress == text))
|
||||
{
|
||||
if (win32_IP_ADDR_STRING.Next == IntPtr.Zero)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
win32_IP_ADDR_STRING = (Win32_IP_ADDR_STRING)Marshal.PtrToStructure(win32_IP_ADDR_STRING.Next, typeof(Win32_IP_ADDR_STRING));
|
||||
}
|
||||
return IPAddress.Parse(win32_IP_ADDR_STRING.IpMask);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004FB RID: 1275
|
||||
// (get) Token: 0x06000EC1 RID: 3777 RVA: 0x00029410 File Offset: 0x00027610
|
||||
public override PrefixOrigin PrefixOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.PrefixOrigin;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170004FC RID: 1276
|
||||
// (get) Token: 0x06000EC2 RID: 3778 RVA: 0x00029420 File Offset: 0x00027620
|
||||
public override SuffixOrigin SuffixOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.info.SuffixOrigin;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D21 RID: 3361
|
||||
private int if_index;
|
||||
|
||||
// Token: 0x04000D22 RID: 3362
|
||||
private Win32_IP_ADAPTER_UNICAST_ADDRESS info;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001C5 RID: 453
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class Win32_FIXED_INFO
|
||||
{
|
||||
// Token: 0x06000EDF RID: 3807
|
||||
[DllImport("iphlpapi.dll", SetLastError = true)]
|
||||
private static extern int GetNetworkParams(byte[] bytes, ref int size);
|
||||
|
||||
// Token: 0x1700050B RID: 1291
|
||||
// (get) Token: 0x06000EE0 RID: 3808 RVA: 0x000296C4 File Offset: 0x000278C4
|
||||
public static Win32_FIXED_INFO Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Win32_FIXED_INFO.fixed_info == null)
|
||||
{
|
||||
Win32_FIXED_INFO.fixed_info = Win32_FIXED_INFO.GetInstance();
|
||||
}
|
||||
return Win32_FIXED_INFO.fixed_info;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EE1 RID: 3809 RVA: 0x000296E0 File Offset: 0x000278E0
|
||||
private unsafe static Win32_FIXED_INFO GetInstance()
|
||||
{
|
||||
int num = 0;
|
||||
Win32_FIXED_INFO.GetNetworkParams(null, ref num);
|
||||
byte[] array = new byte[num];
|
||||
Win32_FIXED_INFO.GetNetworkParams(array, ref num);
|
||||
Win32_FIXED_INFO win32_FIXED_INFO = new Win32_FIXED_INFO();
|
||||
fixed (byte* ptr = (ref array != null && array.Length != 0 ? ref array[0] : ref *null))
|
||||
{
|
||||
Marshal.PtrToStructure((IntPtr)((void*)ptr), win32_FIXED_INFO);
|
||||
}
|
||||
return win32_FIXED_INFO;
|
||||
}
|
||||
|
||||
// Token: 0x04000D27 RID: 3367
|
||||
private const int MAX_HOSTNAME_LEN = 128;
|
||||
|
||||
// Token: 0x04000D28 RID: 3368
|
||||
private const int MAX_DOMAIN_NAME_LEN = 128;
|
||||
|
||||
// Token: 0x04000D29 RID: 3369
|
||||
private const int MAX_SCOPE_ID_LEN = 256;
|
||||
|
||||
// Token: 0x04000D2A RID: 3370
|
||||
private static Win32_FIXED_INFO fixed_info;
|
||||
|
||||
// Token: 0x04000D2B RID: 3371
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 132)]
|
||||
public string HostName;
|
||||
|
||||
// Token: 0x04000D2C RID: 3372
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 132)]
|
||||
public string DomainName;
|
||||
|
||||
// Token: 0x04000D2D RID: 3373
|
||||
public IntPtr CurrentDnsServer;
|
||||
|
||||
// Token: 0x04000D2E RID: 3374
|
||||
public Win32_IP_ADDR_STRING DnsServerList;
|
||||
|
||||
// Token: 0x04000D2F RID: 3375
|
||||
public NetBiosNodeType NodeType;
|
||||
|
||||
// Token: 0x04000D30 RID: 3376
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
|
||||
public string ScopeId;
|
||||
|
||||
// Token: 0x04000D31 RID: 3377
|
||||
public uint EnableRouting;
|
||||
|
||||
// Token: 0x04000D32 RID: 3378
|
||||
public uint EnableProxy;
|
||||
|
||||
// Token: 0x04000D33 RID: 3379
|
||||
public uint EnableDns;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001C7 RID: 455
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
internal class Win32_IP_ADAPTER_ADDRESSES
|
||||
{
|
||||
// Token: 0x1700050C RID: 1292
|
||||
// (get) Token: 0x06000EE3 RID: 3811 RVA: 0x00029748 File Offset: 0x00027948
|
||||
public bool DdnsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.Flags & 1U) != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700050D RID: 1293
|
||||
// (get) Token: 0x06000EE4 RID: 3812 RVA: 0x00029758 File Offset: 0x00027958
|
||||
public bool IsReceiveOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.Flags & 8U) != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700050E RID: 1294
|
||||
// (get) Token: 0x06000EE5 RID: 3813 RVA: 0x00029768 File Offset: 0x00027968
|
||||
public bool NoMulticast
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.Flags & 16U) != 0U;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000D37 RID: 3383
|
||||
private const int MAX_ADAPTER_ADDRESS_LENGTH = 8;
|
||||
|
||||
// Token: 0x04000D38 RID: 3384
|
||||
private const int IP_ADAPTER_DDNS_ENABLED = 1;
|
||||
|
||||
// Token: 0x04000D39 RID: 3385
|
||||
private const int IP_ADAPTER_RECEIVE_ONLY = 8;
|
||||
|
||||
// Token: 0x04000D3A RID: 3386
|
||||
private const int IP_ADAPTER_NO_MULTICAST = 16;
|
||||
|
||||
// Token: 0x04000D3B RID: 3387
|
||||
public AlignmentUnion Alignment;
|
||||
|
||||
// Token: 0x04000D3C RID: 3388
|
||||
public IntPtr Next;
|
||||
|
||||
// Token: 0x04000D3D RID: 3389
|
||||
[MarshalAs(UnmanagedType.LPStr)]
|
||||
public string AdapterName;
|
||||
|
||||
// Token: 0x04000D3E RID: 3390
|
||||
public IntPtr FirstUnicastAddress;
|
||||
|
||||
// Token: 0x04000D3F RID: 3391
|
||||
public IntPtr FirstAnycastAddress;
|
||||
|
||||
// Token: 0x04000D40 RID: 3392
|
||||
public IntPtr FirstMulticastAddress;
|
||||
|
||||
// Token: 0x04000D41 RID: 3393
|
||||
public IntPtr FirstDnsServerAddress;
|
||||
|
||||
// Token: 0x04000D42 RID: 3394
|
||||
public string DnsSuffix;
|
||||
|
||||
// Token: 0x04000D43 RID: 3395
|
||||
public string Description;
|
||||
|
||||
// Token: 0x04000D44 RID: 3396
|
||||
public string FriendlyName;
|
||||
|
||||
// Token: 0x04000D45 RID: 3397
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public byte[] PhysicalAddress;
|
||||
|
||||
// Token: 0x04000D46 RID: 3398
|
||||
public uint PhysicalAddressLength;
|
||||
|
||||
// Token: 0x04000D47 RID: 3399
|
||||
public uint Flags;
|
||||
|
||||
// Token: 0x04000D48 RID: 3400
|
||||
public uint Mtu;
|
||||
|
||||
// Token: 0x04000D49 RID: 3401
|
||||
public NetworkInterfaceType IfType;
|
||||
|
||||
// Token: 0x04000D4A RID: 3402
|
||||
public OperationalStatus OperStatus;
|
||||
|
||||
// Token: 0x04000D4B RID: 3403
|
||||
public int Ipv6IfIndex;
|
||||
|
||||
// Token: 0x04000D4C RID: 3404
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
|
||||
public uint[] ZoneIndices;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001CC RID: 460
|
||||
internal struct Win32_IP_ADAPTER_ANYCAST_ADDRESS
|
||||
{
|
||||
// Token: 0x04000D85 RID: 3461
|
||||
public Win32LengthFlagsUnion LengthFlags;
|
||||
|
||||
// Token: 0x04000D86 RID: 3462
|
||||
public IntPtr Next;
|
||||
|
||||
// Token: 0x04000D87 RID: 3463
|
||||
public Win32_SOCKET_ADDRESS Address;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001CD RID: 461
|
||||
internal struct Win32_IP_ADAPTER_DNS_SERVER_ADDRESS
|
||||
{
|
||||
// Token: 0x04000D88 RID: 3464
|
||||
public Win32LengthFlagsUnion LengthFlags;
|
||||
|
||||
// Token: 0x04000D89 RID: 3465
|
||||
public IntPtr Next;
|
||||
|
||||
// Token: 0x04000D8A RID: 3466
|
||||
public Win32_SOCKET_ADDRESS Address;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001C8 RID: 456
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal class Win32_IP_ADAPTER_INFO
|
||||
{
|
||||
// Token: 0x04000D4D RID: 3405
|
||||
private const int MAX_ADAPTER_NAME_LENGTH = 256;
|
||||
|
||||
// Token: 0x04000D4E RID: 3406
|
||||
private const int MAX_ADAPTER_DESCRIPTION_LENGTH = 128;
|
||||
|
||||
// Token: 0x04000D4F RID: 3407
|
||||
private const int MAX_ADAPTER_ADDRESS_LENGTH = 8;
|
||||
|
||||
// Token: 0x04000D50 RID: 3408
|
||||
public IntPtr Next;
|
||||
|
||||
// Token: 0x04000D51 RID: 3409
|
||||
public int ComboIndex;
|
||||
|
||||
// Token: 0x04000D52 RID: 3410
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
|
||||
public string AdapterName;
|
||||
|
||||
// Token: 0x04000D53 RID: 3411
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 132)]
|
||||
public string Description;
|
||||
|
||||
// Token: 0x04000D54 RID: 3412
|
||||
public uint AddressLength;
|
||||
|
||||
// Token: 0x04000D55 RID: 3413
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public byte[] Address;
|
||||
|
||||
// Token: 0x04000D56 RID: 3414
|
||||
public uint Index;
|
||||
|
||||
// Token: 0x04000D57 RID: 3415
|
||||
public uint Type;
|
||||
|
||||
// Token: 0x04000D58 RID: 3416
|
||||
public uint DhcpEnabled;
|
||||
|
||||
// Token: 0x04000D59 RID: 3417
|
||||
public IntPtr CurrentIpAddress;
|
||||
|
||||
// Token: 0x04000D5A RID: 3418
|
||||
public Win32_IP_ADDR_STRING IpAddressList;
|
||||
|
||||
// Token: 0x04000D5B RID: 3419
|
||||
public Win32_IP_ADDR_STRING GatewayList;
|
||||
|
||||
// Token: 0x04000D5C RID: 3420
|
||||
public Win32_IP_ADDR_STRING DhcpServer;
|
||||
|
||||
// Token: 0x04000D5D RID: 3421
|
||||
public bool HaveWins;
|
||||
|
||||
// Token: 0x04000D5E RID: 3422
|
||||
public Win32_IP_ADDR_STRING PrimaryWinsServer;
|
||||
|
||||
// Token: 0x04000D5F RID: 3423
|
||||
public Win32_IP_ADDR_STRING SecondaryWinsServer;
|
||||
|
||||
// Token: 0x04000D60 RID: 3424
|
||||
public long LeaseObtained;
|
||||
|
||||
// Token: 0x04000D61 RID: 3425
|
||||
public long LeaseExpires;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x020001CE RID: 462
|
||||
internal struct Win32_IP_ADAPTER_MULTICAST_ADDRESS
|
||||
{
|
||||
// Token: 0x04000D8B RID: 3467
|
||||
public Win32LengthFlagsUnion LengthFlags;
|
||||
|
||||
// Token: 0x04000D8C RID: 3468
|
||||
public IntPtr Next;
|
||||
|
||||
// Token: 0x04000D8D RID: 3469
|
||||
public Win32_SOCKET_ADDRESS Address;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user