From owner-freebsd-questions Fri Jun 4 9: 4:57 1999 Delivered-To: freebsd-questions@freebsd.org Received: from righi.ml.org (RIGHI.DF.UNIBO.IT [137.204.49.17]) by hub.freebsd.org (Postfix) with ESMTP id ABB1914D54 for ; Fri, 4 Jun 1999 09:04:52 -0700 (PDT) (envelope-from riccardo@righi.ml.org) Received: from localhost (riccardo@localhost) by righi.ml.org (8.9.2/8.9.1) with ESMTP id SAA19316; Fri, 4 Jun 1999 18:08:55 +0200 (CEST) (envelope-from riccardo@righi.ml.org) Date: Fri, 4 Jun 1999 18:08:54 +0200 (CEST) From: Riccardo Veraldi To: Ladavac Marino Cc: "'Pavel V. Antipov'" , freebsd-questions@FreeBSD.ORG Subject: RE: Ethernet-level connection In-Reply-To: <55586E7391ACD211B9730000C110027617963C@r-lmh-wi-100.corpnet.at> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG do u know how I can access to raw ethernet data without using bpf and pcap ??? how I have to do?? ther si some way to look inside kernel buffer for ether device ? thanks Rick On Fri, 4 Jun 1999, Ladavac Marino wrote: > > -----Original Message----- > > From: Pavel V. Antipov [SMTP:pavel@ikar.elect.ru] > > Sent: Friday, June 04, 1999 2:19 PM > > To: Riccardo Veraldi > > Cc: freebsd-questions@FreeBSD.ORG > > Subject: Re: Ethernet-level connection > > > > Hi ! > > > > I saw PF_PACKET parameter for system call "socket" in linux. In > > FreeBSD > > thare is PF_LINK (see ). > > I tried to execute this program: > > > > #include > > #include > > #include > > #include > > > > main(){ > > cout << socket(AF_LINK, SOCK_RAW, 0)< > cout< > } > > > > 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. > > > [ML] I don't think you ever will. Use bpf instead. > > I don't think PF_PACKET will ever be in BSD because IIRC it is > only a subset of bpf functionality. It either gets none or all packets > whereas bpf is capable of programming the NIC for packet filtering (i.e. > filtering is done in hardware, if the hardware supports it, and many > cards do, otherwise in driver). > > AFAIK PF_PACKET is a Linuxism. Most other unices have bpf. > > /Marino > > 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