From fd086b87023da5a5ba4e42da2327fa39a6725cd2 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sun, 9 Oct 2016 17:45:31 +0200 Subject: lib: Add a type for struct flow_set The struct flow_set can now be accessed in applications as flow_set_t. Fixes some malformed lines and homogenizes output when receiving bad SDUs in the oping tool. --- src/tools/oping/oping.c | 2 +- src/tools/oping/oping_client.c | 3 +-- src/tools/oping/oping_server.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3