summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGlenn L McGrath2002-12-01 23:04:06 +0000
committerGlenn L McGrath2002-12-01 23:04:06 +0000
commitf112daa232122dd114933d04a9e415cfc61f1717 (patch)
tree1e52823545fb3e20f89205fd6224017e19586c72 /include
parentf3faf41334fab96d20854c2b4c1acab022c98028 (diff)
downloadbusybox-f112daa232122dd114933d04a9e415cfc61f1717.zip
busybox-f112daa232122dd114933d04a9e415cfc61f1717.tar.gz
Enable ip commands to be compiled seperate from ip, modifed patch from Bastian Blank
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 a85a8bf..d8c4b38 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 c676754..eca0544 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 \