scripts
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Sockets
|
||||
{
|
||||
/// <summary>Presents the packet information from a call to <see cref="M:System.Net.Sockets.Socket.ReceiveMessageFrom(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@)" /> or <see cref="M:System.Net.Sockets.Socket.EndReceiveMessageFrom(System.IAsyncResult,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@)" />.</summary>
|
||||
// Token: 0x020001DA RID: 474
|
||||
public struct IPPacketInformation
|
||||
{
|
||||
// Token: 0x06000F53 RID: 3923 RVA: 0x0002A268 File Offset: 0x00028468
|
||||
internal IPPacketInformation(IPAddress address, int iface)
|
||||
{
|
||||
this.address = address;
|
||||
this.iface = iface;
|
||||
}
|
||||
|
||||
/// <summary>Gets the origin information of the packet that was received as a result of calling the <see cref="M:System.Net.Sockets.Socket.ReceiveMessageFrom(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@)" /> method or <see cref="M:System.Net.Sockets.Socket.EndReceiveMessageFrom(System.IAsyncResult,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@)" /> method.</summary>
|
||||
/// <returns>An <see cref="T:System.Net.IPAddress" /> that indicates the origin information of the packet that was received as a result of calling the <see cref="M:System.Net.Sockets.Socket.ReceiveMessageFrom(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@)" /> method or <see cref="M:System.Net.Sockets.Socket.EndReceiveMessageFrom(System.IAsyncResult,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@)" /> method. For packets that were sent from a unicast address, the <see cref="P:System.Net.Sockets.IPPacketInformation.Address" /> property will return the <see cref="T:System.Net.IPAddress" /> of the sender; for multicast or broadcast packets, the <see cref="P:System.Net.Sockets.IPPacketInformation.Address" /> property will return the multicast or broadcast <see cref="T:System.Net.IPAddress" />.</returns>
|
||||
// Token: 0x1700053E RID: 1342
|
||||
// (get) Token: 0x06000F54 RID: 3924 RVA: 0x0002A278 File Offset: 0x00028478
|
||||
public IPAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.address;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the network interface information that is associated with a call to <see cref="M:System.Net.Sockets.Socket.ReceiveMessageFrom(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@)" /> or <see cref="M:System.Net.Sockets.Socket.EndReceiveMessageFrom(System.IAsyncResult,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@)" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value, which represents the index of the network interface. You can use this index with <see cref="M:System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces" /> to get more information about the relevant interface.</returns>
|
||||
// Token: 0x1700053F RID: 1343
|
||||
// (get) Token: 0x06000F55 RID: 3925 RVA: 0x0002A280 File Offset: 0x00028480
|
||||
public int Interface
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.iface;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a value that indicates whether this instance is equal to a specified object.</summary>
|
||||
/// <returns>true if <paramref name="comparand" /> is an instance of <see cref="T:System.Net.Sockets.IPPacketInformation" /> and equals the value of the instance; otherwise, false.</returns>
|
||||
/// <param name="comparand">The object to compare with this instance.</param>
|
||||
// Token: 0x06000F56 RID: 3926 RVA: 0x0002A288 File Offset: 0x00028488
|
||||
public override bool Equals(object comparand)
|
||||
{
|
||||
if (!(comparand is IPPacketInformation))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
IPPacketInformation ippacketInformation = (IPPacketInformation)comparand;
|
||||
return ippacketInformation.iface == this.iface && ippacketInformation.address.Equals(this.address);
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this instance.</summary>
|
||||
/// <returns>An Int32 hash code.</returns>
|
||||
// Token: 0x06000F57 RID: 3927 RVA: 0x0002A2D0 File Offset: 0x000284D0
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.address.GetHashCode() + this.iface;
|
||||
}
|
||||
|
||||
/// <summary>Tests whether two specified <see cref="T:System.Net.Sockets.IPPacketInformation" /> instances are equivalent.</summary>
|
||||
/// <returns>true if <paramref name="packetInformation1" /> and <paramref name="packetInformation2" /> are equal; otherwise, false.</returns>
|
||||
/// <param name="packetInformation1">The <see cref="T:System.Net.Sockets.IPPacketInformation" /> instance that is to the left of the equality operator.</param>
|
||||
/// <param name="packetInformation2">The <see cref="T:System.Net.Sockets.IPPacketInformation" /> instance that is to the right of the equality operator.</param>
|
||||
// Token: 0x06000F58 RID: 3928 RVA: 0x0002A2E4 File Offset: 0x000284E4
|
||||
public static bool operator ==(IPPacketInformation p1, IPPacketInformation p2)
|
||||
{
|
||||
return p1.Equals(p2);
|
||||
}
|
||||
|
||||
/// <summary>Tests whether two specified <see cref="T:System.Net.Sockets.IPPacketInformation" /> instances are not equal.</summary>
|
||||
/// <returns>true if <paramref name="packetInformation1" /> and <paramref name="packetInformation2" /> are unequal; otherwise, false.</returns>
|
||||
/// <param name="packetInformation1">The <see cref="T:System.Net.Sockets.IPPacketInformation" /> instance that is to the left of the inequality operator.</param>
|
||||
/// <param name="packetInformation2">The <see cref="T:System.Net.Sockets.IPPacketInformation" /> instance that is to the right of the inequality operator.</param>
|
||||
// Token: 0x06000F59 RID: 3929 RVA: 0x0002A2F4 File Offset: 0x000284F4
|
||||
public static bool operator !=(IPPacketInformation p1, IPPacketInformation p2)
|
||||
{
|
||||
return !p1.Equals(p2);
|
||||
}
|
||||
|
||||
// Token: 0x04000DF4 RID: 3572
|
||||
private IPAddress address;
|
||||
|
||||
// Token: 0x04000DF5 RID: 3573
|
||||
private int iface;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user