From c96efb13edfaf9b2f2c626bd2a5d5d5afd38155f Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sun, 18 Sep 2016 06:27:43 +0200 Subject: lib, ipcp: Revise fast path and flow interfaces IPCPs can now use ap_init() to initialize the memory. All flows are accessed using flow descriptors, this greatly simplifies IPCP development. Reverts the fast path to a single ap_rbuff per process. Splits lib/ipcp into irmd/ipcp and lib/ipcp-dev. Adds a lib/shim-dev holding tailored functions for shims. Moves the buffer_t to utils.h. Fixes the shim-eth-llc length field. Removes the flow from shared.h. Fixes #4 Fixes #5 --- include/ouroboros/dev.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'include/ouroboros/dev.h') diff --git a/include/ouroboros/dev.h b/include/ouroboros/dev.h index fe5ff4b5..25299ee3 100644 --- a/include/ouroboros/dev.h +++ b/include/ouroboros/dev.h @@ -20,11 +20,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include -#include - #include -#include + +#include #ifndef OUROBOROS_DEV_H #define OUROBOROS_DEV_H @@ -36,32 +34,29 @@ int ap_init(char * ap_name); void ap_fini(void); -/* Returns file descriptor (> 0) and client AE name. */ +/* Returns flow descriptor (> 0) and client AE name. */ int flow_accept(char ** ae_name); -int flow_alloc_resp(int fd, int result); +int flow_alloc_resp(int fd, + int response); /* - * Returns file descriptor (> 0). + * Returns flow descriptor (> 0). * On returning, qos will contain the actual supplied QoS. */ -int flow_alloc(char * dst_name, - char * src_ae_name, +int flow_alloc(char * dst_name, + char * src_ae_name, struct qos_spec * qos); int flow_alloc_res(int fd); int flow_dealloc(int fd); -int flow_cntl(int fd, - int cmd, - int oflags); - -ssize_t flow_write(int fd, +ssize_t flow_write(int fd, void * buf, size_t count); -ssize_t flow_read(int fd, +ssize_t flow_read(int fd, void * buf, size_t count); -- cgit v1.2.3