diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-12 16:57:48 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-13 11:30:20 +0200 |
commit | fc10a7587b1a642748ae0fd69f08d92b4a902248 (patch) | |
tree | e0b570cf30753a564855242c94d242f597b5c499 /src/lib/dev.c | |
parent | a3d550ff972121641562d375f75bcf188fc7fe59 (diff) | |
download | ouroboros-fc10a7587b1a642748ae0fd69f08d92b4a902248.tar.gz ouroboros-fc10a7587b1a642748ae0fd69f08d92b4a902248.zip |
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.
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r-- | src/lib/dev.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; |