Date: Wed, 18 Mar 1998 09:08:37 -0500 From: "Alfred Perlstein" <perlsta@cs.sunyit.edu> To: "Robert Watson" <robert+freebsd@cyrus.watson.org>, <hackers@FreeBSD.ORG> Subject: Re: need a reference: data link layer packet transmission Message-ID: <016501bd5277$597270e0$0600a8c0@win95.local.sunyit.edu>
next in thread | raw e-mail | index | archive | help
maybe i'm being niave, but look into DIVERT sockets, with a the kernel firewall and a divert socket you can capture the traffic. -Alfred -----Original Message----- From: Robert Watson <robert@cyrus.watson.org> To: hackers@FreeBSD.ORG <hackers@FreeBSD.ORG> Date: Tuesday, March 17, 1998 11:42 PM Subject: need a reference: data link layer packet transmission > >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 > 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?016501bd5277$597270e0$0600a8c0>