+ /*
+ * If packet filtering is being done in the kernel:
+ *
+ * "ps_recv" counts only packets that passed the filter.
+ * This does not include packets dropped because we
+ * ran out of buffer space. (XXX - perhaps it should,
+ * by adding "ps_drop" to "ps_recv", for compatibility
+ * with some other platforms. On the other hand, on
+ * some platforms "ps_recv" counts only packets that
+ * passed the filter, and on others it counts packets
+ * that didn't pass the filter....)
+ *
+ * "ps_drop" counts packets that passed the kernel filter
+ * (if any) but were dropped because the input queue was
+ * full.
+ *
+ * "ps_ifdrop" counts packets dropped by the network
+ * interface (regardless of whether they would have passed
+ * the input filter, of course).
+ *
+ * If packet filtering is not being done in the kernel:
+ *
+ * "ps_recv" counts only packets that passed the filter.
+ *
+ * "ps_drop" counts packets that were dropped because the
+ * input queue was full, regardless of whether they passed
+ * the userland filter.
+ *
+ * "ps_ifdrop" counts packets dropped by the network
+ * interface (regardless of whether they would have passed
+ * the input filter, of course).
+ *
+ * These statistics don't include packets not yet read from
+ * the kernel by libpcap, but they may include packets not
+ * yet read from libpcap by the application.
+ */
+ ps->ps_recv = pf->TotAccepted;
+ ps->ps_drop = pf->TotDrops;
+ ps->ps_ifdrop = pf->TotMissed - pf->OrigMissed;