다음을 통해 공유


IPGlobalStatistics.ReceivedPacketsWithHeadersErrors 속성

정의

받은 IP(인터넷 프로토콜) 패킷 중 헤더 오류가 발생한 패킷의 수를 가져옵니다.

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

속성 값

받은 IP 패킷 중 헤더에서 오류가 발생하여 삭제된 패킷의 총 수를 나타내는 Int64 값입니다.

특성

예제

다음 코드 예제에서는 오류가 있는 수신된 IP 패킷에 대한 통계를 표시합니다.

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

설명

이 속성에서 반환되는 값에는 잘못된 체크섬, 초과된 시간-투-라이브 값 및 잘못된 IP 옵션과 같은 헤더 필드의 주소가 아닌 관련 문제에 대해 삭제된 패킷이 포함됩니다.

적용 대상