diff options
author | dimitri staessens <[email protected]> | 2016-10-25 12:57:15 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-10-25 12:57:15 +0200 |
commit | cce79395b5a9f75d3fe1b14bf5df44795d680ca4 (patch) | |
tree | ec6df2d106018595f6f9abc6b09c9606c4715a5c /src/tools | |
parent | f33f8f79ee6fd6efe6c868be61ab3addf2ec2730 (diff) | |
download | ouroboros-cce79395b5a9f75d3fe1b14bf5df44795d680ca4.tar.gz ouroboros-cce79395b5a9f75d3fe1b14bf5df44795d680ca4.zip |
lib: API for accepting flows with QoS
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/cbr/cbr_server.c | 3 | ||||
-rw-r--r-- | src/tools/echo/echo_server.c | 3 | ||||
-rw-r--r-- | src/tools/oping/oping_server.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/cbr/cbr_server.c b/src/tools/cbr/cbr_server.c index f1c342d1..eb45a2c6 100644 --- a/src/tools/cbr/cbr_server.c +++ b/src/tools/cbr/cbr_server.c @@ -155,6 +155,7 @@ void * listener(void * o) { int client_fd = 0; int response = 0; + struct qos_spec qs; (void) o; @@ -162,7 +163,7 @@ void * listener(void * o) server_settings.interval, server_settings.timeout); while (true) { - client_fd = flow_accept(NULL); + client_fd = flow_accept(NULL, &qs); if (client_fd < 0) { printf("Failed to accept flow.\n"); break; diff --git a/src/tools/echo/echo_server.c b/src/tools/echo/echo_server.c index 070f0ce3..09575364 100644 --- a/src/tools/echo/echo_server.c +++ b/src/tools/echo/echo_server.c @@ -40,6 +40,7 @@ int server_main(void) int client_fd = 0; char buf[BUF_SIZE]; ssize_t count = 0; + struct qos_spec qs; printf("Starting the server.\n"); @@ -50,7 +51,7 @@ int server_main(void) } while (true) { - client_fd = flow_accept(NULL); + client_fd = flow_accept(NULL, &qs); if (client_fd < 0) { printf("Failed to accept flow.\n"); break; diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c index 720e71b6..8d7ab1db 100644 --- a/src/tools/oping/oping_server.c +++ b/src/tools/oping/oping_server.c @@ -115,13 +115,14 @@ void * accept_thread(void * o) { int fd = 0; struct timespec now = {0, 0}; + struct qos_spec qs; (void) o; printf("Ouroboros ping server started.\n"); while (true) { - fd = flow_accept(NULL); + fd = flow_accept(NULL, &qs); if (fd < 0) { printf("Failed to accept flow.\n"); break; |