aboutsummaryrefslogtreecommitdiff
path: root/pcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcap.c')
-rw-r--r--pcap.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/pcap.c b/pcap.c
index 2c81a768..f9cb99bd 100644
--- a/pcap.c
+++ b/pcap.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.66 2003-11-18 22:14:24 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.67 2003-11-20 01:21:26 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -61,6 +61,11 @@ static const char rcsid[] _U_ =
#include "pcap-int.h"
+#ifdef HAVE_DAG_API
+#include <dagnew.h>
+#include <dagapi.h>
+#endif
+
int
pcap_dispatch(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
@@ -558,6 +563,15 @@ pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf)
*/
return (0);
}
+
+#if HAVE_DAG_API
+ if (nonblock) {
+ p->md.dag_offset_flags |= DAGF_NONBLOCK;
+ } else {
+ p->md.dag_offset_flags &= ~DAGF_NONBLOCK;
+ }
+#endif /* HAVE_DAG_API */
+
#ifndef WIN32
fdflags = fcntl(p->fd, F_GETFL, 0);
if (fdflags == -1) {