From owner-freebsd-questions Fri Jun 4 5:20:27 1999 Delivered-To: freebsd-questions@freebsd.org Received: from ikar.elect.ru (unknown [195.161.50.139]) by hub.freebsd.org (Postfix) with ESMTP id 70FCC14E83 for ; Fri, 4 Jun 1999 05:19:50 -0700 (PDT) (envelope-from pavel@ikar.elect.ru) Received: from localhost (pavel@localhost) by ikar.elect.ru (8.8.7/8.8.7) with SMTP id QAA14001; Fri, 4 Jun 1999 16:18:55 +0400 (MSD) (envelope-from pavel@ikar.elect.ru) Date: Fri, 4 Jun 1999 16:18:45 +0400 (MSD) From: "Pavel V. Antipov" To: Riccardo Veraldi 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 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)<