History log of /freebsd-10.0-release/usr.bin/tftp/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


241737 19-Oct-2012 ed

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


235211 10-May-2012 gjb

General mdoc(7) and typo fixes.

PR: 167696
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days


233648 29-Mar-2012 eadler

Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days


233574 27-Mar-2012 joel

Only use macros inside a reference block.

Discussed with: brueffer


230044 13-Jan-2012 kevlo

fgets(3) returns a pointer, so compare against NULL, not integer 0.


229403 03-Jan-2012 ed

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


223926 11-Jul-2011 delphij

peeraddr is only used in sizeof() evaluations, so instead of declaring it
a variable, use typedef.

MFC after: 1 month


223493 24-Jun-2011 kevlo

Remove duplicated header files


223491 24-Jun-2011 rodrigc

Acknowledge Edwin Groothuis for the major rewrite he
did of the tftpd and tftp code to support TFTP blocksize.


223451 22-Jun-2011 rodrigc

Update references to RFC's that the newer TFTP implementation supports.


223447 22-Jun-2011 rodrigc

Bump date.
Document the following commands which were added in the new TFTP implementation:
blocksize, blocksize2, packetdrop, options, rollover


223137 16-Jun-2011 rodrigc

Clarify that the TFTP blocksize (RFC2348) or non-standard
TFTP rollover option can be used to transfer larger files.


223135 16-Jun-2011 rodrigc

Specify correct RFC2347 for TFTP options in diagnostic message.


222534 31-May-2011 imp

Fix a couple of spelling errors.

Submitted by: bcr@


216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


213099 24-Sep-2010 marius

Make WARNS=6 clean.

MFC after: 1 week


213075 23-Sep-2010 marius

Try to adhere to style.Makefile(5).

MFC after: 3 days


213053 23-Sep-2010 marius

Remove an explicit assignment of the CFLAGS variable intended for
debugging purposes only.

MFC after: 3 days


209551 27-Jun-2010 gavin

Fix transfer statistics in the "send file" case - The conditional used
to print the stats were using an uninitialised variable. [1]

Fix trasnfer statistics in the "receive file" case - the statistics struct
was being cleared both before and after the initial connect to the remote
server. As a result, the printed time and calculated bandwidth covers
the time to connect ad well as the time to transfer the file. This may
not be ideal, but now at least matches the "send file" case.

Found by: clang static analyser [1]
Reviewed by: imp


209550 27-Jun-2010 gavin

Fix core dump when server fails to respond.

Reviewed by: imp


209112 12-Jun-2010 gavin

These files are no longer required since r207607


207621 04-May-2010 imp

Doh! Add another new file forgotten by the importer of edwin@'s tftp
improvements.

MFC after: 1 week
Pointy Hat: imp-o-rama...


207607 04-May-2010 imp

Go ahead and merge the work edwin@ on tftpd into the tree. It is a
lot better than what's in the tree now. Edwin tested it at a prior
employer, but can't test it today. I've found that it works a lot
better with the various uboot versions that I've used in my embedded
work. Here's the pkg-descr from the port that describes the changes:

It all started when we got some new routers, which told me the
following when trying to upload configuration or download images
from it: The TFTP server doesn't support the blocksize option.

My curiousity was triggered, it took me some reading of RFCs and
other documentation to find out what was possible and what could
be done. Was plain TFTP very simple in its handshake, TFTP with
options was kind of messy because of its backwards capability: The
first packet returned could either be an acknowledgement of options,
or the first data packet.

Going through the source code of src/libexec/tftpd and going through
the code of src/usr.bin/tftp showed that there was a lot of duplicate
code, and the addition of options would only increase the amount
of duplicate code. After all, both the client and the server can
act as a sender and receiver.

At the end, it ended up with a nearly complete rewrite of the tftp
client and server. It has been tested against the following TFTP
clients and servers:

- Itself (yay!)
- The standard FreeBSD tftp client and server
- The Fedora Core 6 tftp client and server
- Cisco router tftp client
- Extreme Networks tftp client

It supports the following RFCs:

RFC1350 - THE TFTP PROTOCOL (REVISION 2)
RFC2347 - TFTP Option Extension
RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability
Statement for the Trivial File Transfer Protocol (TFTP)

It supports the following unofficial TFTP Options as described at
http://www.compuphase.com/tftp.htm:

blksize2 - Block size restricted to powers of 2, excluding protocol headers
rollover - Block counter roll-over (roll back to zero or to one)

From the tftp program point of view the following things are changed:

- New commands: "blocksize", "blocksize2", "rollover" and "options"
- Development features: "debug" and "packetdrop"

