summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/ipcp-dev.h2
-rw-r--r--include/ouroboros/np1_flow.h2
-rw-r--r--include/ouroboros/qos.h22
-rw-r--r--include/ouroboros/sockets.h.in11
4 files changed, 21 insertions, 16 deletions
diff --git a/include/ouroboros/ipcp-dev.h b/include/ouroboros/ipcp-dev.h
index 9a33c25a..a0ed026c 100644
--- a/include/ouroboros/ipcp-dev.h
+++ b/include/ouroboros/ipcp-dev.h
@@ -31,7 +31,7 @@ int ipcp_create_r(pid_t pid,
int ipcp_flow_req_arr(pid_t pid,
const uint8_t * dst,
size_t len,
- qoscube_t cube);
+ qosspec_t qs);
int ipcp_flow_alloc_reply(int fd,
int response);
diff --git a/include/ouroboros/np1_flow.h b/include/ouroboros/np1_flow.h
index 789e82df..3435c24a 100644
--- a/include/ouroboros/np1_flow.h
+++ b/include/ouroboros/np1_flow.h
@@ -29,7 +29,7 @@
int np1_flow_alloc(pid_t n_pid,
int port_id,
- qoscube_t qc);
+ qosspec_t qs);
int np1_flow_resp(int port_id);
diff --git a/include/ouroboros/qos.h b/include/ouroboros/qos.h
index 011828d7..2b93f1d0 100644
--- a/include/ouroboros/qos.h
+++ b/include/ouroboros/qos.h
@@ -27,26 +27,20 @@
#include <stdbool.h>
typedef struct qos_spec {
- uint32_t delay; /* In ms */
- uint64_t bandwidth; /* In bits/s */
- uint8_t availability; /* Class of 9s */
- uint32_t loss; /* Packet loss */
- uint8_t in_order; /* In-order delivery, enables FRCT */
- uint32_t maximum_interruption; /* In ms */
+ uint32_t delay; /* In ms */
+ uint64_t bandwidth; /* In bits/s */
+ uint8_t availability; /* Class of 9s */
+ uint32_t loss; /* Packet loss */
+ uint32_t ber; /* Bit error rate, errors per billion bits */
+ uint8_t in_order; /* In-order delivery, enables FRCT */
+ uint32_t max_gap; /* In ms */
} qosspec_t;
qosspec_t qos_raw;
+qosspec_t qos_raw_no_errors;
qosspec_t qos_best_effort;
qosspec_t qos_video;
qosspec_t qos_voice;
qosspec_t qos_data;
-__BEGIN_DECLS
-
-int qosspec_init(qosspec_t * qs);
-
-int qosspec_fini(qosspec_t * qs);
-
-__END_DECLS
-
#endif /* OUROBOROS_QOS_H */
diff --git a/include/ouroboros/sockets.h.in b/include/ouroboros/sockets.h.in
index 4557a9ef..368923db 100644
--- a/include/ouroboros/sockets.h.in
+++ b/include/ouroboros/sockets.h.in
@@ -23,6 +23,8 @@
#ifndef OUROBOROS_SOCKETS_H
#define OUROBOROS_SOCKETS_H
+#include <ouroboros/qos.h>
+
#include <sys/types.h>
#include "ipcp_config.pb-c.h"
@@ -36,6 +38,9 @@ typedef IpcpInfoMsg ipcp_info_msg_t;
#include "ipcpd_messages.pb-c.h"
typedef IpcpMsg ipcp_msg_t;
+#include "qosspec.pb-c.h"
+typedef QosspecMsg qosspec_msg_t;
+
#define SOCK_PATH "/var/run/ouroboros/"
#define SOCK_PATH_SUFFIX ".sock"
@@ -53,4 +58,10 @@ int client_socket_open(char * file_name);
irm_msg_t * send_recv_irm_msg(irm_msg_t * msg);
+
+/* qos message conversion needed in different components */
+qosspec_msg_t spec_to_msg(qosspec_t * qs);
+
+qosspec_t msg_to_spec(qosspec_msg_t * msg);
+
#endif