[Click] control packetflow
Michael Neufeld
neufeldm at cs.colorado.edu
Sat May 22 09:43:53 EDT 2004
If you aren't already using the "Paint" annotation for something, I'd be
tempted to use that. So instead of Element A controlling Element B
directly, it'd paint packets depending on its current state. Downstream,
Element B would examine the Paint annotation and do the approprate
splitting/duplication.
More concretely, say that Element A paints packets 0 if they're going
out to just 0, 1 if they're going out to 1, and 2 if to both.
Element B could then be a compound element something like this:
PaintSwitch() :: sortpackets;
input[0] -> sortpackets;
sortpackets[0] -> [0]output;
sortpackets[1] -> [1]output;
sortpackets[2] -> duplicator :: Tee(2);
duplicator[0] -> [0]output;
duplicator[1] -> [1]output;
Not *technically* a single off-the-shelf element, but it only uses stock
Click elements. It's also just a little different than explicitly
controlling the downstream element directly, but unless I'm missing
something it ought to behave pretty similarly.
-Mike
Peter De Cleyn wrote:
> Hi all,
>
> I would like to control the flow of packets at runtime using some state in
> the system and I was wondering if such an flowcontrolelement already
> exist.
>
> Let me explain more carefully with an example. Based on commands from
> Element A, Element B should pass the packets arriving at its input to
> either
>
> port 0 and port 1
> or only port 0
> or only port 1
>
>
> |
> |
> -------------
> | Element B |
> -------------
> | |
> | | |
> | | |
> | | |
> ---
> | |
> | /
> \ /
> |
> -------------
> | Element A |
> -------------
> |
> |
>
> Could you tell me if this is already possible before I start writing
> something like it? I do not seem to find it in the elementlist online.
>
> Thanks!
>
> Peter
>
> ______________
> /Peter De Cleyn\
> -------------------------------------
> University of Antwerp
> Dep. Math. and Computer Science
> PATS research group
> -------------------------------------
> Middelheimlaan 1
> Building G
> B-2020 Antwerp
> -------------------------------------
> http://www.ua.ac.be
> http://win-www.ruca.ua.ac.be
> peter.decleyn at ua.ac.be
> +32 3 265 33 64
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list