summaryrefslogtreecommitdiff
path: root/include/ouroboros/dev.h
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-03 00:19:06 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-03 00:29:34 +0200
commita6e8978fd9b5786607438689f8cd8b8efb8ef77e (patch)
tree3c2e0982771540ab9b5a061a1645a8a36568bacf /include/ouroboros/dev.h
parentd409fd569683d8f0e8c8f65d4820087dbf7c0786 (diff)
downloadouroboros-a6e8978fd9b5786607438689f8cd8b8efb8ef77e.tar.gz
ouroboros-a6e8978fd9b5786607438689f8cd8b8efb8ef77e.zip
lib: dev: Add select-like call
This adds a flow_select() call that will sleep until an SDU can be read on a flow. It returns the file descriptor for which an SDU is ready. It takes as optional argument a timespec struct to specify a timeout.
Diffstat (limited to 'include/ouroboros/dev.h')
-rw-r--r--include/ouroboros/dev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ouroboros/dev.h b/include/ouroboros/dev.h
index eb779953..91d5c7de 100644
--- a/include/ouroboros/dev.h
+++ b/include/ouroboros/dev.h
@@ -22,6 +22,7 @@
#include <unistd.h>
#include <stdint.h>
+#include <sys/time.h>
#include <ouroboros/qos.h>
#include <ouroboros/flow.h>
@@ -53,5 +54,6 @@ int flow_dealloc(int fd);
int flow_cntl(int fd, int cmd, int oflags);
ssize_t flow_write(int fd, void * buf, size_t count);
ssize_t flow_read(int fd, void * buf, size_t count);
+int flow_select(const struct timespec * timeout);
#endif