Share via


IcmpV6Statistics.DestinationUnreachableMessagesSent 屬性

定義

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

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

屬性值

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

範例

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

void ShowIcmpV6UnreachableData()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IcmpV6Statistics ^ statistics = properties->GetIcmpV6Statistics();
   Console::WriteLine( "  Destination Unreachables ............ Sent: {0,-10}   Received: {1,-10}", 
      statistics->DestinationUnreachableMessagesSent, 
      statistics->DestinationUnreachableMessagesReceived );
}
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);
}
Public Shared Sub ShowIcmpV6UnreachableData() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim statistics As IcmpV6Statistics = properties.GetIcmpV6Statistics()
    Console.WriteLine("  Destination Unreachables ............ Sent: {0,-10}   Received: {1,-10}", statistics.DestinationUnreachableMessagesSent, statistics.DestinationUnreachableMessagesReceived)

End Sub

備註

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

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

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

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

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

適用於