From owner-freebsd-questions Fri Jun 4 9: 3: 5 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 8D0A214C99 for ; Fri, 4 Jun 1999 09:03:01 -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 SAA19308; Fri, 4 Jun 1999 18:07:20 +0200 (CEST) (envelope-from riccardo@righi.ml.org) Date: Fri, 4 Jun 1999 18:07:19 +0200 (CEST) From: Riccardo Veraldi To: "Pavel V. Antipov" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Ethernet-level connection In-Reply-To: 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 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 ). > 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. > > 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