summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/main.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-05-12 13:05:47 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-05-15 12:06:09 +0200
commit9903b8a2f9a7dc8ebac6928dcf2d2b5593ea0615 (patch)
treeea16469c2d8fbcb417ed89e0bbd550834d0602a6 /src/ipcpd/normal/main.c
parentb36acfd93b1dc16a153ca9b9077d113732accb4e (diff)
downloadouroboros-9903b8a2f9a7dc8ebac6928dcf2d2b5593ea0615.tar.gz
ouroboros-9903b8a2f9a7dc8ebac6928dcf2d2b5593ea0615.zip
ipcpd: Allow specifying fixed syntax
This commits adds the functions and messages to specify a fixed protocol syntax during CACEP. It also revises the messages for specifying the DT protocol syntax from the irm tool.
Diffstat (limited to 'src/ipcpd/normal/main.c')
-rw-r--r--src/ipcpd/normal/main.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c
index d103b339..f9718041 100644
--- a/src/ipcpd/normal/main.c
+++ b/src/ipcpd/normal/main.c
@@ -229,7 +229,7 @@ static int normal_ipcp_enroll(const char * dst,
log_dbg("Enrolled with " HASH_FMT, HASH_VAL(dst));
- info->algo = ipcpi.dir_hash_algo;
+ info->dir_hash_algo = ipcpi.dir_hash_algo;
strcpy(info->dif_name, ipcpi.dif_name);
@@ -259,12 +259,8 @@ const struct ros {
{BOOT_PATH "/dt/gam", "cacep"},
{BOOT_PATH "/dt", "const"},
{BOOT_PATH "/dt/const", "addr_size"},
- {BOOT_PATH "/dt/const", "cep_id_size"},
- {BOOT_PATH "/dt/const", "seqno_size"},
+ {BOOT_PATH "/dt/const", "fd_size"},
{BOOT_PATH "/dt/const", "has_ttl"},
- {BOOT_PATH "/dt/const", "has_chk"},
- {BOOT_PATH "/dt/const", "min_pdu_size"},
- {BOOT_PATH "/dt/const", "max_pdu_size"},
/* RIB MGR COMPONENT */
{BOOT_PATH, "rm"},
@@ -301,7 +297,7 @@ static int normal_ipcp_bootstrap(const struct ipcp_config * conf)
assert(conf);
assert(conf->type == THIS_TYPE);
- hash_algo = hton32((uint32_t) conf->dir_hash_algo);
+ hash_algo = hton32((uint32_t) conf->dif_info.dir_hash_algo);
assert(ntoh32(hash_algo) != 0);
@@ -311,32 +307,20 @@ static int normal_ipcp_bootstrap(const struct ipcp_config * conf)
}
if (rib_write(BOOT_PATH "/general/dif_name",
- conf->dif_name,
- strlen(conf->dif_name) + 1) ||
+ conf->dif_info.dif_name,
+ strlen(conf->dif_info.dif_name) + 1) ||
rib_write(BOOT_PATH "/general/dir_hash_algo",
&hash_algo,
sizeof(hash_algo)) ||
rib_write(BOOT_PATH "/dt/const/addr_size",
&conf->addr_size,
sizeof(conf->addr_size)) ||
- rib_write(BOOT_PATH "/dt/const/cep_id_size",
- &conf->cep_id_size,
- sizeof(conf->cep_id_size)) ||
- rib_write(BOOT_PATH "/dt/const/seqno_size",
- &conf->seqno_size,
- sizeof(conf->seqno_size)) ||
+ rib_write(BOOT_PATH "/dt/const/fd_size",
+ &conf->fd_size,
+ sizeof(conf->fd_size)) ||
rib_write(BOOT_PATH "/dt/const/has_ttl",
&conf->has_ttl,
sizeof(conf->has_ttl)) ||
- rib_write(BOOT_PATH "/dt/const/has_chk",
- &conf->has_chk,
- sizeof(conf->has_chk)) ||
- rib_write(BOOT_PATH "/dt/const/min_pdu_size",
- &conf->min_pdu_size,
- sizeof(conf->min_pdu_size)) ||
- rib_write(BOOT_PATH "/dt/const/max_pdu_size",
- &conf->max_pdu_size,
- sizeof(conf->max_pdu_size)) ||
rib_write(BOOT_PATH "/dt/gam/type",
&conf->dt_gam_type,
sizeof(conf->dt_gam_type)) ||
@@ -355,7 +339,7 @@ static int normal_ipcp_bootstrap(const struct ipcp_config * conf)
return -1;
}
- log_dbg("Bootstrapped in DIF %s.", conf->dif_name);
+ log_dbg("Bootstrapped in DIF %s.", conf->dif_info.dif_name);
return 0;
}