summaryrefslogtreecommitdiffstats
path: root/usr.bin/tftp
Commit message (Collapse)AuthorAgeFilesLines
* MFC r315170:ngie2017-05-301-2/+2
| | | | | | | | | | | r315170 (by imp): Adopt SRCTOP in usr.bin Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Silence on: arch@ (twice)
* Use MIN() macro from sys/param.h.araujo2016-04-271-1/+1
| | | | MFC after: 2 weeks.
* Partially revert the change on r298325 where there is anaraujo2016-04-201-1/+1
| | | | | | | (-1) casted to a pointer. Submitted by: pfg MFC after: 2 weeks.
* Use NULL instead of 0 for pointers.araujo2016-04-201-2/+2
| | | | | | Small cosmetic change. MFC after: 2 weeks.
* - uri is expected to be nul-terminated (strchr used later),delphij2015-08-311-4/+3
| | | | | | | so use strlcpy instead of strncpy. - unroll the other two cases of strncpy+\0 to strlcpy. MFC after: 2 weeks
* Add META_MODE support.sjg2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-271-2/+2
| |\ | |/ |/|
| * Merge head from 7/28sjg2014-08-192-3/+3
| |\
| * | Updated dependenciessjg2014-05-161-1/+0
| | |
| * | Updated dependenciessjg2014-05-101-0/+2
| | |
| * | Merge headsjg2014-04-281-1/+1
| |\ \
| * | | Updated dependenciessjg2013-03-111-0/+1
| | | |
| * | | Updated dependenciessjg2013-02-161-2/+0
| | | |
| | | |
| | \ \
| *-. \ \ Sync from headsjg2012-11-041-2/+2
| |\ \ \ \
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+22
| | |/ / / | |/| | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | Convert to usr.bin/ to LIBADDbapt2014-11-251-2/+2
| |_|_|/ |/| | | | | | | | | | | Reduce overlinking
* | | | Replace all uses of libncurses and libtermcap with their wide characterbrooks2014-07-171-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy of the curses library. Exp-run: antoine PR: 189842 Discussed with: bapt Sponsored by: DARPA, AFRL
* | | Increase MAXLINE to deal with longer paths.marcel2014-03-041-1/+1
| |/ |/| | | | | Obtained from: Juniper Networks, Inc.
* | More -Wmissing-variable-declarations fixes.ed2012-10-191-2/+2
|/ | | | | | | | | | | | | | | | 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'.
* 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.
OpenPOWER on IntegriCloud