summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorPere Orga2011-04-11 03:29:49 +0200
committerDenys Vlasenko2011-04-11 03:29:49 +0200
commit5bc8c005a8e15c43285bc595a8d404de67a482ac (patch)
tree98f2d35d1db26f4d8cba5f095ff63bf8e2e8d980 /networking
parent73ef15cf3894716c1393ed21dee6e6bb2cdbc90f (diff)
downloadbusybox-5bc8c005a8e15c43285bc595a8d404de67a482ac.zip
busybox-5bc8c005a8e15c43285bc595a8d404de67a482ac.tar.gz
move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/arp.c19
-rw-r--r--networking/arping.c17
-rw-r--r--networking/brctl.c24
-rw-r--r--networking/dnsd.c16
-rw-r--r--networking/ether-wake.c10
-rw-r--r--networking/ftpgetput.c38
-rw-r--r--networking/hostname.c19
-rw-r--r--networking/httpd.c26
-rw-r--r--networking/ifconfig.c21
-rw-r--r--networking/ifenslave.c27
-rw-r--r--networking/ifplugd.c26
-rw-r--r--networking/ifupdown.c28
-rw-r--r--networking/inetd.c11
-rw-r--r--networking/ip.c73
-rw-r--r--networking/ipcalc.c27
-rw-r--r--networking/isrv_identd.c11
-rw-r--r--networking/nslookup.c14
-rw-r--r--networking/ntpd.c17
-rw-r--r--networking/pscan.c12
-rw-r--r--networking/route.c9
-rw-r--r--networking/slattach.c14
-rw-r--r--networking/tc.c21
-rw-r--r--networking/tcpudp.c37
-rw-r--r--networking/telnet.c16
-rw-r--r--networking/telnetd.c22
-rw-r--r--networking/tftp.c33
-rw-r--r--networking/traceroute.c45
-rw-r--r--networking/tunctl.c19
-rw-r--r--networking/udhcp/dhcpd.c11
-rw-r--r--networking/udhcp/dhcprelay.c6
-rw-r--r--networking/udhcp/dumpleases.c17
-rw-r--r--networking/vconfig.c12
-rw-r--r--networking/zcip.c13
33 files changed, 711 insertions, 0 deletions
diff --git a/networking/arp.c b/networking/arp.c
index 0ef267a..3f68f5c 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -13,6 +13,25 @@
* modified for getopt32 by Arne Bernin <arne [at] alamut.de>
*/
+//usage:#define arp_trivial_usage
+//usage: "\n[-vn] [-H HWTYPE] [-i IF] -a [HOSTNAME]"
+//usage: "\n[-v] [-i IF] -d HOSTNAME [pub]"
+//usage: "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [temp]"
+//usage: "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [netmask MASK] pub"
+//usage: "\n[-v] [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub"
+//usage:#define arp_full_usage "\n\n"
+//usage: "Manipulate ARP cache\n"
+//usage: "\nOptions:"
+//usage: "\n -a Display (all) hosts"
+//usage: "\n -s Set new ARP entry"
+//usage: "\n -d Delete a specified entry"
+//usage: "\n -v Verbose"
+//usage: "\n -n Don't resolve names"
+//usage: "\n -i IF Network interface"
+//usage: "\n -D Read <hwaddr> from given device"
+//usage: "\n -A,-p AF Protocol family"
+//usage: "\n -H HWTYPE Hardware address type"
+
#include "libbb.h"
#include "inet_common.h"
diff --git a/networking/arping.c b/networking/arping.c
index 6f6b59c..357dcaa 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -6,6 +6,23 @@
* Busybox port: Nick Fedchik <nick@fedchik.org.ua>
*/
+//usage:#define arping_trivial_usage
+//usage: "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP"
+//usage:#define arping_full_usage "\n\n"
+//usage: "Send ARP requests/replies\n"
+//usage: "\nOptions:"
+//usage: "\n -f Quit on first ARP reply"
+//usage: "\n -q Quiet"
+//usage: "\n -b Keep broadcasting, don't go unicast"
+//usage: "\n -D Duplicated address detection mode"
+//usage: "\n -U Unsolicited ARP mode, update your neighbors"
+//usage: "\n -A ARP answer mode, update your neighbors"
+//usage: "\n -c N Stop after sending N ARP requests"
+//usage: "\n -w TIMEOUT Time to wait for ARP reply, seconds"
+//usage: "\n -I IFACE Interface to use (default eth0)"
+//usage: "\n -s SRC_IP Sender IP address"
+//usage: "\n DST_IP Target IP address"
+
#include <arpa/inet.h>
#include <net/if.h>
#include <netinet/ether.h>
diff --git a/networking/brctl.c b/networking/brctl.c
index c0b094e..19f474f 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -12,6 +12,30 @@
/* This applet currently uses only the ioctl interface and no sysfs at all.
* At the time of this writing this was considered a feature.
*/
+
+//usage:#define brctl_trivial_usage
+//usage: "COMMAND [BRIDGE [INTERFACE]]"
+//usage:#define brctl_full_usage "\n\n"
+//usage: "Manage ethernet bridges\n"
+//usage: "\nCommands:"
+//usage: IF_FEATURE_BRCTL_SHOW(
+//usage: "\n show Show a list of bridges"
+//usage: )
+//usage: "\n addbr BRIDGE Create BRIDGE"
+//usage: "\n delbr BRIDGE Delete BRIDGE"
+//usage: "\n addif BRIDGE IFACE Add IFACE to BRIDGE"
+//usage: "\n delif BRIDGE IFACE Delete IFACE from BRIDGE"
+//usage: IF_FEATURE_BRCTL_FANCY(
+//usage: "\n setageing BRIDGE TIME Set ageing time"
+//usage: "\n setfd BRIDGE TIME Set bridge forward delay"
+//usage: "\n sethello BRIDGE TIME Set hello time"
+//usage: "\n setmaxage BRIDGE TIME Set max message age"
+//usage: "\n setpathcost BRIDGE COST Set path cost"
+//usage: "\n setportprio BRIDGE PRIO Set port priority"
+//usage: "\n setbridgeprio BRIDGE PRIO Set bridge priority"
+//usage: "\n stp BRIDGE [1/yes/on|0/no/off] STP on/off"
+//usage: )
+
#include "libbb.h"
#include <linux/sockios.h>
#include <net/if.h>
diff --git a/networking/dnsd.c b/networking/dnsd.c
index 8ed31ce..65eae96 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -17,6 +17,22 @@
* the first porting of oao' scdns to busybox also.
*/
+//usage:#define dnsd_trivial_usage
+//usage: "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]"
+//usage:#define dnsd_full_usage "\n\n"
+//usage: "Small static DNS server daemon\n"
+//usage: "\nOptions:"
+//usage: "\n -c FILE Config file"
+//usage: "\n -t SEC TTL"
+//usage: "\n -p PORT Listen on PORT"
+//usage: "\n -i ADDR Listen on ADDR"
+//usage: "\n -d Daemonize"
+//usage: "\n -v Verbose"
+//usage: "\n -s Send successful replies only. Use this if you want"
+//usage: "\n to use /etc/resolv.conf with two nameserver lines:"
+//usage: "\n nameserver DNSD_SERVER"
+//usage: "\n nameserver NORNAL_DNS_SERVER"
+
#include "libbb.h"
#include <syslog.h>
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index 8f1479c..7bb9aa5 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -64,6 +64,16 @@
* filter. That configuration consumes more power.
*/
+//usage:#define ether_wake_trivial_usage
+//usage: "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
+//usage:#define ether_wake_full_usage "\n\n"
+//usage: "Send a magic packet to wake up sleeping machines.\n"
+//usage: "MAC must be a station address (00:11:22:33:44:55) or\n"
+//usage: "a hostname with a known 'ethers' entry.\n"
+//usage: "\nOptions:"
+//usage: "\n -b Send wake-up packet to the broadcast address"
+//usage: "\n -i iface Interface to use (default eth0)"
+//usage: "\n -p pass Append four or six byte password PW to the packet"
#include <netpacket/packet.h>
#include <net/ethernet.h>
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 09c5ff3..66316e2 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -13,6 +13,44 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define ftpget_trivial_usage
+//usage: "[OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE"
+//usage:#define ftpget_full_usage "\n\n"
+//usage: "Retrieve a remote file via FTP\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_FTPGETPUT_LONG_OPTIONS(
+//usage: "\n -c,--continue Continue previous transfer"
+//usage: "\n -v,--verbose Verbose"
+//usage: "\n -u,--username Username"
+//usage: "\n -p,--password Password"
+//usage: "\n -P,--port Port number"
+//usage: )
+//usage: IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS(
+//usage: "\n -c Continue previous transfer"
+//usage: "\n -v Verbose"
+//usage: "\n -u Username"
+//usage: "\n -p Password"
+//usage: "\n -P Port number"
+//usage: )
+//usage:
+//usage:#define ftpput_trivial_usage
+//usage: "[OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE"
+//usage:#define ftpput_full_usage "\n\n"
+//usage: "Store a local file on a remote machine via FTP\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_FTPGETPUT_LONG_OPTIONS(
+//usage: "\n -v,--verbose Verbose"
+//usage: "\n -u,--username Username"
+//usage: "\n -p,--password Password"
+//usage: "\n -P,--port Port number"
+//usage: )
+//usage: IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS(
+//usage: "\n -v Verbose"
+//usage: "\n -u Username"
+//usage: "\n -p Password"
+//usage: "\n -P Port number"
+//usage: )
+
#include "libbb.h"
struct globals {
diff --git a/networking/hostname.c b/networking/hostname.c
index 66b52dd..49a3e89 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -9,6 +9,25 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define hostname_trivial_usage
+//usage: "[OPTIONS] [HOSTNAME | -F FILE]"
+//usage:#define hostname_full_usage "\n\n"
+//usage: "Get or set hostname or DNS domain name\n"
+//usage: "\nOptions:"
+//usage: "\n -s Short"
+//usage: "\n -i Addresses for the hostname"
+//usage: "\n -d DNS domain name"
+//usage: "\n -f Fully qualified domain name"
+//usage: "\n -F FILE Use FILE's content as hostname"
+//usage:
+//usage:#define hostname_example_usage
+//usage: "$ hostname\n"
+//usage: "sage\n"
+//usage:
+//usage:#define dnsdomainname_trivial_usage NOUSAGE_STR
+//usage:#define dnsdomainname_full_usage ""
+
#include "libbb.h"
static void do_sethostname(char *s, int isfile)
diff --git a/networking/httpd.c b/networking/httpd.c
index eded7b6..d6157ac 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -97,6 +97,32 @@
*/
/* TODO: use TCP_CORK, parse_config() */
+//usage:#define httpd_trivial_usage
+//usage: "[-ifv[v]]"
+//usage: " [-c CONFFILE]"
+//usage: " [-p [IP:]PORT]"
+//usage: IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]")
+//usage: IF_FEATURE_HTTPD_BASIC_AUTH(" [-r REALM]")
+//usage: " [-h HOME]\n"
+//usage: "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING"
+//usage:#define httpd_full_usage "\n\n"
+//usage: "Listen for incoming HTTP requests\n"
+//usage: "\nOptions:"
+//usage: "\n -i Inetd mode"
+//usage: "\n -f Don't daemonize"
+//usage: "\n -v[v] Verbose"
+//usage: "\n -p [IP:]PORT Bind to IP:PORT (default *:80)"
+//usage: IF_FEATURE_HTTPD_SETUID(
+//usage: "\n -u USER[:GRP] Set uid/gid after binding to port")
+//usage: IF_FEATURE_HTTPD_BASIC_AUTH(
+//usage: "\n -r REALM Authentication Realm for Basic Authentication")
+//usage: "\n -h HOME Home directory (default .)"
+//usage: "\n -c FILE Configuration file (default {/etc,HOME}/httpd.conf)"
+//usage: IF_FEATURE_HTTPD_AUTH_MD5(
+//usage: "\n -m STRING MD5 crypt STRING")
+//usage: "\n -e STRING HTML encode STRING"
+//usage: "\n -d STRING URL decode STRING"
+
#include "libbb.h"
#if ENABLE_FEATURE_HTTPD_USE_SENDFILE
# include <sys/sendfile.h>
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index da2635c..220b021 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -26,6 +26,27 @@
* IPV6 support added by Bart Visscher <magick@linux-fan.com>
*/
+//usage:#define ifconfig_trivial_usage
+//usage: IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
+//usage:#define ifconfig_full_usage "\n\n"
+//usage: "Configure a network interface\n"
+//usage: "\nOptions:"
+//usage: "\n"
+//usage: IF_FEATURE_IPV6(
+//usage: " [add ADDRESS[/PREFIXLEN]]\n")
+//usage: IF_FEATURE_IPV6(
+//usage: " [del ADDRESS[/PREFIXLEN]]\n")
+//usage: " [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n"
+//usage: " [netmask ADDRESS] [dstaddr ADDRESS]\n"
+//usage: IF_FEATURE_IFCONFIG_SLIP(
+//usage: " [outfill NN] [keepalive NN]\n")
+//usage: " " IF_FEATURE_IFCONFIG_HW("[hw ether" IF_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n"
+//usage: " [[-]trailers] [[-]arp] [[-]allmulti]\n"
+//usage: " [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n"
+//usage: IF_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ(
+//usage: " [mem_start NN] [io_addr NN] [irq NN]\n")
+//usage: " [up|down] ..."
+
#include <net/if.h>
#include <net/if_arp.h>
#include <netinet/in.h>
diff --git a/networking/ifenslave.c b/networking/ifenslave.c
index 0b3ebf7..208623e 100644
--- a/networking/ifenslave.c
+++ b/networking/ifenslave.c
@@ -98,6 +98,33 @@
* set version to 1.1.0
*/
+//usage:#define ifenslave_trivial_usage
+//usage: "[-cdf] MASTER_IFACE SLAVE_IFACE..."
+//usage:#define ifenslave_full_usage "\n\n"
+//usage: "Configure network interfaces for parallel routing\n"
+//usage: "\nOptions:"
+//usage: "\n -c,--change-active Change active slave"
+//usage: "\n -d,--detach Remove slave interface from bonding device"
+//usage: "\n -f,--force Force, even if interface is not Ethernet"
+/* //usage: "\n -r,--receive-slave Create a receive-only slave" */
+//usage:
+//usage:#define ifenslave_example_usage
+//usage: "To create a bond device, simply follow these three steps:\n"
+//usage: "- ensure that the required drivers are properly loaded:\n"
+//usage: " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n"
+//usage: "- assign an IP address to the bond device:\n"
+//usage: " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n"
+//usage: "- attach all the interfaces you need to the bond device:\n"
+//usage: " # ifenslave bond0 eth0 eth1 eth2\n"
+//usage: " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n"
+//usage: " interfaces attached AFTER this assignment will get the same MAC addr.\n\n"
+//usage: " To detach a dead interface without setting the bond device down:\n"
+//usage: " # ifenslave -d bond0 eth1\n\n"
+//usage: " To set the bond device down and automatically release all the slaves:\n"
+//usage: " # ifconfig bond0 down\n\n"
+//usage: " To change active slave:\n"
+//usage: " # ifenslave -c bond0 eth0\n"
+
#include "libbb.h"
/* #include <net/if.h> - no. linux/if_bonding.h pulls in linux/if.h */
diff --git a/networking/ifplugd.c b/networking/ifplugd.c
index 8dd0a5b..421611a 100644
--- a/networking/ifplugd.c
+++ b/networking/ifplugd.c
@@ -6,6 +6,32 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define ifplugd_trivial_usage
+//usage: "[OPTIONS]"
+//usage:#define ifplugd_full_usage "\n\n"
+//usage: "Network interface plug detection daemon\n"
+//usage: "\nOptions:"
+//usage: "\n -n Don't daemonize"
+//usage: "\n -s Don't log to syslog"
+//usage: "\n -i IFACE Interface"
+//usage: "\n -f/-F Treat link detection error as link down/link up"
+//usage: "\n (otherwise exit on error)"
+//usage: "\n -a Don't up interface at each link probe"
+//usage: "\n -M Monitor creation/destruction of interface"
+//usage: "\n (otherwise it must exist)"
+//usage: "\n -r PROG Script to run"
+//usage: "\n -x ARG Extra argument for script"
+//usage: "\n -I Don't exit on nonzero exit code from script"
+//usage: "\n -p Don't run script on daemon startup"
+//usage: "\n -q Don't run script on daemon quit"
+//usage: "\n -l Run script on startup even if no cable is detected"
+//usage: "\n -t SECS Poll time in seconds"
+//usage: "\n -u SECS Delay before running script after link up"
+//usage: "\n -d SECS Delay after link down"
+//usage: "\n -m MODE API mode (mii, priv, ethtool, wlan, iff, auto)"
+//usage: "\n -k Kill running daemon"
+
#include "libbb.h"
#include "fix_u32.h"
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 7706a84..b48abb7 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -17,6 +17,34 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define ifup_trivial_usage
+//usage: "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..."
+//usage:#define ifup_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -a De/configure all interfaces automatically"
+//usage: "\n -i FILE Use FILE for interface definitions"
+//usage: "\n -n Print out what would happen, but don't do it"
+//usage: IF_FEATURE_IFUPDOWN_MAPPING(
+//usage: "\n (note: doesn't disable mappings)"
+//usage: "\n -m Don't run any mappings"
+//usage: )
+//usage: "\n -v Print out what would happen before doing it"
+//usage: "\n -f Force de/configuration"
+//usage:
+//usage:#define ifdown_trivial_usage
+//usage: "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..."
+//usage:#define ifdown_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -a De/configure all interfaces automatically"
+//usage: "\n -i FILE Use FILE for interface definitions"
+//usage: "\n -n Print out what would happen, but don't do it"
+//usage: IF_FEATURE_IFUPDOWN_MAPPING(
+//usage: "\n (note: doesn't disable mappings)"
+//usage: "\n -m Don't run any mappings"
+//usage: )
+//usage: "\n -v Print out what would happen before doing it"
+//usage: "\n -f Force de/configuration"
+
#include "libbb.h"
/* After libbb.h, since it needs sys/types.h on some systems */
#include <sys/utsname.h>
diff --git a/networking/inetd.c b/networking/inetd.c
index 6018665..226a649 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -154,6 +154,17 @@
* setuid()
*/
+//usage:#define inetd_trivial_usage
+//usage: "[-fe] [-q N] [-R N] [CONFFILE]"
+//usage:#define inetd_full_usage "\n\n"
+//usage: "Listen for network connections and launch programs\n"
+//usage: "\nOptions:"
+//usage: "\n -f Run in foreground"
+//usage: "\n -e Log to stderr"
+//usage: "\n -q N Socket listen queue (default: 128)"
+//usage: "\n -R N Pause services after N connects/min"
+//usage: "\n (default: 0 - disabled)"
+
#include <syslog.h>
#include <sys/un.h>
diff --git a/networking/ip.c b/networking/ip.c
index 350656c..98d5833 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -9,6 +9,79 @@
* Bernhard Reutner-Fischer rewrote to use index_in_substr_array
*/
+/* would need to make the " | " optional depending on more than one selected: */
+//usage:#define ip_trivial_usage
+//usage: "[OPTIONS] {"
+//usage: IF_FEATURE_IP_ADDRESS("address | ")
+//usage: IF_FEATURE_IP_ROUTE("route | ")
+//usage: IF_FEATURE_IP_LINK("link | ")
+//usage: IF_FEATURE_IP_TUNNEL("tunnel | ")
+//usage: IF_FEATURE_IP_RULE("rule")
+//usage: "} {COMMAND}"
+//usage:#define ip_full_usage "\n\n"
+//usage: "ip [OPTIONS] OBJECT {COMMAND}\n"
+//usage: "where OBJECT := {"
+//usage: IF_FEATURE_IP_ADDRESS("address | ")
+//usage: IF_FEATURE_IP_ROUTE("route | ")
+//usage: IF_FEATURE_IP_LINK("link | ")
+//usage: IF_FEATURE_IP_TUNNEL("tunnel | ")
+//usage: IF_FEATURE_IP_RULE("rule")
+//usage: "}\n"
+//usage: "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }"
+//usage:
+//usage:#define ipaddr_trivial_usage
+//usage: "{ {add|del} IFADDR dev STRING | {show|flush}\n"
+//usage: " [dev STRING] [to PREFIX] }"
+//usage:#define ipaddr_full_usage "\n\n"
+//usage: "ipaddr {add|delete} IFADDR dev STRING\n"
+//usage: "ipaddr {show|flush} [dev STRING] [scope SCOPE-ID]\n"
+//usage: " [to PREFIX] [label PATTERN]\n"
+//usage: " IFADDR := PREFIX | ADDR peer PREFIX\n"
+//usage: " [broadcast ADDR] [anycast ADDR]\n"
+//usage: " [label STRING] [scope SCOPE-ID]\n"
+//usage: " SCOPE-ID := [host | link | global | NUMBER]"
+//usage:
+//usage:#define iplink_trivial_usage
+//usage: "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }"
+//usage:#define iplink_full_usage "\n\n"
+//usage: "iplink set DEVICE { up | down | arp | multicast { on | off } |\n"
+//usage: " dynamic { on | off } |\n"
+//usage: " mtu MTU }\n"
+//usage: "iplink show [DEVICE]"
+//usage:
+//usage:#define iproute_trivial_usage
+//usage: "{ list | flush | { add | del | change | append |\n"
+//usage: " replace | monitor } ROUTE }"
+//usage:#define iproute_full_usage "\n\n"
+//usage: "iproute { list | flush } SELECTOR\n"
+//usage: "iproute get ADDRESS [from ADDRESS iif STRING]\n"
+//usage: " [oif STRING] [tos TOS]\n"
+//usage: "iproute { add | del | change | append | replace | monitor } ROUTE\n"
+//usage: " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n"
+//usage: " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]\n"
+//usage: " [metric METRIC]"
+//usage:
+//usage:#define iprule_trivial_usage
+//usage: "{[list | add | del] RULE}"
+//usage:#define iprule_full_usage "\n\n"
+//usage: "iprule [list | add | del] SELECTOR ACTION\n"
+//usage: " SELECTOR := [from PREFIX] [to PREFIX] [tos TOS] [fwmark FWMARK]\n"
+//usage: " [dev STRING] [pref NUMBER]\n"
+//usage: " ACTION := [table TABLE_ID] [nat ADDRESS]\n"
+//usage: " [prohibit | reject | unreachable]\n"
+//usage: " [realms [SRCREALM/]DSTREALM]\n"
+//usage: " TABLE_ID := [local | main | default | NUMBER]"
+//usage:
+//usage:#define iptunnel_trivial_usage
+//usage: "{ add | change | del | show } [NAME]\n"
+//usage: " [mode { ipip | gre | sit }]\n"
+//usage: " [remote ADDR] [local ADDR] [ttl TTL]"
+//usage:#define iptunnel_full_usage "\n\n"
+//usage: "iptunnel { add | change | del | show } [NAME]\n"
+//usage: " [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n"
+//usage: " [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n"
+//usage: " [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]"
+
#include "libbb.h"
#include "libiproute/utils.h"
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index acbaa4a..f96c739 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -11,6 +11,33 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define ipcalc_trivial_usage
+//usage: "[OPTIONS] ADDRESS[[/]NETMASK] [NETMASK]"
+//usage:#define ipcalc_full_usage "\n\n"
+//usage: "Calculate IP network settings from a IP address\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_IPCALC_LONG_OPTIONS(
+//usage: "\n -b,--broadcast Display calculated broadcast address"
+//usage: "\n -n,--network Display calculated network address"
+//usage: "\n -m,--netmask Display default netmask for IP"
+//usage: IF_FEATURE_IPCALC_FANCY(
+//usage: "\n -p,--prefix Display the prefix for IP/NETMASK"
+//usage: "\n -h,--hostname Display first resolved host name"
+//usage: "\n -s,--silent Don't ever display error messages"
+//usage: )
+//usage: )
+//usage: IF_NOT_FEATURE_IPCALC_LONG_OPTIONS(
+//usage: "\n -b Display calculated broadcast address"
+//usage: "\n -n Display calculated network address"
+//usage: "\n -m Display default netmask for IP"
+//usage: IF_FEATURE_IPCALC_FANCY(
+//usage: "\n -p Display the prefix for IP/NETMASK"
+//usage: "\n -h Display first resolved host name"
+//usage: "\n -s Don't ever display error messages"
+//usage: )
+//usage: )
+
#include "libbb.h"
/* After libbb.h, because on some systems it needs other includes */
#include <arpa/inet.h>
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c
index 18ce59a..199e112 100644
--- a/networking/isrv_identd.c
+++ b/networking/isrv_identd.c
@@ -7,6 +7,17 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//usage:#define fakeidentd_trivial_usage
+//usage: "[-fiw] [-b ADDR] [STRING]"
+//usage:#define fakeidentd_full_usage "\n\n"
+//usage: "Provide fake ident (auth) service\n"
+//usage: "\nOptions:"
+//usage: "\n -f Run in foreground"
+//usage: "\n -i Inetd mode"
+//usage: "\n -w Inetd 'wait' mode"
+//usage: "\n -b ADDR Bind to specified address"
+//usage: "\n STRING Ident answer string (default: nobody)"
+
#include "libbb.h"
#include <syslog.h>
#include "isrv.h"
diff --git a/networking/nslookup.c b/networking/nslookup.c
index 67fc015..f4fd407 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -11,6 +11,20 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define nslookup_trivial_usage
+//usage: "[HOST] [SERVER]"
+//usage:#define nslookup_full_usage "\n\n"
+//usage: "Query the nameserver for the IP address of the given HOST\n"
+//usage: "optionally using a specified DNS server"
+//usage:
+//usage:#define nslookup_example_usage
+//usage: "$ nslookup localhost\n"
+//usage: "Server: default\n"
+//usage: "Address: default\n"
+//usage: "\n"
+//usage: "Name: debian\n"
+//usage: "Address: 127.0.0.1\n"
+
#include <resolv.h>
#include "libbb.h"
diff --git a/networking/ntpd.c b/networking/ntpd.c
index ba2950d..e27dbaa 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -27,6 +27,23 @@
* *
***********************************************************************
*/
+
+//usage:#define ntpd_trivial_usage
+//usage: "[-dnqNw"IF_FEATURE_NTPD_SERVER("l")"] [-S PROG] [-p PEER]..."
+//usage:#define ntpd_full_usage "\n\n"
+//usage: "NTP client/server\n"
+//usage: "\nOptions:"
+//usage: "\n -d Verbose"
+//usage: "\n -n Do not daemonize"
+//usage: "\n -q Quit after clock is set"
+//usage: "\n -N Run at high priority"
+//usage: "\n -w Do not set time (only query peers), implies -n"
+//usage: IF_FEATURE_NTPD_SERVER(
+//usage: "\n -l Run as server on port 123"
+//usage: )
+//usage: "\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins"
+//usage: "\n -p PEER Obtain time from PEER (may be repeated)"
+
#include "libbb.h"
#include <math.h>
#include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
diff --git a/networking/pscan.c b/networking/pscan.c
index a9e5d5c..5595148 100644
--- a/networking/pscan.c
+++ b/networking/pscan.c
@@ -6,6 +6,18 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define pscan_trivial_usage
+//usage: "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
+//usage:#define pscan_full_usage "\n\n"
+//usage: "Scan a host, print all open ports\n"
+//usage: "\nOptions:"
+//usage: "\n -c Show closed ports too"
+//usage: "\n -b Show blocked ports too"
+//usage: "\n -p Scan from this port (default 1)"
+//usage: "\n -P Scan up to this port (default 1024)"
+//usage: "\n -t Timeout (default 5000 ms)"
+//usage: "\n -T Minimum rtt (default 5 ms, increase for congested hosts)"
+
#include "libbb.h"
/* debugging */
diff --git a/networking/route.c b/networking/route.c
index 98a03de..6699a1c 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -25,6 +25,15 @@
* remove ridiculous amounts of bloat.
*/
+//usage:#define route_trivial_usage
+//usage: "[{add|del|delete}]"
+//usage:#define route_full_usage "\n\n"
+//usage: "Edit kernel routing tables\n"
+//usage: "\nOptions:"
+//usage: "\n -n Don't resolve names"
+//usage: "\n -e Display other/more information"
+//usage: "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family"
+
#include <net/route.h>
#include <net/if.h>
diff --git a/networking/slattach.c b/networking/slattach.c
index 71edd2f..d1221b1 100644
--- a/networking/slattach.c
+++ b/networking/slattach.c
@@ -13,6 +13,20 @@
* - The -F options allows disabling of RTS/CTS flow control.
*/
+//usage:#define slattach_trivial_usage
+//usage: "[-cehmLF] [-s SPEED] [-p PROTOCOL] DEVICE"
+//usage:#define slattach_full_usage "\n\n"
+//usage: "Attach network interface(s) to serial line(s)\n"
+//usage: "\nOptions:"
+//usage: "\n -p PROT Set protocol (slip, cslip, slip6, clisp6 or adaptive)"
+//usage: "\n -s SPD Set line speed"
+//usage: "\n -e Exit after initializing device"
+//usage: "\n -h Exit when the carrier is lost"
+//usage: "\n -c PROG Run PROG when the line is hung up"
+//usage: "\n -m Do NOT initialize the line in raw 8 bits mode"
+//usage: "\n -L Enable 3-wire operation"
+//usage: "\n -F Disable RTS/CTS flow control"
+
#include "libbb.h"
#include "libiproute/utils.h" /* invarg() */
diff --git a/networking/tc.c b/networking/tc.c
index 9b32455..e9848a8 100644
--- a/networking/tc.c
+++ b/networking/tc.c
@@ -7,6 +7,27 @@
* Bernhard Reutner-Fischer adjusted for busybox
*/
+//usage:#define tc_trivial_usage
+/* //usage: "[OPTIONS] OBJECT CMD [dev STRING]" */
+//usage: "OBJECT CMD [dev STRING]"
+//usage:#define tc_full_usage "\n\n"
+//usage: "OBJECT: {qdisc|class|filter}\n"
+//usage: "CMD: {add|del|change|replace|show}\n"
+//usage: "\n"
+//usage: "qdisc [ handle QHANDLE ] [ root |"IF_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n"
+/* //usage: "[ estimator INTERVAL TIME_CONSTANT ]\n" */
+//usage: " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n"
+//usage: " QDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n"
+//usage: "qdisc show [ dev STRING ]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n"
+//usage: "class [ classid CLASSID ] [ root | parent CLASSID ]\n"
+//usage: " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n"
+//usage: "class show [ dev STRING ] [ root | parent CLASSID ]\n"
+//usage: "filter [ pref PRIO ] [ protocol PROTO ]\n"
+/* //usage: "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */
+//usage: " [ root | classid CLASSID ] [ handle FILTERID ]\n"
+//usage: " [ [ FILTER_TYPE ] [ help | OPTIONS ] ]\n"
+//usage: "filter show [ dev STRING ] [ root | parent CLASSID ]"
+
#include "libbb.h"
#include "libiproute/utils.h"
diff --git a/networking/tcpudp.c b/networking/tcpudp.c
index 3ff2acb..a2b8c95 100644
--- a/networking/tcpudp.c
+++ b/networking/tcpudp.c
@@ -29,6 +29,43 @@
* - don't know how to retrieve ORIGDST for udp.
*/
+//usage:#define tcpsvd_trivial_usage
+//usage: "[-hEv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] IP PORT PROG"
+/* with not-implemented options: */
+/* //usage: "[-hpEvv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] [-i DIR|-x CDB] [-t SEC] IP PORT PROG" */
+//usage:#define tcpsvd_full_usage "\n\n"
+//usage: "Create TCP socket, bind to IP:PORT and listen\n"
+//usage: "for incoming connection. Run PROG for each connection.\n"
+//usage: "\n IP IP to listen on. '0' = all"
+//usage: "\n PORT Port to listen on"
+//usage: "\n PROG ARGS Program to run"
+//usage: "\n -l NAME Local hostname (else looks up local hostname in DNS)"
+//usage: "\n -u USER[:GRP] Change to user/group after bind"
+//usage: "\n -c N Handle up to N connections simultaneously"
+//usage: "\n -b N Allow a backlog of approximately N TCP SYNs"
+//usage: "\n -C N[:MSG] Allow only up to N connections from the same IP."
+//usage: "\n New connections from this IP address are closed"
+//usage: "\n immediately. MSG is written to the peer before close"
+//usage: "\n -h Look up peer's hostname"
+//usage: "\n -E Don't set up environment variables"
+//usage: "\n -v Verbose"
+//usage:
+//usage:#define udpsvd_trivial_usage
+//usage: "[-hEv] [-c N] [-u USER] [-l NAME] IP PORT PROG"
+//usage:#define udpsvd_full_usage "\n\n"
+//usage: "Create UDP socket, bind to IP:PORT and wait\n"
+//usage: "for incoming packets. Run PROG for each packet,\n"
+//usage: "redirecting all further packets with same peer ip:port to it.\n"
+//usage: "\n IP IP to listen on. '0' = all"
+//usage: "\n PORT Port to listen on"
+//usage: "\n PROG ARGS Program to run"
+//usage: "\n -l NAME Local hostname (else looks up local hostname in DNS)"
+//usage: "\n -u USER[:GRP] Change to user/group after bind"
+//usage: "\n -c N Handle up to N connections simultaneously"
+//usage: "\n -h Look up peer's hostname"
+//usage: "\n -E Don't set up environment variables"
+//usage: "\n -v Verbose"
+
#include "libbb.h"
/* Wants <limits.h> etc, thus included after libbb.h: */
diff --git a/networking/telnet.c b/networking/telnet.c
index f6fad68..1f0d851 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -21,6 +21,22 @@
*
*/
+//usage:#if ENABLE_FEATURE_TELNET_AUTOLOGIN
+//usage:#define telnet_trivial_usage
+//usage: "[-a] [-l USER] HOST [PORT]"
+//usage:#define telnet_full_usage "\n\n"
+//usage: "Connect to telnet server\n"
+//usage: "\nOptions:"
+//usage: "\n -a Automatic login with $USER variable"
+//usage: "\n -l USER Automatic login as USER"
+//usage:
+//usage:#else
+//usage:#define telnet_trivial_usage
+//usage: "HOST [PORT]"
+//usage:#define telnet_full_usage "\n\n"
+//usage: "Connect to telnet server"
+//usage:#endif
+
#include <arpa/telnet.h>
#include <netinet/in.h>
#include "libbb.h"
diff --git a/networking/telnetd.c b/networking/telnetd.c
index eec4417..4404064 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -20,6 +20,28 @@
* Vladimir Oleynik <dzo@simtreas.ru> 2001
* Set process group corrections, initial busybox port
*/
+
+//usage:#define telnetd_trivial_usage
+//usage: "[OPTIONS]"
+//usage:#define telnetd_full_usage "\n\n"
+//usage: "Handle incoming telnet connections"
+//usage: IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n"
+//usage: "\nOptions:"
+//usage: "\n -l LOGIN Exec LOGIN on connect"
+//usage: "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue"
+//usage: "\n -K Close connection as soon as login exits"
+//usage: "\n (normally wait until all programs close slave pty)"
+//usage: IF_FEATURE_TELNETD_STANDALONE(
+//usage: "\n -p PORT Port to listen on"
+//usage: "\n -b ADDR[:PORT] Address to bind to"
+//usage: "\n -F Run in foreground"
+//usage: "\n -i Inetd mode"
+//usage: IF_FEATURE_TELNETD_INETD_WAIT(
+//usage: "\n -w SEC Inetd 'wait' mode, linger time SEC"
+//usage: "\n -S Log to syslog (implied by -i or without -F and -w)"
+//usage: )
+//usage: )
+
#define DEBUG 0
#include "libbb.h"
diff --git a/networking/tftp.c b/networking/tftp.c
index 35cf0db..f52e49d 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -18,6 +18,39 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define tftp_trivial_usage
+//usage: "[OPTIONS] HOST [PORT]"
+//usage:#define tftp_full_usage "\n\n"
+//usage: "Transfer a file from/to tftp server\n"
+//usage: "\nOptions:"
+//usage: "\n -l FILE Local FILE"
+//usage: "\n -r FILE Remote FILE"
+//usage: IF_FEATURE_TFTP_GET(
+//usage: "\n -g Get file"
+//usage: )
+//usage: IF_FEATURE_TFTP_PUT(
+//usage: "\n -p Put file"
+//usage: )
+//usage: IF_FEATURE_TFTP_BLOCKSIZE(
+//usage: "\n -b SIZE Transfer blocks of SIZE octets"
+//usage: )
+//usage:
+//usage:#define tftpd_trivial_usage
+//usage: "[-cr] [-u USER] [DIR]"
+//usage:#define tftpd_full_usage "\n\n"
+//usage: "Transfer a file on tftp client's request\n"
+//usage: "\n"
+//usage: "tftpd should be used as an inetd service.\n"
+//usage: "tftpd's line for inetd.conf:\n"
+//usage: " 69 dgram udp nowait root tftpd tftpd /files/to/serve\n"
+//usage: "It also can be ran from udpsvd:\n"
+//usage: " udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve\n"
+//usage: "\nOptions:"
+//usage: "\n -r Prohibit upload"
+//usage: "\n -c Allow file creation via upload"
+//usage: "\n -u Access files as USER"
+
#include "libbb.h"
#if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 55dc15b..96f9d34 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -210,6 +210,51 @@
* Tue Dec 20 03:50:13 PST 1988
*/
+//usage:#define traceroute_trivial_usage
+//usage: "[-"IF_TRACEROUTE6("46")"FIldnrv] [-f 1ST_TTL] [-m MAXTTL] [-p PORT] [-q PROBES]\n"
+//usage: " [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-g GATEWAY] [-i IFACE]\n"
+//usage: " [-z PAUSE_MSEC] HOST [BYTES]"
+//usage:#define traceroute_full_usage "\n\n"
+//usage: "Trace the route to HOST\n"
+//usage: "\nOptions:"
+//usage: IF_TRACEROUTE6(
+//usage: "\n -4,-6 Force IP or IPv6 name resolution"
+//usage: )
+//usage: "\n -F Set the don't fragment bit"
+//usage: "\n -I Use ICMP ECHO instead of UDP datagrams"
+//usage: "\n -l Display the TTL value of the returned packet"
+//usage: "\n -d Set SO_DEBUG options to socket"
+//usage: "\n -n Print numeric addresses"
+//usage: "\n -r Bypass routing tables, send directly to HOST"
+//usage: "\n -v Verbose"
+//usage: "\n -m Max time-to-live (max number of hops)"
+//usage: "\n -p Base UDP port number used in probes"
+//usage: "\n (default 33434)"
+//usage: "\n -q Number of probes per TTL (default 3)"
+//usage: "\n -s IP address to use as the source address"
+//usage: "\n -t Type-of-service in probe packets (default 0)"
+//usage: "\n -w Time in seconds to wait for a response (default 3)"
+//usage: "\n -g Loose source route gateway (8 max)"
+//usage:
+//usage:#define traceroute6_trivial_usage
+//usage: "[-dnrv] [-m MAXTTL] [-p PORT] [-q PROBES]\n"
+//usage: " [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-i IFACE]\n"
+//usage: " HOST [BYTES]"
+//usage:#define traceroute6_full_usage "\n\n"
+//usage: "Trace the route to HOST\n"
+//usage: "\nOptions:"
+//usage: "\n -d Set SO_DEBUG options to socket"
+//usage: "\n -n Print numeric addresses"
+//usage: "\n -r Bypass routing tables, send directly to HOST"
+//usage: "\n -v Verbose"
+//usage: "\n -m Max time-to-live (max number of hops)"
+//usage: "\n -p Base UDP port number used in probes"
+//usage: "\n (default is 33434)"
+//usage: "\n -q Number of probes per TTL (default 3)"
+//usage: "\n -s IP address to use as the source address"
+//usage: "\n -t Type-of-service in probe packets (default 0)"
+//usage: "\n -w Time in seconds to wait for a response (default 3)"
+
#define TRACEROUTE_SO_DEBUG 0
/* TODO: undefs were uncommented - ??! we have config system for that! */
diff --git a/networking/tunctl.c b/networking/tunctl.c
index e17a9db..8cb733b 100644
--- a/networking/tunctl.c
+++ b/networking/tunctl.c
@@ -9,6 +9,25 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define tunctl_trivial_usage
+//usage: "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]")
+//usage:#define tunctl_full_usage "\n\n"
+//usage: "Create or delete tun interfaces\n"
+//usage: "\nOptions:"
+//usage: "\n -f name tun device (/dev/net/tun)"
+//usage: "\n -t name Create iface 'name'"
+//usage: "\n -d name Delete iface 'name'"
+//usage: IF_FEATURE_TUNCTL_UG(
+//usage: "\n -u owner Set iface owner"
+//usage: "\n -g group Set iface group"
+//usage: "\n -b Brief output"
+//usage: )
+//usage:
+//usage:#define tunctl_example_usage
+//usage: "# tunctl\n"
+//usage: "# tunctl -d tun0\n"
+
#include <netinet/in.h>
#include <net/if.h>
#include <linux/if_tun.h>
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 6fb48a1..747472d 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -20,6 +20,17 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
+//usage:#define udhcpd_trivial_usage
+//usage: "[-fS]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [CONFFILE]"
+//usage:#define udhcpd_full_usage "\n\n"
+//usage: "DHCP server\n"
+//usage: "\n -f Run in foreground"
+//usage: "\n -S Log to syslog too"
+//usage: IF_FEATURE_UDHCP_PORT(
+//usage: "\n -P N Use port N (default 67)"
+//usage: )
+
#include <syslog.h>
#include "common.h"
#include "dhcpc.h"
diff --git a/networking/udhcp/dhcprelay.c b/networking/udhcp/dhcprelay.c
index 86ef04a..f82ac05 100644
--- a/networking/udhcp/dhcprelay.c
+++ b/networking/udhcp/dhcprelay.c
@@ -9,6 +9,12 @@
* Netbeat AG
* Upstream has GPL v2 or later
*/
+
+//usage:#define dhcprelay_trivial_usage
+//usage: "CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]"
+//usage:#define dhcprelay_full_usage "\n\n"
+//usage: "Relay DHCP requests between clients and server"
+
#include "common.h"
#define SERVER_PORT 67
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c
index 21d62a2..ec07192 100644
--- a/networking/udhcp/dumpleases.c
+++ b/networking/udhcp/dumpleases.c
@@ -2,6 +2,23 @@
/*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define dumpleases_trivial_usage
+//usage: "[-r|-a] [-f LEASEFILE]"
+//usage:#define dumpleases_full_usage "\n\n"
+//usage: "Display DHCP leases granted by udhcpd\n"
+//usage: "\nOptions:"
+//usage: IF_LONG_OPTS(
+//usage: "\n -f,--file=FILE Lease file"
+//usage: "\n -r,--remaining Show remaining time"
+//usage: "\n -a,--absolute Show expiration time"
+//usage: )
+//usage: IF_NOT_LONG_OPTS(
+//usage: "\n -f FILE Lease file"
+//usage: "\n -r Show remaining time"
+//usage: "\n -a Show expiration time"
+//usage: )
+
#include "common.h"
#include "dhcpd.h"
#include "unicode.h"
diff --git a/networking/vconfig.c b/networking/vconfig.c
index 13c65ad..4fa341a 100644
--- a/networking/vconfig.c
+++ b/networking/vconfig.c
@@ -9,6 +9,18 @@
/* BB_AUDIT SUSv3 N/A */
+//usage:#define vconfig_trivial_usage
+//usage: "COMMAND [OPTIONS]"
+//usage:#define vconfig_full_usage "\n\n"
+//usage: "Create and remove virtual ethernet devices\n"
+//usage: "\nOptions:"
+//usage: "\n add [interface-name] [vlan_id]"
+//usage: "\n rem [vlan-name]"
+//usage: "\n set_flag [interface-name] [flag-num] [0 | 1]"
+//usage: "\n set_egress_map [vlan-name] [skb_priority] [vlan_qos]"
+//usage: "\n set_ingress_map [vlan-name] [skb_priority] [vlan_qos]"
+//usage: "\n set_name_type [name-type]"
+
#include "libbb.h"
#include <net/if.h>
diff --git a/networking/zcip.c b/networking/zcip.c
index 6fa265a..7250fb2 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -23,6 +23,19 @@
// - avoid silent script failures, especially under load...
// - link status monitoring (restart on link-up; stop on link-down)
+//usage:#define zcip_trivial_usage
+//usage: "[OPTIONS] IFACE SCRIPT"
+//usage:#define zcip_full_usage "\n\n"
+//usage: "Manage a ZeroConf IPv4 link-local address\n"
+//usage: "\nOptions:"
+//usage: "\n -f Run in foreground"
+//usage: "\n -q Quit after obtaining address"
+//usage: "\n -r 169.254.x.x Request this address first"
+//usage: "\n -v Verbose"
+//usage: "\n"
+//usage: "\nWith no -q, runs continuously monitoring for ARP conflicts,"
+//usage: "\nexits only on I/O errors (link down etc)"
+
#include <netinet/ether.h>
#include <net/ethernet.h>
#include <net/if.h>