aboutsummaryrefslogtreecommitdiff
path: root/pcap-airpcap.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-05-30 15:47:16 -0700
committerGuy Harris <gharris@sonic.net>2020-05-30 15:47:16 -0700
commit19e1676ca47ddb11385b771f477e181e3a442e3b (patch)
tree433e6ab5b3ef2e106163cb780d2e84c202ac44f6 /pcap-airpcap.c
parentb1d0216d9c0eb2427559789383134d92a5ac6b76 (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-airpcap.c')
-rw-r--r--pcap-airpcap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pcap-airpcap.c b/pcap-airpcap.c
index 257d5e1a..e90212a8 100644
--- a/pcap-airpcap.c
+++ b/pcap-airpcap.c
@@ -435,7 +435,11 @@ airpcap_stats_ex(pcap_t *p, int *pcap_stat_size)
p->stat.ps_recv = tas.Recvs;
p->stat.ps_drop = tas.Drops;
p->stat.ps_ifdrop = tas.IfDrops;
-#ifdef ENABLE_REMOTE
+ /*
+ * Just in case this is ever compiled for a target other than
+ * Windows, which is extremely unlikely at best.
+ */
+#ifdef _WIN32
p->stat.ps_capt = tas.Capt;
#endif
return (&p->stat);