summaryrefslogtreecommitdiff
path: root/src/tools/irm
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2017-12-13 17:54:13 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2017-12-15 15:43:37 +0100
commit757cbecfeb13e0db0fd8db7b2a3e8c57f733e77d (patch)
tree34ebed962b22fe4721c3bb5f7175d9f2c3dd90ee /src/tools/irm
parent7f077e978738c3ecdb37b3d5cf30e03bb63fc8ad (diff)
downloadouroboros-757cbecfeb13e0db0fd8db7b2a3e8c57f733e77d.tar.gz
ouroboros-757cbecfeb13e0db0fd8db7b2a3e8c57f733e77d.zip
ipcpd: Integrate raptor into ouroboros 0.8
The raptor code is refactored to completely remove reduntant code relating to addresses. The dependency on the google protocol buffers is removed. The build system will only build raptor if the relevant kernel module is found on the system. The irm tool and the relevant documentation are updated. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/tools/irm')
-rw-r--r--src/tools/irm/irm_ipcp_bootstrap.c12
-rw-r--r--src/tools/irm/irm_ipcp_create.c11
2 files changed, 17 insertions, 6 deletions
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c
index 728d3d11..66bb96ce 100644
--- a/src/tools/irm/irm_ipcp_bootstrap.c
+++ b/src/tools/irm/irm_ipcp_bootstrap.c
@@ -53,6 +53,7 @@
#define SHIM_UDP "shim-udp"
#define SHIM_ETH_LLC "shim-eth-llc"
#define LOCAL "local"
+#define RAPTOR "raptor"
#define MD5 "MD5"
#define SHA3_224 "SHA3_224"
@@ -81,7 +82,7 @@ static void usage(void)
" dif <DIF name>\n"
" type [TYPE]\n"
"where TYPE = {" NORMAL " " LOCAL " "
- SHIM_UDP " " SHIM_ETH_LLC"},\n\n"
+ SHIM_UDP " " SHIM_ETH_LLC " " RAPTOR "},\n\n"
"if TYPE == " NORMAL "\n"
" [addr <address size> (default: %d)]\n"
" [fd <fd size> (default: %d)]\n"
@@ -109,9 +110,14 @@ static void usage(void)
"if TYPE == " LOCAL "\n"
" [hash [ALGORITHM] (default: %s)]\n"
"where ALGORITHM = {" SHA3_224 " " SHA3_256 " "
+ SHA3_384 " " SHA3_512 "}\n\n"
+ "if TYPE == " RAPTOR "\n"
+ " [hash [ALGORITHM] (default: %s)]\n"
+ "where ALGORITHM = {" SHA3_224 " " SHA3_256 " "
SHA3_384 " " SHA3_512 "}\n\n",
DEFAULT_ADDR_SIZE, DEFAULT_FD_SIZE, FLAT_RANDOM_ADDR_AUTH,
- LINK_STATE_ROUTING, SIMPLE_PFF, SHA3_256, SHA3_256, SHA3_256);
+ LINK_STATE_ROUTING, SIMPLE_PFF, SHA3_256, SHA3_256, SHA3_256,
+ SHA3_256);
}
int do_bootstrap_ipcp(int argc,
@@ -231,6 +237,8 @@ int do_bootstrap_ipcp(int argc,
conf.dns_addr = dns_addr;
} else if (strcmp(ipcp_type, LOCAL) == 0) {
conf.type = IPCP_LOCAL;
+ } else if (strcmp(ipcp_type, RAPTOR) == 0) {
+ conf.type = IPCP_RAPTOR;
} else if (strcmp(ipcp_type, SHIM_ETH_LLC) == 0) {
conf.type = IPCP_SHIM_ETH_LLC;
if (if_name == NULL) {
diff --git a/src/tools/irm/irm_ipcp_create.c b/src/tools/irm/irm_ipcp_create.c
index bad62aed..1ec73049 100644
--- a/src/tools/irm/irm_ipcp_create.c
+++ b/src/tools/irm/irm_ipcp_create.c
@@ -44,10 +44,11 @@
#include "irm_ops.h"
#include "irm_utils.h"
-#define NORMAL "normal"
-#define SHIM_UDP "shim-udp"
+#define NORMAL "normal"
+#define SHIM_UDP "shim-udp"
#define SHIM_ETH_LLC "shim-eth-llc"
-#define LOCAL "local"
+#define LOCAL "local"
+#define RAPTOR "raptor"
static void usage(void)
{
@@ -55,7 +56,7 @@ static void usage(void)
" name <ipcp name>\n"
" type [TYPE]\n\n"
"where TYPE = {" NORMAL " " LOCAL " "
- SHIM_UDP " " SHIM_ETH_LLC "}\n");
+ SHIM_UDP " " SHIM_ETH_LLC " " RAPTOR "}\n");
}
int do_create_ipcp(int argc, char ** argv)
@@ -93,6 +94,8 @@ int do_create_ipcp(int argc, char ** argv)
type = IPCP_LOCAL;
else if (strcmp(ipcp_type, SHIM_ETH_LLC) == 0)
type = IPCP_SHIM_ETH_LLC;
+ else if (strcmp(ipcp_type, RAPTOR) == 0)
+ type = IPCP_RAPTOR;
else {
usage();
return -1;