how to runparallel functions, thread in click
sophia wright <[email protected]> Wed, 12 Feb 2014 01:39:43 +0100
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAFb6iCbNDv_26Kyqs9WBE2Bdbdh2SfX9Jb-SswG0ik1JkWT4Ow@mail.gmail.com> |
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