[Click] proposition for a tcpipsend update
Eddie Kohler
kohler at cs.ucla.edu
Sat Apr 24 23:29:28 EDT 2010
Hi Jens,
Thanks for this update! Sorry for the delay. I've applied a version of this
patch. There are a couple differences. First, I updated the header
documentation (please remember to do this in future). Second, I changed the
"send" argument with "COUNT > 1" to send clones of a single packet, rather
than re-creating a packet each time.
I would note that in general I would have used a Script element to create the
functionality you've added, since it would be easy to tweak in other ways.
For example, something like (untested):
tcp_ip_send :: TCPIPSend ....
tcp_ip_send_with_count :: Script(
TYPE PASSIVE,
set count $8,
set stop $9,
label send_again,
write tcp_ip_send.send $1 $2 $3 $4 $5 $6 $7,
set count $(sub $count 1),
goto send_again $(gt $count 0),
goto end $(ne $stop true),
stop);
But I totally understand that TCPIPSend is only for testing anyway and it's
useful to have the functionality there.
Thanks,
Eddie
Jens De Wit wrote:
> Hi Eddie,
>
> I'm still working on my FireSim project which you will probably remember
> from SyClick. I've reworked my scripts a bit in a way that they can now
> smoothly terminate themselves instead of some dirty polling trick with
> handlers I used till now. However, to stop the scripts in cases where I
> generate tcp traffic with the TCPIPSend element I needed a stop
> parameter for the send write handler. I also liked the idea of being
> able to send multiple copies of the same tcp packet for testing
> purposes, just like you can do for udp en icmp by using InfiniteSource
> in combination with UDPIPEncap or ICMPIPencap.
> So, I've updated the write handler of the TCPIPSend element and now I
> was wondering if you would consider adding this small change to the
> Click standard. If you have any remarks, please let me know.
>
> Regards,
> Jens
>
More information about the click
mailing list