[Winpcap-users] pcap_stats_ex statistics

Roger H. Levy rhl at lucent.com
Wed Oct 25 18:13:13 GMT 2006


I copied the lines below from pcap.h however pcap_stats_ex() is documented 
as returning a pointer to a pcap_stats struct, not a pcap_stats_ex struct. 
Also the #ifdef MSDOS prevents this struct from being defined in my win32 
program.  Can I get the statistics shown in the pcap_stat_ex struct or is 
this something that is not actually implemented?  I'm especially interested 
in the "detailed rx_errors."

#ifdef MSDOS
/*
 * As returned by the pcap_stats_ex()
 */
struct pcap_stat_ex {
       u_long  rx_packets;        /* total packets received       */
       u_long  tx_packets;        /* total packets transmitted    */
       u_long  rx_bytes;          /* total bytes received         */
       u_long  tx_bytes;          /* total bytes transmitted      */
       u_long  rx_errors;         /* bad packets received         */
       u_long  tx_errors;         /* packet transmit problems     */
       u_long  rx_dropped;        /* no space in Rx buffers       */
       u_long  tx_dropped;        /* no space available for Tx    */
       u_long  multicast;         /* multicast packets received   */
       u_long  collisions;

       /* detailed rx_errors: */
       u_long  rx_length_errors;
       u_long  rx_over_errors;    /* receiver ring buff overflow  */
       u_long  rx_crc_errors;     /* recv'd pkt with crc error    */
       u_long  rx_frame_errors;   /* recv'd frame alignment error */
       u_long  rx_fifo_errors;    /* recv'r fifo overrun          */
       u_long  rx_missed_errors;  /* recv'r missed packet         */

       /* detailed tx_errors */
       u_long  tx_aborted_errors;
       u_long  tx_carrier_errors;
       u_long  tx_fifo_errors;
       u_long  tx_heartbeat_errors;
       u_long  tx_window_errors;
     };
#endif 



More information about the Winpcap-users mailing list