summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-10-20 01:38:56 +0200
committerDenys Vlasenko2010-10-20 01:38:56 +0200
commit9e244c760042e764d3504dc94cf79b41938d9b1d (patch)
tree299bc7c3a90afa63b87dc9fc3a31866794cf3ee3 /networking/udhcp/dhcpc.c
parentf04ca74ab5eb6ee57a573c6e1ab3e84d3f0a0af8 (diff)
downloadbusybox-9e244c760042e764d3504dc94cf79b41938d9b1d.zip
busybox-9e244c760042e764d3504dc94cf79b41938d9b1d.tar.gz
udhcpc: move usage text to .c file. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 27d6ad1..3630129 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -765,6 +765,84 @@ static void client_background(void)
}
#endif
+//usage:#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1
+//usage:# define IF_UDHCP_VERBOSE(...) __VA_ARGS__
+//usage:#else
+//usage:# define IF_UDHCP_VERBOSE(...)
+//usage:#endif
+//usage:#define udhcpc_trivial_usage
+//usage: "[-fbnq"IF_UDHCP_VERBOSE("v")"oCR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]\n"
+//usage: " [-H HOSTNAME] [-c CID] [-V VENDOR] [-O DHCP_OPT]..." IF_FEATURE_UDHCP_PORT(" [-P N]")
+//usage:#define udhcpc_full_usage "\n"
+//usage: IF_LONG_OPTS(
+//usage: "\n -i,--interface IFACE Interface to use (default eth0)"
+//usage: "\n -p,--pidfile FILE Create pidfile"
+//usage: "\n -r,--request IP IP address to request"
+//usage: "\n -s,--script PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")"
+//usage: "\n -t,--retries N Send up to N discover packets"
+//usage: "\n -T,--timeout N Pause between packets (default 3 seconds)"
+//usage: "\n -A,--tryagain N Wait N seconds after failure (default 20)"
+//usage: "\n -f,--foreground Run in foreground"
+//usage: USE_FOR_MMU(
+//usage: "\n -b,--background Background if lease is not obtained"
+//usage: )
+//usage: "\n -S,--syslog Log to syslog too"
+//usage: "\n -n,--now Exit if lease is not obtained"
+//usage: "\n -q,--quit Exit after obtaining lease"
+//usage: "\n -R,--release Release IP on exit"
+//usage: IF_FEATURE_UDHCP_PORT(
+//usage: "\n -P,--client-port N Use port N (default 68)"
+//usage: )
+//usage: IF_FEATURE_UDHCPC_ARPING(
+//usage: "\n -a,--arping Use arping to validate offered address"
+//usage: )
+//usage: "\n -O,--request-option OPT Request DHCP option OPT (cumulative)"
+//usage: "\n -o,--no-default-options Don't request any options (unless -O is given)"
+//usage: "\n -x OPT:VAL Include option OPT in sent packets (cumulative)"
+//usage: "\n -F,--fqdn NAME Ask server to update DNS mapping for NAME"
+//usage: "\n -H,-h,--hostname NAME Send NAME as client hostname (default none)"
+//usage: "\n -V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')"
+//usage: "\n -c,--clientid CLIENTID Client identifier (default own MAC)"
+//usage: "\n -C,--clientid-none Don't send client identifier"
+//usage: IF_UDHCP_VERBOSE(
+//usage: "\n -v Verbose"
+//usage: )
+//usage: )
+//usage: IF_NOT_LONG_OPTS(
+//usage: "\n -i IFACE Interface to use (default eth0)"
+//usage: "\n -p FILE Create pidfile"
+//usage: "\n -r IP IP address to request"
+//usage: "\n -s PROG Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")"
+//usage: "\n -t N Send up to N discover packets"
+//usage: "\n -T N Pause between packets (default 3 seconds)"
+//usage: "\n -A N Wait N seconds (default 20) after failure"
+//usage: "\n -x OPT:VAL Include option OPT in sent packets"
+//usage: "\n -O OPT Request DHCP option OPT (cumulative)"
+//usage: "\n -o Don't request any options (unless -O is given)"
+//usage: "\n -f Run in foreground"
+//usage: USE_FOR_MMU(
+//usage: "\n -b Background if lease is not obtained"
+//usage: )
+//usage: "\n -S Log to syslog too"
+//usage: "\n -n Exit if lease is not obtained"
+//usage: "\n -q Exit after obtaining lease"
+//usage: "\n -R Release IP on exit"
+//usage: IF_FEATURE_UDHCP_PORT(
+//usage: "\n -P N Use port N (default 68)"
+//usage: )
+//usage: IF_FEATURE_UDHCPC_ARPING(
+//usage: "\n -a Use arping to validate offered address"
+//usage: )
+//usage: "\n -F NAME Ask server to update DNS mapping for NAME"
+//usage: "\n -H,-h NAME Send NAME as client hostname (default none)"
+//usage: "\n -V VENDOR Vendor identifier (default 'udhcp VERSION')"
+//usage: "\n -c CLIENTID Client identifier (default own MAC)"
+//usage: "\n -C Don't send client identifier"
+//usage: IF_UDHCP_VERBOSE(
+//usage: "\n -v Verbose"
+//usage: )
+//usage: )
+
int udhcpc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int udhcpc_main(int argc UNUSED_PARAM, char **argv)
{