IcmpV4Statistics.DestinationUnreachableMessagesSent 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得由於封包有無法到達的目的位址而傳送的網際網路控制訊息通訊協定第 4 版 (ICMPv4) 訊息數目。
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 ShowIcmpV4UnreachableData()
{
IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
IcmpV4Statistics ^ statistics = properties->GetIcmpV4Statistics();
Console::WriteLine( " Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}",
statistics->DestinationUnreachableMessagesSent,
statistics->DestinationUnreachableMessagesReceived );
}
public static void ShowIcmpV4UnreachableData()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
IcmpV4Statistics statistics = properties.GetIcmpV4Statistics();
Console.WriteLine(" Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}",
statistics.DestinationUnreachableMessagesSent,
statistics.DestinationUnreachableMessagesReceived);
}
Public Shared Sub ShowIcmpV4UnreachableData()
Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
Dim statistics As IcmpV4Statistics = properties.GetIcmpV4Statistics()
Console.WriteLine(" Destination Unreachables ............ Sent: {0,-10} Received: {1,-10}", statistics.DestinationUnreachableMessagesSent, statistics.DestinationUnreachableMessagesReceived)
End Sub
備註
目的地無法連線的訊息可以傳送至屬於封包來源的計算機,原因如下:
計算機找不到目的地位址的路由。
系統禁止與目的地地址通訊。 例如,防火牆可防止將封包傳遞至目的地。
無法連線到目的地位址。
無法連線到目的地埠。 例如,封包的通訊協議沒有可用的接聽程式。