diff options
author | dimitri staessens <[email protected]> | 2016-09-04 18:11:53 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-09-06 09:12:27 +0200 |
commit | 116cda0ae03bc4e7b8571cf1658775c13c03c68e (patch) | |
tree | d15cb04d68a063fc3418d0259c9e779514861fcf /src/tools/oping/oping.c | |
parent | d35685c537e7809d5c4a213fcfa553d8a522bc51 (diff) | |
download | ouroboros-116cda0ae03bc4e7b8571cf1658775c13c03c68e.tar.gz ouroboros-116cda0ae03bc4e7b8571cf1658775c13c03c68e.zip |
lib: dev: Provide a set of fds to flow_select
The flow_select call now takes as a parameter a flow_set_t, which
specifies a set of flow descriptors that will unblock the select call
when an SDU for one of them arrives. The select call has been moved to
its own header.
Diffstat (limited to 'src/tools/oping/oping.c')
-rw-r--r-- | src/tools/oping/oping.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/oping/oping.c b/src/tools/oping/oping.c index 2871e79e..7d2edf33 100644 --- a/src/tools/oping/oping.c +++ b/src/tools/oping/oping.c @@ -23,6 +23,9 @@ #define _POSIX_C_SOURCE 199506L +#include <ouroboros/select.h> +#include <ouroboros/dev.h> + #include <stdio.h> #include <string.h> #include <pthread.h> @@ -59,9 +62,9 @@ struct c { } client; struct s { - struct timespec times[OPING_MAX_FLOWS]; - bool flows[OPING_MAX_FLOWS]; - pthread_mutex_t lock; + struct timespec times[OPING_MAX_FLOWS]; + struct flow_set * flows; + pthread_mutex_t lock; pthread_t cleaner_pt; pthread_t accept_pt; |