Commit Graph

65 Commits

Author SHA1 Message Date
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
6536a9b583 next part of ipv6-ization is here: wget & httpd 2007-01-12 10:35:23 +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
bf0a201008 style fixes
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +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
621204bbf6 get_terminal_width_height: do not pass insanely large values 2006-10-27 09:03:24 +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
67b23e6043 getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
Denis Vlasenko
9275814a9e lots of silly indent fixes 2006-10-03 19:56:34 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Rob Landley
88621d7398 Svn 16007 broke the build under gcc 4.0.3. This fixes up some of the damage
(the e2fsprogs directory is too twisty and evil to easily fix, but I plan
to rewrite it anyway so I'll just bump that up in priority a bit).
2006-08-29 19:41:06 +00:00
"Robert P. J. Day"
d35ef0f666 More removal of "#if 0" content. 2006-07-01 14:59:54 +00:00
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Bernhard Reutner-Fischer
b1629b1b2a - remove emacs layout block as suggested by Robert P.J. Day
- use shorter boilerplate while at it
2006-05-19 19:29:19 +00:00
Rob Landley
bc68cd14cc Patch from Denis Vlasenko turning static const int (which gets emitted into
the busybox binary) into enums (which don't).
2006-03-10 19:22:06 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Eric Andersen
0cb6f35c33 fix up annoying signed/unsigned and mixed type errors 2006-01-30 22:30:41 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Paul Fox
5a16a89427 eliminate mixed declaration, to support older compilers a little longer. 2005-11-28 16:29:45 +00:00
Rob Landley
1b751c894b Rob Sullivan sent in some cleanups, which I beat on slightly. 2005-10-28 09:24:33 +00:00
Paul Fox
f2ddc05ee7 applying fix for:
0000026: poor man's "scriptable" telnet
2005-07-20 19:55:19 +00:00
Glenn L McGrath
d4004ee6a9 Patch from Felipe Kellermann, remove some unnecessary dups, i declared a few extra const's also. 2004-09-14 17:24:59 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
539ffc9129 Fernando Silveira writes:
Hi,

  Well, I made this patch a long time ago (08/2002) because it was a
  need of a project, but had no time to send it to you. It adds support
  to `autologin' option of the telnet protocol. It has been used since
  made with busybox 0.60.3 at production and I had no problems with it.
  I have ported it to the HEAD revision of the CVS server (20040211) and
  I hope you enjoy and apply it to the official sources. :)

Thanks a lot!
2004-02-22 12:25:47 +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
Glenn L McGrath
ffccf6eb5d Change interface to bb_lookup_host, dont try and set port inside this
function as there is no gracefull way of handling failures.
Rename bb_getport to bb_lookup_port, allow a default port to be
specified so it always returns a correct value.
Modify ftpgetput/rdate/wget to use the new interface.
wget/rdate now use etc/services with a falback default value.
2003-12-20 01:47:18 +00:00
Eric Andersen
e6dc439b3a Rework wget, the xconnect interface, and its various clients
in order to fix the problems with round robin DNS reported
by Andrew Flegg:
    http://busybox.net/lists/busybox/2003-October/009579.html

This removes the ipv6 specific xconnect dns lookups.  I do
not see why that would need to be special cased for ipv6 as
was done, but that will just have to be tested.

So IPV6 people -- please test this change!

 -Erik
2003-10-31 09:31:46 +00:00
Eric Andersen
8efe967018 Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
to ensure proper fallback behavior on, i.e. serial consoles.
 -Erik
2003-09-15 08:33:45 +00:00
Eric Andersen
cb81e6484d Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Aaron Lehmann
84878fe20e remove duplicate definition of G
caught by tinycc
2002-08-23 07:51:01 +00:00
Eric Andersen
2276d83639 Fixup warnings and undefined operations that show up in gcc-3.1
-Erik
2002-07-11 11:11:56 +00:00
Eric Andersen
0b31586c71 A patch from Bart Visscher <magick@linux-fan.com> to add an
xconnect helper routine which does:
        -address and port resolving
	-tries to connect to all resolved addresses until connected
	-uses getaddrinfo, so works for IPv6 too
This patch also ports rdate, telnet, and wget to use the new
xconnect function.  Thanks Bart!
2002-07-03 11:51:44 +00:00
Eric Andersen
27d3766e0d Email addr fix 2002-06-06 12:59:13 +00:00
Eric Andersen
416340642d Fix bugs 2002-04-26 08:44:17 +00:00
Eric Andersen
8db361b3e5 Minor formatting 2002-04-26 08:00:33 +00:00
Tim Riker
ed8e036360 add missing void, still has issues though 2002-04-26 07:53:39 +00:00
Eric Andersen
0e28e1fa05 Forward port patch from Przemyslaw Czerpak <druzus@polbox.com>:
1. busybox-telnet dosn't inform server about the size of terminal screen.
    In the world of xterminals and frame buffers it's rather horrible
    to use fixed 80x24 region in upper-left corner of screen/window.

 2. If client sends character 0x0d to the server then sends character 0x0a
   the server eat the second byte (0x0a) - it's described in telnet RFC.
    Client should send two bytes ( 0x0d + 0x0a or 0x0d + 0x00 ) insted of
    one 0x0d byte.

 3. busybox telnet implementation wasn't 8bit clean (look at 0xff byte).
    I need it because I have to use binray transfer like rz/sz. So when
    I resloved the problem (2) I corrected this one two.

This also contains a small cleanup patch from vodz, and some minor editing
by me.
2002-04-26 07:20:47 +00:00
Matt Kraai
1f0c43668a Remove == TRUE' tests and convert != TRUE' and `== FALSE' tests to use !. 2001-12-20 23:13:26 +00:00
Eric Andersen
cd8c436d81 Latest patch from vodz:
-- reverse resolve network name and cache in route and ifconfig
	applets, fix print nslookup server name if compile without
	uClibc, fix route crashe 'route add', fix warnings compile
	networking and pwd_grp applets
2001-11-10 11:22:46 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Glenn L McGrath
78b0e379d7 Vladimir's last_patch_15 2001-06-26 02:06:08 +00:00
Matt Kraai
c55b8d41c1 Add xgethostbyname and herror_msg* functions. 2001-05-16 15:40:51 +00:00
Eric Andersen
7e1273edf7 Patch from Jim McQuillan to pass the terminal type to the remote host. 2001-05-07 17:57:45 +00:00
Eric Andersen
92d23245c9 Another cleanup patch from Jeff Garzik <jgarzik@mandrakesoft.com> 2001-03-19 23:49:41 +00:00
Eric Andersen
8b96032139 Fix a bug pointed out by Rob Landley <rlandley@austin.rr.com>, where
setup_sockaddr_in was zeroing the sizeof a pointer, not the sizeof the struct,
which was obviously what was intended.  Thanks Rob,
 -Erik
2001-03-17 05:43:39 +00:00
Eric Andersen
3e6ff9017f A cleanup patch from Jeff Garzik to static-ify a number of
namespace polluting things that really should be static.
2001-03-09 21:24:12 +00:00
Eric Andersen
cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
header file usage before the 0.49 release.  To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
 -Erik
2001-02-20 06:14:08 +00:00
Eric Andersen
67991cf824 This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Matt Kraai
dd19c69904 Removed trailing \n from error_msg{,_and_die} messages. 2001-01-31 19:00:21 +00:00