IcmpV6Statistics.DestinationUnreachableMessagesSent 屬性

定義

取得由於封包有無法到達的目的位址而傳送的網際網路控制訊息通訊協定第 6 版 (ICMPv6) 訊息數目。

C#
public abstract long DestinationUnreachableMessagesSent { get; }

屬性值

Int64 值,指定已傳送的「無法到達目的地」訊息總數。

範例

下列範例會顯示這個屬性的值。

C#
public static void ShowIcmpV6UnreachableData ()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IcmpV6Statistics statistics = properties.GetIcmpV6Statistics();
    Console.WriteLine ("  Destination Unreachables ............ Sent: {0,-10}   Received: {1,-10}",
        statistics.DestinationUnreachableMessagesSent, statistics.DestinationUnreachableMessagesReceived);
}

備註

目的地無法連線的訊息可以傳送至屬於封包來源的計算機,原因如下:

  • 計算機找不到目的地位址的路由。

  • 系統禁止與目的地地址通訊。 例如,防火牆會防止將封包傳遞至目的地。

  • 無法連線到目的地位址。

  • 無法連線到目的地埠。 例如,封包的通訊協議沒有可用的接聽程式。

適用於

產品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1