summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/fmgr.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2017-01-03 11:57:59 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2017-01-03 12:12:49 +0100
commit5ab96126078cb9166356beaff3458404664274ed (patch)
tree4734c9872a5b9b4b4cb12e9fab82bdb255a6591a /src/ipcpd/normal/fmgr.c
parent4ccd3e2c8af00963ac6d88aac587de016300ed90 (diff)
downloadouroboros-5ab96126078cb9166356beaff3458404664274ed.tar.gz
ouroboros-5ab96126078cb9166356beaff3458404664274ed.zip
lib, ipcpd, irmd: Proof of concept QoS
Now correctly relays the qoscube end-to-end in the stack. A simple function specifying the cube in the spec is used for initial testing. The translation is now done in dev.c, but it could be moved elsewhere when qos cabability matures and the need arises.
Diffstat (limited to 'src/ipcpd/normal/fmgr.c')
-rw-r--r--src/ipcpd/normal/fmgr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ipcpd/normal/fmgr.c b/src/ipcpd/normal/fmgr.c
index d8190572..4b24d5a1 100644
--- a/src/ipcpd/normal/fmgr.c
+++ b/src/ipcpd/normal/fmgr.c
@@ -351,7 +351,7 @@ int fmgr_fini()
int fmgr_np1_alloc(int fd,
char * dst_ap_name,
char * src_ae_name,
- qoscube_t qos)
+ qoscube_t cube)
{
cep_id_t cep_id;
buffer_t buf;
@@ -391,8 +391,8 @@ int fmgr_np1_alloc(int fd,
msg.code = FLOW_ALLOC_CODE__FLOW_REQ;
msg.dst_name = dst_ap_name;
msg.src_ae_name = src_ae_name;
- msg.qos_cube = qos;
- msg.has_qos_cube = true;
+ msg.has_qoscube = true;
+ msg.qoscube = cube;
buf.len = flow_alloc_msg__get_packed_size(&msg);
if (buf.len == 0) {
@@ -410,7 +410,7 @@ int fmgr_np1_alloc(int fd,
pthread_rwlock_wrlock(&fmgr.np1_flows_lock);
- cep_id = frct_i_create(addr, &buf, qos);
+ cep_id = frct_i_create(addr, &buf, cube);
if (cep_id == INVALID_CEP_ID) {
free(ro_data);
free(buf.data);
@@ -535,7 +535,8 @@ int fmgr_np1_post_buf(cep_id_t cep_id, buffer_t * buf)
case FLOW_ALLOC_CODE__FLOW_REQ:
fd = ipcp_flow_req_arr(getpid(),
msg->dst_name,
- msg->src_ae_name);
+ msg->src_ae_name,
+ msg->qoscube);
if (fd < 0) {
flow_alloc_msg__free_unpacked(msg, NULL);
LOG_ERR("Failed to get fd for flow.");