Date: Thu, 15 Oct 2009 15:30:41 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/tools/tools/netrate/netsend netsend.c Message-ID: <200910151530.n9FFUn6e033303@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
luigi 2009-10-15 15:30:41 UTC
FreeBSD src repository
Modified files:
tools/tools/netrate/netsend netsend.c
Log:
SVN rev 198136 on 2009-10-15 15:30:41Z by luigi
Support the specification of a range of destination ports e.g.
netsend 127.0.0.1 6666-7777 [payloadsize] [packet_rate] [duration]
This is useful to test the behaviour of systems that do some kind
of flow classifications and so exhibit different behaviour depending
on the number of flows that hit them.
I plan to add a similar extension to sweep on a range of IP addresses,
so we can issue a single command to flood (obviously, for testing
purposes!) a number of different destinations.
When there is only one destination, we do a preliminary connect()
of the socket so we can use send() instead of sendto().
When we have multiple ports, the socket is not connect()'ed and we
do a sendto() instead. There is a performance hit in this case,
as the throughput on the loopback interface (with a firewall rule
that blocks the transmission) goes down from 900kpps to 490kpps on
my test machine.
If the number of different destinations is limited, one option to
explore is to have multiple connect()ed sockets.
MFC after: 1 month
Revision Changes Path
1.11 +88 -51 src/tools/tools/netrate/netsend/netsend.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910151530.n9FFUn6e033303>
