summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_ipcp_enroll.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-02-13 18:16:28 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-02-13 19:15:07 +0100
commite095d0ade3035c714768266755c9c61acfc2ad0f (patch)
tree9b3fccffb5a8669bdb71bee1d266e3c441d66703 /src/tools/irm/irm_ipcp_enroll.c
parent068a13ca7c1fdaefbfc4e846aaa8eefe9eb1d821 (diff)
downloadouroboros-e095d0ade3035c714768266755c9c61acfc2ad0f.tar.gz
ouroboros-e095d0ade3035c714768266755c9c61acfc2ad0f.zip
ipcpd: Revise Data Transfer component0.10.0
This makes the TTL non-optional and allows the maximum (initial) value of the TTL to be specified at bootstrap (the default is set to 60). The fd in the DT PCI is now called EID (Endpoint ID). The names "dif" and "ae" have been replaced by "layer" and "component" respectively in all sources. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/tools/irm/irm_ipcp_enroll.c')
-rw-r--r--src/tools/irm/irm_ipcp_enroll.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c
index e827dcf0..8b897096 100644
--- a/src/tools/irm/irm_ipcp_enroll.c
+++ b/src/tools/irm/irm_ipcp_enroll.c
@@ -54,13 +54,13 @@ static void usage(void)
int do_enroll_ipcp(int argc, char ** argv)
{
- char * name = NULL;
- char * dif_name = NULL;
- pid_t * pids = NULL;
+ char * name = NULL;
+ char * layer_name = NULL;
+ pid_t * pids = NULL;
pid_t pid;
- ssize_t len = 0;
- int i = 0;
- bool autobind = false;
+ ssize_t len = 0;
+ int i = 0;
+ bool autobind = false;
int cargs;
while (argc > 0) {
@@ -68,7 +68,7 @@ int do_enroll_ipcp(int argc, char ** argv)
if (matches(*argv, "name") == 0) {
name = *(argv + 1);
} else if (matches(*argv, "layer") == 0) {
- dif_name = *(argv + 1);
+ layer_name = *(argv + 1);
} else if (matches(*argv, "autobind") == 0) {
autobind = true;
cargs = 1;
@@ -82,7 +82,7 @@ int do_enroll_ipcp(int argc, char ** argv)
argv += cargs;
}
- if (dif_name == NULL || name == NULL) {
+ if (layer_name == NULL || name == NULL) {
usage();
return -1;
}
@@ -101,15 +101,16 @@ int do_enroll_ipcp(int argc, char ** argv)
return -1;
}
- if (irm_enroll_ipcp(pids[i], dif_name)) {
+ if (irm_enroll_ipcp(pids[i], layer_name)) {
if (autobind)
irm_unbind_process(pids[i], name);
free(pids);
return -1;
}
- if (autobind && irm_bind_process(pids[i], dif_name)) {
- printf("Failed to bind %d to %s.\n", pids[i], dif_name);
+ if (autobind && irm_bind_process(pids[i], layer_name)) {
+ printf("Failed to bind %d to %s.\n",
+ pids[i], layer_name);
free(pids);
return -1;
}