summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-06-21 11:50:19 +0200
committerSander Vrijders <[email protected]>2017-06-21 12:21:54 +0200
commit806629e64e8231d0c57a80d3b6584094cd6c89bd (patch)
treee0bbe49e68ba86be325ee23c5879a7611df87c9f /include
parent22020246ac2b6f03f42dffb48ced19e43b3e9b77 (diff)
downloadouroboros-806629e64e8231d0c57a80d3b6584094cd6c89bd.tar.gz
ouroboros-806629e64e8231d0c57a80d3b6584094cd6c89bd.zip
lib, ipcpd, irmd: Add full-fledged QoS
This adds more Quality of Service support to Ouroboros. One part is the network specific characteristics such as bandwidth, delay, ... The other part is end-to-end QoS like reliability, window based flow control, ...
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/qos.h17
-rw-r--r--include/ouroboros/qoscube.h (renamed from include/ouroboros/shared.h)18
-rw-r--r--include/ouroboros/shm_rdrbuff.h2
-rw-r--r--include/ouroboros/sockets.h3
4 files changed, 28 insertions, 12 deletions
diff --git a/include/ouroboros/qos.h b/include/ouroboros/qos.h
index b12fed60..78bdba45 100644
--- a/include/ouroboros/qos.h
+++ b/include/ouroboros/qos.h
@@ -25,13 +25,22 @@
#define OUROBOROS_QOS_H
#include <stdint.h>
+#include <stdbool.h>
typedef struct qos_spec {
- uint32_t delay;
- uint32_t jitter;
+ uint32_t delay; /* In ms */
+ uint64_t bandwidth; /* In bits/s */
+ uint8_t availability; /* Class of 9s */
+ uint32_t maximum_interruption; /* In ms */
- /* FIXME: define qosspecs */
- int cube;
+ bool resource_control; /* Feedback from receiver */
+ bool reliable; /* Reliable flow */
+ bool error_check; /* Check for errors */
+ bool ordered; /* Ordered delivery */
+ bool partial; /* Allow partial delivery */
} qosspec_t;
+int qosspec_init(qosspec_t * qs);
+int qosspec_fini(qosspec_t * qs);
+
#endif
diff --git a/include/ouroboros/shared.h b/include/ouroboros/qoscube.h
index 07d4be5e..5d339adb 100644
--- a/include/ouroboros/shared.h
+++ b/include/ouroboros/qoscube.h
@@ -1,7 +1,7 @@
/*
* Ouroboros - Copyright (C) 2016 - 2017
*
- * Shared definitions between IRMd and IPCPs
+ * Quality of Service cubes
*
* Dimitri Staessens <[email protected]>
* Sander Vrijders <[email protected]>
@@ -21,15 +21,19 @@
* 02110-1301 USA
*/
-#ifndef OUROBOROS_SHARED_H
-#define OUROBOROS_SHARED_H
+#ifndef OUROBOROS_QOSCUBE_H
+#define OUROBOROS_QOSCUBE_H
+
+#include <ouroboros/qos.h>
-/* FIXME: To be decided which QoS cubes we support */
typedef enum qos_cube {
- QOS_CUBE_FRC = 0,
- QOS_CUBE_BE,
+ QOS_CUBE_BE = 0,
QOS_CUBE_VIDEO,
+ QOS_CUBE_VOICE,
QOS_CUBE_MAX
} qoscube_t;
-#endif /* OUROBOROS_SHARED_H */
+qoscube_t qos_spec_to_cube(qosspec_t qs);
+qosspec_t qos_cube_to_spec(qoscube_t qc);
+
+#endif
diff --git a/include/ouroboros/shm_rdrbuff.h b/include/ouroboros/shm_rdrbuff.h
index 13b99eef..fb12be74 100644
--- a/include/ouroboros/shm_rdrbuff.h
+++ b/include/ouroboros/shm_rdrbuff.h
@@ -25,7 +25,7 @@
#define OUROBOROS_SHM_RDRBUFF_H
#include <ouroboros/shm_du_buff.h>
-#include <ouroboros/shared.h>
+#include <ouroboros/qoscube.h>
#include <stdint.h>
#include <pthread.h>
diff --git a/include/ouroboros/sockets.h b/include/ouroboros/sockets.h
index 660709bf..0d65c15d 100644
--- a/include/ouroboros/sockets.h
+++ b/include/ouroboros/sockets.h
@@ -30,6 +30,9 @@
typedef IpcpConfigMsg ipcp_config_msg_t;
typedef DifInfoMsg dif_info_msg_t;
+#include "frct_enroll.pb-c.h"
+typedef FrctEnrollMsg frct_enroll_msg_t;
+
#include "irmd_messages.pb-c.h"
typedef IrmMsg irm_msg_t;