If you try this tftp/tftpd implementation, please let me know if
it works (or doesn't work) and against which implementaion so I can
get a list of confirmed working systems.

Author: Edwin Groothuis <edwin@FreeBSD.org>


201429 03-Jan-2010 gavin

Fix return code in the case of successful file transfer, broken in
tftp.c 1.13

PR: bin/117452
Submitted by: Spencer Minear minear securecomputing.com
Approved by: ed (mentor)
MFC after: 2 weeks


183858 13-Oct-2008 delphij

ANSIfy, plus constify interfaces where possible.


183857 13-Oct-2008 delphij

Use strlcpy() instead of strncpy() when we want the string to be
NUL-terminated.


173408 07-Nov-2007 ru

Fix markup.


162749 28-Sep-2006 matteo

Set txrx_error to 1 when we reach abort. This makes the program correctly set the exit code.
The PR has further details on this.

PR: bin/103206
Submitted by: John Hickey <jjh-freebsd@daedalian.us>
MFC after: 3 days


151471 19-Oct-2005 stefanf

Use the new name H_SETSIZE instead of the old H_EVENT to set the history
size.

PR: 86355


148726 05-Aug-2005 stefanf

Use socklen_t where appropriate.


141918 14-Feb-2005 stefanf

Fix most cases where the address of an int is passed to a function expecting a
socklen_t * argument.


140420 18-Jan-2005 ru

Sort sections.


131491 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


129435 19-May-2004 ru

Bumped the document date.


121015 12-Oct-2003 tjr

Fix BSS buffer overflow in makeargv().


120647 01-Oct-2003 simon

tftp.1:
- Add the optional port argument to SYNOPSIS.
main.c:
- Sync usage with the manual page.

Approved by: trhodes (main.c part)
Obtained from: OpenBSD (jmc)
MFC after: 2 weeks


120042 13-Sep-2003 simon

Make the description of the connect, get, and put commands clearer.

Reported by: Gary W. Swearingen <underway@comcast.net>
Submitted by: Jim Brown <jpb@sixshooter.v6.thrupoint.net> (original version)
Reviewed by: ru
PR: docs/36459
MFC after: 3 weeks


112582 25-Mar-2003 jon

fix reverse logic in "connect" command that cause port specifications to be ignored.

MFC after: 1 week


107276 26-Nov-2002 ru

mdoc(7) police: markup polishing.

Approved by: re


97546 30-May-2002 ru

mdoc(7) police: markup nits.


96433 12-May-2002 bsd

To perform even basic error checking, one must have an exit code that
indicates that not everything worked as expected. Exit non-zero if we
timed out while transmitting or receiving a file or if the file did
not exist, etc.

MFC After: 3 days (re@ willing)


95495 26-Apr-2002 ume

Backout copyright notice I broke by my previous commit.


95124 20-Apr-2002 charnier

Use `The .Nm utility'


94605 13-Apr-2002 dwmalone

Add some constness to make this WARNS clean again.


94443 11-Apr-2002 ume

IPv6 support for tftp/tftpd.

Obtained from: KAME
MFC after: 2 weeks


93428 30-Mar-2002 dwmalone

Clean up vendor ID and FBSDID.
We now seem to include <arpa/inet.h> to get ntoh*.


92922 22-Mar-2002 imp

remove __P


91387 27-Feb-2002 dwmalone

1) Move FreeBSD ID below vendor ID and don't compile vendor ID.
2) Cast some numbers we know to be positive to size_t before we MIN them
with the result of a sizeof.
3) Compare result of inet_addr to INADDR_NONE, not -1.


90416 08-Feb-2002 markm

Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.


88883 04-Jan-2002 guido

Argh...argv->argc


88882 04-Jan-2002 guido

Fix the coredump that occurs when, from the tfpt prompt, a 'c' command is
issued without an argument.


87708 11-Dec-2001 markm

WARNS=2 fixes. NO_WERROR set as there are some hard-to-fix
signed/unsigned comparisons. Use __FBSDID().


85155 19-Oct-2001 bde

Fixed most style bugs in previous commit.


85152 19-Oct-2001 bde

Fixed missing DPADD and misplaced $FreeBSD$ in previous commit.


85120 19-Oct-2001 mdodd

Add libedit support to tftp.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


79535 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79454 09-Jul-2001 dd

mdoc(7) police: remove extraneous .Pp before and/or after .Sh.


71926 02-Feb-2001 asmodai

Fix tftpd and tftp to support file transfers of over 65535 blocks
(about 31 MB - 32 MB).

Submitted (partially)
by: Pascal Hofstee <daeron@wit401305.student.utwente.nl>


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


48792 12-Jul-1999 nik

Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

.\" $Id$
.\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by: bde


40765 30-Oct-1998 dg

Rename a function name so that it doesn't conflict with a future system call.


36792 09-Jun-1998 imp

Don't assume that hp->h_lenght == 4. Be conservative in its use.
Submitted by: J. Assange a long time ago.


33645 20-Feb-1998 jb

Add #include <string.h> to get prototypes.


28202 14-Aug-1997 charnier

Use err(3). 100 -> MAXHOSTNAMELEN from OpenBSD.
Obtained from: OpenBSD


18286 14-Sep-1996 bde

Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.


13068 27-Dec-1995 joerg

Kill the (hopefully) last occurance of gets(3) in the base source tree.


8874 30-May-1995 rgrimes

Remove trailing whitespace.


1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.