John-Mark Gurney wrote:
Ragnar Lonn wrote this message on Tue, Oct 04, 2005 at 18:58 +0200:
Ceri Davies wrote:
I only call it "wrong" as it didn't agree with Archie's article or my
expectations, hence the quotes - I realise that it's subjective.
It just seems to me that packets leaving left2right would go to right,
as the name implies. I don't really mind either way, it's simply that
I found it confusing.
It's not, really. A good idea is to draw the tee node and its hooks on a
piece of paper.
Here is an ASCII attempt:
left --- right
\ /
x
/ \
r2l l2r
The drawing shows that the left hook is associated with the left2right hook:
When packets come in on the left hook they are forwarded to the left2right
hook. Logically, that means they are connected, like in the drawing above,
and that also means that packets can go in the other direction - i.e. from
the left2right hook and to the left hook.
I personally imagined the picture like:
l2r
>>>>^>>>>
/ \
left right
\ /
<<<v<<<<
r2l
where the l2r and r2l are taps into the line that goes a certain way... and
so, it'd mean that sending a package on the r2l hook goes to left instead
of right.. not that I use net graph much, but just thought I'd show how
I thought of it...
Though if the behavior matches what the man page states, that's all that
matters, and my drawing is invalidated...
For me, the behaviour was intuitive. Maybe it depends on whether you're
familiar
with the Unix "tee" command or not, how you look at it? "tee" is used
to duplicate
a one-way (output) stream, so I've always thought of the hooks
right2left and
left2right as one-way output hooks.
Think of the tee node as a connector between left and right, with the
option to
"wiretap" traffic going either from right to left, or from left to
right. To do this
wiretapping you have two hooks where you can snoop the traffic going in
either
direction. One hook for snooping traffic left->right and one hook for
snooping traffic
right->left. The option to input traffic into one of these "tap" hooks
is just a bonus
feature. And maybe it's more confusing than useful, I'm not sure. It
seems that if you
want to output traffic on the right hook, all you have to do is input it
on the left hook,
and vice versa. Of course, you'd have to use a hub or bridge to connect
more than
one node to the hook then.
/Ragnar
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"