summaryrefslogtreecommitdiff
path: root/src/lib/irm.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-12 16:57:48 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-13 11:30:20 +0200
commitfc10a7587b1a642748ae0fd69f08d92b4a902248 (patch)
treee0b570cf30753a564855242c94d242f597b5c499 /src/lib/irm.c
parenta3d550ff972121641562d375f75bcf188fc7fe59 (diff)
downloadouroboros-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/irm.c')
-rw-r--r--src/lib/irm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/irm.c b/src/lib/irm.c
index 57e09369..a2fd5d0b 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -87,13 +87,13 @@ int irm_destroy_ipcp(pid_t api)
return ret;
}
-int irm_bootstrap_ipcp(pid_t api,
- const struct dif_config * conf)
+int irm_bootstrap_ipcp(pid_t api,
+ const struct ipcp_config * conf)
{
- irm_msg_t msg = IRM_MSG__INIT;
- dif_config_msg_t config = DIF_CONFIG_MSG__INIT;
- irm_msg_t * recv_msg = NULL;
- int ret = -1;
+ irm_msg_t msg = IRM_MSG__INIT;
+ ipcp_config_msg_t config = IPCP_CONFIG_MSG__INIT;
+ irm_msg_t * recv_msg = NULL;
+ int ret = -1;
if (api == -1 || conf == NULL)
return -EINVAL;
@@ -105,6 +105,7 @@ int irm_bootstrap_ipcp(pid_t api,
msg.conf = &config;
config.dif_name = conf->dif_name;
config.ipcp_type = conf->type;
+ config.dir_hash_len = (uint16_t) conf->dir_hash_len;
switch (conf->type) {
case IPCP_NORMAL: