summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/fmgr.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-16 12:04:59 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-16 13:40:12 +0200
commit97ef24340da7d3f55a39ba16b400d13f9bbe9e60 (patch)
treee13656c267343db47a4f79d2098222909222736d /src/ipcpd/normal/fmgr.c
parentc884fb9d6b3d3ea59f5fc7c5d709bfff4fcf1849 (diff)
downloadouroboros-97ef24340da7d3f55a39ba16b400d13f9bbe9e60.tar.gz
ouroboros-97ef24340da7d3f55a39ba16b400d13f9bbe9e60.zip
ipcpd: Allow specifying the hash algorithm to use
Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported.
Diffstat (limited to 'src/ipcpd/normal/fmgr.c')
-rw-r--r--src/ipcpd/normal/fmgr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipcpd/normal/fmgr.c b/src/ipcpd/normal/fmgr.c
index 5166cc5d..ba36812f 100644
--- a/src/ipcpd/normal/fmgr.c
+++ b/src/ipcpd/normal/fmgr.c
@@ -439,7 +439,7 @@ int fmgr_np1_alloc(int fd,
ssize_t ch;
ssize_t i;
char ** children;
- char hashstr[DIR_HASH_STRLEN + 1];
+ char hashstr[ipcp_dir_hash_strlen() + 1];
char * dst_ipcp = NULL;
ipcp_hash_str(hashstr, dst);
@@ -477,7 +477,7 @@ int fmgr_np1_alloc(int fd,
msg.code = FLOW_ALLOC_CODE__FLOW_REQ;
msg.has_hash = true;
- msg.hash.len = ipcpi.dir_hash_len;
+ msg.hash.len = ipcp_dir_hash_len();
msg.hash.data = (uint8_t *) dst;
msg.has_qoscube = true;
msg.qoscube = cube;
@@ -663,7 +663,7 @@ int fmgr_np1_post_buf(cep_id_t cep_id,
fd = ipcp_flow_req_arr(getpid(),
msg->hash.data,
- ipcpi.dir_hash_len,
+ ipcp_dir_hash_len(),
msg->qoscube);
if (fd < 0) {
pthread_mutex_unlock(&ipcpi.alloc_lock);