Commit Graph

59 Commits

Author SHA1 Message Date
Denis Vlasenko
f6b4685691 add FEATURE_UNIX_LOCAL. By Ingo van Lil (inguin AT gmx.de) 2009-04-25 13:16:53 +00:00
Denis Vlasenko
a771e7c005 *: remove check for errors on getsockaddr in cases we know they can't happen
libbb: make get_sock_lsa use only one getsockaddr syscall, not two

function                                             old     new   delta
get_sock_lsa                                          72     101     +29
do_iplink                                           1151    1137     -14
arping_main                                         1585    1569     -16
dolisten                                             789     755     -34
xrtnl_open                                           161      94     -67
2009-04-21 23:48:38 +00:00
Denis Vlasenko
5e34ff29bc *: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
9b2fbda538 ftpd: EPSV and SIZE support. Tested to work on IPv6 too.
libbb: str2sockaddr shuld accept [IPv6] addr without port -
 wget 'ftp://[::1]/file' needs that to work.

function                                             old     new   delta
bind_for_passive_mode                                  -     129    +129
get_nport                                              -      30     +30
ftpd_main                                           1731    1760     +29
str2sockaddr                                         412     431     +19
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 207/0)             Total: 207 bytes
   text    data     bss     dec     hex filename
 808568     476    7864  816908   c770c busybox_old
 808804     476    7864  817144   c77f8 busybox_unstripped
2009-03-09 13:01:08 +00:00
Denis Vlasenko
73c571a5ff *: move get_sock_lsa and xwrite_str to libbb, use where appropriate
function                                             old     new   delta
get_sock_lsa                                           -      72     +72
buffer_fill_and_print                                179     196     +17
parse_expr                                           824     832      +8
read_base64                                          343     348      +5
nameval                                              202     206      +4
fbset_main                                          1694    1698      +4
expand                                              1849    1853      +4
udhcp_send_kernel_packet                             249     252      +3
udhcp_get_option                                     223     222      -1
chat_main                                           1246    1245      -1
pack_gzip                                           1661    1659      -2
doset                                                299     297      -2
bb__parsespent                                       119     117      -2
test_main                                            260     257      -3
qgravechar                                           109     106      -3
tcpudpsvd_main                                      1834    1830      -4
sysctl_display_all                                   589     580      -9
xopen_xwrite_close                                    44      33     -11
prs                                                   30      18     -12
find_main                                            418     406     -12
full_write2_str                                       25      12     -13
adduser_main                                         667     654     -13
evaltreenr                                           817     802     -15
evaltree                                             817     802     -15
tftpd_main                                           526     493     -33
ftpd_main                                           2050    1990     -60
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/18 up/down: 117/-211)         Total: -94 bytes
2009-03-09 00:12:37 +00:00
Denis Vlasenko
a3ca7cf069 add a note that SO_BINDTODEVICE needs padded iface name on 2.6.26 2008-12-10 11:24:33 +00:00
Denis Vlasenko
e53738558f *: fix SO_BINDTODEVICE. Kernel wants at least IFNAMSIZ bytes there. 2008-12-10 11:12:16 +00:00
Denis Vlasenko
db12d1d733 Fix forgotten license comments 2008-12-07 00:52:58 +00:00
Denis Vlasenko
defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
4e6d5117b8 inetd: make it NOMMU-capable and IPv6-friendly. Lots of renames
of variable/function names

Total: -2474 bytes
   text    data     bss     dec     hex filename
 802215     661    7452  810328   c5d58 busybox_old
 800120     661    7428  808209   c5511 busybox_unstripped
2008-03-12 22:14:34 +00:00
Bernhard Reutner-Fischer
8c69afd992 - be C99 friendly. Anonymous unions are a GNU extension. This change is
size-neutral WRT -std=gnu99 and fixes several compilation errors for strict
  C99 mode.
2008-01-29 10:33:34 +00:00
Denis Vlasenko
9d6c46955f Introduce FEATURE_PREFER_IPV4_ADDRESS. If selected, we have:
function                                             old     new   delta
str2sockaddr                                         328     344     +16
2007-11-14 10:18:33 +00:00
Denis Vlasenko
a27a11bb2c introduce and use xdup2(int, int)
stop checking whether setsockopt_reuseaddr(int fd) was successful (it always is)
remove second parameter (sockllen) from xmalloc_sockaddr2xxxxx functions

