diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-10-04 18:06:32 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-10-05 09:07:47 +0200 |
commit | b802b25ddfe6f1b6ecabe3ba70e3dac2e99e7a50 (patch) | |
tree | 94e787f0f0ca1f0254b3728b0156b2e3283d8518 /src/irmd/ipcp.c | |
parent | 937adca2a718b160b6d42bb8a3f28d96321fdb49 (diff) | |
download | ouroboros-b802b25ddfe6f1b6ecabe3ba70e3dac2e99e7a50.tar.gz ouroboros-b802b25ddfe6f1b6ecabe3ba70e3dac2e99e7a50.zip |
lib: Pass qosspec at flow allocation
The flow allocator now passes the full qos specification to the
endpoint, instead of just a cube. This is a more flexible
architecture, as it makes QoS cubes internal to the layers.
Adds endianness transforms for the flow allocator protocol in the
normal IPCP.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/irmd/ipcp.c')
-rw-r--r-- | src/irmd/ipcp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c index dc8f1c6e..0bdf674b 100644 --- a/src/irmd/ipcp.c +++ b/src/irmd/ipcp.c @@ -433,11 +433,12 @@ int ipcp_flow_alloc(pid_t pid, pid_t n_pid, const uint8_t * dst, size_t len, - qoscube_t cube) + qosspec_t qs) { - ipcp_msg_t msg = IPCP_MSG__INIT; - ipcp_msg_t * recv_msg = NULL; - int ret = -1; + ipcp_msg_t msg = IPCP_MSG__INIT; + qosspec_msg_t qs_msg; + ipcp_msg_t * recv_msg = NULL; + int ret = -1; assert(dst); @@ -449,8 +450,8 @@ int ipcp_flow_alloc(pid_t pid, msg.has_hash = true; msg.hash.len = len; msg.hash.data = (uint8_t *) dst; - msg.has_qoscube = true; - msg.qoscube = cube; + qs_msg = spec_to_msg(&qs); + msg.qosspec = &qs_msg; recv_msg = send_recv_ipcp_msg(pid, &msg); if (recv_msg == NULL) |