summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tools/irm/irm.c2
-rw-r--r--src/tools/irm/irm_bind.c2
-rw-r--r--src/tools/irm/irm_ipcp.c9
-rw-r--r--src/tools/irm/irm_ipcp_bootstrap.c16
-rw-r--r--src/tools/irm/irm_ipcp_connect.c4
-rw-r--r--src/tools/irm/irm_ipcp_create.c15
-rw-r--r--src/tools/irm/irm_ipcp_disconnect.c12
-rw-r--r--src/tools/irm/irm_ipcp_enroll.c2
-rw-r--r--src/tools/irm/irm_name.c7
-rw-r--r--src/tools/irm/irm_name_create.c2
-rw-r--r--src/tools/irm/irm_unbind.c2
11 files changed, 38 insertions, 35 deletions
diff --git a/src/tools/irm/irm.c b/src/tools/irm/irm.c
index 5d24ad03..1e648b85 100644
--- a/src/tools/irm/irm.c
+++ b/src/tools/irm/irm.c
@@ -49,7 +49,7 @@
static void usage(void)
{
printf("Usage: irm [OPERATION]\n\n"
- "where OPERATION = {ipcp bind unbind name}\n");
+ "where OPERATION in { ipcp bind unbind name }\n");
}
static int do_help(int argc,
diff --git a/src/tools/irm/irm_bind.c b/src/tools/irm/irm_bind.c
index 6a8fd7c2..c3e5a002 100644
--- a/src/tools/irm/irm_bind.c
+++ b/src/tools/irm/irm_bind.c
@@ -47,7 +47,7 @@ static void usage(void)
{
printf("Usage: irm bind [OPERATION]\n"
"\n"
- "where OPERATION = {program process ipcp help}\n");
+ "where OPERATION in {program process ipcp help}\n");
}
static int do_help(int argc,
diff --git a/src/tools/irm/irm_ipcp.c b/src/tools/irm/irm_ipcp.c
index 56448742..68d119b9 100644
--- a/src/tools/irm/irm_ipcp.c
+++ b/src/tools/irm/irm_ipcp.c
@@ -44,10 +44,11 @@
static void usage(void)
{
printf("Usage: irm ipcp [OPERATION]\n\n"
- "where OPERATION = {create destroy\n"
- " bootstrap enroll\n"
- " connect disconnect\n"
- " list help}\n");
+ "where OPERATION in {create destroy\n"
+ " bootstrap enroll\n"
+ " connect disconnect\n"
+ " list\n"
+ " help}\n");
}
static int do_help(int argc, char **argv)
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c
index f1255113..9895577c 100644
--- a/src/tools/irm/irm_ipcp_bootstrap.c
+++ b/src/tools/irm/irm_ipcp_bootstrap.c
@@ -88,7 +88,7 @@ static void usage(void)
" name <ipcp name>\n"
" layer <layer name>\n"
" [type [TYPE]]\n"
- "where TYPE = {" UNICAST " " BROADCAST " " LOCAL " "
+ "where TYPE in {" UNICAST " " BROADCAST " " LOCAL " "
UDP " " ETH_LLC " " ETH_DIX "},\n\n"
"if TYPE == " UNICAST "\n"
" [addr <address size> (default: %d)]\n"
@@ -99,11 +99,11 @@ static void usage(void)
" [congestion <CONG_POLICY> (default: %s)]\n"
" [hash [ALGORITHM] (default: %s)]\n"
" [autobind]\n"
- "where ADDRESS_POLICY = {" FLAT_RANDOM_ADDR_AUTH "}\n"
- " ROUTING_POLICY = {" LINK_STATE_ROUTING " "
+ "where ADDRESS_POLICY in {" FLAT_RANDOM_ADDR_AUTH "}\n"
+ " ROUTING_POLICY in {" LINK_STATE_ROUTING " "
LINK_STATE_LFA_ROUTING " " LINK_STATE_ECM_ROUTING "}\n"
- " CONG_POLICY = {" NONE_CA " " MB_ECN_CA "}\n"
- " ALGORITHM = {" SHA3_224 " " SHA3_256 " "
+ " CONG_POLICY in {" NONE_CA " " MB_ECN_CA "}\n"
+ " ALGORITHM in {" SHA3_224 " " SHA3_256 " "
SHA3_384 " " SHA3_512 "}\n\n"
"if TYPE == " UDP "\n"
" ip <IP address in dotted notation>\n"
@@ -113,17 +113,17 @@ static void usage(void)
"if TYPE == " ETH_LLC "\n"
" dev <interface name>\n"
" [hash [ALGORITHM] (default: %s)]\n"
- "where ALGORITHM = {" SHA3_224 " " SHA3_256 " "
+ "where ALGORITHM in {" SHA3_224 " " SHA3_256 " "
SHA3_384 " " SHA3_512 "}\n\n"
"if TYPE == " ETH_DIX "\n"
" dev <interface name>\n"
" [ethertype <ethertype> (default: 0x%4X)]\n"
" [hash [ALGORITHM] (default: %s)]\n"
- "where ALGORITHM = {" SHA3_224 " " SHA3_256 " "
+ "where ALGORITHM in {" SHA3_224 " " SHA3_256 " "
SHA3_384 " " SHA3_512 "}\n\n"
"if TYPE == " LOCAL "\n"
" [hash [ALGORITHM] (default: %s)]\n"
- "where ALGORITHM = {" SHA3_224 " " SHA3_256 " "
+ "where ALGORITHM in {" SHA3_224 " " SHA3_256 " "
SHA3_384 " " SHA3_512 "}\n\n"
"if TYPE == " BROADCAST "\n"
" [autobind]\n\n",
diff --git a/src/tools/irm/irm_ipcp_connect.c b/src/tools/irm/irm_ipcp_connect.c
index c1b2a1d1..222ac620 100644
--- a/src/tools/irm/irm_ipcp_connect.c
+++ b/src/tools/irm/irm_ipcp_connect.c
@@ -55,10 +55,10 @@ static void usage(void)
" name <ipcp name>\n"
" dst <name of destination IPCP>\n"
" [component [COMPONENT]]\n"
- "where COMPONENT = {" DT " " MGMT "}\n\n"
+ "where COMPONENT in {" DT " " MGMT "}\n\n"
"if COMPONENT == " DT "\n"
" [qos [QOS]\n"
- "where QOS = {raw, best, voice, video, data}\n\n");
+ "where QOS in {raw, best, voice, video, data}\n");
}
int do_connect_ipcp(int argc,
diff --git a/src/tools/irm/irm_ipcp_create.c b/src/tools/irm/irm_ipcp_create.c
index 059156a9..ebfcb02f 100644
--- a/src/tools/irm/irm_ipcp_create.c
+++ b/src/tools/irm/irm_ipcp_create.c
@@ -44,7 +44,7 @@
#include "irm_ops.h"
#include "irm_utils.h"
-#define UNICAST "unicast"
+#define UNICAST "unicast"
#define BROADCAST "broadcast"
#define UDP "udp"
#define ETH_LLC "eth-llc"
@@ -56,17 +56,17 @@ static void usage(void)
printf("Usage: irm ipcp create\n"
" name <ipcp name>\n"
" type [TYPE]\n\n"
- "where TYPE = {" UNICAST " " BROADCAST " " LOCAL " "
- UDP " " ETH_LLC "}\n");
+ "where TYPE in {" UNICAST " " BROADCAST " " LOCAL " "
+ UDP " " ETH_LLC " " ETH_DIX "}\n");
}
int do_create_ipcp(int argc,
char ** argv)
{
- char * ipcp_type = NULL;
- char * ipcp_name = NULL;
- enum ipcp_type type = 0;
- pid_t pid;
+ char * ipcp_type = NULL;
+ char * ipcp_name = NULL;
+ enum ipcp_type type = 0;
+ pid_t pid;
while (argc > 0) {
if (matches(*argv, "type") == 0) {
@@ -101,6 +101,7 @@ int do_create_ipcp(int argc,
else if (strcmp(ipcp_type, ETH_DIX) == 0)
type = IPCP_ETH_DIX;
else {
+ printf("IPCP type \"%s\" is unknown.\n", ipcp_type);
usage();
return -1;
}
diff --git a/src/tools/irm/irm_ipcp_disconnect.c b/src/tools/irm/irm_ipcp_disconnect.c
index c591a9fe..2b54a998 100644
--- a/src/tools/irm/irm_ipcp_disconnect.c
+++ b/src/tools/irm/irm_ipcp_disconnect.c
@@ -54,19 +54,19 @@ static void usage(void)
" name <ipcp name>\n"
" dst <name of destination IPCP>\n"
" [component [COMPONENT]]\n\n"
- "where COMPONENT = {" DT " " MGMT "}\n");
+ "where COMPONENT in {" DT " " MGMT "}\n");
}
int do_disconnect_ipcp(int argc,
char ** argv)
{
- char * ipcp = NULL;
- char * dst = NULL;
- char * comp = "*";
+ char * ipcp = NULL;
+ char * dst = NULL;
+ char * comp = "*";
char * component = NULL;
struct ipcp_list_info * ipcps;
- ssize_t len = 0;
- pid_t pid = -1;
+ ssize_t len = 0;
+ pid_t pid = -1;
ssize_t i;
while (argc > 0) {
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c
index 63f740fe..70bf5a34 100644
--- a/src/tools/irm/irm_ipcp_enroll.c
+++ b/src/tools/irm/irm_ipcp_enroll.c
@@ -57,7 +57,7 @@ static void usage(void)
" [dst <destination to enroll with>]\n"
" [type [TYPE], default = " UNICAST "]\n"
" [autobind]\n"
- "where TYPE = {" UNICAST " " BROADCAST "}\n");
+ "where TYPE in {" UNICAST " " BROADCAST "}\n");
}
static int get_layer_name(const char * ipcp,
diff --git a/src/tools/irm/irm_name.c b/src/tools/irm/irm_name.c
index 14a792a7..2edf48e5 100644
--- a/src/tools/irm/irm_name.c
+++ b/src/tools/irm/irm_name.c
@@ -44,9 +44,10 @@
static void usage(void)
{
printf("Usage: irm name [OPERATION]\n\n"
- "where OPERATION = {create destroy\n"
- " register unregister\n"
- " list help}\n");
+ "where OPERATION in {create destroy\n"
+ " register unregister\n"
+ " list\n"
+ " help}\n");
}
static int do_help(int argc, char **argv)
diff --git a/src/tools/irm/irm_name_create.c b/src/tools/irm/irm_name_create.c
index 9f7e04f7..e92b1f63 100644
--- a/src/tools/irm/irm_name_create.c
+++ b/src/tools/irm/irm_name_create.c
@@ -52,7 +52,7 @@ static void usage(void)
printf("Usage: irm name create\n"
" <name>\n"
" lb [LB_POLICY], default: %s\n\n"
- "where LB_POLICY = {" RR " " SPILL "}\n", RR);
+ "where LB_POLICY in {" RR " " SPILL "}\n", RR);
}
int do_create_name(int argc,
diff --git a/src/tools/irm/irm_unbind.c b/src/tools/irm/irm_unbind.c
index 25b9ffbe..debebce5 100644
--- a/src/tools/irm/irm_unbind.c
+++ b/src/tools/irm/irm_unbind.c
@@ -47,7 +47,7 @@ static void usage(void)
{
printf("Usage: irm unbind [OPERATION]\n"
"\n"
- "where OPERATION = {program process ipcp help}\n");
+ "where OPERATION in {program process ipcp help}\n");
}
static int do_help(int argc,