From owner-freebsd-hackers Mon Jul 19 21:53:36 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from wrath.cs.utah.edu (wrath.cs.utah.edu [155.99.198.100]) by hub.freebsd.org (Postfix) with ESMTP id 77D4D15144 for ; Mon, 19 Jul 1999 21:53:32 -0700 (PDT) (envelope-from danderse@cs.utah.edu) Received: from lal.cs.utah.edu (lal.cs.utah.edu [155.99.195.65]) by wrath.cs.utah.edu (8.8.8/8.8.8) with ESMTP id WAA17142; Mon, 19 Jul 1999 22:52:44 -0600 (MDT) From: David G Andersen Received: (from danderse@localhost) by lal.cs.utah.edu (8.8.8/8.8.8) id WAA15557; Mon, 19 Jul 1999 22:52:42 -0600 (MDT) Message-Id: <199907200452.WAA15557@lal.cs.utah.edu> Subject: Re: tee option on ipfw? To: mrcpu@internetcds.com (Jaye Mathisen) Date: Mon, 19 Jul 1999 22:52:42 -0600 (MDT) Cc: hackers@FreeBSD.ORG In-Reply-To: from "Jaye Mathisen" at Jul 18, 99 03:42:19 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The 'tee' behavior can be pretty easily emulated, however. a) use bpfilter - it automatically does a copy type thing. b) Use a little divert socket program which simply does: len = recvfrom(divert_socket, packetbuf, sizeof(packetbuf), 0, (struct sockaddr *)&from, &fromlen); sendto(divert_socket, packetbuf, len, 0, (struct sockaddr *)&from, fromlen); do_whatever_stuff_you_want(); Option a will, of course, be faster, since it doesn't involve a copy to userspace before allowing the packet to continue its normal path. The tee option would do the same thing, if and when. -Dave Lo and behold, Jaye Mathisen once said: > > > > The man page says the tee option on ipfw is not yet supported. > > I'm wondering if that is still the case as of 3.2-stable, or if the doc is > just out of date. > > I would like to make a copy of incoming UDP packets to a specific port for > some testing. tee seems like an easy way to go. > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > -- work: danderse@cs.utah.edu me: angio@pobox.com University of Utah CS Department http://www.angio.net/ "If you haul a geek up a crack, you will bloody their fingers for a day... If you teach a geek to climb, you will bloody their fingers for life." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message