summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_create_ipcp.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-03-30 15:36:19 +0200
committerdimitri staessens <[email protected]>2016-03-30 15:36:19 +0200
commit231f60c51c1346069ab82ab17eb392e039620270 (patch)
treeb4dea779cd0b2de5b6ffd760704700dbb665cdf6 /src/tools/irm/irm_create_ipcp.c
parentdd20c175f10c04bf5abd0ca764ededaa7a4ac621 (diff)
parenta3f002d6f2d102588f988c99eb16c64a68706dd2 (diff)
downloadouroboros-231f60c51c1346069ab82ab17eb392e039620270.tar.gz
ouroboros-231f60c51c1346069ab82ab17eb392e039620270.zip
Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-flow
Diffstat (limited to 'src/tools/irm/irm_create_ipcp.c')
-rw-r--r--src/tools/irm/irm_create_ipcp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/irm/irm_create_ipcp.c b/src/tools/irm/irm_create_ipcp.c
index 3262bd5c..73d20dce 100644
--- a/src/tools/irm/irm_create_ipcp.c
+++ b/src/tools/irm/irm_create_ipcp.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <ouroboros/irm.h>
#include <ouroboros/common.h>
+#include <ouroboros/instance_name.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
@@ -41,16 +42,15 @@ static void usage()
int do_create_ipcp(int argc, char ** argv)
{
char * ipcp_type = NULL;
- char * ap_name = NULL;
- int api_id = 0;
+ instance_name_t api = {NULL, 0};
while (argc > 0) {
if (matches(*argv, "type") == 0) {
ipcp_type = *(argv + 1);
} else if (matches(*argv, "ap") == 0) {
- ap_name = *(argv + 1);
+ api.name = *(argv + 1);
} else if (matches(*argv, "api") == 0) {
- api_id = atoi(*(argv + 1));
+ api.id = atoi(*(argv + 1));
} else {
printf("\"%s\" is unknown, try \"irm "
"create_ipcp\".\n", *argv);
@@ -61,10 +61,10 @@ int do_create_ipcp(int argc, char ** argv)
argv += 2;
}
- if (ipcp_type == NULL || ap_name == NULL) {
+ if (ipcp_type == NULL || api.name == NULL) {
usage();
return -1;
}
- return irm_create_ipcp(ap_name, api_id, ipcp_type);
+ return irm_create_ipcp(&api, ipcp_type);
}