Bagikan melalui


IPGlobalStatistics.ReceivedPacketsWithAddressErrors Properti

Definisi

Mendapatkan jumlah paket Protokol Internet (IP) dengan kesalahan alamat yang diterima.

public:
 abstract property long ReceivedPacketsWithAddressErrors { long get(); };
public abstract long ReceivedPacketsWithAddressErrors { get; }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract long ReceivedPacketsWithAddressErrors { get; }
member this.ReceivedPacketsWithAddressErrors : int64
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.ReceivedPacketsWithAddressErrors : int64
Public MustOverride ReadOnly Property ReceivedPacketsWithAddressErrors As Long

Nilai Properti

Nilai Int64 yang menentukan jumlah total paket IP yang diterima dengan kesalahan di bagian alamat 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 mengatasi masalah terkait di bidang header, seperti alamat yang tidak valid. Jika penerusan paket tidak diaktifkan, nilai yang dikembalikan oleh properti ini mencakup paket yang dibuang karena alamat tujuan bukan alamat lokal.

Berlaku untuk