Ethereal-users: [Ethereal-users] How to use TotDrops in pcap_md

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Qili, Zhou" <Z.Qili@xxxxxxxxxxxxx>
Date: Mon, 9 Feb 2004 13:15:53 -0000
Title: How to use TotDrops in pcap_md

I am new to the mailing list and don't know if it is fittng for me to propose a question here:

I checked quite a few items in Ethereal mailing list, but have not found how to know if any packets dropped (or how many packets dropped) in ETHEREAL or its offline (sniffed) files.

I do not remember where the following definitions come from.  Could anybody instruct me how to use the following information to get "TotDrops" (for example, in C/C++)?

//struct pcap_md {
//      struct pcap_stat stat;
/*XXX*/
//      int use_bpf;            /* using kernel filter */
//      u_long  TotPkts;        /* can't oflow for 79 hrs on ether */
//      u_long  TotAccepted;    /* count accepted by filter */
//      u_long  TotDrops;       /* count of dropped packets */
//      long    TotMissed;      /* missed by i/f during this run */
//      long    OrigMissed;     /* missed by i/f before this run */
//#ifdef linux
//      int     sock_packet;    /* using Linux 2.0 compatible interface */
//      int     readlen;        /* byte count to hand to "recvmsg()" */
//      int     timeout;        /* timeout specified to pcap_open_live */
//      int     clear_promisc;  /* must clear promiscuous mode when we close */
//      int     cooked;         /* using SOCK_DGRAM rather than SOCK_RAW */
//      int     lo_ifindex;     /* interface index of the loopback device */
//      char    *device;        /* device name */
//      struct pcap *next;      /* list of open promiscuous sock_packet pcaps */
//#endif
//};