[Click] How to handle multiple flows?
Harald Schiöberg
harald at net.t-labs.tu-berlin.de
Tue Jul 8 12:12:09 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi again,
since I write that tcp thingy, here is my first problem:
Say you'd like to bridge between transport protocols, such as in a
tcp-split-proxy, the setup would look like this:
connection1 connection2
| |
- -> |0 1| -> |1 0| ->
| TCPSpeaker| | TCPSpeaker|
<- |0 1| <- |1 0| <-
stateless
packets
Both TCPSpeaker should be able to deal with multiple connections.
How to design the stateless ports "1" ?
Push: means if connection is choked due to congestion/flow control you
overwhelm the port.
Pull: If you have one connection that is chocked, and anotherone that is
idle, you'd like to pull packets for the idle connection only.
Solution would be to make ports "1" of type "qualified pull", with a
function like:
Element::pull(port, thunk)
so that the elements could pass each other the connection identifier.
Since choked flows are never pulled, the windows on the upstream
connection shrinks, and everything is fine.
Has a
virtual Element::pull(port,thunk){pull(port);}
any chance to make it into click?
How to implement that? Something deep in click, where elements are
connected during startup must learn about that. Where to start looking?
Another thing:
thunk could be a void pointer. But: it could as well be a more specific
thing like a flow classifier. In this case more elements could start
doing things on a per flow basis. I don't know whether that is actually
needed. I can imagine a flow-classifier like:
{
bitfield significant-fields
in_addr source
char source-netmask
in_addr dest
char dst-netmask
char proto
u_int16 source-port
u_int16 dest-port
}
with tests whether a packet belongs to a flow like
if ( !(significant-fields | FLOW_SOURCE_ADDR) ||
(p->source | ~source-netmask == source ))
- --
Harald Schiöberg
Technische Universität Berlin | T-Laboratories | FG INET
www: http://www.net.t-labs.tu-berlin.de
Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIc5HYJgyxs71kcx4RAihbAJ4nNDG39JB3QSJhjR2Pb0hQWlfvrgCfWQ9S
hwRWNI0XFDiQKm4KXNLcwUg=
=dYrP
-----END PGP SIGNATURE-----
More information about the click
mailing list