summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-10-19 11:38:54 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-10-19 12:24:23 +0200
commit619502f7178fef30e726ba57b5a49b61c1c1a276 (patch)
tree7700b7e3a197358c5d48dd2d3cca30bdd391762c /src/lib
parent22e46ab72ff1093882b502a095f36a15807a78d9 (diff)
downloadouroboros-0.13.0.tar.gz
ouroboros-0.13.0.zip
tools: Specify QoS cube for data transfer flows0.13.0
The ipcp connect command can now set a specific qos cube for data transfer flows. For management flows, the tool ignores this and defaults to raw until data flows are stable enough. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/irm.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/lib/irm.c b/src/lib/irm.c
index 384da7b0..bf10ae3f 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -173,17 +173,22 @@ int irm_bootstrap_ipcp(pid_t pid,
int irm_connect_ipcp(pid_t pid,
const char * dst,
- const char * component)
+ const char * component,
+ qosspec_t qs)
{
- irm_msg_t msg = IRM_MSG__INIT;
- irm_msg_t * recv_msg = NULL;
- int ret;
+ irm_msg_t msg = IRM_MSG__INIT;
+ qosspec_msg_t qs_msg = QOSSPEC_MSG__INIT;
+ irm_msg_t * recv_msg;
+ int ret;
+
msg.code = IRM_MSG_CODE__IRM_CONNECT_IPCP;
msg.dst = (char *) dst;
msg.comp = (char *) component;
msg.has_pid = true;
msg.pid = pid;
+ qs_msg = spec_to_msg(&qs);
+ msg.qosspec = &qs_msg;
recv_msg = send_recv_irm_msg(&msg);
if (recv_msg == NULL)
@@ -204,8 +209,8 @@ int irm_disconnect_ipcp(pid_t pid,
const char * dst,
const char * component)
{
- irm_msg_t msg = IRM_MSG__INIT;
- irm_msg_t * recv_msg = NULL;
+ irm_msg_t msg = IRM_MSG__INIT;
+ irm_msg_t * recv_msg;
int ret;
msg.code = IRM_MSG_CODE__IRM_DISCONNECT_IPCP;
@@ -231,10 +236,10 @@ int irm_disconnect_ipcp(pid_t pid,
ssize_t irm_list_ipcps(struct ipcp_info ** ipcps)
{
- irm_msg_t msg = IRM_MSG__INIT;
+ irm_msg_t msg = IRM_MSG__INIT;
irm_msg_t * recv_msg;
- size_t nr;
- size_t i;
+ size_t nr;
+ size_t i;
if (ipcps == NULL)
return -EINVAL;