IPGlobalStatistics.ReceivedPacketsWithAddressErrors Proprietà

Definizione

Ottiene il numero di pacchetti IP (Internet Protocol) ricevuti che contengono errori di indirizzo.Gets the number of Internet Protocol (IP) packets with address errors that were received.

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

Valore della proprietà

Int64

Valore Int64 che specifica il numero totale di pacchetti IP ricevuti che contengono errori nella parte dell'intestazione relativa all'indirizzo.An Int64 value that specifies the total number of IP packets received with errors in the address portion of the header.

Esempio

Nell'esempio di codice seguente vengono visualizzate le statistiche per i pacchetti IP ricevuti con errori.The following code example displays statistics for received IP packets with errors.

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

Commenti

Il valore restituito da questa proprietà include i pacchetti scartati per i problemi relativi all'indirizzo nei campi di intestazione, ad esempio indirizzi non validi.The value returned by this property includes packets discarded for address related issues in the header fields, such as invalid addresses. Se l'invio di pacchetti non è abilitato, il valore restituito da questa proprietà include i pacchetti eliminati perché l'indirizzo di destinazione non è un indirizzo locale.If packet forwarding is not enabled, the value returned by this property includes packets that were discarded because the destination address was not a local address.

Si applica a