diff options
Diffstat (limited to 'src/tools/irm/irm_bootstrap_ipcp.c')
-rw-r--r-- | src/tools/irm/irm_bootstrap_ipcp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tools/irm/irm_bootstrap_ipcp.c b/src/tools/irm/irm_bootstrap_ipcp.c index 0843083d..c7b82c4a 100644 --- a/src/tools/irm/irm_bootstrap_ipcp.c +++ b/src/tools/irm/irm_bootstrap_ipcp.c @@ -39,17 +39,16 @@ static void usage() int do_bootstrap_ipcp(int argc, char ** argv) { - char * ap_name = NULL; - int api_id = 0; + instance_name_t api = {NULL, 0}; struct dif_config conf; conf.qosspecs = NULL; while (argc > 0) { 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 " "destroy_ipcp\".\n", *argv); @@ -61,10 +60,10 @@ int do_bootstrap_ipcp(int argc, char ** argv) argv += 2; } - if (ap_name == NULL) { + if (api.name == NULL) { usage(); return -1; } - return irm_bootstrap_ipcp(ap_name, api_id, &conf); + return irm_bootstrap_ipcp(&api, &conf); } |