語言

IcmpV4Statistics.RedirectsReceived 屬性

定義

取得已接收的網際網路控制訊息協定第4版(ICMPv4)重定向訊息數量。

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

屬性值

一個 Int64 指定總接收到 ICMP 重定向訊息數量的值。

範例

以下範例展示了此性質的價值。

public static void ShowRedirectsData()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IcmpV4Statistics statistics = properties.GetIcmpV4Statistics();
    Console.WriteLine("  Redirects ........................... Sent: {0,-10}   Received: {1,-10}",
        statistics.RedirectsSent, statistics.RedirectsReceived);
}
Public Shared Sub ShowRedirectsData() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim statistics As IcmpV4Statistics = properties.GetIcmpV4Statistics()
    Console.WriteLine("  Redirects ........................... Sent: {0,-10}   Received: {1,-10}", statistics.RedirectsSent, statistics.RedirectsReceived)

End Sub

備註

路由路由器發送重定向訊息,以通知主機電腦目的地地址的更佳路由。

適用於