diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-02-06 22:41:25 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-02-06 22:41:25 +0000 |
commit | 7f631c7e861e6fecb1d6886529f8e4dd11962fb9 (patch) | |
tree | 0404d22866f1396a5de94ab9756b9bf491a76e13 /lib/libpcap | |
parent | 72d59ef21c72c4554aa9dac9bed3bc02f7165483 (diff) |
use the kernel default for buf size. no behavior change by default.
ok canacar@ mcbride@
Diffstat (limited to 'lib/libpcap')
-rw-r--r-- | lib/libpcap/pcap-bpf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libpcap/pcap-bpf.c b/lib/libpcap/pcap-bpf.c index a8fb6b1edb0..f81375e0203 100644 --- a/lib/libpcap/pcap-bpf.c +++ b/lib/libpcap/pcap-bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcap-bpf.c,v 1.15 2004/01/27 06:58:03 tedu Exp $ */ +/* $OpenBSD: pcap-bpf.c,v 1.16 2004/02/06 22:41:24 tedu Exp $ */ /* * Copyright (c) 1993, 1994, 1995, 1996, 1998 @@ -197,6 +197,8 @@ pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf) "kernel bpf filter out of date"); goto bad; } +#if 0 + /* Just use the kernel default */ v = 32768; /* XXX this should be a user-accessible hook */ /* Ignore the return value - this is because the call fails on * BPF systems that don't have kernel malloc. And if the call @@ -204,6 +206,7 @@ pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf) * buffer size. */ (void) ioctl(fd, BIOCSBLEN, (caddr_t)&v); +#endif (void)strlcpy(ifr.ifr_name, device, sizeof(ifr.ifr_name)); if (ioctl(fd, BIOCSETIF, (caddr_t)&ifr) < 0) { |