summaryrefslogtreecommitdiff
path: root/src/tools/irm
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/irm')
-rw-r--r--src/tools/irm/main.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/tools/irm/main.c b/src/tools/irm/main.c
index ac09e1e7..ea88e4a6 100644
--- a/src/tools/irm/main.c
+++ b/src/tools/irm/main.c
@@ -20,13 +20,25 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#define OUROBOROS_PREFIX "irm"
-
-#include <ouroboros/logs.h>
#include <ouroboros/common.h>
#include <ouroboros/irm.h>
+#include <stdio.h>
+
+int main (int argc, char ** argv) {
+
+ char * operation;
+
+ if (argc < 2) {
+ printf("Usage: irm [OPERATION]\n\n"
+ "where OPERATION = {create_ipcp destroy_ipcp \n"
+ " bootstrap_ipcp enroll_ipcp\n"
+ " register_ipcp unregister_ipcp}\n");
+ return 0;
+ }
+
+ operation = argv[1];
+ printf("Operation is %s\n", operation);
-int main () {
char * ap_name = "test";
char * ipcp_type = "normal-ipcp";
rina_name_t name;
@@ -39,32 +51,26 @@ int main () {
size_t difs_size = 1;
if (irm_create_ipcp(name, ipcp_type)) {
- LOG_ERR("Failed to create IPCP");
return -1;
}
if (irm_destroy_ipcp(name)) {
- LOG_ERR("Failed to destroy IPCP");
return -1;
}
if (irm_bootstrap_ipcp(name, info)) {
- LOG_ERR("Failed to bootstrap IPCP");
return -1;
}
if (irm_enroll_ipcp(name, dif_name)) {
- LOG_ERR("Failed to enroll IPCP");
return -1;
}
if (irm_reg_ipcp(name, &dif_name, difs_size)) {
- LOG_ERR("Failed to register IPCP");
return -1;
}
if (irm_unreg_ipcp(name, &dif_name, difs_size)) {
- LOG_ERR("Failed to unregister IPCP");
return -1;
}