From 3c6f5161b2903c1bf59bcc959301a7390c3c5c79 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 21 Mar 2016 17:41:29 +0100 Subject: tools: Simple echo application This adds a simple echo application written to show application how to use the API. It also updates the dev.h header file with the insights gained from performing this excercise. --- include/ouroboros/dev.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'include/ouroboros/dev.h') diff --git a/include/ouroboros/dev.h b/include/ouroboros/dev.h index 217352ef..39194abd 100644 --- a/include/ouroboros/dev.h +++ b/include/ouroboros/dev.h @@ -23,30 +23,30 @@ #ifndef OUROBOROS_DEV_H #define OUROBOROS_DEV_H -#include "common.h" - -struct qos_spec * list_qos_cubes(rina_name_t dst, - struct qos_spec min_qos); +#include /* Returns file descriptor */ -int ap_reg(rina_name_t name, char ** difs); -int ap_unreg(rina_name_t name, char ** difs); +int ap_reg(char * ap_name, char * ae_name, + char ** difs, size_t difs_size); +int ap_unreg(char * ap_name, char * ae_name, + char ** difs, size_t difs_size); -/* Returns file descriptor (> 0) */ -int flow_accept(int fd, rina_name_t * name); -int flow_alloc_resp(int fd, int result); +/* Returns file descriptor (> 0) and client name(s) */ +int flow_accept(int fd, char * ap_name, char * ae_name); +int flow_alloc_resp(int fd, int result); /* Returns file descriptor */ -int flow_alloc(rina_name_t src, rina_name_t dst, - struct qos_spec qos, int oflags); +int flow_alloc(char * dst_ap_name, char * dst_ae_name, + char * src_ap_name, char * src_ae_name, + struct qos_spec * qos, int oflags); /* If flow is accepted returns a value > 0 */ -int flow_alloc_res(int fd); -int flow_dealloc(int fd); +int flow_alloc_res(int fd); +int flow_dealloc(int fd); /* Wraps around fnctl */ -int flow_cntl(int fd, int oflags); -int flow_write(int fd, buffer_t * sdu); -int flow_read(int fd, buffer_t * sdu); +int flow_cntl(int fd, int oflags); +ssize_t flow_write(int fd, void * buf, size_t count); +ssize_t flow_read(int fd, void * buf, size_t count); #endif -- cgit v1.2.3