diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-03 00:19:06 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-03 00:29:34 +0200 |
commit | a6e8978fd9b5786607438689f8cd8b8efb8ef77e (patch) | |
tree | 3c2e0982771540ab9b5a061a1645a8a36568bacf /include/ouroboros/dev.h | |
parent | d409fd569683d8f0e8c8f65d4820087dbf7c0786 (diff) | |
download | ouroboros-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.h | 2 |
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 |