summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.h
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/ipcp.h
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/ipcp.h')
-rw-r--r--src/ipcpd/ipcp.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h
index d6e2aa7c..c78aa5a6 100644
--- a/src/ipcpd/ipcp.h
+++ b/src/ipcpd/ipcp.h
@@ -24,6 +24,7 @@
#define IPCPD_IPCP_H
#include <ouroboros/config.h>
+#include <ouroboros/hash.h>
#include <ouroboros/ipcp.h>
#include "shim-data.h"
@@ -60,7 +61,8 @@ struct ipcp_ops {
int (* ipcp_flow_dealloc)(int fd);
};
-#define DIR_HASH_STRLEN (ipcpi.dir_hash_len * 2)
+#define ipcp_dir_hash_strlen() (hash_len(ipcpi.dir_hash_algo) * 2)
+#define ipcp_dir_hash_len() (hash_len(ipcpi.dir_hash_algo))
struct ipcp {
int irmd_api;
@@ -70,7 +72,8 @@ struct ipcp {
char * dif_name;
uint64_t dt_addr;
- uint16_t dir_hash_len;
+
+ enum hash_algo dir_hash_algo;
struct ipcp_ops * ops;
int irmd_fd;