From 7ba0fd0ce19244745c8d2512ce8a003783d914a7 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 30 Mar 2017 20:33:22 +0200 Subject: lib: Revise flow allocation API The flow_alloc_res and flow_alloc_resp calls have been removed. The flow_alloc and flow_accept calls are now both blocking and take an additional timeout argument. --- include/ouroboros/dev.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/ouroboros/dev.h b/include/ouroboros/dev.h index e92cdd1c..4984736c 100644 --- a/include/ouroboros/dev.h +++ b/include/ouroboros/dev.h @@ -24,6 +24,7 @@ #include #include +#include #ifndef OUROBOROS_DEV_H #define OUROBOROS_DEV_H @@ -33,20 +34,14 @@ int ap_init(const char * ap_name); void ap_fini(void); -/* Returns flow descriptor (> 0) and qos spec. */ -int flow_accept(qosspec_t * spec); +/* Returns flow descriptor, qs updates to supplied QoS. */ +int flow_alloc(const char * dst_name, + qosspec_t * qs, + struct timespec * timeo); -int flow_alloc_resp(int fd, - int response); - -/* - * Returns flow descriptor (> 0). - * On returning, spec will contain the actual supplied QoS. - */ -int flow_alloc(const char * dst_name, - qosspec_t * spec); - -int flow_alloc_res(int fd); +/* Returns flow descriptor, qs updates to supplied QoS. */ +int flow_accept(qosspec_t * qs, + struct timespec * timeo); int flow_dealloc(int fd); @@ -58,4 +53,4 @@ ssize_t flow_read(int fd, void * buf, size_t count); -#endif +#endif /* OUROBOROS_DEV_H */ -- cgit v1.2.3