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 majord...@freebsd.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 


-- 
work: dande...@cs.utah.edu                     me:  an...@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 majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to