Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 1998 03:38:20 -0500 (EST)
From:      Robert Watson <robert@cyrus.watson.org>
To:        hackers@FreeBSD.ORG
Subject:   need a reference: data link layer packet transmission
Message-ID:  <Pine.BSF.3.96.980318033148.410A-100000@thithle.watson.org>

next in thread | raw e-mail | index | archive | help

For performance testing and bug catching, I would like to be able to
"replay" tcpdump captured packet streams that were promiscuously sniffed
off of a network.  Using the existing tcpdump to do this is ideal, as it
timestamps, etc.  However, I need to be able to resend the packets over
the network, and not all of the packets of interest are IP-packets.  So I
need to be able to manually ship these packets to the link layer for
delivery (on a specific device).  I know that bpf can be used for
transmission as well as reception (bpfwrite), but have had a hard time
finding sample source code that uses this transmission; bpf is primarily
intended for listening and not deliver.

The Stevens UNIX Network Programming book referred me to the rarp source
code, and indeed there is a somewhat obfuscated creation of rarp replies
there, but I was hoping for something a little more tutorial-like.
Similarly, the man pages are not particularly talkative about the
functions associated with BPF (although they due cover the structures
fairly well).  I do not currently have a copy of the original BPF paper,
but was wondering if it was available online, or if there were other
software packages I could look at for further information.  While I am
willing to delve into kernel source to find the answer, I would rather see
some text or a package that does similar things to what I want to write.

Alternatively, if such a package exists that already does what I describe,
a URL to that would be great!

Thanks in advance,

  Robert N Watson 

Carnegie Mellon University http://www.cmu.edu/
SafePort Network Services  http://www.safeport.com/
robert@fledge.watson.org   http://www.watson.org/~robert/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" 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.980318033148.410A-100000>