語言

IcmpV4Statistics.RedirectsSent 屬性

定義

取得已發送的網際網路控制訊息協定(ICMPv4)重定向訊息數量。

public:
 abstract property long RedirectsSent { long get(); };
public abstract long RedirectsSent { get; }
member this.RedirectsSent : int64
Public MustOverride ReadOnly Property RedirectsSent 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

備註

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

適用於