From 48bc6c35b191857f39b628bd586bd94a03fd13d7 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 8 May 2013 13:06:27 -0700 Subject: Add an API to set "immediate mode". In "immediate mode", packets are delivered as soon as they arrive. --- pcap-pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pcap-pf.c') 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) { -- cgit v1.2.3