Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: basesrc



Module Name:    basesrc
Committed By:   lukem
Date:           Tue Jun 29 10:43:20 UTC 1999

Modified Files:
        basesrc/usr.bin/ftp: cmds.c cmdtab.c extern.h fetch.c ftp.1 ftp.c
            ftp_var.h main.c util.c

Log Message:
[fear this; more ftp hacking from lukem :-]

features:
---------
* transfer rate throttling with the new `rate' command. syntax:
        rate direction [max [incr]]
  where direction is `all', `get' or `put'.
  if max is not supplied, the current settings are displayed.
  if max is supplied, then transfers in the given direction will
  be throttled to this value.
  if incr is supplied, the increment for the `on-the-fly' scaling
  will be set to that, otherwise `1024' is used.
  currently implemented for binary get, binary put, and url fetches.
  not yet supported for ascii get or put, or local file copies.
* on-the-fly scaling of the throttle based on signals:
    - SIGUSR1 raises the throttle rate by the increment for that direction
    - SIGUSR2 lowers the throttle rate by the increment for that direction
* -T dir,max[,incr] option to set rate from the command line
* `k', `m', `g' suffix support for bytecounts in the `hash', `rate',
  `rcvbuf' and `sndbuf' commands)

bug fixes and code mods:
------------------------
* fix up ftp_login() so that ruserpass() is always called, even for
  command-line url fetches.
* implement strsuftoi(), which parses a given number into a int with
  suffix support. replaces getsockbufsize()
* implement parserate(), which does the argv parsing for -T and rate
* save and restore errno in signal handlers (may not be necessary, but
  it doesn't hurt)

notes:
------
the rate command has had reasonable testing, but I'd like feedback
if it doesn't do the right thing, especially from people on slower
(i.e, modem) links.
I haven't tested the rate throttle against a http server which does
`transfer-encoding: chunked' because I couldn't find a server to
test against.


To generate a diff of this commit:
cvs rdiff -r1.51 -r1.52 basesrc/usr.bin/ftp/cmds.c
cvs rdiff -r1.22 -r1.23 basesrc/usr.bin/ftp/cmdtab.c
cvs rdiff -r1.30 -r1.31 basesrc/usr.bin/ftp/extern.h
cvs rdiff -r1.58 -r1.59 basesrc/usr.bin/ftp/fetch.c
cvs rdiff -r1.41 -r1.42 basesrc/usr.bin/ftp/ftp.1
cvs rdiff -r1.45 -r1.46 basesrc/usr.bin/ftp/ftp.c
cvs rdiff -r1.32 -r1.33 basesrc/usr.bin/ftp/ftp_var.h
cvs rdiff -r1.43 -r1.44 basesrc/usr.bin/ftp/main.c
cvs rdiff -r1.52 -r1.53 basesrc/usr.bin/ftp/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index