[Click] How to run parallel functions, thread in click
sophia wright
wrightsophia119 at gmail.com
Tue Feb 11 19:36:40 EST 2014
Hello clickers,
i have implement my own element:rstPacket. My element rstPacket extract
from input ip packet
some info( dstIP, srcIP, etc) and create a Reset TCP packet.
my current version works like this
tmp::rstPacket;
PreviewsElement[0] ->tmp[0]->nextElement
tmp[1]->otherElement
this version is sequence,but it works normaly.
At this point i want to create a new version that the creation of RST
packet to be independent from the packet p, i want to run it parallel .
so I tried to do this
t:: Tee(2);
PreviewsElement[0]->t;
t[0]->nextElement
t[1]->rstPacket->otherElement
The above gemeral idea is that , i create a clone of a packet p ,
so in the output zero the packet p is routing normaly, without any side
effect
In the output one i have a clone of packet, i used it to extract my info
and i create
th reset packets.
But it doesnt work, the router crash, at the point --- of Tee(2)
Any IDEA somenone ,how can run parallel an element ,or a function in my
element??
General i want from a packet to extract some info, then the packet i want
to route normaly
thank you
More information about the click
mailing list