From owner-freebsd-arch@FreeBSD.ORG Wed Nov 5 11:25:30 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from green.bikeshed.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AD14416A4CF; Wed, 5 Nov 2003 11:25:30 -0800 (PST) Received: from green.bikeshed.org (localhost [127.0.0.1]) by green.bikeshed.org (8.12.10/8.12.9) with ESMTP id hA5JPTcR003096; Wed, 5 Nov 2003 14:25:29 -0500 (EST) (envelope-from green@green.bikeshed.org) Received: from localhost (green@localhost)hA5JPT6S003092; Wed, 5 Nov 2003 14:25:29 -0500 (EST) Message-Id: <200311051925.hA5JPT6S003092@green.bikeshed.org> X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: arch@FreeBSD.org From: Brian Fundakowski Feldman Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 05 Nov 2003 14:25:29 -0500 Sender: green@green.bikeshed.org cc: fenner@FreeBSD.org Subject: bpf/pcap are weird X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2003 19:25:31 -0000 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. What's up with this? Software that knows about pcap(3) but not bpf(4) on FreeBSD can't put the interface in the mode it wants to, and the non-blocking flag is settable and gettable but doesn't do anything. Wouldn't it be better to get rid of at least one of the interfaces, and provide a way to check what mode the bpf descriptor is in, either way? -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\