summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_ipcp_bootstrap.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2017-12-02 14:01:03 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2017-12-02 14:56:20 +0100
commit9b8a3e11c558877c09416991ff1ec840fea6d0ab (patch)
treef2faf7a4ab45687782a010fb6e48829e8ee1bdeb /src/tools/irm/irm_ipcp_bootstrap.c
parentf43e5e2329fb798047d15dd0748e5eef3359c966 (diff)
downloadouroboros-9b8a3e11c558877c09416991ff1ec840fea6d0ab.tar.gz
ouroboros-9b8a3e11c558877c09416991ff1ec840fea6d0ab.zip
lib, tools: Rename application process and instance
This refactors ouroboros to use "program" instead of "application process" and "process" instead of "application process instance" to align with current naming in current Operating Systems courses instead of the ISO nomenclature adopted by RINA. This change permeates through the entire implementation. Also contains some minor other refactors. 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_bootstrap.c')
-rw-r--r--src/tools/irm/irm_ipcp_bootstrap.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c
index 3da78a2b..acd3779e 100644
--- a/src/tools/irm/irm_ipcp_bootstrap.c
+++ b/src/tools/irm/irm_ipcp_bootstrap.c
@@ -107,10 +107,11 @@ static void usage(void)
LINK_STATE_ROUTING, SIMPLE_PFF, SHA3_256);
}
-int do_bootstrap_ipcp(int argc, char ** argv)
+int do_bootstrap_ipcp(int argc,
+ char ** argv)
{
char * name = NULL;
- pid_t api;
+ pid_t pid;
struct ipcp_config conf;
uint8_t addr_size = DEFAULT_ADDR_SIZE;
uint8_t fd_size = DEFAULT_FD_SIZE;
@@ -124,7 +125,7 @@ int do_bootstrap_ipcp(int argc, char ** argv)
char * ipcp_type = NULL;
char * dif_name = NULL;
char * if_name = NULL;
- pid_t * apis = NULL;
+ pid_t * pids = NULL;
ssize_t len = 0;
int i = 0;
bool autobind = false;
@@ -239,39 +240,39 @@ int do_bootstrap_ipcp(int argc, char ** argv)
autobind = false;
}
- len = irm_list_ipcps(name, &apis);
+ len = irm_list_ipcps(name, &pids);
if (len <= 0) {
- api = irm_create_ipcp(name, conf.type);
- if (api == 0)
+ pid = irm_create_ipcp(name, conf.type);
+ if (pid== 0)
return -1;
- len = irm_list_ipcps(name, &apis);
+ len = irm_list_ipcps(name, &pids);
}
for (i = 0; i < len; i++) {
- if (autobind && irm_bind_api(apis[i], name)) {
- printf("Failed to bind %d to %s.\n", apis[i], name);
- free(apis);
+ if (autobind && irm_bind_process(pids[i], name)) {
+ printf("Failed to bind %d to %s.\n", pids[i], name);
+ free(pids);
return -1;
}
- if (autobind && irm_bind_api(apis[i], dif_name)) {
- printf("Failed to bind %d to %s.\n", apis[i], dif_name);
- irm_unbind_api(apis[i], name);
- free(apis);
+ if (autobind && irm_bind_process(pids[i], dif_name)) {
+ printf("Failed to bind %d to %s.\n", pids[i], dif_name);
+ irm_unbind_process(pids[i], name);
+ free(pids);
return -1;
}
- if (irm_bootstrap_ipcp(apis[i], &conf)) {
+ if (irm_bootstrap_ipcp(pids[i], &conf)) {
if (autobind) {
- irm_unbind_api(apis[i], name);
- irm_unbind_api(apis[i], dif_name);
+ irm_unbind_process(pids[i], name);
+ irm_unbind_process(pids[i], dif_name);
}
- free(apis);
+ free(pids);
return -1;
}
}
- free(apis);
+ free(pids);
return 0;