diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:41:00 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:41:00 +0000 |
commit | 1118c95535ea51961437089fc3dece5ab4ea7e1b (patch) | |
tree | 1515bd2376a6d6c5123791662307ce2ed90cdf36 /networking | |
parent | 0d8b2c4a929ea9d3ac37499319fe0d8e7941a0c2 (diff) | |
parent | 066f39956641300c1e5c6bfe6c11a115cea3e2cf (diff) | |
download | busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.tar.gz busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.tar.bz2 busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.zip |
Merge commit '066f39956641300c1e5c6bfe6c11a115cea3e2cf' into merge
Conflicts:
procps/ps.c
Diffstat (limited to 'networking')
42 files changed, 61 insertions, 126 deletions
diff --git a/networking/arp.c b/networking/arp.c index 3f68f5cf7..696c402e0 100644 --- a/networking/arp.c +++ b/networking/arp.c | |||
@@ -21,7 +21,6 @@ | |||
21 | //usage: "\n[-v] [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub" | 21 | //usage: "\n[-v] [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub" |
22 | //usage:#define arp_full_usage "\n\n" | 22 | //usage:#define arp_full_usage "\n\n" |
23 | //usage: "Manipulate ARP cache\n" | 23 | //usage: "Manipulate ARP cache\n" |
24 | //usage: "\nOptions:" | ||
25 | //usage: "\n -a Display (all) hosts" | 24 | //usage: "\n -a Display (all) hosts" |
26 | //usage: "\n -s Set new ARP entry" | 25 | //usage: "\n -s Set new ARP entry" |
27 | //usage: "\n -d Delete a specified entry" | 26 | //usage: "\n -d Delete a specified entry" |
diff --git a/networking/arping.c b/networking/arping.c index 357dcaaf0..a4421edcb 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -10,7 +10,6 @@ | |||
10 | //usage: "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP" | 10 | //usage: "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP" |
11 | //usage:#define arping_full_usage "\n\n" | 11 | //usage:#define arping_full_usage "\n\n" |
12 | //usage: "Send ARP requests/replies\n" | 12 | //usage: "Send ARP requests/replies\n" |
13 | //usage: "\nOptions:" | ||
14 | //usage: "\n -f Quit on first ARP reply" | 13 | //usage: "\n -f Quit on first ARP reply" |
15 | //usage: "\n -q Quiet" | 14 | //usage: "\n -q Quiet" |
16 | //usage: "\n -b Keep broadcasting, don't go unicast" | 15 | //usage: "\n -b Keep broadcasting, don't go unicast" |
diff --git a/networking/dnsd.c b/networking/dnsd.c index 65eae9670..d80306d3d 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -21,7 +21,6 @@ | |||
21 | //usage: "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]" | 21 | //usage: "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]" |
22 | //usage:#define dnsd_full_usage "\n\n" | 22 | //usage:#define dnsd_full_usage "\n\n" |
23 | //usage: "Small static DNS server daemon\n" | 23 | //usage: "Small static DNS server daemon\n" |
24 | //usage: "\nOptions:" | ||
25 | //usage: "\n -c FILE Config file" | 24 | //usage: "\n -c FILE Config file" |
26 | //usage: "\n -t SEC TTL" | 25 | //usage: "\n -t SEC TTL" |
27 | //usage: "\n -p PORT Listen on PORT" | 26 | //usage: "\n -p PORT Listen on PORT" |
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index 7bb9aa5a7..6a88279f4 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
@@ -70,18 +70,15 @@ | |||
70 | //usage: "Send a magic packet to wake up sleeping machines.\n" | 70 | //usage: "Send a magic packet to wake up sleeping machines.\n" |
71 | //usage: "MAC must be a station address (00:11:22:33:44:55) or\n" | 71 | //usage: "MAC must be a station address (00:11:22:33:44:55) or\n" |
72 | //usage: "a hostname with a known 'ethers' entry.\n" | 72 | //usage: "a hostname with a known 'ethers' entry.\n" |
73 | //usage: "\nOptions:" | ||
74 | //usage: "\n -b Send wake-up packet to the broadcast address" | 73 | //usage: "\n -b Send wake-up packet to the broadcast address" |
75 | //usage: "\n -i iface Interface to use (default eth0)" | 74 | //usage: "\n -i iface Interface to use (default eth0)" |
76 | //usage: "\n -p pass Append four or six byte password PW to the packet" | 75 | //usage: "\n -p pass Append four or six byte password PW to the packet" |
77 | 76 | ||
77 | #include "libbb.h" | ||
78 | #include <netpacket/packet.h> | 78 | #include <netpacket/packet.h> |
79 | #include <net/ethernet.h> | ||
80 | #include <netinet/ether.h> | 79 | #include <netinet/ether.h> |
81 | #include <linux/if.h> | 80 | #include <linux/if.h> |
82 | 81 | ||
83 | #include "libbb.h" | ||
84 | |||
85 | /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to | 82 | /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to |
86 | * work as non-root, but we need SOCK_PACKET to specify the Ethernet | 83 | * work as non-root, but we need SOCK_PACKET to specify the Ethernet |
87 | * destination address. | 84 | * destination address. |
diff --git a/networking/ftpd.c b/networking/ftpd.c index fae634ec4..e38138c0a 100644 --- a/networking/ftpd.c +++ b/networking/ftpd.c | |||
@@ -22,7 +22,6 @@ | |||
22 | //usage: " 21 stream tcp nowait root ftpd ftpd /files/to/serve\n" | 22 | //usage: " 21 stream tcp nowait root ftpd ftpd /files/to/serve\n" |
23 | //usage: "It also can be ran from tcpsvd:\n" | 23 | //usage: "It also can be ran from tcpsvd:\n" |
24 | //usage: " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n" | 24 | //usage: " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n" |
25 | //usage: "\nOptions:" | ||
26 | //usage: "\n -w Allow upload" | 25 | //usage: "\n -w Allow upload" |
27 | //usage: "\n -v Log errors to stderr. -vv: verbose log" | 26 | //usage: "\n -v Log errors to stderr. -vv: verbose log" |
28 | //usage: "\n -S Log errors to syslog. -SS: verbose log" | 27 | //usage: "\n -S Log errors to syslog. -SS: verbose log" |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index f63df55f4..abdf94c45 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -17,7 +17,6 @@ | |||
17 | //usage: "[OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE" | 17 | //usage: "[OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE" |
18 | //usage:#define ftpget_full_usage "\n\n" | 18 | //usage:#define ftpget_full_usage "\n\n" |
19 | //usage: "Retrieve a remote file via FTP\n" | 19 | //usage: "Retrieve a remote file via FTP\n" |
20 | //usage: "\nOptions:" | ||
21 | //usage: IF_FEATURE_FTPGETPUT_LONG_OPTIONS( | 20 | //usage: IF_FEATURE_FTPGETPUT_LONG_OPTIONS( |
22 | //usage: "\n -c,--continue Continue previous transfer" | 21 | //usage: "\n -c,--continue Continue previous transfer" |
23 | //usage: "\n -v,--verbose Verbose" | 22 | //usage: "\n -v,--verbose Verbose" |
@@ -37,7 +36,6 @@ | |||
37 | //usage: "[OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE" | 36 | //usage: "[OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE" |
38 | //usage:#define ftpput_full_usage "\n\n" | 37 | //usage:#define ftpput_full_usage "\n\n" |
39 | //usage: "Store a local file on a remote machine via FTP\n" | 38 | //usage: "Store a local file on a remote machine via FTP\n" |
40 | //usage: "\nOptions:" | ||
41 | //usage: IF_FEATURE_FTPGETPUT_LONG_OPTIONS( | 39 | //usage: IF_FEATURE_FTPGETPUT_LONG_OPTIONS( |
42 | //usage: "\n -v,--verbose Verbose" | 40 | //usage: "\n -v,--verbose Verbose" |
43 | //usage: "\n -u,--username Username" | 41 | //usage: "\n -u,--username Username" |
diff --git a/networking/hostname.c b/networking/hostname.c index 49a3e89bb..5f663908c 100644 --- a/networking/hostname.c +++ b/networking/hostname.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[OPTIONS] [HOSTNAME | -F FILE]" | 14 | //usage: "[OPTIONS] [HOSTNAME | -F FILE]" |
15 | //usage:#define hostname_full_usage "\n\n" | 15 | //usage:#define hostname_full_usage "\n\n" |
16 | //usage: "Get or set hostname or DNS domain name\n" | 16 | //usage: "Get or set hostname or DNS domain name\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -s Short" | 17 | //usage: "\n -s Short" |
19 | //usage: "\n -i Addresses for the hostname" | 18 | //usage: "\n -i Addresses for the hostname" |
20 | //usage: "\n -d DNS domain name" | 19 | //usage: "\n -d DNS domain name" |
diff --git a/networking/httpd.c b/networking/httpd.c index d77342a2a..ba5eebad5 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -107,7 +107,6 @@ | |||
107 | //usage: "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING" | 107 | //usage: "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING" |
108 | //usage:#define httpd_full_usage "\n\n" | 108 | //usage:#define httpd_full_usage "\n\n" |
109 | //usage: "Listen for incoming HTTP requests\n" | 109 | //usage: "Listen for incoming HTTP requests\n" |
110 | //usage: "\nOptions:" | ||
111 | //usage: "\n -i Inetd mode" | 110 | //usage: "\n -i Inetd mode" |
112 | //usage: "\n -f Don't daemonize" | 111 | //usage: "\n -f Don't daemonize" |
113 | //usage: "\n -v[v] Verbose" | 112 | //usage: "\n -v[v] Verbose" |
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 220b02126..b6604f5d1 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c | |||
@@ -30,7 +30,6 @@ | |||
30 | //usage: IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]" | 30 | //usage: IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]" |
31 | //usage:#define ifconfig_full_usage "\n\n" | 31 | //usage:#define ifconfig_full_usage "\n\n" |
32 | //usage: "Configure a network interface\n" | 32 | //usage: "Configure a network interface\n" |
33 | //usage: "\nOptions:" | ||
34 | //usage: "\n" | 33 | //usage: "\n" |
35 | //usage: IF_FEATURE_IPV6( | 34 | //usage: IF_FEATURE_IPV6( |
36 | //usage: " [add ADDRESS[/PREFIXLEN]]\n") | 35 | //usage: " [add ADDRESS[/PREFIXLEN]]\n") |
@@ -47,18 +46,14 @@ | |||
47 | //usage: " [mem_start NN] [io_addr NN] [irq NN]\n") | 46 | //usage: " [mem_start NN] [io_addr NN] [irq NN]\n") |
48 | //usage: " [up|down] ..." | 47 | //usage: " [up|down] ..." |
49 | 48 | ||
49 | #include "libbb.h" | ||
50 | #include "inet_common.h" | ||
50 | #include <net/if.h> | 51 | #include <net/if.h> |
51 | #include <net/if_arp.h> | 52 | #include <net/if_arp.h> |
52 | #include <netinet/in.h> | 53 | #include <netinet/in.h> |
53 | #if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 | 54 | #ifdef HAVE_NET_ETHERNET_H |
54 | #include <netpacket/packet.h> | 55 | # include <net/ethernet.h> |
55 | #include <net/ethernet.h> | ||
56 | #else | ||
57 | #include <sys/types.h> | ||
58 | #include <netinet/if_ether.h> | ||
59 | #endif | 56 | #endif |
60 | #include "libbb.h" | ||
61 | #include "inet_common.h" | ||
62 | 57 | ||
63 | #if ENABLE_FEATURE_IFCONFIG_SLIP | 58 | #if ENABLE_FEATURE_IFCONFIG_SLIP |
64 | # include <net/if_slip.h> | 59 | # include <net/if_slip.h> |
diff --git a/networking/ifenslave.c b/networking/ifenslave.c index 208623e7d..ae7719f52 100644 --- a/networking/ifenslave.c +++ b/networking/ifenslave.c | |||
@@ -102,7 +102,6 @@ | |||
102 | //usage: "[-cdf] MASTER_IFACE SLAVE_IFACE..." | 102 | //usage: "[-cdf] MASTER_IFACE SLAVE_IFACE..." |
103 | //usage:#define ifenslave_full_usage "\n\n" | 103 | //usage:#define ifenslave_full_usage "\n\n" |
104 | //usage: "Configure network interfaces for parallel routing\n" | 104 | //usage: "Configure network interfaces for parallel routing\n" |
105 | //usage: "\nOptions:" | ||
106 | //usage: "\n -c,--change-active Change active slave" | 105 | //usage: "\n -c,--change-active Change active slave" |
107 | //usage: "\n -d,--detach Remove slave interface from bonding device" | 106 | //usage: "\n -d,--detach Remove slave interface from bonding device" |
108 | //usage: "\n -f,--force Force, even if interface is not Ethernet" | 107 | //usage: "\n -f,--force Force, even if interface is not Ethernet" |
diff --git a/networking/ifplugd.c b/networking/ifplugd.c index 421611aae..d8358cdfd 100644 --- a/networking/ifplugd.c +++ b/networking/ifplugd.c | |||
@@ -11,7 +11,6 @@ | |||
11 | //usage: "[OPTIONS]" | 11 | //usage: "[OPTIONS]" |
12 | //usage:#define ifplugd_full_usage "\n\n" | 12 | //usage:#define ifplugd_full_usage "\n\n" |
13 | //usage: "Network interface plug detection daemon\n" | 13 | //usage: "Network interface plug detection daemon\n" |
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -n Don't daemonize" | 14 | //usage: "\n -n Don't daemonize" |
16 | //usage: "\n -s Don't log to syslog" | 15 | //usage: "\n -s Don't log to syslog" |
17 | //usage: "\n -i IFACE Interface" | 16 | //usage: "\n -i IFACE Interface" |
@@ -38,7 +37,9 @@ | |||
38 | #include <linux/if.h> | 37 | #include <linux/if.h> |
39 | #include <linux/mii.h> | 38 | #include <linux/mii.h> |
40 | #include <linux/ethtool.h> | 39 | #include <linux/ethtool.h> |
41 | #include <net/ethernet.h> | 40 | #ifdef HAVE_NET_ETHERNET_H |
41 | # include <net/ethernet.h> | ||
42 | #endif | ||
42 | #include <linux/netlink.h> | 43 | #include <linux/netlink.h> |
43 | #include <linux/rtnetlink.h> | 44 | #include <linux/rtnetlink.h> |
44 | #include <linux/sockios.h> | 45 | #include <linux/sockios.h> |
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index b48abb7dc..382033038 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -20,8 +20,7 @@ | |||
20 | //usage:#define ifup_trivial_usage | 20 | //usage:#define ifup_trivial_usage |
21 | //usage: "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..." | 21 | //usage: "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..." |
22 | //usage:#define ifup_full_usage "\n\n" | 22 | //usage:#define ifup_full_usage "\n\n" |
23 | //usage: "Options:" | 23 | //usage: " -a De/configure all interfaces automatically" |
24 | //usage: "\n -a De/configure all interfaces automatically" | ||
25 | //usage: "\n -i FILE Use FILE for interface definitions" | 24 | //usage: "\n -i FILE Use FILE for interface definitions" |
26 | //usage: "\n -n Print out what would happen, but don't do it" | 25 | //usage: "\n -n Print out what would happen, but don't do it" |
27 | //usage: IF_FEATURE_IFUPDOWN_MAPPING( | 26 | //usage: IF_FEATURE_IFUPDOWN_MAPPING( |
@@ -34,8 +33,7 @@ | |||
34 | //usage:#define ifdown_trivial_usage | 33 | //usage:#define ifdown_trivial_usage |
35 | //usage: "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..." | 34 | //usage: "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..." |
36 | //usage:#define ifdown_full_usage "\n\n" | 35 | //usage:#define ifdown_full_usage "\n\n" |
37 | //usage: "Options:" | 36 | //usage: " -a De/configure all interfaces automatically" |
38 | //usage: "\n -a De/configure all interfaces automatically" | ||
39 | //usage: "\n -i FILE Use FILE for interface definitions" | 37 | //usage: "\n -i FILE Use FILE for interface definitions" |
40 | //usage: "\n -n Print out what would happen, but don't do it" | 38 | //usage: "\n -n Print out what would happen, but don't do it" |
41 | //usage: IF_FEATURE_IFUPDOWN_MAPPING( | 39 | //usage: IF_FEATURE_IFUPDOWN_MAPPING( |
diff --git a/networking/inetd.c b/networking/inetd.c index 58ae089d1..873fd9528 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -158,10 +158,9 @@ | |||
158 | //usage: "[-fe] [-q N] [-R N] [CONFFILE]" | 158 | //usage: "[-fe] [-q N] [-R N] [CONFFILE]" |
159 | //usage:#define inetd_full_usage "\n\n" | 159 | //usage:#define inetd_full_usage "\n\n" |
160 | //usage: "Listen for network connections and launch programs\n" | 160 | //usage: "Listen for network connections and launch programs\n" |
161 | //usage: "\nOptions:" | ||
162 | //usage: "\n -f Run in foreground" | 161 | //usage: "\n -f Run in foreground" |
163 | //usage: "\n -e Log to stderr" | 162 | //usage: "\n -e Log to stderr" |
164 | //usage: "\n -q N Socket listen queue (default: 128)" | 163 | //usage: "\n -q N Socket listen queue (default: 128)" |
165 | //usage: "\n -R N Pause services after N connects/min" | 164 | //usage: "\n -R N Pause services after N connects/min" |
166 | //usage: "\n (default: 0 - disabled)" | 165 | //usage: "\n (default: 0 - disabled)" |
167 | 166 | ||
@@ -171,8 +170,11 @@ | |||
171 | #include "libbb.h" | 170 | #include "libbb.h" |
172 | 171 | ||
173 | #if ENABLE_FEATURE_INETD_RPC | 172 | #if ENABLE_FEATURE_INETD_RPC |
174 | #include <rpc/rpc.h> | 173 | # if defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__) |
175 | #include <rpc/pmap_clnt.h> | 174 | # error "You need to build uClibc with UCLIBC_HAS_RPC for NFS support" |
175 | # endif | ||
176 | # include <rpc/rpc.h> | ||
177 | # include <rpc/pmap_clnt.h> | ||
176 | #endif | 178 | #endif |
177 | 179 | ||
178 | #if !BB_MMU | 180 | #if !BB_MMU |
diff --git a/networking/interface.c b/networking/interface.c index bea54c180..79c322ec0 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -30,15 +30,14 @@ | |||
30 | * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu | 30 | * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu |
31 | * (default AF was wrong) | 31 | * (default AF was wrong) |
32 | */ | 32 | */ |
33 | |||
34 | #include "libbb.h" | ||
35 | #include "inet_common.h" | ||
33 | #include <net/if.h> | 36 | #include <net/if.h> |
34 | #include <net/if_arp.h> | 37 | #include <net/if_arp.h> |
35 | #ifndef __UCLIBC__ | 38 | #ifdef HAVE_NET_ETHERNET_H |
36 | # include <net/ethernet.h> | 39 | # include <net/ethernet.h> |
37 | #else | ||
38 | # include <linux/if_ether.h> | ||
39 | #endif | 40 | #endif |
40 | #include "libbb.h" | ||
41 | #include "inet_common.h" | ||
42 | 41 | ||
43 | #if ENABLE_FEATURE_HWIB | 42 | #if ENABLE_FEATURE_HWIB |
44 | /* #include <linux/if_infiniband.h> */ | 43 | /* #include <linux/if_infiniband.h> */ |
diff --git a/networking/ip.c b/networking/ip.c index 98d583325..fb2f5e2da 100644 --- a/networking/ip.c +++ b/networking/ip.c | |||
@@ -55,7 +55,7 @@ | |||
55 | //usage:#define iproute_full_usage "\n\n" | 55 | //usage:#define iproute_full_usage "\n\n" |
56 | //usage: "iproute { list | flush } SELECTOR\n" | 56 | //usage: "iproute { list | flush } SELECTOR\n" |
57 | //usage: "iproute get ADDRESS [from ADDRESS iif STRING]\n" | 57 | //usage: "iproute get ADDRESS [from ADDRESS iif STRING]\n" |
58 | //usage: " [oif STRING] [tos TOS]\n" | 58 | //usage: " [oif STRING] [tos TOS]\n" |
59 | //usage: "iproute { add | del | change | append | replace | monitor } ROUTE\n" | 59 | //usage: "iproute { add | del | change | append | replace | monitor } ROUTE\n" |
60 | //usage: " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" | 60 | //usage: " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" |
61 | //usage: " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]\n" | 61 | //usage: " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]\n" |
diff --git a/networking/ipcalc.c b/networking/ipcalc.c index f96c73912..3c8b8bfc9 100644 --- a/networking/ipcalc.c +++ b/networking/ipcalc.c | |||
@@ -16,7 +16,6 @@ | |||
16 | //usage: "[OPTIONS] ADDRESS[[/]NETMASK] [NETMASK]" | 16 | //usage: "[OPTIONS] ADDRESS[[/]NETMASK] [NETMASK]" |
17 | //usage:#define ipcalc_full_usage "\n\n" | 17 | //usage:#define ipcalc_full_usage "\n\n" |
18 | //usage: "Calculate IP network settings from a IP address\n" | 18 | //usage: "Calculate IP network settings from a IP address\n" |
19 | //usage: "\nOptions:" | ||
20 | //usage: IF_FEATURE_IPCALC_LONG_OPTIONS( | 19 | //usage: IF_FEATURE_IPCALC_LONG_OPTIONS( |
21 | //usage: "\n -b,--broadcast Display calculated broadcast address" | 20 | //usage: "\n -b,--broadcast Display calculated broadcast address" |
22 | //usage: "\n -n,--network Display calculated network address" | 21 | //usage: "\n -n,--network Display calculated network address" |
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index 199e11225..a41405c33 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c | |||
@@ -11,7 +11,6 @@ | |||
11 | //usage: "[-fiw] [-b ADDR] [STRING]" | 11 | //usage: "[-fiw] [-b ADDR] [STRING]" |
12 | //usage:#define fakeidentd_full_usage "\n\n" | 12 | //usage:#define fakeidentd_full_usage "\n\n" |
13 | //usage: "Provide fake ident (auth) service\n" | 13 | //usage: "Provide fake ident (auth) service\n" |
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -f Run in foreground" | 14 | //usage: "\n -f Run in foreground" |
16 | //usage: "\n -i Inetd mode" | 15 | //usage: "\n -i Inetd mode" |
17 | //usage: "\n -w Inetd 'wait' mode" | 16 | //usage: "\n -w Inetd 'wait' mode" |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 82ab979a5..bad2017fe 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <net/if.h> | 7 | #include <net/if.h> |
8 | #include <net/if_packet.h> | 8 | #include <net/if_packet.h> |
9 | #include <netpacket/packet.h> | 9 | #include <netpacket/packet.h> |
10 | #include <net/ethernet.h> | 10 | #include <netinet/if_ether.h> |
11 | 11 | ||
12 | #include "ip_common.h" /* #include "libbb.h" is inside */ | 12 | #include "ip_common.h" /* #include "libbb.h" is inside */ |
13 | #include "rt_names.h" | 13 | #include "rt_names.h" |
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index 04925ecf6..7aac8364d 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c | |||
@@ -12,11 +12,7 @@ | |||
12 | #include "rt_names.h" | 12 | #include "rt_names.h" |
13 | #include "utils.h" | 13 | #include "utils.h" |
14 | 14 | ||
15 | #if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1 | 15 | #include <netinet/if_ether.h> |
16 | #include <net/ethernet.h> | ||
17 | #else | ||
18 | #include <linux/if_ether.h> | ||
19 | #endif | ||
20 | 16 | ||
21 | #if !ENABLE_WERROR | 17 | #if !ENABLE_WERROR |
22 | #warning de-bloat | 18 | #warning de-bloat |
diff --git a/networking/nameif.c b/networking/nameif.c index 78719edac..5d7e8f9a4 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
@@ -61,7 +61,6 @@ | |||
61 | //usage: "\n [mac=]XX:XX:XX:XX:XX:XX" | 61 | //usage: "\n [mac=]XX:XX:XX:XX:XX:XX" |
62 | //usage: ) | 62 | //usage: ) |
63 | //usage: "\n" | 63 | //usage: "\n" |
64 | //usage: "\nOptions:" | ||
65 | //usage: "\n -c FILE Configuration file (default: /etc/mactab)" | 64 | //usage: "\n -c FILE Configuration file (default: /etc/mactab)" |
66 | //usage: "\n -s Log to syslog" | 65 | //usage: "\n -s Log to syslog" |
67 | //usage: | 66 | //usage: |
@@ -122,20 +121,20 @@ struct ethtool_drvinfo { | |||
122 | }; | 121 | }; |
123 | 122 | ||
124 | struct ethtool_cmd { | 123 | struct ethtool_cmd { |
125 | __u32 cmd; | 124 | uint32_t cmd; |
126 | __u32 supported; /* Features this interface supports */ | 125 | uint32_t supported; /* Features this interface supports */ |
127 | __u32 advertising; /* Features this interface advertises */ | 126 | uint32_t advertising; /* Features this interface advertises */ |
128 | __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ | 127 | uint16_t speed; /* The forced speed, 10Mb, 100Mb, gigabit */ |
129 | __u8 duplex; /* Duplex, half or full */ | 128 | uint8_t duplex; /* Duplex, half or full */ |
130 | __u8 port; /* Which connector port */ | 129 | uint8_t port; /* Which connector port */ |
131 | __u8 phy_address; | 130 | uint8_t phy_address; |
132 | __u8 transceiver; /* Which transceiver to use */ | 131 | uint8_t transceiver; /* Which transceiver to use */ |
133 | __u8 autoneg; /* Enable or disable autonegotiation */ | 132 | uint8_t autoneg; /* Enable or disable autonegotiation */ |
134 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ | 133 | uint32_t maxtxpkt; /* Tx pkts before generating tx int */ |
135 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ | 134 | uint32_t maxrxpkt; /* Rx pkts before generating rx int */ |
136 | __u16 speed_hi; | 135 | uint16_t speed_hi; |
137 | __u16 reserved2; | 136 | uint16_t reserved2; |
138 | __u32 reserved[3]; | 137 | uint32_t reserved[3]; |
139 | }; | 138 | }; |
140 | 139 | ||
141 | #define ETHTOOL_GSET 0x00000001 /* Get settings. */ | 140 | #define ETHTOOL_GSET 0x00000001 /* Get settings. */ |
diff --git a/networking/nc.c b/networking/nc.c index 31d450dda..1b32e3aa3 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
@@ -49,7 +49,7 @@ | |||
49 | //usage:#if !ENABLE_NC_110_COMPAT | 49 | //usage:#if !ENABLE_NC_110_COMPAT |
50 | //usage: | 50 | //usage: |
51 | //usage:#if ENABLE_NC_SERVER || ENABLE_NC_EXTRA | 51 | //usage:#if ENABLE_NC_SERVER || ENABLE_NC_EXTRA |
52 | //usage:#define NC_OPTIONS_STR "\n\nOptions:" | 52 | //usage:#define NC_OPTIONS_STR "\n" |
53 | //usage:#else | 53 | //usage:#else |
54 | //usage:#define NC_OPTIONS_STR | 54 | //usage:#define NC_OPTIONS_STR |
55 | //usage:#endif | 55 | //usage:#endif |
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index 29f99e76b..1daad1358 100644 --- a/networking/nc_bloaty.c +++ b/networking/nc_bloaty.c | |||
@@ -60,8 +60,7 @@ | |||
60 | //usage: "nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen" | 60 | //usage: "nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen" |
61 | //usage: ) | 61 | //usage: ) |
62 | //usage:#define nc_full_usage "\n\n" | 62 | //usage:#define nc_full_usage "\n\n" |
63 | //usage: "Options:" | 63 | //usage: " -e PROG Run PROG after connect (must be last)" |
64 | //usage: "\n -e PROG Run PROG after connect (must be last)" | ||
65 | //usage: IF_NC_SERVER( | 64 | //usage: IF_NC_SERVER( |
66 | //usage: "\n -l Listen mode, for inbound connects" | 65 | //usage: "\n -l Listen mode, for inbound connects" |
67 | //usage: ) | 66 | //usage: ) |
diff --git a/networking/netstat.c b/networking/netstat.c index 356fb53cb..9c239579f 100644 --- a/networking/netstat.c +++ b/networking/netstat.c | |||
@@ -21,7 +21,6 @@ | |||
21 | //usage: "[-"IF_ROUTE("r")"al] [-tuwx] [-en"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]" | 21 | //usage: "[-"IF_ROUTE("r")"al] [-tuwx] [-en"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]" |
22 | //usage:#define netstat_full_usage "\n\n" | 22 | //usage:#define netstat_full_usage "\n\n" |
23 | //usage: "Display networking information\n" | 23 | //usage: "Display networking information\n" |
24 | //usage: "\nOptions:" | ||
25 | //usage: IF_ROUTE( | 24 | //usage: IF_ROUTE( |
26 | //usage: "\n -r Routing table" | 25 | //usage: "\n -r Routing table" |
27 | //usage: ) | 26 | //usage: ) |
diff --git a/networking/ntpd.c b/networking/ntpd.c index 165673a1e..206af00c7 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -32,7 +32,6 @@ | |||
32 | //usage: "[-dnqNw"IF_FEATURE_NTPD_SERVER("l")"] [-S PROG] [-p PEER]..." | 32 | //usage: "[-dnqNw"IF_FEATURE_NTPD_SERVER("l")"] [-S PROG] [-p PEER]..." |
33 | //usage:#define ntpd_full_usage "\n\n" | 33 | //usage:#define ntpd_full_usage "\n\n" |
34 | //usage: "NTP client/server\n" | 34 | //usage: "NTP client/server\n" |
35 | //usage: "\nOptions:" | ||
36 | //usage: "\n -d Verbose" | 35 | //usage: "\n -d Verbose" |
37 | //usage: "\n -n Do not daemonize" | 36 | //usage: "\n -n Do not daemonize" |
38 | //usage: "\n -q Quit after clock is set" | 37 | //usage: "\n -q Quit after clock is set" |
diff --git a/networking/ping.c b/networking/ping.c index 7a9c2d1f0..d75747984 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -73,7 +73,6 @@ | |||
73 | //usage: "[OPTIONS] HOST" | 73 | //usage: "[OPTIONS] HOST" |
74 | //usage:# define ping_full_usage "\n\n" | 74 | //usage:# define ping_full_usage "\n\n" |
75 | //usage: "Send ICMP ECHO_REQUEST packets to network hosts\n" | 75 | //usage: "Send ICMP ECHO_REQUEST packets to network hosts\n" |
76 | //usage: "\nOptions:" | ||
77 | //usage: "\n -4,-6 Force IP or IPv6 name resolution" | 76 | //usage: "\n -4,-6 Force IP or IPv6 name resolution" |
78 | //usage: "\n -c CNT Send only CNT pings" | 77 | //usage: "\n -c CNT Send only CNT pings" |
79 | //usage: "\n -s SIZE Send SIZE data bytes in packets (default:56)" | 78 | //usage: "\n -s SIZE Send SIZE data bytes in packets (default:56)" |
@@ -90,7 +89,6 @@ | |||
90 | //usage: "[OPTIONS] HOST" | 89 | //usage: "[OPTIONS] HOST" |
91 | //usage:# define ping6_full_usage "\n\n" | 90 | //usage:# define ping6_full_usage "\n\n" |
92 | //usage: "Send ICMP ECHO_REQUEST packets to network hosts\n" | 91 | //usage: "Send ICMP ECHO_REQUEST packets to network hosts\n" |
93 | //usage: "\nOptions:" | ||
94 | //usage: "\n -c CNT Send only CNT pings" | 92 | //usage: "\n -c CNT Send only CNT pings" |
95 | //usage: "\n -s SIZE Send SIZE data bytes in packets (default:56)" | 93 | //usage: "\n -s SIZE Send SIZE data bytes in packets (default:56)" |
96 | //usage: "\n -I IFACE/IP Use interface or IP address as source" | 94 | //usage: "\n -I IFACE/IP Use interface or IP address as source" |
diff --git a/networking/pscan.c b/networking/pscan.c index 5595148fc..28005ad57 100644 --- a/networking/pscan.c +++ b/networking/pscan.c | |||
@@ -10,7 +10,6 @@ | |||
10 | //usage: "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST" | 10 | //usage: "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST" |
11 | //usage:#define pscan_full_usage "\n\n" | 11 | //usage:#define pscan_full_usage "\n\n" |
12 | //usage: "Scan a host, print all open ports\n" | 12 | //usage: "Scan a host, print all open ports\n" |
13 | //usage: "\nOptions:" | ||
14 | //usage: "\n -c Show closed ports too" | 13 | //usage: "\n -c Show closed ports too" |
15 | //usage: "\n -b Show blocked ports too" | 14 | //usage: "\n -b Show blocked ports too" |
16 | //usage: "\n -p Scan from this port (default 1)" | 15 | //usage: "\n -p Scan from this port (default 1)" |
diff --git a/networking/route.c b/networking/route.c index 6699a1c32..b7b5a02e6 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -29,7 +29,6 @@ | |||
29 | //usage: "[{add|del|delete}]" | 29 | //usage: "[{add|del|delete}]" |
30 | //usage:#define route_full_usage "\n\n" | 30 | //usage:#define route_full_usage "\n\n" |
31 | //usage: "Edit kernel routing tables\n" | 31 | //usage: "Edit kernel routing tables\n" |
32 | //usage: "\nOptions:" | ||
33 | //usage: "\n -n Don't resolve names" | 32 | //usage: "\n -n Don't resolve names" |
34 | //usage: "\n -e Display other/more information" | 33 | //usage: "\n -e Display other/more information" |
35 | //usage: "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" | 34 | //usage: "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" |
diff --git a/networking/slattach.c b/networking/slattach.c index d1221b11a..a500da6d0 100644 --- a/networking/slattach.c +++ b/networking/slattach.c | |||
@@ -17,7 +17,6 @@ | |||
17 | //usage: "[-cehmLF] [-s SPEED] [-p PROTOCOL] DEVICE" | 17 | //usage: "[-cehmLF] [-s SPEED] [-p PROTOCOL] DEVICE" |
18 | //usage:#define slattach_full_usage "\n\n" | 18 | //usage:#define slattach_full_usage "\n\n" |
19 | //usage: "Attach network interface(s) to serial line(s)\n" | 19 | //usage: "Attach network interface(s) to serial line(s)\n" |
20 | //usage: "\nOptions:" | ||
21 | //usage: "\n -p PROT Set protocol (slip, cslip, slip6, clisp6 or adaptive)" | 20 | //usage: "\n -p PROT Set protocol (slip, cslip, slip6, clisp6 or adaptive)" |
22 | //usage: "\n -s SPD Set line speed" | 21 | //usage: "\n -s SPD Set line speed" |
23 | //usage: "\n -e Exit after initializing device" | 22 | //usage: "\n -e Exit after initializing device" |
diff --git a/networking/tc.c b/networking/tc.c index e9848a86b..1574353a5 100644 --- a/networking/tc.c +++ b/networking/tc.c | |||
@@ -58,10 +58,10 @@ | |||
58 | 58 | ||
59 | struct globals { | 59 | struct globals { |
60 | int filter_ifindex; | 60 | int filter_ifindex; |
61 | __u32 filter_qdisc; | 61 | uint32_t filter_qdisc; |
62 | __u32 filter_parent; | 62 | uint32_t filter_parent; |
63 | __u32 filter_prio; | 63 | uint32_t filter_prio; |
64 | __u32 filter_proto; | 64 | uint32_t filter_proto; |
65 | } FIX_ALIASING; | 65 | } FIX_ALIASING; |
66 | #define G (*(struct globals*)&bb_common_bufsiz1) | 66 | #define G (*(struct globals*)&bb_common_bufsiz1) |
67 | struct BUG_G_too_big { | 67 | struct BUG_G_too_big { |
@@ -94,8 +94,8 @@ static char* print_tc_classid(uint32_t cid) | |||
94 | } | 94 | } |
95 | 95 | ||
96 | /* Get a qdisc handle. Return 0 on success, !0 otherwise. */ | 96 | /* Get a qdisc handle. Return 0 on success, !0 otherwise. */ |
97 | static int get_qdisc_handle(__u32 *h, const char *str) { | 97 | static int get_qdisc_handle(uint32_t *h, const char *str) { |
98 | __u32 maj; | 98 | uint32_t maj; |
99 | char *p; | 99 | char *p; |
100 | 100 | ||
101 | maj = TC_H_UNSPEC; | 101 | maj = TC_H_UNSPEC; |
@@ -113,8 +113,8 @@ static int get_qdisc_handle(__u32 *h, const char *str) { | |||
113 | } | 113 | } |
114 | 114 | ||
115 | /* Get class ID. Return 0 on success, !0 otherwise. */ | 115 | /* Get class ID. Return 0 on success, !0 otherwise. */ |
116 | static int get_tc_classid(__u32 *h, const char *str) { | 116 | static int get_tc_classid(uint32_t *h, const char *str) { |
117 | __u32 maj, min; | 117 | uint32_t maj, min; |
118 | char *p; | 118 | char *p; |
119 | 119 | ||
120 | maj = TC_H_ROOT; | 120 | maj = TC_H_ROOT; |
@@ -513,7 +513,7 @@ int tc_main(int argc UNUSED_PARAM, char **argv) | |||
513 | if (obj == OBJ_filter) | 513 | if (obj == OBJ_filter) |
514 | filter_parent = TC_H_ROOT; | 514 | filter_parent = TC_H_ROOT; |
515 | } else if (arg == ARG_parent) { | 515 | } else if (arg == ARG_parent) { |
516 | __u32 handle; | 516 | uint32_t handle; |
517 | if (msg.tcm_parent) | 517 | if (msg.tcm_parent) |
518 | duparg(*argv, "parent"); | 518 | duparg(*argv, "parent"); |
519 | if (get_tc_classid(&handle, *argv)) | 519 | if (get_tc_classid(&handle, *argv)) |
@@ -530,7 +530,7 @@ int tc_main(int argc UNUSED_PARAM, char **argv) | |||
530 | *slash = '\0'; | 530 | *slash = '\0'; |
531 | */ | 531 | */ |
532 | msg.tcm_handle = get_u32(*argv, "handle"); | 532 | msg.tcm_handle = get_u32(*argv, "handle"); |
533 | /* if (slash) {if (get_u32(__u32 &mask, slash+1, NULL)) inv mask; addattr32(n, MAX_MSG, TCA_FW_MASK, mask); */ | 533 | /* if (slash) {if (get_u32(uint32_t &mask, slash+1, NULL)) inv mask; addattr32(n, MAX_MSG, TCA_FW_MASK, mask); */ |
534 | } else if (arg == ARG_classid && obj == OBJ_class && cmd == CMD_change){ | 534 | } else if (arg == ARG_classid && obj == OBJ_class && cmd == CMD_change){ |
535 | } else if (arg == ARG_pref || arg == ARG_prio) { /* filter::list */ | 535 | } else if (arg == ARG_pref || arg == ARG_prio) { /* filter::list */ |
536 | if (filter_prio) | 536 | if (filter_prio) |
diff --git a/networking/telnet.c b/networking/telnet.c index 1f0d85107..6dd0de53a 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -26,7 +26,6 @@ | |||
26 | //usage: "[-a] [-l USER] HOST [PORT]" | 26 | //usage: "[-a] [-l USER] HOST [PORT]" |
27 | //usage:#define telnet_full_usage "\n\n" | 27 | //usage:#define telnet_full_usage "\n\n" |
28 | //usage: "Connect to telnet server\n" | 28 | //usage: "Connect to telnet server\n" |
29 | //usage: "\nOptions:" | ||
30 | //usage: "\n -a Automatic login with $USER variable" | 29 | //usage: "\n -a Automatic login with $USER variable" |
31 | //usage: "\n -l USER Automatic login as USER" | 30 | //usage: "\n -l USER Automatic login as USER" |
32 | //usage: | 31 | //usage: |
diff --git a/networking/telnetd.c b/networking/telnetd.c index 4404064fc..33020f1b4 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -26,7 +26,6 @@ | |||
26 | //usage:#define telnetd_full_usage "\n\n" | 26 | //usage:#define telnetd_full_usage "\n\n" |
27 | //usage: "Handle incoming telnet connections" | 27 | //usage: "Handle incoming telnet connections" |
28 | //usage: IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" | 28 | //usage: IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" |
29 | //usage: "\nOptions:" | ||
30 | //usage: "\n -l LOGIN Exec LOGIN on connect" | 29 | //usage: "\n -l LOGIN Exec LOGIN on connect" |
31 | //usage: "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" | 30 | //usage: "\n -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue" |
32 | //usage: "\n -K Close connection as soon as login exits" | 31 | //usage: "\n -K Close connection as soon as login exits" |
diff --git a/networking/tftp.c b/networking/tftp.c index 648441016..17485a527 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -23,7 +23,6 @@ | |||
23 | //usage: "[OPTIONS] HOST [PORT]" | 23 | //usage: "[OPTIONS] HOST [PORT]" |
24 | //usage:#define tftp_full_usage "\n\n" | 24 | //usage:#define tftp_full_usage "\n\n" |
25 | //usage: "Transfer a file from/to tftp server\n" | 25 | //usage: "Transfer a file from/to tftp server\n" |
26 | //usage: "\nOptions:" | ||
27 | //usage: "\n -l FILE Local FILE" | 26 | //usage: "\n -l FILE Local FILE" |
28 | //usage: "\n -r FILE Remote FILE" | 27 | //usage: "\n -r FILE Remote FILE" |
29 | //usage: IF_FEATURE_TFTP_GET( | 28 | //usage: IF_FEATURE_TFTP_GET( |
@@ -46,7 +45,6 @@ | |||
46 | //usage: " 69 dgram udp nowait root tftpd tftpd -l /files/to/serve\n" | 45 | //usage: " 69 dgram udp nowait root tftpd tftpd -l /files/to/serve\n" |
47 | //usage: "It also can be ran from udpsvd:\n" | 46 | //usage: "It also can be ran from udpsvd:\n" |
48 | //usage: " udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve\n" | 47 | //usage: " udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve\n" |
49 | //usage: "\nOptions:" | ||
50 | //usage: "\n -r Prohibit upload" | 48 | //usage: "\n -r Prohibit upload" |
51 | //usage: "\n -c Allow file creation via upload" | 49 | //usage: "\n -c Allow file creation via upload" |
52 | //usage: "\n -u Access files as USER" | 50 | //usage: "\n -u Access files as USER" |
diff --git a/networking/traceroute.c b/networking/traceroute.c index 85181ab8d..c32103519 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -216,7 +216,6 @@ | |||
216 | //usage: " [-z PAUSE_MSEC] HOST [BYTES]" | 216 | //usage: " [-z PAUSE_MSEC] HOST [BYTES]" |
217 | //usage:#define traceroute_full_usage "\n\n" | 217 | //usage:#define traceroute_full_usage "\n\n" |
218 | //usage: "Trace the route to HOST\n" | 218 | //usage: "Trace the route to HOST\n" |
219 | //usage: "\nOptions:" | ||
220 | //usage: IF_TRACEROUTE6( | 219 | //usage: IF_TRACEROUTE6( |
221 | //usage: "\n -4,-6 Force IP or IPv6 name resolution" | 220 | //usage: "\n -4,-6 Force IP or IPv6 name resolution" |
222 | //usage: ) | 221 | //usage: ) |
@@ -242,7 +241,6 @@ | |||
242 | //usage: " HOST [BYTES]" | 241 | //usage: " HOST [BYTES]" |
243 | //usage:#define traceroute6_full_usage "\n\n" | 242 | //usage:#define traceroute6_full_usage "\n\n" |
244 | //usage: "Trace the route to HOST\n" | 243 | //usage: "Trace the route to HOST\n" |
245 | //usage: "\nOptions:" | ||
246 | //usage: "\n -d Set SO_DEBUG options to socket" | 244 | //usage: "\n -d Set SO_DEBUG options to socket" |
247 | //usage: "\n -n Print numeric addresses" | 245 | //usage: "\n -n Print numeric addresses" |
248 | //usage: "\n -r Bypass routing tables, send directly to HOST" | 246 | //usage: "\n -r Bypass routing tables, send directly to HOST" |
diff --git a/networking/tunctl.c b/networking/tunctl.c index 8cb733b68..3a0870eb5 100644 --- a/networking/tunctl.c +++ b/networking/tunctl.c | |||
@@ -14,7 +14,6 @@ | |||
14 | //usage: "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]") | 14 | //usage: "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]") |
15 | //usage:#define tunctl_full_usage "\n\n" | 15 | //usage:#define tunctl_full_usage "\n\n" |
16 | //usage: "Create or delete tun interfaces\n" | 16 | //usage: "Create or delete tun interfaces\n" |
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -f name tun device (/dev/net/tun)" | 17 | //usage: "\n -f name tun device (/dev/net/tun)" |
19 | //usage: "\n -t name Create iface 'name'" | 18 | //usage: "\n -t name Create iface 'name'" |
20 | //usage: "\n -d name Delete iface 'name'" | 19 | //usage: "\n -d name Delete iface 'name'" |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 510c3a1d0..4d755e6b8 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -25,14 +25,8 @@ | |||
25 | #include "dhcpd.h" | 25 | #include "dhcpd.h" |
26 | #include "dhcpc.h" | 26 | #include "dhcpc.h" |
27 | 27 | ||
28 | #include <asm/types.h> | 28 | #include <netinet/if_ether.h> |
29 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | 29 | #include <netpacket/packet.h> |
30 | # include <netpacket/packet.h> | ||
31 | # include <net/ethernet.h> | ||
32 | #else | ||
33 | # include <linux/if_packet.h> | ||
34 | # include <linux/if_ether.h> | ||
35 | #endif | ||
36 | #include <linux/filter.h> | 30 | #include <linux/filter.h> |
37 | 31 | ||
38 | /* struct client_config_t client_config is in bb_common_bufsiz1 */ | 32 | /* struct client_config_t client_config is in bb_common_bufsiz1 */ |
@@ -1134,8 +1128,11 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
1134 | client_config.no_default_options = 1; | 1128 | client_config.no_default_options = 1; |
1135 | while (list_O) { | 1129 | while (list_O) { |
1136 | char *optstr = llist_pop(&list_O); | 1130 | char *optstr = llist_pop(&list_O); |
1137 | unsigned n = udhcp_option_idx(optstr); | 1131 | unsigned n = bb_strtou(optstr, NULL, 0); |
1138 | n = dhcp_optflags[n].code; | 1132 | if (errno || n > 254) { |
1133 | n = udhcp_option_idx(optstr); | ||
1134 | n = dhcp_optflags[n].code; | ||
1135 | } | ||
1139 | client_config.opt_mask[n >> 3] |= 1 << (n & 7); | 1136 | client_config.opt_mask[n >> 3] |= 1 << (n & 7); |
1140 | } | 1137 | } |
1141 | while (list_x) { | 1138 | while (list_x) { |
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c index ec07192c1..64cd73ec7 100644 --- a/networking/udhcp/dumpleases.c +++ b/networking/udhcp/dumpleases.c | |||
@@ -7,7 +7,6 @@ | |||
7 | //usage: "[-r|-a] [-f LEASEFILE]" | 7 | //usage: "[-r|-a] [-f LEASEFILE]" |
8 | //usage:#define dumpleases_full_usage "\n\n" | 8 | //usage:#define dumpleases_full_usage "\n\n" |
9 | //usage: "Display DHCP leases granted by udhcpd\n" | 9 | //usage: "Display DHCP leases granted by udhcpd\n" |
10 | //usage: "\nOptions:" | ||
11 | //usage: IF_LONG_OPTS( | 10 | //usage: IF_LONG_OPTS( |
12 | //usage: "\n -f,--file=FILE Lease file" | 11 | //usage: "\n -f,--file=FILE Lease file" |
13 | //usage: "\n -r,--remaining Show remaining time" | 12 | //usage: "\n -r,--remaining Show remaining time" |
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 2b7528cc7..66b42c5e1 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c | |||
@@ -6,18 +6,11 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | #include <netinet/in.h> | ||
10 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||
11 | # include <netpacket/packet.h> | ||
12 | # include <net/ethernet.h> | ||
13 | #else | ||
14 | # include <asm/types.h> | ||
15 | # include <linux/if_packet.h> | ||
16 | # include <linux/if_ether.h> | ||
17 | #endif | ||
18 | |||
19 | #include "common.h" | 9 | #include "common.h" |
20 | #include "dhcpd.h" | 10 | #include "dhcpd.h" |
11 | #include <netinet/in.h> | ||
12 | #include <netinet/if_ether.h> | ||
13 | #include <netpacket/packet.h> | ||
21 | 14 | ||
22 | void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type) | 15 | void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type) |
23 | { | 16 | { |
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c index 39f1cec54..a5220ba74 100644 --- a/networking/udhcp/socket.c +++ b/networking/udhcp/socket.c | |||
@@ -22,17 +22,8 @@ | |||
22 | * along with this program; if not, write to the Free Software | 22 | * along with this program; if not, write to the Free Software |
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
24 | */ | 24 | */ |
25 | #include <net/if.h> | ||
26 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||
27 | # include <netpacket/packet.h> | ||
28 | # include <net/ethernet.h> | ||
29 | #else | ||
30 | # include <asm/types.h> | ||
31 | # include <linux/if_packet.h> | ||
32 | # include <linux/if_ether.h> | ||
33 | #endif | ||
34 | |||
35 | #include "common.h" | 25 | #include "common.h" |
26 | #include <net/if.h> | ||
36 | 27 | ||
37 | int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *nip, uint8_t *mac) | 28 | int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *nip, uint8_t *mac) |
38 | { | 29 | { |
diff --git a/networking/vconfig.c b/networking/vconfig.c index 4fa341ac3..48b45d9af 100644 --- a/networking/vconfig.c +++ b/networking/vconfig.c | |||
@@ -13,7 +13,6 @@ | |||
13 | //usage: "COMMAND [OPTIONS]" | 13 | //usage: "COMMAND [OPTIONS]" |
14 | //usage:#define vconfig_full_usage "\n\n" | 14 | //usage:#define vconfig_full_usage "\n\n" |
15 | //usage: "Create and remove virtual ethernet devices\n" | 15 | //usage: "Create and remove virtual ethernet devices\n" |
16 | //usage: "\nOptions:" | ||
17 | //usage: "\n add [interface-name] [vlan_id]" | 16 | //usage: "\n add [interface-name] [vlan_id]" |
18 | //usage: "\n rem [vlan-name]" | 17 | //usage: "\n rem [vlan-name]" |
19 | //usage: "\n set_flag [interface-name] [flag-num] [0 | 1]" | 18 | //usage: "\n set_flag [interface-name] [flag-num] [0 | 1]" |
diff --git a/networking/wget.c b/networking/wget.c index 5f6e8155f..eca673a86 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -22,7 +22,6 @@ | |||
22 | //usage: ) | 22 | //usage: ) |
23 | //usage:#define wget_full_usage "\n\n" | 23 | //usage:#define wget_full_usage "\n\n" |
24 | //usage: "Retrieve files via HTTP or FTP\n" | 24 | //usage: "Retrieve files via HTTP or FTP\n" |
25 | //usage: "\nOptions:" | ||
26 | //usage: "\n -s Spider mode - only check file existence" | 25 | //usage: "\n -s Spider mode - only check file existence" |
27 | //usage: "\n -c Continue retrieval of aborted transfer" | 26 | //usage: "\n -c Continue retrieval of aborted transfer" |
28 | //usage: "\n -q Quiet" | 27 | //usage: "\n -q Quiet" |
diff --git a/networking/whois.c b/networking/whois.c index 4eab9e5fe..bf330334a 100644 --- a/networking/whois.c +++ b/networking/whois.c | |||
@@ -24,7 +24,6 @@ | |||
24 | //usage: "[-h SERVER] [-p PORT] NAME..." | 24 | //usage: "[-h SERVER] [-p PORT] NAME..." |
25 | //usage:#define whois_full_usage "\n\n" | 25 | //usage:#define whois_full_usage "\n\n" |
26 | //usage: "Query WHOIS info about NAME\n" | 26 | //usage: "Query WHOIS info about NAME\n" |
27 | //usage: "\nOptions:" | ||
28 | //usage: "\n -h,-p Server to query" | 27 | //usage: "\n -h,-p Server to query" |
29 | 28 | ||
30 | #include "libbb.h" | 29 | #include "libbb.h" |
diff --git a/networking/zcip.c b/networking/zcip.c index 7250fb2fd..8a35eca5d 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
@@ -27,7 +27,6 @@ | |||
27 | //usage: "[OPTIONS] IFACE SCRIPT" | 27 | //usage: "[OPTIONS] IFACE SCRIPT" |
28 | //usage:#define zcip_full_usage "\n\n" | 28 | //usage:#define zcip_full_usage "\n\n" |
29 | //usage: "Manage a ZeroConf IPv4 link-local address\n" | 29 | //usage: "Manage a ZeroConf IPv4 link-local address\n" |
30 | //usage: "\nOptions:" | ||
31 | //usage: "\n -f Run in foreground" | 30 | //usage: "\n -f Run in foreground" |
32 | //usage: "\n -q Quit after obtaining address" | 31 | //usage: "\n -q Quit after obtaining address" |
33 | //usage: "\n -r 169.254.x.x Request this address first" | 32 | //usage: "\n -r 169.254.x.x Request this address first" |
@@ -36,14 +35,12 @@ | |||
36 | //usage: "\nWith no -q, runs continuously monitoring for ARP conflicts," | 35 | //usage: "\nWith no -q, runs continuously monitoring for ARP conflicts," |
37 | //usage: "\nexits only on I/O errors (link down etc)" | 36 | //usage: "\nexits only on I/O errors (link down etc)" |
38 | 37 | ||
38 | #include "libbb.h" | ||
39 | #include <netinet/ether.h> | 39 | #include <netinet/ether.h> |
40 | #include <net/ethernet.h> | ||
41 | #include <net/if.h> | 40 | #include <net/if.h> |
42 | #include <net/if_arp.h> | 41 | #include <net/if_arp.h> |
43 | #include <linux/if_packet.h> | ||
44 | #include <linux/sockios.h> | 42 | #include <linux/sockios.h> |
45 | 43 | ||
46 | #include "libbb.h" | ||
47 | #include <syslog.h> | 44 | #include <syslog.h> |
48 | 45 | ||
49 | /* We don't need more than 32 bits of the counter */ | 46 | /* We don't need more than 32 bits of the counter */ |