Commit graph

34 commits

Author SHA1 Message Date
H. Peter Anvin
33051a296c signals: require and always use sigaction()
tftpd already requires sigaction() to compile, so there is no reason
to use anything else. It also allows for nicer combination of flags.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-06-10 14:36:28 -07:00
H. Peter Anvin
1f4b33a1f7 Modernize: use sigaction() whenever possible. Remove uses of common.
bsd_signal() may not be defined, and there is really no reason to even
try to use it if sigaction() is avaiable; using sigaction() guarantees
the semantics we really want.

Replace uses of common variables with explicit instantiation and
extern declarations in a header file.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-05-29 15:34:57 -07:00
H. Peter Anvin
8ddf0d87d7 tftp: drop "inline" from definition of usage()
It is pointless and newer gcc say it is a lose.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-06-07 13:00:46 -07:00
Karsten Keil
18fd18bd5c Improve address type error handling
This patch detects numeric address types to avoid unnecessary
warnings/errors.  It also cleans up error printing to not print error
messages on stderr in the deamon case.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-07-31 11:48:18 -07:00
H. Peter Anvin
c3a5c712e2 Allow the -4 option even in an IPv4-only configuration
Allow the -4 option even if IPv6 isn't compiled in.
2008-07-23 14:36:18 -04:00
Karsten Keil
28f22b6591 Add support for IPv6 in the server and client.
Add support for IPv6 in the server and client.
You can force the use of IPv4 or IPv6 only with new
-4 and -6 commandline options, if IPv6 support was compiled in.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-07-23 14:29:41 -04:00
H. Peter Anvin
50f22a7ad2 Remove long since obsolete ID tags 2008-07-08 17:30:27 -04:00
H. Peter Anvin
22accddda0 Reformat the source code
The source code was a mix of different styles; normalize on NASM
style; basically K&R style with 4 space indentation.
2008-07-08 17:14:44 -04:00
Craig Johnston
899b7d500b Add option to TFTP client to ignore ':' in file name
I have encountered a situation where I would like to use tftp-hpa to
retrieve a file that resides within an absolute path containing a ':'
character.  Ala, "tftp foobar -c get C:2/tftpdir/myfile".  Since the
tftp client automatically converts the host:file syntax, I get an
error "tftp: C: Unknown host".

I made a chage to the tftp client code to add a literal mode (-l),
that prevents the special treatment of the ':' character.  I've
attached a patch set for main.c and tftp.1.in for your consideration.
I'm not sure how many folks run into this, but it may be somewhat
common for VxWorks and perhaps MSDOS users.

Thanks,
Craig Johnston
2006-12-12 14:31:51 -08:00
Zack Bartel
ec5973ac5f Moved pick_port_bind() to the libcommon common code so both client and server can use it. Client can now specify a range of ephemeral ports (transaction id) 2006-11-13 17:33:29 -08:00
H. Peter Anvin
f3beb3a119 Merge with git+ssh://master.kernel.org/pub/scm/network/tftp/tftp-hpa.git 2006-10-04 10:19:23 -07:00
H. Peter Anvin
40133b212b Move common code to a common/ subdirectory 2006-10-04 10:19:06 -07:00
H. Peter Anvin
0b821ec893 Fix double-free error in tftp client. 2006-09-27 15:54:41 -07:00
hpa
0eea078aec Command-line parsing that doesn't depend on getopt() 2004-01-08 20:47:00 +00:00
hpa
8796832723 Support running the TFTP client from the command line 2003-02-03 01:29:00 +00:00
hpa
64ae5fda79 -> Clean up the use of autoconf macros a bit.
-> Always pass O_TEXT/O_BINARY and "t"/"b" respectively, as appropriate.
2001-11-29 22:02:52 +00:00
hpa
98d7543721 Working on version 0.29.
Initial work for compiling on Win32/Cygwin.

Posixly correctness.
2001-11-27 10:05:13 +00:00
hpa
3d401fa4c9 Be paranoid about multiple inclusions (apparently some systems don't like
it for certain header files.)  Be a little bit more careful in setting
up the standard environment in config.h.  This is AIX portability work.
2001-11-16 20:15:27 +00:00
hpa
eaed5dbbca Fix trivial memory leak 2001-11-14 20:51:57 +00:00
hpa
01acb3dc7f Allow "readline" to be used even if "history" is unavailable... 2001-11-14 20:51:09 +00:00
hpa
7edb3d5b92 Display configuration information when using the -V option... 2001-11-14 04:16:23 +00:00
hpa
06bfb2bf4f - Better parsing of the "connect" command (tftp).
- Move missing header file stuff consistently into config.h.
- Make "make -j" work correctly.
2001-11-13 19:58:32 +00:00
hpa
13849b4a32 Fix the handling of continuation prompts when using readline 2001-11-13 02:42:54 +00:00
hpa
9753e234c6 Add readline support in tftp client; some additional minor cleanups. 2001-11-12 23:27:48 +00:00
hpa
b46e220d49 A few more renames; fix <inttypes.h> emulation. 2001-11-12 18:14:14 +00:00
hpa
3df5c1f25c Even more portability work... 2001-11-12 06:46:56 +00:00
hpa
5b0cb11445 Support "constipation" -- compile cleanly with -Wwrite-strings 2001-08-10 18:25:08 +00:00
hpa
266427bc5b Portability improvements. Now compiles and works on Solaris 8, as well
as Linux.
2001-08-03 03:17:57 +00:00
hpa
304cb0877c Quiet final set of warnings. 2001-07-21 02:02:43 +00:00
hpa
0034637792 Quiet more warnings. 2001-07-21 01:54:26 +00:00
hpa
c92bf0f3d4 More merging mania... 2001-03-30 01:30:49 +00:00
hpa
7a15e40374 Fix massive lossage: 0.15 based on an outdated repository!!! 2001-03-30 01:08:12 +00:00
hpa
ffa45eae76 Add code to always reply using the queried IP address, if the OS
makes it possible.
2001-03-28 18:24:25 +00:00
hpa
09f975fa4c Initial revision 1999-09-26 06:32:41 +00:00