Re: bpf/pcap are weird
From: Bruce Evans (bde_at_zeta.org.au)
Date: 11/06/03
- Previous message: Kirk McKusick: ">0x7fffffff blocksize filesystem reporting"
- In reply to: Brian Fundakowski Feldman: "bpf/pcap are weird"
- Next in thread: Guy Harris: "Re: bpf/pcap are weird"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 6 Nov 2003 16:30:22 +1100 (EST) To: Brian Fundakowski Feldman <green@freebsd.org>
On Wed, 5 Nov 2003, Brian Fundakowski Feldman wrote:
> Okay, this is goofy stuff and breaks a lot of code that otherwise makes
> certain assumptions about pcap/bpf that don't work on FreeBSD. Our bpf(4)
> doesn't actually care about the non-blocking fd flag, and our pcap(3)
> doesn't care at all about BIOCIMMEDIATE. Why do we have BIOCIMMEDIATE? It
> seems like it's what SHOULD be implemented with the non-blocking I/O flag
> with the exception that if using O_NONBLOCK/FIONBIO you could actually query
> for the status, whereas you can't query for BIOCIMMEDIATE since it's only a
> SET and not a GET ioctl.
Er, FreeBSD's bpf certainly cares about the non-blocking fd flag. It uses
it in bpfread() although not in any other device switch function:
if (ioflag & IO_NDELAY) {
BPFD_UNLOCK(d);
return (EWOULDBLOCK);
}
NetBSD still seems to use the old 4.4 code which ignores the non-blocking
fd flag in bpfread() and doesn't even use a dedicated non-blocking device
flag (it overloads the timeout).
bpfpoll() is reported to be broken; see PR 36219. Rev.1.113 of bpf.c
may have disturbed this. It removed the comment which said that
bpf_ready() doesn't acually imitate resultof(FIONREAD) != 0.
I don't know anything about BIOCIMMEDIATE.
Bruce
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Kirk McKusick: ">0x7fffffff blocksize filesystem reporting"
- In reply to: Brian Fundakowski Feldman: "bpf/pcap are weird"
- Next in thread: Guy Harris: "Re: bpf/pcap are weird"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|