共用方式為


IcmpV6Statistics.RedirectsReceived 屬性

定義

取得已收到的網際網路控制訊息通訊協定第 6 版 (ICMPv6)「重新導向」訊息數目。

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「重新導向」訊息總數。

範例

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

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

End Sub

備註

路由器會傳送重新導向訊息,以通知主計算機目的地位址的更佳路由。

適用於