From fc10a7587b1a642748ae0fd69f08d92b4a902248 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 12 Apr 2017 16:57:48 +0200 Subject: lib, ipcpd, irmd: Register hash instead of name All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs. --- src/lib/dev.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/lib/dev.c') diff --git a/src/lib/dev.c b/src/lib/dev.c index 433fb93b..a4707dc3 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -1210,7 +1210,8 @@ int ipcp_create_r(pid_t api, } int ipcp_flow_req_arr(pid_t api, - char * dst_name, + uint8_t * dst, + size_t len, qoscube_t cube) { irm_msg_t msg = IRM_MSG__INIT; @@ -1218,13 +1219,15 @@ int ipcp_flow_req_arr(pid_t api, int port_id = -1; int fd = -1; - if (dst_name == NULL) + if (dst == NULL) return -EINVAL; msg.code = IRM_MSG_CODE__IPCP_FLOW_REQ_ARR; msg.has_api = true; msg.api = api; - msg.dst_name = dst_name; + msg.has_hash = true; + msg.hash.len = len; + msg.hash.data = dst; msg.has_qoscube = true; msg.qoscube = cube; -- cgit v1.2.3