diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/applets.h | 14 | ||||
-rw-r--r-- | include/usage.h | 51 |
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 @@ | |||
255 | APPLET(insmod, insmod_main, _BB_DIR_SBIN, _BB_SUID_NEVER) | 255 | APPLET(insmod, insmod_main, _BB_DIR_SBIN, _BB_SUID_NEVER) |
256 | #endif | 256 | #endif |
257 | #ifdef CONFIG_IP | 257 | #ifdef CONFIG_IP |
258 | APPLET(ip, ip_main, _BB_DIR_BIN, _BB_SUID_NEVER) | 258 | APPLET(ip, ip_main, _BB_DIR_SBIN, _BB_SUID_NEVER) |
259 | #endif | 259 | #endif |
260 | #ifdef CONFIG_IPCALC | 260 | #ifdef CONFIG_IPCALC |
261 | APPLET(ipcalc, ipcalc_main, _BB_DIR_BIN, _BB_SUID_NEVER) | 261 | APPLET(ipcalc, ipcalc_main, _BB_DIR_BIN, _BB_SUID_NEVER) |
262 | #endif | 262 | #endif |
263 | #ifdef CONFIG_IPADDRESS | ||
264 | APPLET(ipaddr, ipaddr_main, _BB_DIR_SBIN, _BB_SUID_NEVER) | ||
265 | #endif | ||
266 | #ifdef CONFIG_IPLINK | ||
267 | APPLET(iplink, iplink_main, _BB_DIR_SBIN, _BB_SUID_NEVER) | ||
268 | #endif | ||
269 | #ifdef CONFIG_IPROUTE | ||
270 | APPLET(iproute, iproute_main, _BB_DIR_SBIN, _BB_SUID_NEVER) | ||
271 | #endif | ||
272 | #ifdef CONFIG_IPTUNNEL | ||
273 | APPLET(iptunnel, iptunnel_main, _BB_DIR_SBIN, _BB_SUID_NEVER) | ||
274 | #endif | ||
263 | #ifdef CONFIG_KILL | 275 | #ifdef CONFIG_KILL |
264 | APPLET(kill, kill_main, _BB_DIR_BIN, _BB_SUID_NEVER) | 276 | APPLET(kill, kill_main, _BB_DIR_BIN, _BB_SUID_NEVER) |
265 | #endif | 277 | #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 @@ | |||
989 | "\t-x\tdo not export externs" | 989 | "\t-x\tdo not export externs" |
990 | 990 | ||
991 | #define ip_trivial_usage \ | 991 | #define ip_trivial_usage \ |
992 | "not written yet" | 992 | "[ OPTIONS ] { address | link | route | tunnel } { COMMAND | help }" |
993 | #define ip_full_usage \ | 993 | #define ip_full_usage \ |
994 | "not written yet" | 994 | "ip [ OPTIONS ] OBJECT { COMMAND | help }\n" \ |
995 | "where OBJECT := { link | addr | route | tunnel }\n" \ | ||
996 | "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }\n" | ||
997 | |||
998 | #define ipaddr_trivial_usage \ | ||
999 | "{ {add|del} IFADDR dev STRING | {show|flush} [ dev STRING ] [ to PREFIX ] }" | ||
1000 | #define ipaddr_full_usage \ | ||
1001 | "ipaddr {add|del} IFADDR dev STRING\n" \ | ||
1002 | "ipaddr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]\n" \ | ||
1003 | " [ to PREFIX ] [ label PATTERN ]\n" \ | ||
1004 | "IFADDR := PREFIX | ADDR peer PREFIX\n" \ | ||
1005 | " [ broadcast ADDR ] [ anycast ADDR ]\n" \ | ||
1006 | " [ label STRING ] [ scope SCOPE-ID ]\n" \ | ||
1007 | "SCOPE-ID := [ host | link | global | NUMBER ]\n" | ||
995 | 1008 | ||
996 | #ifndef CONFIG_FEATURE_IPCALC_FANCY | 1009 | #ifndef CONFIG_FEATURE_IPCALC_FANCY |
997 | #define ipcalc_trivial_usage \ | 1010 | # define ipcalc_trivial_usage \ |
998 | "[--broadcast] [--netmask] [--network] ipaddr <netmask>" | 1011 | "[--broadcast] [--netmask] [--network] ipaddr <netmask>" |
999 | 1012 | ||
1000 | #define ipcalc_full_usage \ | 1013 | # define ipcalc_full_usage \ |
1001 | "Calculate IP network settings from a IP address\n\n" \ | 1014 | "Calculate IP network settings from a IP address\n\n" \ |
1002 | "Options:\n" \ | 1015 | "Options:\n" \ |
1003 | "\t-b\t--broadcast\tDisplay calculated broadcast address.\n" \ | 1016 | "\t-b\t--broadcast\tDisplay calculated broadcast address.\n" \ |
1004 | "\t-n\t--netmask\tDisplay default netmask for IP.\n" \ | 1017 | "\t-n\t--netmask\tDisplay default netmask for IP.\n" \ |
1005 | "\t-w\t--network\tDisplay calculated network address." | 1018 | "\t-w\t--network\tDisplay calculated network address." |
1006 | #else | 1019 | #else |
1007 | #define ipcalc_trivial_usage \ | 1020 | # define ipcalc_trivial_usage \ |
1008 | "[OPTION]... ipaddr <netmask>" | 1021 | "[OPTION]... ipaddr <netmask>" |
1009 | 1022 | ||
1010 | #define ipcalc_full_usage \ | 1023 | # define ipcalc_full_usage \ |
1011 | "Calculate IP network settings from a IP address\n\n" \ | 1024 | "Calculate IP network settings from a IP address\n\n" \ |
1012 | "Options:\n" \ | 1025 | "Options:\n" \ |
1013 | "\t-b\t--broadcast\tDisplay calculated broadcast address.\n" \ | 1026 | "\t-b\t--broadcast\tDisplay calculated broadcast address.\n" \ |
@@ -1023,6 +1036,32 @@ | |||
1023 | "should display on standard out. Multiple options may be\n" \ | 1036 | "should display on standard out. Multiple options may be\n" \ |
1024 | "specified.\n" | 1037 | "specified.\n" |
1025 | 1038 | ||
1039 | #define iplink_trivial_usage \ | ||
1040 | "{ set DEVICE { up | down | arp { on | off } | show [ DEVICE ] }" | ||
1041 | #define iplink_full_usage \ | ||
1042 | "iplink set DEVICE { up | down | arp { on | off } |\n" \ | ||
1043 | " dynamic { on | off } |\n" \ | ||
1044 | " mtu MTU }\n" \ | ||
1045 | "iplink show [ DEVICE ]\n" | ||
1046 | |||
1047 | #define iproute_trivial_usage \ | ||
1048 | "{ list | flush | { add | del | change | append | replace | monitor } ROUTE }" | ||
1049 | #define iproute_full_usage \ | ||
1050 | "iproute { list | flush } SELECTOR\n" \ | ||
1051 | "iproute get ADDRESS [ from ADDRESS iif STRING ]\n" \ | ||
1052 | " [ oif STRING ] [ tos TOS ]\n" \ | ||
1053 | "iproute { add | del | change | append | replace | monitor } ROUTE\n" \ | ||
1054 | "SELECTOR := [ root PREFIX ] [ match PREFIX ] [ proto RTPROTO ]\n" \ | ||
1055 | "ROUTE := [ TYPE ] PREFIX [ tos TOS ] [ proto RTPROTO ]\n" | ||
1056 | |||
1057 | #define iptunnel_trivial_usage \ | ||
1058 | "{ add | change | del | show } [ NAME ] [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ] [ ttl TTL ]" | ||
1059 | #define iptunnel_full_usage \ | ||
1060 | "iptunnel { add | change | del | show } [ NAME ]\n" \ | ||
1061 | " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" \ | ||
1062 | " [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" \ | ||
1063 | " [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]\n" | ||
1064 | |||
1026 | #define kill_trivial_usage \ | 1065 | #define kill_trivial_usage \ |
1027 | "[-signal] process-id [process-id ...]" | 1066 | "[-signal] process-id [process-id ...]" |
1028 | #define kill_full_usage \ | 1067 | #define kill_full_usage \ |