sockaddr2str                                         142     156     +14
collect_blk                                          467     474      +7
xdup2                                                 28      33      +5
singlemount                                         4456    4454      -2
print_host                                           214     212      -2
nslookup_main                                        139     137      -2
ftpgetput_main                                       414     412      -2
udhcpd_main                                         1258    1255      -3
udhcpc_main                                         2405    2402      -3
traceroute_main                                     4125    4122      -3
nc_main                                             1072    1069      -3
buffer_fill_and_print                                 76      73      -3
xmalloc_sockaddr2hostonly_noport                      18      14      -4
xmalloc_sockaddr2host_noport                          18      14      -4
xmalloc_sockaddr2host                                 15      11      -4
xmalloc_sockaddr2dotted_noport                        18      14      -4
xmalloc_sockaddr2dotted                               18      14      -4
wget_main                                           2618    2614      -4
ping_main                                            393     389      -4
ip_port_str                                          120     115      -5
dhcprelay_main                                      1146    1141      -5
dnsd_main                                           1531    1525      -6
passwd_main                                         1110    1102      -8
udhcp_kernel_packet                                  206     197      -9
udhcp_listen_socket                                  154     144     -10
getty_main                                          2576    2566     -10
setup                                                655     640     -15
xmove_fd                                              51      34     -17
dolisten                                             759     742     -17
tcpudpsvd_main                                      1866    1836     -30
startservice                                         339     299     -40
2007-08-18 14:16:39 +00:00
Denis Vlasenko
5c51a7ca52 nc: make connecting to IPv4 from IPv6-enabled hosts easier
(was requiring -s <local addr>)
2007-06-05 20:08:11 +00:00
Denis Vlasenko
335b63d8d1 make a few struct bb_applet members conditional
rename sllep_and_die -> xfunc_die
make fflush_stdout_and_exit NOFORK-safe
fix some buglets found by randomconfig
2007-04-10 21:38:30 +00:00
Denis Vlasenko
29fe7265b8 nc: port nc 1.10 to busybox 2007-04-05 20:26:28 +00:00
Denis Vlasenko
729bd9e0b0 test: comment out unused code
udpsvd: fake it compile
tcpsvd: more optimal memorizing of IP's for -C
2007-04-02 12:37:28 +00:00
Denis Vlasenko
2856dab477 tcpsvd: new applet
It's a GPL-ed 'clone' of Dan Bernstein's tcpserver.
Author: Gerrit Pape <pape@smarden.org>
http://smarden.sunsite.dk/ipsvd/
size tcpsvd.o
   text    data     bss     dec     hex filename
   2571       4      16    2591     a1f tcpsvd.o
