diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/sockets.c | 2 | ||||
-rw-r--r-- | src/tools/irm/main.c | 26 |
2 files changed, 17 insertions, 11 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c index c0331063..6cd70a8b 100644 --- a/src/lib/sockets.c +++ b/src/lib/sockets.c @@ -48,7 +48,7 @@ int client_socket_open(char * file_name) if (connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr))) { - LOG_ERR("Failed to connect to server"); + LOG_ERR("Failed to connect to daemon"); return -1; } 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; } |