From owner-freebsd-questions Sun Jun 20 7:50:47 1999 Delivered-To: freebsd-questions@freebsd.org Received: from latour.sth.frontec.se (pc242.frontec.se [193.13.194.242]) by hub.freebsd.org (Postfix) with ESMTP id 592C614BEC for ; Sun, 20 Jun 1999 07:50:33 -0700 (PDT) (envelope-from Alexander.Podoplelov@sth.frontec.se) Received: from sth.frontec.se ([172.18.16.112]) by latour.sth.frontec.se (8.8.0/8.6.6) with ESMTP id QAA03349 for ; Sun, 20 Jun 1999 16:51:32 +0200 (MET DST) Message-ID: <376CFEFB.9C487896@sth.frontec.se> Date: Sun, 20 Jun 1999 16:47:23 +0200 From: Alexander Podoplelov Reply-To: Alexander.Podoplelov@sth.frontec.se Organization: Frontec Tekniksystem AB X-Mailer: Mozilla 4.51 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: Looking for some net sniffer C sources References: <376C9813.BF6B778D@prodigy.net> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello. I have a task which implies to read raw data from the network interface. I would be more than happy to have a "necessary and sufficient" piece of C code for proper opening of the network interface (bpf, ioctl?), reading packets from there (I guess read() is enough :), and having structure of the packet (detecting that it belongs to IP ones; which *.h files are to be included). A working example for monitoring IP packets is wanted mostly. Also, if you know good sources to read about that (books, url), please, share that info with me. Any help is Ok. Thank you in advance, Alexander. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message