diff options
-rw-r--r-- | include/ouroboros/select.h | 24 | ||||
-rw-r--r-- | src/tools/oping/oping.c | 2 | ||||
-rw-r--r-- | src/tools/oping/oping_client.c | 3 | ||||
-rw-r--r-- | src/tools/oping/oping_server.c | 3 |
4 files changed, 16 insertions, 16 deletions
diff --git a/include/ouroboros/select.h b/include/ouroboros/select.h index 9e0b8fec..de309b8d 100644 --- a/include/ouroboros/select.h +++ b/include/ouroboros/select.h @@ -29,22 +29,24 @@ struct flow_set; -struct flow_set * flow_set_create(); +typedef struct flow_set flow_set_t; -void flow_set_destroy(struct flow_set * set); +flow_set_t * flow_set_create(); -void flow_set_zero(struct flow_set * set); +void flow_set_destroy(flow_set_t * set); -void flow_set_add(struct flow_set * set, - int fd); +void flow_set_zero(flow_set_t * set); -void flow_set_del(struct flow_set * set, - int fd); +void flow_set_add(flow_set_t * set, + int fd); -bool flow_set_has(struct flow_set * set, - int fd); +void flow_set_del(flow_set_t * set, + int fd); -int flow_select(struct flow_set * set, - const struct timespec * timeout); +bool flow_set_has(flow_set_t * set, + int fd); + +int flow_select(flow_set_t * set, + const struct timespec * timeout); #endif /* OUROBOROS_SELECT_H */ diff --git a/src/tools/oping/oping.c b/src/tools/oping/oping.c index 7d2edf33..7d41b497 100644 --- a/src/tools/oping/oping.c +++ b/src/tools/oping/oping.c @@ -63,7 +63,7 @@ struct c { struct s { struct timespec times[OPING_MAX_FLOWS]; - struct flow_set * flows; + flow_set_t * flows; pthread_mutex_t lock; pthread_t cleaner_pt; diff --git a/src/tools/oping/oping_client.c b/src/tools/oping/oping_client.c index 8b4e0fc2..4742d0de 100644 --- a/src/tools/oping/oping_client.c +++ b/src/tools/oping/oping_client.c @@ -73,8 +73,7 @@ void * reader(void * o) continue; if (ntohl(msg->type) != ECHO_REPLY) { - printf("Invalid message received (%d).\n", - msg->type); + printf("Invalid message on fd %d.\n", fd); continue; } diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c index 0ba47174..845f0cbd 100644 --- a/src/tools/oping/oping_server.c +++ b/src/tools/oping/oping_server.c @@ -83,8 +83,7 @@ void * server_thread(void *o) continue; if (ntohl(msg->type) != ECHO_REQUEST) { - printf("Invalid message on fd %d: type %d, len = %d.\n", - fd, ntohl(msg->type), msg_len); + printf("Invalid message on fd %d.", fd); continue; } |