summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_ipcp_enroll.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_enroll.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_enroll.c')
-rw-r--r--src/tools/irm/irm_ipcp_enroll.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c
index 1ebe9a6d..4beb6754 100644
--- a/src/tools/irm/irm_ipcp_enroll.c
+++ b/src/tools/irm/irm_ipcp_enroll.c
@@ -56,8 +56,8 @@ int do_enroll_ipcp(int argc, char ** argv)
{
char * name = NULL;
char * dif_name = NULL;
- pid_t * apis = NULL;
- pid_t api;
+ pid_t * pids = NULL;
+ pid_t pid;
ssize_t len = 0;
int i = 0;
bool autobind = false;
@@ -87,36 +87,36 @@ int do_enroll_ipcp(int argc, char ** argv)
return -1;
}
- len = irm_list_ipcps(name, &apis);
+ len = irm_list_ipcps(name, &pids);
if (len <= 0) {
- api = irm_create_ipcp(name, IPCP_NORMAL);
- if (api == 0)
+ pid = irm_create_ipcp(name, IPCP_NORMAL);
+ 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)) {
- free(apis);
+ if (autobind && irm_bind_process(pids[i], name)) {
+ free(pids);
return -1;
}
- if (irm_enroll_ipcp(apis[i], dif_name)) {
+ if (irm_enroll_ipcp(pids[i], dif_name)) {
if (autobind)
- irm_unbind_api(apis[i], name);
- free(apis);
+ irm_unbind_process(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);
- free(apis);
+ if (autobind && irm_bind_process(pids[i], dif_name)) {
+ printf("Failed to bind %d to %s.\n", pids[i], dif_name);
+ free(pids);
return -1;
}
}
- if (apis != NULL)
- free(apis);
+ if (pids != NULL)
+ free(pids);
return 0;
}