org.jnetpcap
Class PcapStat

java.lang.Object
  extended by org.jnetpcap.PcapStat
Direct Known Subclasses:
WinPcapStat

public class PcapStat
extends java.lang.Object

Class peered with native pcap_stat structure providing only the core statistics. Class that is filled in by a call to method Pcap.stats. The structure keeps statisical values on an interface.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Field Summary
protected  long capt
          number of packets that are received by the application
protected  long netdrop
          number of packets lost on the network
protected static java.lang.StringBuilder out
          For toString() to build its string.
protected  long sent
          number of packets sent by the server on the network
 
Constructor Summary
PcapStat()
           
 
Method Summary
 long getDrop()
          number of packets dropped by the driver
 long getIfDrop()
          drops by interface.
 long getRecv()
          Number of packets transmitted on the network
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

out

protected static final java.lang.StringBuilder out
For toString() to build its string. Should be made thread local.


capt

protected long capt
number of packets that are received by the application


sent

protected long sent
number of packets sent by the server on the network


netdrop

protected long netdrop
number of packets lost on the network

Constructor Detail

PcapStat

public PcapStat()
Method Detail

getRecv

public final long getRecv()
Number of packets transmitted on the network

Returns:
the recv

getDrop

public final long getDrop()
number of packets dropped by the driver

Returns:
the drop

getIfDrop

public final long getIfDrop()
drops by interface. Not supported.

Returns:
the ifdrop

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object