Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jun 1999 10:20:00 -0500 (EST)
From:      Alfred Perlstein <bright@rush.net>
To:        Alexander Podoplelov <Alexander.Podoplelov@sth.frontec.se>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Looking for some net sniffer C sources
Message-ID:  <Pine.BSF.3.96.990620101750.14320d-100000@cygnus.rush.net>
In-Reply-To: <376CFEFB.9C487896@sth.frontec.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Jun 1999, Alexander Podoplelov wrote:

> 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.

look no further than "TCPdump" it's in the source tree, it should
guide the way for you.

you can get the source tree by executing this command:

pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/CVSup/cvsupit.tgz

and downloading the 300 or so megs, or you can grab the FreeBSD
cdroms from Walnut Creek. www.cdrom.com

good luck,
-Alfred



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.3.96.990620101750.14320d-100000>