WARNING: tcpblast is really crude and measures the throuput by sending as much
data as possible. USE CAREFULLY. For much more subtle bandwidth measurements
use Van Jacobson's pathchar (ftp://ftp.ee.lbl.gov/pathchar/) if it is available
for your system (he promised to show the sources in May 1997, the publication
seems to be somewhat delayed...).

New version of tcpblast is based on several versions floating around, mostly on
FreeBSD version (signed: Daniel Karrenberg <dfk@nic.eu.net>). Can be made as
follows:

./configure
make
make install


The newest version is available in
ftp://ftp.6bone.pl/pub/blast/


Usage: tcpblast [options] destination nblocks

tcpblast/udpblast is a simple tool for probing network and estimating its
throughput. It sends nblocks of data to specified destination host. Each
block has 1024 B by default.

Options:
-b nnn           socket buf size (default: -1 == don't change)
-c               display speed continuously, default
-d nnn           print dot every nnn blocks, disables -c
-e               when calculating throuput substract sock. buf. size
-h, --help       this help
-l nnn           show also speed for last nnn blocks
-p xyz           use port #/name xyz instead of default 9
-r               send random data
-s nnn           block size (default 1024 bytes)
-t               use TCP (default)
-u               use UDP (default if named udpblast)
-v, --verbosity  verbosity, default 0, maximum 3
-V, --version    version
destination      host name or address
nblocks          number of blocks (1..9999)

tcpblast version: FreeBSD + rzm 19991103; max. time: 42949.7 h


CHANGES:
- setting TCP/UDP
- setting block size
- setting buffer size
- sending random data
19960224 version released
19960926 setting port # 
         uploaded to sunsite.unc.edu
19961001 option for setting # of dots per block sent 
         some cleanup
19961002 better description of -b in usage()
         corrected bug in setsockopt (buffer wasn't set)
         for -r buffer still wasn't filled with random data (Pratip K. Banerji <pbanerji@bbn.com>)
         version 961002a
19961003 usage_small() used in same cases instead of usage()
         some help/error messages rearangement
19961028 getopt from GNU libc 961017 included
         #include <errno.h>
         compiles+links on Solaris 0.5
         more files, Makefiles and such
19970119 -c option for continuous speed display
         either port # or name can be used with -p
         SunOS (4.1.3) compile target works
19981108 included DEC OSF/1 changes from Arun Moorthy <moorthy@cs.iitm.ernet.in> (sent Feb 97,  sorry..)
         getsockopt() should know how much space can it use for returned parameter, so size must be 4
         output shows data/time and (data-bufsize)/time. far from perfect, take a look
         y2k problem in version number (:
         install target
19981109 printresult() in a loop arguments corrected
         -e(xperimental) option
         default port now properly printed
19981112 dist Makefile target
         changed . into - in the package name
19990326 install udpblast too (as a symlink)
         version.h depending on tcpblast.c
19990504 2 spaces after 'KB/s'
	 I don't understand why
write(3, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"..., 65536) = -1 EFAULT (Bad address)
write(2, "tcp/udpblast send:: Bad address\n"..., 32tcp/udpblast send:: Bad address
) = 32
	 with -s 65536. It works OK up to 46648 B (?!)
19991102 configure.in and such borrowed from nmap
	 Karsten Hecker <karsten@merlin.nrw-online.de> had problems compiling it on Solaris, should work with configure
	 Michal 'Orr' Daszkowski <midas@ufik.idn.org.pl> spotted a long standing bug in port arg copying
	 included a manual from Artur R. Czechowski <arturcz@bofh.org.pl>, I'm sure it is going to be outdated soon
	 moved binary do ..../sbin
19991103  -c  (continuous) is default now, instead of dots
	 millisecond = ms (not msec)
	 time scaling when adding s and us (USCALE)
	 circular buffer for measuring last nnn blocks speed, the option: -l nnn  (off by default)

PORTS:
Done and tested:
- Linux Rawhide 19991031, Sparc, 19991102 rzm
- Solaris 2.6, Sparc, 19991102 rzm

TODO:
- port to more unices, should be easy with autoconf
- add even more options
  - sending file contents - -f
- learn more theory and think how to improve accuracy of bandwidth
  measurement (maybe it could be corrected for the buffer size.. - doesn't help much 19981108)
  (-b 1024 gives more reasonable results)
- summarize on ^C (anyway, not needed when -c option used)
- integrate tcpblast-dfk.tar.gz (or tcpspray) functionality - two way stream via echo port, comparing
- allow read-only mode (with chargen)
- clean up after stealing *.in scripts

BUGS: (send to the address below if found)
- I'm a perfectly bad and careless maintainer

rzm@icm.edu.pl
