summaryrefslogtreecommitdiffstats
path: root/usr.bin/tftp
Commit message (Collapse)AuthorAgeFilesLines
* General mdoc(7) and typo fixes.gjb2012-05-101-2/+2
| | | | | | PR: 167696 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days
* Remove trailing whitespace per mdoc lint warningeadler2012-03-291-4/+4
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Only use macros inside a reference block.joel2012-03-271-10/+5
| | | | Discussed with: brueffer
* fgets(3) returns a pointer, so compare against NULL, not integer 0.kevlo2012-01-131-1/+1
|
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-031-7/+7
| | | | | | | | | | 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.
* peeraddr is only used in sizeof() evaluations, so instead of declaring itdelphij2011-07-111-1/+1
| | | | | | a variable, use typedef. MFC after: 1 month
* Remove duplicated header fileskevlo2011-06-241-1/+0
|
* Acknowledge Edwin Groothuis for the major rewrite herodrigc2011-06-241-1/+7
| | | | did of the tftpd and tftp code to support TFTP blocksize.
* Update references to RFC's that the newer TFTP implementation supports.rodrigc2011-06-221-0/+34
|
* Bump date.rodrigc2011-06-221-1/+49
| | | | | Document the following commands which were added in the new TFTP implementation: blocksize, blocksize2, packetdrop, options, rollover
* Clarify that the TFTP blocksize (RFC2348) or non-standardrodrigc2011-06-161-2/+3
| | | | TFTP rollover option can be used to transfer larger files.
* Specify correct RFC2347 for TFTP options in diagnostic message.rodrigc2011-06-161-2/+2
|
* Fix a couple of spelling errors.imp2011-05-311-3/+3
| | | | Submitted by: bcr@
* 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.
OpenPOWER on IntegriCloud