aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/applets.h14
-rw-r--r--include/usage.h51
2 files changed, 58 insertions, 7 deletions
diff --git a/include/applets.h b/include/applets.h
index a85a8bfcb..d8c4b38a0 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -255,11 +255,23 @@
APPLET(insmod, insmod_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
#endif
#ifdef CONFIG_IP
- APPLET(ip, ip_main, _BB_DIR_BIN, _BB_SUID_NEVER)
+ APPLET(ip, ip_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
#endif
#ifdef CONFIG_IPCALC
APPLET(ipcalc, ipcalc_main, _BB_DIR_BIN, _BB_SUID_NEVER)
#endif
+#ifdef CONFIG_IPADDRESS
+ APPLET(ipaddr, ipaddr_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#endif
+#ifdef CONFIG_IPLINK
+ APPLET(iplink, iplink_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#endif
+#ifdef CONFIG_IPROUTE
+ APPLET(iproute, iproute_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#endif
+#ifdef CONFIG_IPTUNNEL
+ APPLET(iptunnel, iptunnel_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#endif
#ifdef CONFIG_KILL
APPLET(kill, kill_main, _BB_DIR_BIN, _BB_SUID_NEVER)
#endif
diff --git a/include/usage.h b/include/usage.h
index c676754e3..eca05446f 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -989,25 +989,38 @@
"\t-x\tdo not export externs"
#define ip_trivial_usage \
- "not written yet"
+ "[ OPTIONS ] { address | link | route | tunnel } { COMMAND | help }"
#define ip_full_usage \
- "not written yet"
+ "ip [ OPTIONS ] OBJECT { COMMAND | help }\n" \
+ "where OBJECT := { link | addr | route | tunnel }\n" \
+ "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }\n"
+
+#define ipaddr_trivial_usage \
+ "{ {add|del} IFADDR dev STRING | {show|flush} [ dev STRING ] [ to PREFIX ] }"
+#define ipaddr_full_usage \
+ "ipaddr {add|del} IFADDR dev STRING\n" \
+ "ipaddr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]\n" \
+ " [ to PREFIX ] [ label PATTERN ]\n" \
+ "IFADDR := PREFIX | ADDR peer PREFIX\n" \
+ " [ broadcast ADDR ] [ anycast ADDR ]\n" \
+ " [ label STRING ] [ scope SCOPE-ID ]\n" \
+ "SCOPE-ID := [ host | link | global | NUMBER ]\n"
#ifndef CONFIG_FEATURE_IPCALC_FANCY
-#define ipcalc_trivial_usage \
+# define ipcalc_trivial_usage \
"[--broadcast] [--netmask] [--network] ipaddr <netmask>"
-#define ipcalc_full_usage \
+# define ipcalc_full_usage \
"Calculate IP network settings from a IP address\n\n" \
"Options:\n" \
"\t-b\t--broadcast\tDisplay calculated broadcast address.\n" \
"\t-n\t--netmask\tDisplay default netmask for IP.\n" \
"\t-w\t--network\tDisplay calculated network address."
#else
-#define ipcalc_trivial_usage \
+# define ipcalc_trivial_usage \
"[OPTION]... ipaddr <netmask>"
-#define ipcalc_full_usage \
+# define ipcalc_full_usage \
"Calculate IP network settings from a IP address\n\n" \
"Options:\n" \
"\t-b\t--broadcast\tDisplay calculated broadcast address.\n" \
@@ -1023,6 +1036,32 @@
"should display on standard out. Multiple options may be\n" \
"specified.\n"
+#define iplink_trivial_usage \
+ "{ set DEVICE { up | down | arp { on | off } | show [ DEVICE ] }"
+#define iplink_full_usage \
+ "iplink set DEVICE { up | down | arp { on | off } |\n" \
+ " dynamic { on | off } |\n" \
+ " mtu MTU }\n" \
+ "iplink show [ DEVICE ]\n"
+
+#define iproute_trivial_usage \
+ "{ list | flush | { add | del | change | append | replace | monitor } ROUTE }"
+#define iproute_full_usage \
+ "iproute { list | flush } SELECTOR\n" \
+ "iproute get ADDRESS [ from ADDRESS iif STRING ]\n" \
+ " [ oif STRING ] [ tos TOS ]\n" \
+ "iproute { add | del | change | append | replace | monitor } ROUTE\n" \
+ "SELECTOR := [ root PREFIX ] [ match PREFIX ] [ proto RTPROTO ]\n" \
+ "ROUTE := [ TYPE ] PREFIX [ tos TOS ] [ proto RTPROTO ]\n"
+
+#define iptunnel_trivial_usage \
+ "{ add | change | del | show } [ NAME ] [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ] [ ttl TTL ]"
+#define iptunnel_full_usage \
+ "iptunnel { add | change | del | show } [ NAME ]\n" \
+ " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" \
+ " [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" \
+ " [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]\n"
+
#define kill_trivial_usage \
"[-signal] process-id [process-id ...]"
#define kill_full_usage \