/// <item><term>Eof</term><description>EOF was reached reading from an offline capture. In this case the packet out parameter will be null.</description></item>
/// <item><term>Eof</term><description>EOF was reached reading from an offline capture. In this case the packet out parameter will be null.</description></item>
/// </list>
/// </list>
/// </returns>
/// </returns>
/// <exception cref="System::InvalidOperationException">Thrown if an error occurred.</exception>
/// <exception cref="System::InvalidOperationException">Thrown if the mode is not Capture or an error occurred.</exception>
/// Specifies the maximum number of packets to process before returning.
/// This is not a minimum number; when reading a live capture, only one bufferful of packets is read at a time, so fewer than maxPackets packets may be processed.
/// </para>
/// <para>A maxPackets of -1 processes all the packets received in one buffer when reading a live capture, or all the packets in the file when reading an offline capture.</para>
/// </param>
/// <param name="callback">Specifies a routine to be called with one argument: the packet received.</param>
/// <param name="countGot">
/// <para>The number of packets read is returned.</para>
/// <para>0 is returned if no packets were read from a live capture (if, for example, they were discarded because they didn't pass the packet filter, or if, on platforms that support a read timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the communicator is in non-blocking mode and no packets were available to be read) or if no more packets are available in an offline capture.</para>
/// </param>
/// <returns>
/// <list type="table">
/// <listheader>
/// <term>Return value</term>
/// <description>description</description>
/// </listheader>
/// <item><term>Ok</term><description>countGot packets has been read without problems. This includes the case where a read timeout occurred and the case the communicator is in non-blocking mode and no packets were available</description></item>
/// <item><term>Eof</term><description>EOF was reached reading from an offline capture.</description></item>
/// <item><term>BreakLoop</term><description>Indicates that the loop terminated due to a call to Break() before any packets were processed.</description></item>
/// </list>
/// </returns>
/// <exception cref="System::InvalidOperationException">Thrown if the mode is not Capture or an error occurred.</exception>
/// <remarks>
/// <para>Only the first bytes of data from the packet might be in the received packet (which won't necessarily be the entire packet; to capture the entire packet, you will have to provide a value for snapshortLength in your call to PacketDevice.Open() that is sufficiently large to get all of the packet's data - a value of 65535 should be sufficient on most if not all networks).</para>
/// <para>When reading a live capture, ReceiveSomePackets() will not necessarily return when the read times out; on some platforms, the read timeout isn't supported, and, on other platforms, the timer doesn't start until at least one packet arrives. This means that the read timeout should NOT be used in, for example, an interactive application, to allow the packet capture loop to ``poll'' for user input periodically, as there's no guarantee that ReceiveSomePackets() will return after the timeout expires.</para>
/// Similar to ReceiveSomePackets() except it keeps reading packets until conut packets are processed or an error occurs. It does not return when live read timeouts occur.
/// <seealso cref="ReceivePacket"/>
/// <seealso cref="ReceiveSomePackets"/>
/// </summary>
/// <param name="count">Number of packets to process. A negative count causes ReceivePackets() to loop forever (or at least until an error occurs).</param>
/// <param name="callback">Specifies a routine to be called with one argument: the packet received.</param>
/// <returns>
/// <list type="table">
/// <listheader>
/// <term>Return value</term>
/// <description>description</description>
/// </listheader>
/// <item><term>Ok</term><description>Count is exhausted</description></item>
/// <item><term>Eof</term><description>Count wasn't exhausted and EOF was reached reading from an offline capture.</description></item>
/// <item><term>BreakLoop</term><description>Indicates that the loop terminated due to a call to Break() before count packets were processed.</description></item>
/// </list>
/// </returns>
/// <exception cref="System::InvalidOperationException">Thrown if the mode is not Capture or an error occurred.</exception>
/// Receives a single statistics data on packets from an interface instead of receiving the packets.
/// The statistics can be received in the resolution set by readTimeout when calling LivePacketDevice.Open().
/// </summary>
/// <param name="statistics">The received statistics if it was read without problems. null otherwise.</param>
/// <returns>
/// <list type="table">
/// <listheader>
/// <term>Return value</term>
/// <description>description</description>
/// </listheader>
/// <item><term>Ok</term><description>The statistics has been read without problems. In statistics mode the readTimeout is always used and it never runs on offline captures so Ok is the only valid result.</description></item>
/// </list>
/// </returns>
/// <exception cref="System::InvalidOperationException">Thrown if the mode is not Statistics or an error occurred.</exception>
/// Collect a group of statistics every readTimeout given in LivePacketDevice.Open().
/// </summary>
/// <param name="count">Number of statistics to process. A negative count causes ReceiveStatistics() to loop forever (or at least until an error occurs).</param>
/// <param name="callback">Specifies a routine to be called with one argument: the statistics received.</param>
/// <returns>
/// <list type="table">
/// <listheader>
/// <term>Return value</term>
/// <description>description</description>
/// </listheader>
/// <item><term>Ok</term><description>Count is exhausted</description></item>
/// <item><term>BreakLoop</term><description>Indicates that the loop terminated due to a call to Break() before count statistics were processed.</description></item>
/// </list>
/// </returns>
/// <exception cref="System::InvalidOperationException">Thrown if the mode is not Statistics or an error occurred.</exception>