IPGlobalStatistics.ReceivedPacketsWithHeadersErrors 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 paket Protokol Internet (IP) dengan kesalahan header yang diterima.
public:
abstract property long ReceivedPacketsWithHeadersErrors { long get(); };
public abstract long ReceivedPacketsWithHeadersErrors { get; }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract long ReceivedPacketsWithHeadersErrors { get; }
member this.ReceivedPacketsWithHeadersErrors : int64
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.ReceivedPacketsWithHeadersErrors : int64
Public MustOverride ReadOnly Property ReceivedPacketsWithHeadersErrors As Long
Nilai Properti
Nilai Int64 yang menentukan jumlah total paket IP yang diterima dan dibuang karena kesalahan di header.
- Atribut
Contoh
Contoh kode berikut menampilkan statistik untuk paket IP yang diterima dengan kesalahan.
void ShowInboundIPErrors()
{
IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
IPGlobalStatistics ^ ipstat = properties->GetIPv4GlobalStatistics();
Console::WriteLine( " Inbound Packet Errors:" );
Console::WriteLine( " Header Errors ....................... : {0}",
ipstat->ReceivedPacketsWithHeadersErrors );
Console::WriteLine( " Address Errors ...................... : {0}",
ipstat->ReceivedPacketsWithAddressErrors );
Console::WriteLine( " Unknown Protocol Errors ............. : {0}",
ipstat->ReceivedPacketsWithUnknownProtocol );
}
public static void ShowInboundIPErrors()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
IPGlobalStatistics ipstat = properties.GetIPv4GlobalStatistics();
Console.WriteLine(" Inbound Packet Errors:");
Console.WriteLine(" Header Errors ....................... : {0}",
ipstat.ReceivedPacketsWithHeadersErrors);
Console.WriteLine(" Address Errors ...................... : {0}",
ipstat.ReceivedPacketsWithAddressErrors);
Console.WriteLine(" Unknown Protocol Errors ............. : {0}",
ipstat.ReceivedPacketsWithUnknownProtocol);
}
Public Shared Sub ShowInboundIPErrors()
Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
Dim ipstat As IPGlobalStatistics = properties.GetIPv4GlobalStatistics()
Console.WriteLine(" Inbound Packet Errors:")
Console.WriteLine(" Header Errors ....................... : {0}", ipstat.ReceivedPacketsWithHeadersErrors)
Console.WriteLine(" Address Errors ...................... : {0}", ipstat.ReceivedPacketsWithAddressErrors)
Console.WriteLine(" Unknown Protocol Errors ............. : {0}", ipstat.ReceivedPacketsWithUnknownProtocol)
End Sub
Keterangan
Nilai yang dikembalikan oleh properti ini mencakup paket yang dibuang untuk masalah terkait non-alamat di bidang header, seperti checksum buruk, nilai time-to-live terlampaui, dan opsi IP yang salah.