bpf/pcap are weird

From: Brian Fundakowski Feldman (green_at_FreeBSD.org)
Date: 11/05/03

  • Next message: Sam Leffler: "Re: __VA_ARGS__izing IEEE80211_DPRINTF[2]()"
    To: arch@FreeBSD.org
    Date: Wed, 05 Nov 2003 14:25:29 -0500
    
    

    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.                       \,,,,,,,,,,,,,,,,,,,,,,\
    _______________________________________________
    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"
    

  • Next message: Sam Leffler: "Re: __VA_ARGS__izing IEEE80211_DPRINTF[2]()"

    Relevant Pages