共用方式為


IcmpV6Statistics.RouterSolicitsSent 屬性

定義

取得已傳送的網際網路控制訊息通訊協定第 6 版 (ICMPv6)「路由器請求」訊息數目。

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

屬性值

Int64 值,指定已傳送的「路由器請求」訊息總數。

範例

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

void ShowIcmpV6RouterData()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IcmpV6Statistics ^ statistics = properties->GetIcmpV6Statistics();
   Console::WriteLine( "  Advertisements ....................... Sent: {0,-10}   Received: {1,-10}", 
      statistics->RouterAdvertisementsSent, 
      statistics->RouterAdvertisementsReceived );
   Console::WriteLine( "  Solicits ............................. Sent: {0,-10}   Received: {1,-10}", 
      statistics->RouterSolicitsSent, 
      statistics->RouterSolicitsReceived );
}
public static void ShowIcmpV6RouterData ()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IcmpV6Statistics statistics = properties.GetIcmpV6Statistics();

    Console.WriteLine ("  Advertisements ....................... Sent: {0,-10}   Received: {1,-10}",
        statistics.RouterAdvertisementsSent, statistics.RouterAdvertisementsReceived);
    Console.WriteLine ("  Solicits ............................. Sent: {0,-10}   Received: {1,-10}",
        statistics.RouterSolicitsSent, statistics.RouterSolicitsReceived);
}
Public Shared Sub ShowIcmpV6RouterData() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim statistics As IcmpV6Statistics = properties.GetIcmpV6Statistics()
    
    Console.WriteLine("  Advertisements ....................... Sent: {0,-10}   Received: {1,-10}", statistics.RouterAdvertisementsSent, statistics.RouterAdvertisementsReceived)
    Console.WriteLine("  Solicits ............................. Sent: {0,-10}   Received: {1,-10}", statistics.RouterSolicitsSent, statistics.RouterSolicitsReceived)

End Sub

備註

主計算機必須先探索該子網上至少一個路由器的位址,才能將IP數據報傳送到其直接連接的子網之外。 此探索可以使用稱為路由器公告和路由器要求的ICMP訊息來完成。 公告訊息會定期由路由器傳送,以宣告其存在及其介面的位址。 當計算機連線到網路,而不是等候接收路由器公告時,它可以傳送路由器要求路由器立即傳送廣告。

適用於