summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/broadcast/main.c7
-rw-r--r--src/ipcpd/eth/eth.c2
-rw-r--r--src/ipcpd/ipcp.h8
-rw-r--r--src/ipcpd/local/main.c2
-rw-r--r--src/ipcpd/udp/main.c3
-rw-r--r--src/ipcpd/unicast/main.c4
6 files changed, 9 insertions, 17 deletions
diff --git a/src/ipcpd/broadcast/main.c b/src/ipcpd/broadcast/main.c
index dbe64559..55d14b31 100644
--- a/src/ipcpd/broadcast/main.c
+++ b/src/ipcpd/broadcast/main.c
@@ -57,7 +57,7 @@ struct ipcp ipcpi;
static int initialize_components(const struct ipcp_config * conf)
{
strcpy(ipcpi.layer_name, conf->layer_info.name);
- ipcpi.dir_hash_algo = conf->layer_info.dir_hash_algo;
+ ipcpi.dir_hash_algo = (enum hash_algo) conf->layer_info.dir_hash_algo;
assert(ipcp_dir_hash_len() != 0);
@@ -146,7 +146,7 @@ static int broadcast_ipcp_enroll(const char * dst,
log_info_id(id, "Enrolled with %s.", dst);
- info->dir_hash_algo = ipcpi.dir_hash_algo;
+ info->dir_hash_algo = (enum pol_dir_hash) ipcpi.dir_hash_algo;
strcpy(info->name, ipcpi.layer_name);
return 0;
@@ -163,7 +163,8 @@ static int broadcast_ipcp_bootstrap(const struct ipcp_config * conf)
{
assert(conf);
assert(conf->type == THIS_TYPE);
- ((struct ipcp_config *) conf)->layer_info.dir_hash_algo = HASH_SHA3_256;
+ ((struct ipcp_config *) conf)->layer_info.dir_hash_algo =
+ DIR_HASH_SHA3_256;
enroll_bootstrap(conf);
diff --git a/src/ipcpd/eth/eth.c b/src/ipcpd/eth/eth.c
index 52525c38..6bac6c76 100644
--- a/src/ipcpd/eth/eth.c
+++ b/src/ipcpd/eth/eth.c
@@ -1247,7 +1247,7 @@ static int eth_ipcp_bootstrap(const struct ipcp_config * conf)
assert(conf);
assert(conf->type == THIS_TYPE);
- ipcpi.dir_hash_algo = conf->layer_info.dir_hash_algo;
+ ipcpi.dir_hash_algo = (enum hash_algo) conf->layer_info.dir_hash_algo;
strcpy(ipcpi.layer_name, conf->layer_info.name);
if (strlen(conf->eth.dev) >= IFNAMSIZ) {
diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h
index 0fcd8d8d..1ce07c57 100644
--- a/src/ipcpd/ipcp.h
+++ b/src/ipcpd/ipcp.h
@@ -34,14 +34,6 @@
#include <pthread.h>
#include <time.h>
-enum ipcp_state {
- IPCP_NULL = 0,
- IPCP_INIT,
- /* Layer name must be set for states below. */
- IPCP_OPERATIONAL,
- IPCP_SHUTDOWN
-};
-
struct ipcp_ops {
int (* ipcp_bootstrap)(const struct ipcp_config * conf);
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c
index 213b6538..717e35ce 100644
--- a/src/ipcpd/local/main.c
+++ b/src/ipcpd/local/main.c
@@ -144,7 +144,7 @@ static int local_ipcp_bootstrap(const struct ipcp_config * conf)
assert(conf);
assert(conf->type == THIS_TYPE);
- ipcpi.dir_hash_algo = conf->layer_info.dir_hash_algo;
+ ipcpi.dir_hash_algo = (enum hash_algo) conf->layer_info.dir_hash_algo;
strcpy(ipcpi.layer_name,conf->layer_info.name);
if (pthread_create(&local_data.packet_loop, NULL,
diff --git a/src/ipcpd/udp/main.c b/src/ipcpd/udp/main.c
index 2e500d24..c6181984 100644
--- a/src/ipcpd/udp/main.c
+++ b/src/ipcpd/udp/main.c
@@ -592,9 +592,8 @@ static int udp_ipcp_bootstrap(const struct ipcp_config * conf)
assert(conf);
assert(conf->type == THIS_TYPE);
- ((struct ipcp_config *) conf)->layer_info.dir_hash_algo = HASH_MD5;
- ipcpi.dir_hash_algo = conf->layer_info.dir_hash_algo;
+ ipcpi.dir_hash_algo = HASH_MD5;
strcpy(ipcpi.layer_name, conf->layer_info.name);
if (inet4_ntop(&conf->udp.ip_addr, ipstr) == NULL) {
diff --git a/src/ipcpd/unicast/main.c b/src/ipcpd/unicast/main.c
index f849e485..fed08d93 100644
--- a/src/ipcpd/unicast/main.c
+++ b/src/ipcpd/unicast/main.c
@@ -60,7 +60,7 @@ struct ipcp ipcpi;
static int initialize_components(const struct ipcp_config * conf)
{
strcpy(ipcpi.layer_name, conf->layer_info.name);
- ipcpi.dir_hash_algo = conf->layer_info.dir_hash_algo;
+ ipcpi.dir_hash_algo = (enum hash_algo) conf->layer_info.dir_hash_algo;
assert(ipcp_dir_hash_len() != 0);
@@ -227,7 +227,7 @@ static int unicast_ipcp_enroll(const char * dst,
log_info_id(id, "Enrolled with %s.", dst);
- info->dir_hash_algo = ipcpi.dir_hash_algo;
+ info->dir_hash_algo = (enum pol_dir_hash) ipcpi.dir_hash_algo;
strcpy(info->name, ipcpi.layer_name);
return 0;