Date: Fri, 11 Feb 2011 11:54:16 +0200 From: Vlad Galu <dudu@dudu.ro> To: Da Rock <freebsd-hackers@herveybayaustralia.com.au> Cc: freebsd-hackers@freebsd.org Subject: Re: linux PF_PACKET compatibility Message-ID: <AANLkTin8i2tExDEj5RiZOgatqsgLD3o3Nnk1-6345fOz@mail.gmail.com> In-Reply-To: <4D550300.5090000@herveybayaustralia.com.au> References: <4D54E39D.1000505@herveybayaustralia.com.au> <4D54F0B0.7010503@freebsd.org> <4D550300.5090000@herveybayaustralia.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 11, 2011 at 11:36 AM, Da Rock < freebsd-hackers@herveybayaustralia.com.au> wrote: > On 02/11/11 18:17, Julian Elischer wrote: > >> On 2/10/11 11:22 PM, Da Rock wrote: >> >>> "In recent versions of the Linux kernel (post-2.0 releases) a new >>> protocol family has been introduced, named PF_PACKET. This family allows an >>> application to send and receive packets dealing directly with the network >>> card driver, thus avoiding the usual protocol stack-handling (e.g., IP/TCP >>> or IP/UDP processing). That is, any packet sent through the socket will be >>> directly passed to the Ethernet interface, and any packet received through >>> the interface will be directly passed to the application." >>> >>> I've been chasing the answer to a FreeBSD version of this (approx. >>> anyway), but I needed to find out what exactly PF_PACKET was first. Finally >>> found this answer here: http://www.linuxjournal.com/article/4659 >>> >>> I looked up man socket and I can see possibilities (in my mind anyway), >>> but I thought I'd be best to check if the gurus here might have a better >>> idea. My reason for this is I'm attempting to build l2tpns (which supposedly >>> builds on 7.3?! with no trouble), and I'm chasing the errors which appear to >>> be linuxisms mostly. >>> >>> So in man socket simply looking at the list of protocol families I'd say >>> network driver level would be similar to PF_LINK link layer interface? Is >>> there another man page I should be looking at as well? >>> >> >> We don't have an exact equivalent.. but we have ways of doing the same >> thing. >> one way that is suggested is to use pcap and bpf which I am pretty certain >> has been enhanced to allow sending as >> well as receiving. >> you can also hook directly to the interface using netgraph(4) >> there are other ways too but those are the two that came to mind >> immediately. >> > So I'm going to have to rewrite that interface entirely? Bugger! I just > can't fathom how this howto could even exist for l2tpns on FreeBSD if it > isn't even close to buildable... weird! > > http://kuapp.com/2010/07/14/how-to-setup-l2tpipsec-vpn-on-freebsd.html > > Thanks guys. I'll probably come back with more problems as I slowly crack > this one... :) > > I suppose you could just use mpd :) -- Good, fast & cheap. Pick any two.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin8i2tExDEj5RiZOgatqsgLD3o3Nnk1-6345fOz>