共用方式為


IPGlobalStatistics.PacketFragmentFailures 屬性

定義

取得無法分散的網際網路通訊協定 (IP) 封包數目。

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

屬性值

Int64 值,指定需要分散但具有 "Don't Fragment" 位元組的封包總數。

屬性

範例

下列程式代碼範例會顯示IP封包的重新組譯統計數據。

void ShowFragmentationStatistics()
{
   IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
   IPGlobalStatistics ^ ipstat = properties->GetIPv4GlobalStatistics();
   Console::WriteLine( "  Reassembly Data:" );
   Console::WriteLine( "      Reassembly Timeout .................. : {0}", 
      ipstat->PacketReassemblyTimeout );
   Console::WriteLine( "      Reassemblies Required ............... : {0}", 
      ipstat->PacketReassembliesRequired );
   Console::WriteLine( "      Packets Reassembled ................. : {0}", 
      ipstat->PacketsReassembled );
   Console::WriteLine( "      Packets Fragmented .................. : {0}", 
      ipstat->PacketsFragmented );
   Console::WriteLine( "      Fragment Failures ................... : {0}", 
      ipstat->PacketFragmentFailures );
}
public static void ShowFragmentationStatistics()
{
    IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
    IPGlobalStatistics ipstat = properties.GetIPv4GlobalStatistics();
    Console.WriteLine("  Reassembly Data:");
    Console.WriteLine("      Reassembly Timeout .................. : {0}",
        ipstat.PacketReassemblyTimeout);
    Console.WriteLine("      Reassemblies Required ............... : {0}",
        ipstat.PacketReassembliesRequired);
    Console.WriteLine("      Packets Reassembled ................. : {0}",
        ipstat.PacketsReassembled);
    Console.WriteLine("      Packets Fragmented .................. : {0}",
        ipstat.PacketsFragmented);
    Console.WriteLine("      Fragment Failures ................... : {0}",
        ipstat.PacketFragmentFailures);
}
Public Shared Sub ShowFragmentationStatistics() 
    Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim ipstat As IPGlobalStatistics = properties.GetIPv4GlobalStatistics()
    Console.WriteLine("  Reassembly Data:")
    Console.WriteLine("      Reassembly Timeout .................. : {0}", ipstat.PacketReassemblyTimeout)
    Console.WriteLine("      Reassemblies Required ............... : {0}", ipstat.PacketReassembliesRequired)
    Console.WriteLine("      Packets Reassembled ................. : {0}", ipstat.PacketsReassembled)
    Console.WriteLine("      Packets Fragmented .................. : {0}", ipstat.PacketsFragmented)
    Console.WriteLine("      Fragment Failures ................... : {0}", ipstat.PacketFragmentFailures)

End Sub

備註

超過IP傳輸大小上限的封包會分成片段,並在目的地重新組譯。 這個屬性所傳回的值表示需要針對IP傳輸進行片段化的封包數目,但不能是 ,因為指定的封包標頭未分散封包。

適用於