diff options
author | dimitri staessens <[email protected]> | 2017-04-13 09:55:31 +0000 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-04-13 09:55:31 +0000 |
commit | 72c28d6173ade511e9dc6969e0fc66db2dbba38a (patch) | |
tree | 12756b89d8f4ce421c70d5cf05850b4968e76412 /src/tools/irm | |
parent | 2cc9c8d742e037c8a6ddc3eea4c05f4a905183d3 (diff) | |
parent | fc10a7587b1a642748ae0fd69f08d92b4a902248 (diff) | |
download | ouroboros-72c28d6173ade511e9dc6969e0fc66db2dbba38a.tar.gz ouroboros-72c28d6173ade511e9dc6969e0fc66db2dbba38a.zip |
Merged in dstaesse/ouroboros/be-hashes (pull request #479)
lib, ipcpd, irmd: Register hash instead of name
Diffstat (limited to 'src/tools/irm')
-rw-r--r-- | src/tools/irm/irm_ipcp_bootstrap.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c index ac52c6c1..489f98b9 100644 --- a/src/tools/irm/irm_ipcp_bootstrap.c +++ b/src/tools/irm/irm_ipcp_bootstrap.c @@ -28,7 +28,8 @@ #include <sys/socket.h> #endif #include <ouroboros/irm.h> -#include <ouroboros/irm_config.h> +#include <ouroboros/ipcp.h> +#include <ouroboros/hash.h> #include "irm_ops.h" #include "irm_utils.h" @@ -55,11 +56,12 @@ static void usage(void) { - /* FIXME: Add dif_config stuff */ + /* FIXME: Add ipcp_config stuff */ printf("Usage: irm ipcp bootstrap\n" " name <ipcp name>\n" " dif <DIF name>\n" - " type [TYPE]\n\n" + " type [TYPE]\n" +/* FIXME: add option to set hash algorithm and length for directory */ "where TYPE = {" NORMAL " " LOCAL " " SHIM_UDP " " SHIM_ETH_LLC"}\n\n" "if TYPE == " NORMAL "\n" @@ -92,7 +94,7 @@ int do_bootstrap_ipcp(int argc, char ** argv) { char * name = NULL; pid_t api; - struct dif_config conf; + struct ipcp_config conf; uint8_t addr_size = DEFAULT_ADDR_SIZE; uint8_t cep_id_size = DEFAULT_CEP_ID_SIZE; uint8_t pdu_length_size = DEFAULT_PDU_LEN_SIZE; @@ -112,6 +114,7 @@ int do_bootstrap_ipcp(int argc, char ** argv) pid_t * apis = NULL; ssize_t len = 0; int i = 0; + uint16_t dir_hash_len = SHA3_256_HASH_LEN; while (argc > 0) { if (matches(*argv, "type") == 0) { @@ -177,6 +180,7 @@ int do_bootstrap_ipcp(int argc, char ** argv) } conf.dif_name = dif_name; + conf.dir_hash_len = dir_hash_len; if (strcmp(ipcp_type, NORMAL) == 0) { conf.type = IPCP_NORMAL; |