次の方法で共有


IcmpV4Statistics.EchoRequestsSent プロパティ

定義

送信したインターネット コントロール メッセージ プロトコル Version 4 (ICMPv4) エコー要求メッセージの数を取得します。

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

プロパティ値

送信した ICMP エコー要求メッセージの合計数を示す Int64 値。

次の例では、このプロパティの値を表示します。

void ShowIcmpV4EchoData()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IcmpV4Statistics ^ statistics = properties->GetIcmpV4Statistics();
   Console::WriteLine( "  Echo Requests ....................... Sent: {0,-10}   Received: {1,-10}", 
      statistics->EchoRequestsSent, 
      statistics->EchoRequestsReceived );
   Console::WriteLine( "  Echo Replies ........................ Sent: {0,-10}   Received: {1,-10}", 
      statistics->EchoRepliesSent, 
      statistics->EchoRepliesReceived );
}
public static void ShowIcmpV4EchoData()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IcmpV4Statistics statistics = properties.GetIcmpV4Statistics();
    Console.WriteLine("  Echo Requests ....................... Sent: {0,-10}   Received: {1,-10}",
        statistics.EchoRequestsSent, statistics.EchoRequestsReceived);
    Console.WriteLine("  Echo Replies ........................ Sent: {0,-10}   Received: {1,-10}",
        statistics.EchoRepliesSent, statistics.EchoRepliesReceived);
}
Public Shared Sub ShowIcmpV4EchoData() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim statistics As IcmpV4Statistics = properties.GetIcmpV4Statistics()
    Console.WriteLine("  Echo Requests ....................... Sent: {0,-10}   Received: {1,-10}", statistics.EchoRequestsSent, statistics.EchoRequestsReceived)
    Console.WriteLine("  Echo Replies ........................ Sent: {0,-10}   Received: {1,-10}", statistics.EchoRepliesSent, statistics.EchoRepliesReceived)

End Sub

注釈

エコー要求メッセージとエコー応答メッセージを使用すると、コンピューターはネットワーク上のリモート コンピューターから ICMP 応答を要求できます。 この機能は、リモート アドレスの有効性を判断するためによく使用されます。

適用対象