aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-11-10 23:42:27 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-11-10 23:42:27 +0000
commitc11986d89eba564945b226660031e624bf897561 (patch)
tree916cab407d266dbbf8f0069e65ab0434583b336c /include
parent912d8f4cbc724ce6ef9d8bd3f73d16d7ef4cf069 (diff)
downloadbusybox-c11986d89eba564945b226660031e624bf897561.tar.gz
ipcalc applet by Stephan Linz and Jordan Crouse
Diffstat (limited to 'include')
-rw-r--r--include/applets.h3
-rw-r--r--include/usage.h30
2 files changed, 33 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h
index a9f93cc49..e8bcb0e4b 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -254,6 +254,9 @@
#ifdef CONFIG_IP
APPLET(ip, ip_main, _BB_DIR_BIN, _BB_SUID_NEVER)
#endif
+#ifdef CONFIG_IPCALC
+ APPLET(ipcalc, ipcalc_main, _BB_DIR_BIN, _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 c140a88ba..b741360cf 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -982,6 +982,36 @@
#define ip_full_usage \
"not written yet"
+#ifndef CONFIG_FEATURE_IPCALC_FANCY
+#define ipcalc_trivial_usage \
+ "[--broadcast] [--netmask] [--network] ipaddr <netmask>"
+
+#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 \
+ "[OPTION]... ipaddr <netmask>"
+
+#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.\n" \
+ "\t-h\t--hostname\tDisplay first resolved host name.\n" \
+ "\t-s\t--silent\tDon't ever display error messages."
+#endif
+
+#define ipcalc_notes_usage \
+ "ipcalc provides a simple way to calculate IP information for\n" \
+ "a host. The various options specify what information ipcalc\n" \
+ "should display on standard out. Multiple options may be\n" \
+ "specified.\n"
+
#define kill_trivial_usage \
"[-signal] process-id [process-id ...]"
#define kill_full_usage \