SourceForge Jpcap

net.sourceforge.jpcap.capture
Class CaptureStatistics

java.lang.Object
  extended by net.sourceforge.jpcap.capture.CaptureStatistics

public class CaptureStatistics
extends Object

Packet capture statistics.

Encapsulation for statistics collected by PacketCapture.

Version:
$Revision: 1.1 $
Author:
Patrick Charles, Jonas Lehmann, Esmond Pitt
Last modified by:
$Author: esmondpitt $
Last modified at:
$Date: 2008/08/21 02:57:52 $

Constructor Summary
CaptureStatistics()
          Create a new instance of CaptureStatistics.
CaptureStatistics(int receivedCount, int droppedCount)
          Create a new and empty statistics container.
 
Method Summary
 int getDroppedByInterfaceCount()
          Return the number of packets dropped by interface XXX not yet supported
 int getDroppedByNetworkCount()
          Return the number of packets dropped by the network.
 int getDroppedCount()
          Return the number of packets dropped
 int getReceivedByApplicationCount()
          Return the number of packets received by the application.
 int getReceivedCount()
          Return the number of packets received
 int getSentByServerCount()
          Return the number of packets sent by the server.
 String toString()
          Convert this packet to a readable string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CaptureStatistics

public CaptureStatistics()
Create a new instance of CaptureStatistics.


CaptureStatistics

public CaptureStatistics(int receivedCount,
                         int droppedCount)
Create a new and empty statistics container.

Parameters:
receivedCount - Count of packets received
droppedCount - Count of packets dropped
Method Detail

getReceivedCount

public int getReceivedCount()
Return the number of packets received

Returns:
the number of packets received

getDroppedCount

public int getDroppedCount()
Return the number of packets dropped

Returns:
the number of packets dropped

getDroppedByInterfaceCount

public int getDroppedByInterfaceCount()
Return the number of packets dropped by interface XXX not yet supported

Returns:
the number of packets dropped by interface

getReceivedByApplicationCount

public int getReceivedByApplicationCount()
Return the number of packets received by the application. Only returns non-zero in libpcap environments with HAVE_REMOTE.

Returns:
the number of packets received by the application.

getSentByServerCount

public int getSentByServerCount()
Return the number of packets sent by the server. Only returns non-zero in libpcap environments with HAVE_REMOTE.

Returns:
the number of packets sent by the server.

getDroppedByNetworkCount

public int getDroppedByNetworkCount()
Return the number of packets dropped by the network. Only returns non-zero in libpcap environments with HAVE_REMOTE.

Returns:
the number of packets dropped by the network.

toString

public String toString()
Convert this packet to a readable string.

Overrides:
toString in class Object

Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008.