IcmpV6Statistics.RouterAdvertisementsReceived Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan jumlah pesan Internet Control Message Protocol versi 6 (ICMPv6) Router Advertisement yang diterima.
public:
abstract property long RouterAdvertisementsReceived { long get(); };
public abstract long RouterAdvertisementsReceived { get; }
member this.RouterAdvertisementsReceived : int64
Public MustOverride ReadOnly Property RouterAdvertisementsReceived As Long
Nilai Properti
Nilai Int64 yang menentukan jumlah total pesan Iklan Router yang diterima.
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.