aboutsummaryrefslogtreecommitdiff
path: root/pcap-pf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-05-08 13:06:27 -0700
committerGuy Harris <guy@alum.mit.edu>2013-05-08 13:06:27 -0700
commit48bc6c35b191857f39b628bd586bd94a03fd13d7 (patch)
treeb44a5a8e6e645194d16d4ddef0a03f0e61509a2d /pcap-pf.c
parent98b7898b2a9906714cc91c818a820f7e47da41b2 (diff)
Add an API to set "immediate mode".
In "immediate mode", packets are delivered as soon as they arrive.
Diffstat (limited to 'pcap-pf.c')
-rw-r--r--pcap-pf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pcap-pf.c b/pcap-pf.c
index eb06e7b5..5eb36087 100644
--- a/pcap-pf.c
+++ b/pcap-pf.c
@@ -337,7 +337,9 @@ your system may not be properly configured; see the packetfilter(4) man page\n",
goto bad;
}
pf->OrigMissed = -1;
- enmode = ENTSTAMP|ENBATCH|ENNONEXCL;
+ enmode = ENTSTAMP|ENNONEXCL;
+ if (!p->opt.immediate)
+ enmode |= ENBATCH;
if (p->opt.promisc)
enmode |= ENPROMISC;
if (ioctl(p->fd, EIOCMBIS, (caddr_t)&enmode) < 0) {