Bagikan melalui


IcmpV6Statistics.RouterSolicitsSent Properti

Definisi

Mendapatkan jumlah pesan Ajakan Router Internet Control Message Protocol versi 6 (ICMPv6) yang dikirim.

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

Nilai Properti

Nilai Int64 yang menentukan jumlah total pesan Ajakan Router yang dikirim.

Contoh

Contoh berikut menampilkan nilai properti ini.

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

Keterangan

Sebelum komputer host dapat mengirim datagram IP di luar subnet yang terpasang langsung, komputer host harus menemukan alamat setidaknya satu router pada subnet tersebut. Penemuan ini dapat dicapai menggunakan pesan ICMP yang disebut Router Advertisements dan Router Solicitations. Pesan Iklan dikirim oleh router secara berkala untuk mengumumkan kehadirannya dan alamat antarmukanya. Ketika komputer terhubung ke jaringan, daripada menunggu untuk menerima Iklan Router, komputer dapat mengirim Router Solicitations untuk meminta router mengirim iklan mereka segera.

Berlaku untuk