summaryrefslogtreecommitdiffstats
path: root/usr.bin/tftp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-114-16/+0
| | | | | | | | | 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
* Make WARNS=6 clean.marius2010-09-242-28/+23
| | | | MFC after: 1 week
* Try to adhere to style.Makefile(5).marius2010-09-231-4/+6
| | | | MFC after: 3 days
* Remove an explicit assignment of the CFLAGS variable intended formarius2010-09-231-1/+0
| | | | | | debugging purposes only. MFC after: 3 days
* Fix transfer statistics in the "send file" case - The conditional usedgavin2010-06-271-4/+1
| | | | | | | | | | | | | 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
* Fix core dump when server fails to respond.gavin2010-06-271-1/+4
| | | | Reviewed by: imp
* These files are no longer required since r207607gavin2010-06-123-355/+0
|
* Doh! Add another new file forgotten by the importer of edwin@'s tftpimp2010-05-041-0/+42
| | | | | | | improvements. MFC after: 1 week Pointy Hat: imp-o-rama...
* Go ahead and merge the work edwin@ on tftpd into the tree. It is aimp2010-05-044-602/+696
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix return code in the case of successful file transfer, broken ingavin2010-01-031-2/+6
| | | | | | | | | tftp.c 1.13 PR: bin/117452 Submitted by: Spencer Minear minear securecomputing.com Approved by: ed (mentor) MFC after: 2 weeks
* ANSIfy, plus constify interfaces where possible.delphij2008-10-134-115/+50
|
* Use strlcpy() instead of strncpy() when we want the string to bedelphij2008-10-131-3/+2
| | | | NUL-terminated.
* Fix markup.ru2007-11-071-29/+31
|
* Set txrx_error to 1 when we reach abort. This makes the program correctly ↵matteo2006-09-281-0/+2
| | | | | | | | | | 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
* Use the new name H_SETSIZE instead of the old H_EVENT to set the historystefanf2005-10-191-1/+1
| | | | | | size. PR: 86355
* Use socklen_t where appropriate.stefanf2005-08-051-2/+2
|
* Fix most cases where the address of an int is passed to a function expecting astefanf2005-02-141-1/+1
| | | | socklen_t * argument.
* Sort sections.ru2005-01-181-5/+5
|
* Mechanically kill hard sentence breaks.ru2004-07-021-1/+2
|
* Bumped the document date.ru2004-05-191-1/+1
|
* Fix BSS buffer overflow in makeargv().tjr2003-10-121-2/+3
|
* tftp.1:simon2003-10-012-6/+6
| | | | | | | | | | - 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
* Make the description of the connect, get, and put commands clearer.simon2003-09-131-34/+43
| | | | | | | | 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
* fix reverse logic in "connect" command that cause port specifications to be ↵jon2003-03-251-2/+2
| | | | | | ignored. MFC after: 1 week
* mdoc(7) police: markup polishing.ru2002-11-261-1/+1
| | | | Approved by: re
* mdoc(7) police: markup nits.ru2002-05-301-5/+5
|
* To perform even basic error checking, one must have an exit code thatbsd2002-05-122-4/+8
| | | | | | | | 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)
* Backout copyright notice I broke by my previous commit.ume2002-04-261-1/+1
|
* Use `The .Nm utility'charnier2002-04-201-2/+3
|
* Add some constness to make this WARNS clean again.dwmalone2002-04-131-3/+3
|
* IPv6 support for tftp/tftpd.ume2002-04-114-94/+155
| | | | | Obtained from: KAME MFC after: 2 weeks
* Clean up vendor ID and FBSDID.dwmalone2002-03-301-5/+7
| | | | We now seem to include <arpa/inet.h> to get ntoh*.
* remove __Pimp2002-03-224-42/+44
|
* 1) Move FreeBSD ID below vendor ID and don't compile vendor ID.dwmalone2002-02-271-9/+10
| | | | | | 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.
* Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.markm2002-02-081-1/+0
|
* Argh...argv->argcguido2002-01-041-1/+1
|
* Fix the coredump that occurs when, from the tfpt prompt, a 'c' command isguido2002-01-041-1/+1
| | | | issued without an argument.
* WARNS=2 fixes. NO_WERROR set as there are some hard-to-fixmarkm2001-12-114-87/+87
| | | | signed/unsigned comparisons. Use __FBSDID().
* Fixed most style bugs in previous commit.bde2001-10-191-14/+11
|
* Fixed missing DPADD and misplaced $FreeBSD$ in previous commit.bde2001-10-191-1/+2
|
* Add libedit support to tftp.mdodd2001-10-192-8/+46
|
* Remove whitespace at EOL.dd2001-07-151-2/+2
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.dd2001-07-091-1/+0
|
* Fix tftpd and tftp to support file transfers of over 65535 blocksasmodai2001-02-022-2/+7
| | | | | | | (about 31 MB - 32 MB). Submitted (partially) by: Pascal Hofstee <daeron@wit401305.student.utwente.nl>
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* $Id$ -> $FreeBSD$peter1999-08-284-4/+4
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | 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
* Rename a function name so that it doesn't conflict with a future system call.dg1998-10-303-6/+6
|
* Don't assume that hp->h_lenght == 4. Be conservative in its use.imp1998-06-091-8/+14
| | | | Submitted by: J. Assange a long time ago.
OpenPOWER on IntegriCloud