2007-04-01 01:18:20 +00:00
Denis Vlasenko
9ca26d38c5 ping: support -I addr in family neutral manner; reuse a bit of common code 2007-02-09 17:32:16 +00:00
Denis Vlasenko
0850cdabde tftp: fix IPv6 fallout 2007-02-07 23:20:32 +00:00
Denis Vlasenko
e991303406 udhcp: use improved gethostbyname replacement from IPv6 code 2007-02-04 02:41:57 +00:00
Denis Vlasenko
5870ad9672 mount: (try to) support cifs with IPv6 2007-02-04 02:39:55 +00:00
Denis Vlasenko
42823d597a add x to IPv6 functions which can die 2007-02-04 02:39:08 +00:00
Denis Vlasenko
b9a279ba94 Unify ping and ping6. ping has -4 and -6 which force
name resolution into IP or IPv6 only, otherwise
we take address family returned by host2sockaddr()
in lsa->sa.sa_family. IOW: "ping ::1" with do IPv6 ping,
"ping 127.0.0.1" will do IPv4 ping.
ping6 is aliased to "ping -6".
2007-01-24 23:53:22 +00:00
Denis Vlasenko
9adc6ced4f ping6: stop using xgethostbyname2, remove it from libbb. 2007-01-22 22:45:27 +00:00
Denis Vlasenko
448f0241e0 nslookup: full circle. Here we started IPv6 work. Use "new API"
and thus save a few bytes.
2007-01-22 22:43:05 +00:00
Denis Vlasenko
703e20235a cleanups: unnecessary casts, unified const_1, eliminate cross-.c file
prototypes (heresy!), add spaces in places like "flags&NETSTAT_CONNECTED",
removed unused #defines, #ifdef -> #if, use uint32_t for ipv4 addrs.
2007-01-22 14:12:08 +00:00
Denis Vlasenko
85629f08bc comment out unused old networking API parts
sockaddr2dotted: return IPV6 addrs in [addr]:port form (was addr:port)
2007-01-22 09:36:41 +00:00
Denis Vlasenko
2418288cac small fixes to ipv6 infrastructure 2007-01-13 21:05:38 +00:00
Denis Vlasenko
5d68724d5b next part of ipv6-ization. mostly netcat. 2007-01-12 20:59:31 +00:00
Denis Vlasenko
6536a9b583 next part of ipv6-ization is here: wget & httpd 2007-01-12 10:35:23 +00:00
Denis Vlasenko
8e9ccba371 ipv6-ization efforts continue. Few bugs are found,
unknown number likely introduced...
2007-01-11 16:50:23 +00:00
Denis Vlasenko
bbe514683a a bit more IPv6-ization work
syslogd: converted to use it (in -R host:port)
2007-01-10 20:19:56 +00:00
Denis Vlasenko
9de420c27c Improve generic ipv4+ipv6 support in libbb.
Convert telnet to it. Now this works:
telnetd -b [::1]:1234 - bind to IPv6 non-standard port
telnet [::1]:1234 - connect to IPv6 non-standard port
telnet ::1 1234 - same
This does not require ANY ipv6-specific code in applets
(no struct sockaddr_in6. In fact, no sockaddr_in, too).
2007-01-10 09:28:01 +00:00
Denis Vlasenko
1dc1b37b33 use xbind, xconnect where appropriate.
small edits to arping
2006-12-23 02:48:44 +00:00
Denis Vlasenko
48237b0c88 introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),
use them where appropriate. 200 bytes saved
2006-11-22 23:22:06 +00:00
Denis Vlasenko
81e264d4af fix double merge 2006-11-22 17:42:06 +00:00
Denis Vlasenko
c8717cd857 telnetd: move generic stuff into libbb. It will make it easy
to make other server applets IPv6-aware too.
2006-11-22 16:10:39 +00:00
Denis Vlasenko
89f0b3486d rodata cleanup. "unable to" == "cannot". -300 bytes 2006-11-18 22:04:09 +00:00
Denis Vlasenko
1457915afc xconnect is non-conforming to "xfunc like libc" rule. Fixing 2006-10-26 01:09:46 +00:00
Denis Vlasenko
a94554d010 wget: fix bug where wget creates null file if there is no remote one.
add O_LARGEFILE support (not run tested :).
2006-09-23 17:49:09 +00:00
Rob Landley
d921b2ecc0 Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes...  General cleanup pass.  What I've
been doing for the last couple days.

And it conflicts!  I've removed httpd.c from this checkin due to somebody else
touching that file.  It builds for me.  I have to catch a bus.  (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
Bernhard Reutner-Fischer
dac7ff15b7 - patch from Denis Vlasenko to add and use bb_xsocket() and to use
bb_xopen some more while at it.
  Also use shorter boilerplate while at it.
2006-04-12 17:55:51 +00:00
"Vladimir N. Oleynik"
06776b3650 type typo. Thanks, Devin Bayer 2006-02-17 09:33:22 +00:00
Rob Landley
6417564eeb Two FEATURE_CLEAN_UP patches from Shaun Jackman, closing filehandles. 2005-08-22 15:57:50 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Glenn L McGrath
036dbaa082 Modify bb_lookup_port to allow the protocol to be specified, allowing
/etc/services support for inetd, netcat and tftp.
2004-01-17 05:03:31 +00:00
Eric Andersen
3a5ed56803 fix broken formatting 2003-12-23 20:37:54 +00:00
Eric Andersen
9cccc18141 don't mess up errno 2003-12-23 20:37:23 +00:00