IcmpV6Statistics.NeighborSolicitsSent 属性

定义

获取发送的 Internet 控制消息协议版本 6 (ICMPv6) 邻居请求消息数。

public:
 abstract property long NeighborSolicitsSent { long get(); };
public abstract long NeighborSolicitsSent { get; }
member this.NeighborSolicitsSent : int64
Public MustOverride ReadOnly Property NeighborSolicitsSent As Long

属性值

Int64 值,指定发送的邻居请求消息的总数。

示例

以下示例显示此属性的值。

void ShowIcmpV6NeighborData()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IcmpV6Statistics ^ statistics = properties->GetIcmpV6Statistics();
   Console::WriteLine( "  Advertisements ...................... Sent: {0,-10}   Received: {1,-10}", 
      statistics->NeighborAdvertisementsSent, statistics->NeighborAdvertisementsReceived );
   Console::WriteLine( "  Solicits ............................ Sent: {0,-10}   Received: {1,-10}", 
      statistics->NeighborSolicitsSent, statistics->NeighborSolicitsReceived );
}
public static void ShowIcmpV6NeighborData ()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IcmpV6Statistics statistics = properties.GetIcmpV6Statistics();
    Console.WriteLine ("  Advertisements ...................... Sent: {0,-10}   Received: {1,-10}",
        statistics.NeighborAdvertisementsSent,statistics.NeighborAdvertisementsReceived);
    Console.WriteLine ("  Solicits ............................ Sent: {0,-10}   Received: {1,-10}",
    statistics.NeighborSolicitsSent, statistics.NeighborSolicitsReceived);
}
Public Shared Sub ShowIcmpV6NeighborData() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim statistics As IcmpV6Statistics = properties.GetIcmpV6Statistics()
    Console.WriteLine("  Advertisements ...................... Sent: {0,-10}   Received: {1,-10}", statistics.NeighborAdvertisementsSent, statistics.NeighborAdvertisementsReceived)
    Console.WriteLine("  Solicits ............................ Sent: {0,-10}   Received: {1,-10}", statistics.NeighborSolicitsSent, statistics.NeighborSolicitsReceived)

End Sub

注解

邻居发现是一个进程,主机计算机和路由器可以确定已知驻留在共享链接上的邻居的地址。 此发现过程的一部分是使用名为“邻居请求”和“邻居广告”的 ICMP 消息完成的。 发送邻居请求消息以发现邻居的链接层地址,或验证仍可通过缓存的链接层地址访问邻居。 发送包含地址信息的邻居播发,以响应请求或宣布地址更改。

适用于