Re: PF_PACKET
From: Brian Fundakowski Feldman (green_at_freebsd.org)
Date: 06/28/04
- Previous message: Brian Fundakowski Feldman: "Re: Panic on 5.2.1-p8 Current"
- In reply to: Lev Walkin: "Re: PF_PACKET"
- Next in thread: Julian Elischer: "Re: PF_PACKET"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Jun 2004 14:21:04 -0400 To: Lev Walkin <vlm@netli.com>
On Fri, Jun 25, 2004 at 01:24:53PM -0700, Lev Walkin wrote:
> Ivan Voras wrote:
> >Lev Walkin wrote:
> >
> >>Ivan Voras wrote:
> >>
> >>>I'm trying to port open1x xsupplicant, and it uses PF_PACKET to get
> >>>relevant packets (of appropriate ethernet type). I looked around in
> >>>/usr/include and can't find the support, at least not under that and
> >>>similar names. Is there support for it in FreeBSD?
> >>>
> >>>(I only need to catch & send a few packets now and then, not anything
> >>>complex or bandwidth demanding).
> >>
> >>
> >>
> >>man bpf
> >
> >
> >
> >I've no experience with bpf, but It looks way too complex. And besides,
> >the program is relaying on using sendto/recvfrom all over the place.
>
>
> it is actually pretty simple. man pcap. this is a wrapper around bpf
> which lets you do it in a couple lines of C code.
Just change the sendto/recvfrom calls to write/read. It's not a lot of
work, the xsupplicant code just sucks period.
-- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Brian Fundakowski Feldman: "Re: Panic on 5.2.1-p8 Current"
- In reply to: Lev Walkin: "Re: PF_PACKET"
- Next in thread: Julian Elischer: "Re: PF_PACKET"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- RE: replacement for SOCK_PACKET
... libpcap provides a portable library interface to ... BPF; pcap ports
are available many other OS ... If you just want to bypass libpcap, open /dev/bpf%d directly,
issue the ... (freebsd-net) - Re: Peeking BPF
... Ivan Voras wrote: ... how to find out if a packet is available over ...
> the BPF interface? ... To unsubscribe, ... (freebsd-hackers) - Re: PF_PACKET
... Ivan Voras wrote: ... > I've no experience with bpf, but It looks
way too complex. ... Lev Walkin ... To unsubscribe, ... (freebsd-hackers)