linux PF_PACKET compatibility
- From: Da Rock <freebsd-questions@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Jan 2011 00:48:20 +1000
"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.2?! 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 PF_LINK link layer interface? Is there another man page I should be looking at as well?
FWIW my gmake output is this:
gcc -Wall -Wformat-security -Wno-format-zero-length -g -O3 -I. -I/usr/include -I/usr/local/include -DLIBDIR='"/lib/l2tpns"' -DETCDIR='"/etc/l2tpns"' -DSTATISTICS -DSTAT_CALLS -DRINGBUFFER -DHAVE_EPOLL -DBGP -c -o arp.o arp.c
arp.c: In function 'sendarp':
arp.c:34: error: storage size of 'sll' isn't known
arp.c:59: error: 'PF_PACKET' undeclared (first use in this function)
arp.c:59: error: (Each undeclared identifier is reported only once
arp.c:59: error: for each function it appears in.)
arp.c:62: error: 'AF_PACKET' undeclared (first use in this function)
arp.c:34: warning: unused variable 'sll'
gmake: *** [arp.o] Error 1
freebsd-questions@xxxxxxxxxxx mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- Prev by Date: Re: snd_es137x && no recording from headset micro
- Next by Date: Bridge Interface Members
- Previous by thread: bigbluebutton
- Next by thread: Re: linux PF_PACKET compatibility