diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-05-08 13:06:27 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-05-08 13:06:27 -0700 |
commit | 48bc6c35b191857f39b628bd586bd94a03fd13d7 (patch) | |
tree | b44a5a8e6e645194d16d4ddef0a03f0e61509a2d /pcap-pf.c | |
parent | 98b7898b2a9906714cc91c818a820f7e47da41b2 (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) { |