From a14d696bdbc72754e8019fa9579d5a338cc85a05 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 28 Mar 2016 14:43:16 +0200 Subject: lib: Update irm.h API Removes rina_name_t from that API. Passing ap_name and api_id as params instead. The IRM tool has been updated accordingly. Some errors in the build related to protobuf-c have also been resolved. --- src/tools/irm/irm_bootstrap_ipcp.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/tools/irm/irm_bootstrap_ipcp.c') diff --git a/src/tools/irm/irm_bootstrap_ipcp.c b/src/tools/irm/irm_bootstrap_ipcp.c index 89950069..0843083d 100644 --- a/src/tools/irm/irm_bootstrap_ipcp.c +++ b/src/tools/irm/irm_bootstrap_ipcp.c @@ -21,6 +21,7 @@ */ #include +#include #include #include @@ -38,29 +39,32 @@ static void usage() int do_bootstrap_ipcp(int argc, char ** argv) { - rina_name_t name; + char * ap_name = NULL; + int api_id = 0; struct dif_config conf; conf.qosspecs = NULL; - name.ap_name = NULL; - name.api_id = 0; - while (argc > 0) { - if (!parse_name(argv, &name)) { + if (matches(*argv, "ap") == 0) { + ap_name = *(argv + 1); + } else if (matches(*argv, "api") == 0) { + api_id = atoi(*(argv + 1)); + } else { printf("\"%s\" is unknown, try \"irm " - "enroll_ipcp\".\n", *argv); + "destroy_ipcp\".\n", *argv); return -1; } + argc -= 2; argv += 2; } - if (name.ap_name == NULL) { + if (ap_name == NULL) { usage(); return -1; } - return irm_bootstrap_ipcp(name, conf); + return irm_bootstrap_ipcp(ap_name, api_id, &conf); } -- cgit v1.2.3