IcmpV6Statistics.NeighborAdvertisementsSent IcmpV6Statistics.NeighborAdvertisementsSent IcmpV6Statistics.NeighborAdvertisementsSent IcmpV6Statistics.NeighborAdvertisementsSent Property

定義

取得已傳送的網際網路控制訊息通訊協定第 6 版 (ICMPv6)「近鄰通告」訊息數目。Gets the number of Internet Control Message Protocol version 6 (ICMPv6) Neighbor Advertisement messages sent.

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

屬性值

Int64 值,指定已傳送的「近鄰通告」訊息總數。An Int64 value that specifies the total number of Neighbor Advertisement messages sent.

範例

下列範例會顯示這個屬性的值。The following example displays the value of this property.

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

備註

「鄰近探索」是一種程式, 可讓主機電腦和路由器判斷位於共用連結上之鄰近位置的位址。Neighbor Discovery is a process whereby host computers and routers can determine the addresses for neighbors known to reside on shared links. 此探索程式的一部分是使用名為「鄰近請求」和「鄰近通告」的 ICMP 訊息來完成。Part of this discovery process is accomplished using ICMP messages called Neighbor Solicitations and Neighbor Advertisements. 系統會傳送「鄰居請求」訊息, 以探索鄰近的連結層位址, 或透過快取的連結層位址來確認是否仍可連線到鄰近。Neighbor Solicitation messages are sent to discover the link-layer address of a neighbor or to verify that a neighbor is still reachable via a cached link-layer address. 包含位址資訊的鄰居公告會傳送以回應請求或宣告位址變更。A Neighbor Advertisement that contains address information is sent in response to a solicitation or to announce an address change.

適用於