Date: Fri, 4 Jun 1999 18:07:19 +0200 (CEST) From: Riccardo Veraldi <riccardo@righi.ml.org> To: "Pavel V. Antipov" <pavel@ikar.elect.ru> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Ethernet-level connection Message-ID: <Pine.BSF.4.10.9906041807060.19306-100000@righi.ml.org> In-Reply-To: <Pine.BSF.3.96.990604161331.13837B-100000@ikar.elect.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
the lastest FreeBSD release is 3.2 On Fri, 4 Jun 1999, Pavel V. Antipov wrote: > > > On Fri, 4 Jun 1999, Riccardo Veraldi wrote: > > > > > > > Hello. > > I did a FreeBSD port called sniff. and to have access to ethernet packets > > I just used tcpdump. AS well tcpdump is written using libpcap. > > I wanted to access directly to the ethernet device without using libpcap > > or tcpdump but since now noone could answer to my question. > > Do u have any clue about it ? > > thanks > > > > Rick > > > > Hi ! > > I saw PF_PACKET parameter for system call "socket" in linux. In FreeBSD > thare is PF_LINK (see <sys/sockst.h>). > I tried to execute this program: > > #include <sys/types.h> > #include <sys/socket.h> > #include <iostream.h> > #include <errno.h> > > main(){ > cout << socket(AF_LINK, SOCK_RAW, 0)<<endl; > cout<<errno<<endl; > } > > As a result errno == 43. I use 2.2.5 and hope that in latest versions of > FreeBSD I'll find direct access to Ethernet packets via > socket & recvfrom & sendto system calls. > > Pavel > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9906041807060.19306-100000>