jam
12 years agoEINTR, not EAGAIN. master
sgunderson@bigfoot.com [Tue, 13 Feb 2007 22:59:34 +0000 (23:59 +0100)]
EINTR, not EAGAIN.

12 years agoAdd the first round of EAGAIN tests.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 22:50:30 +0000 (23:50 +0100)]
Add the first round of EAGAIN tests.

12 years agoAdd support for adjusting the number of receiver threads.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 22:26:45 +0000 (23:26 +0100)]
Add support for adjusting the number of receiver threads.

12 years agoFix a warning.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 22:19:08 +0000 (23:19 +0100)]
Fix a warning.

12 years agoMinor epoll fixes.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 22:17:53 +0000 (23:17 +0100)]
Minor epoll fixes.

12 years agoMake each receiver handle multiple sockets.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 22:13:52 +0000 (23:13 +0100)]
Make each receiver handle multiple sockets.

12 years agoParametrize out the update frequency.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 21:31:46 +0000 (22:31 +0100)]
Parametrize out the update frequency.

12 years agoStop malloc()-ing for each new connection.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 20:54:31 +0000 (21:54 +0100)]
Stop malloc()-ing for each new connection.

12 years agoIt looks like send() can give us EAGAIN even if epoll() said the socket
sgunderson@bigfoot.com [Tue, 13 Feb 2007 20:29:33 +0000 (21:29 +0100)]
It looks like send() can give us EAGAIN even if epoll() said the socket
was ready (after all, we don't check the events bits). Just ignore that.

12 years agoepoll_data is a union, not a struct. Doh, no wonder the .fd element was
sgunderson@bigfoot.com [Tue, 13 Feb 2007 20:05:28 +0000 (21:05 +0100)]
epoll_data is a union, not a struct. Doh, no wonder the .fd element was
corrupted :-)

12 years agoActually take the -N short option.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 20:00:21 +0000 (21:00 +0100)]
Actually take the -N short option.

12 years agoFix a long vs. long long issue.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 20:00:08 +0000 (21:00 +0100)]
Fix a long vs. long long issue.

12 years agoProper error handling for epoll, and some cleanup.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 19:52:29 +0000 (20:52 +0100)]
Proper error handling for epoll, and some cleanup.

12 years agoHandle EAGAIN in connect(). Duh.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 19:45:27 +0000 (20:45 +0100)]
Handle EAGAIN in connect(). Duh.

12 years agoActually abort if we have no list.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 19:41:51 +0000 (20:41 +0100)]
Actually abort if we have no list.

12 years agoStart working on multiple senders per thread, using epoll.
sgunderson@bigfoot.com [Tue, 13 Feb 2007 19:41:36 +0000 (20:41 +0100)]
Start working on multiple senders per thread, using epoll.

12 years agoAdd a little delay at the start.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 23:40:15 +0000 (00:40 +0100)]
Add a little delay at the start.

12 years agoMake a per-second traffic counter.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 23:18:20 +0000 (00:18 +0100)]
Make a per-second traffic counter.

12 years agoPrint out the statistics, and fix a stats bug.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 22:47:43 +0000 (23:47 +0100)]
Print out the statistics, and fix a stats bug.

12 years agoRemove some debugging stuff.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 22:37:39 +0000 (23:37 +0100)]
Remove some debugging stuff.

12 years agoMove the receiver stuff into its own thread, starting before the senders.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 22:36:50 +0000 (23:36 +0100)]
Move the receiver stuff into its own thread, starting before the senders.
Also add some stats.

12 years agoAdd a new printf, for debugging.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 22:08:14 +0000 (23:08 +0100)]
Add a new printf, for debugging.

12 years agoActually send (random) data.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 21:47:10 +0000 (22:47 +0100)]
Actually send (random) data.

12 years agoMake a special "listen-only" mode.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 20:40:32 +0000 (21:40 +0100)]
Make a special "listen-only" mode.

12 years agoCreate threads in a detached state.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 20:36:45 +0000 (21:36 +0100)]
Create threads in a detached state.

12 years agoTweak the output a bit.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 20:30:41 +0000 (21:30 +0100)]
Tweak the output a bit.

12 years agoMake the sender a bit less dumb.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 20:24:37 +0000 (21:24 +0100)]
Make the sender a bit less dumb.

12 years agoAdd a Pareto random number generator.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 20:13:08 +0000 (21:13 +0100)]
Add a Pareto random number generator.

12 years agoAdd an option for setting the number of senders.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 19:44:19 +0000 (20:44 +0100)]
Add an option for setting the number of senders.

12 years agoStart firing off sender workers.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 19:42:13 +0000 (20:42 +0100)]
Start firing off sender workers.

12 years agoWrite a friendly "we're ready" message.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 19:39:15 +0000 (20:39 +0100)]
Write a friendly "we're ready" message.

12 years agos/file/list/ in the options.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 18:40:25 +0000 (19:40 +0100)]
s/file/list/ in the options.

12 years agoCheck for empty source or destination list.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 18:27:36 +0000 (19:27 +0100)]
Check for empty source or destination list.

12 years agoAlso read the sources.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 18:22:25 +0000 (19:22 +0100)]
Also read the sources.

12 years agoGeneralize the file reading, and store the IPs in memory.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 18:21:23 +0000 (19:21 +0100)]
Generalize the file reading, and store the IPs in memory.

12 years agoStart parsing the destination list.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 18:15:54 +0000 (19:15 +0100)]
Start parsing the destination list.

12 years agoMake the port configurable.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 17:22:07 +0000 (18:22 +0100)]
Make the port configurable.

12 years agoStart parsing options.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 17:20:22 +0000 (18:20 +0100)]
Start parsing options.

12 years agoSet a much smaller stack size for the worker threads, so we won't easily
sgunderson@bigfoot.com [Wed, 31 Jan 2007 16:43:12 +0000 (17:43 +0100)]
Set a much smaller stack size for the worker threads, so we won't easily
run out of stack. Also add a FIXME.

12 years agoFix error detection for pthread_create().
sgunderson@bigfoot.com [Wed, 31 Jan 2007 16:37:15 +0000 (17:37 +0100)]
Fix error detection for pthread_create().

12 years agoSet SO_REUSEADDR.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 16:35:50 +0000 (17:35 +0100)]
Set SO_REUSEADDR.

12 years agoCheck the return value of pthread_create.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 16:33:45 +0000 (17:33 +0100)]
Check the return value of pthread_create.

12 years agoMake the receiver worker actually handle the socket.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 16:28:18 +0000 (17:28 +0100)]
Make the receiver worker actually handle the socket.

12 years agoAdd a loop listening for new connections.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 16:21:26 +0000 (17:21 +0100)]
Add a loop listening for new connections.

12 years agolisten() on the socket.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 16:08:25 +0000 (17:08 +0100)]
listen() on the socket.

12 years agoBind to the right port.
sgunderson@bigfoot.com [Wed, 31 Jan 2007 16:05:37 +0000 (17:05 +0100)]
Bind to the right port.

12 years agoBegin!
sgunderson@bigfoot.com [Wed, 31 Jan 2007 15:58:59 +0000 (16:58 +0100)]
Begin!