diff options
author | Guy Harris <gharris@sonic.net> | 2020-05-30 15:47:16 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-05-30 15:47:16 -0700 |
commit | 19e1676ca47ddb11385b771f477e181e3a442e3b (patch) | |
tree | 433e6ab5b3ef2e106163cb780d2e84c202ac44f6 /pcap-npf.c | |
parent | b1d0216d9c0eb2427559789383134d92a5ac6b76 (diff) |
npf, airpcap: fill in ps_capt iff _WIN32 is defined.
struct pcap_stat has a ps_capt member iff _WIN32 is defined, so fill in
our structure's ps_capt member iff _WIN32 is defined. (We *never* fill
it in for pcap_stat(), as we cannot guarantee, *even on Windows*, that a
structure passed to us will have them; we fill in a structure that *we*
set up for pcap_next_ex(), so we don't have to worry about that.)
Diffstat (limited to 'pcap-npf.c')
-rw-r--r-- | pcap-npf.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -273,7 +273,12 @@ pcap_stats_ex_npf(pcap_t *p, int *pcap_stat_size) p->stat.ps_recv = bstats.bs_recv; p->stat.ps_drop = bstats.bs_drop; p->stat.ps_ifdrop = bstats.ps_ifdrop; -#ifdef ENABLE_REMOTE + /* + * Just in case this is ever compiled for a target other than + * Windows, which is somewhere between extemely unlikely and + * impossible. + */ +#ifdef _WIN32 p->stat.ps_capt = bstats.bs_capt; #endif return (&p->stat); |