summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-03-21 17:41:29 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-03-21 17:41:29 +0100
commit3c6f5161b2903c1bf59bcc959301a7390c3c5c79 (patch)
tree87aaeaea67881739220cf7a89d7b9a1a668e20f2 /include
parent02681c391cbc1cc08f2dea5d8499f301d9321147 (diff)
downloadouroboros-3c6f5161b2903c1bf59bcc959301a7390c3c5c79.tar.gz
ouroboros-3c6f5161b2903c1bf59bcc959301a7390c3c5c79.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/common.h2
-rw-r--r--include/ouroboros/dev.h32
2 files changed, 16 insertions, 18 deletions
diff --git a/include/ouroboros/common.h b/include/ouroboros/common.h
index 1ff4267b..7114ed73 100644
--- a/include/ouroboros/common.h
+++ b/include/ouroboros/common.h
@@ -28,8 +28,6 @@
#include <stdbool.h>
#include <errno.h>
-typedef uint32_t port_id_t;
-
typedef struct {
uint8_t * data;
size_t size;
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 <ouroboros/common.h>
/* 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