Date: Mon, 19 Jul 1999 22:52:42 -0600 (MDT) From: David G Andersen <danderse@cs.utah.edu> To: mrcpu@internetcds.com (Jaye Mathisen) Cc: hackers@FreeBSD.ORG Subject: Re: tee option on ipfw? Message-ID: <199907200452.WAA15557@lal.cs.utah.edu> In-Reply-To: <Pine.BSF.4.10.9907181540560.357-100000@schizo.cdsnet.net> from "Jaye Mathisen" at Jul 18, 99 03:42:19 pm
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907200452.WAA15557>