Note: If you run into problems please send e-mail. I'll do my best to help
you. Include a detailed description of what your problem is. If you can't
compile, plese send me a typescript of your exact commands and their
output. 

tzoompy@cs.washington.edu

This directory contains source for for the first alpha release of SProbe,
which is a TCP-based bottleneck link bandwidth measurement tool. For more
information you can visit:
	    http://www.cs.washington.edu/homes/tzoompy/sprobe

Much of the code in this directory is borrowed from Sting (see
http://www.cs.wahsington.edu/homes/savage/sting) and therefore credit is
due there. 

September 8th, 2001:

A simple configure file was added to SProbe. Just run:

./configure; make

and magic should happen. configure primarily checks that you have the
ip_fw.h header file (related to the ipfw firewall) accessible. If you
installed ipchains properly the header file should be accessible. 


GETTING STARTED
---------------
To compile and run sprobe, you'll need three things:

  1) a compiled version of McCanne, Leres and Jacobson's libpcap library
    (I've included the version of this distribution I've used, but the
    most up-to-date version can be found at
    ftp://ftp.ee.lbl.gov.libpcap.tar.Z)

  Either: 

  2a) a modern Linux kernel compiled with support for firewalls. RedHat
      7.0+ comes with all the right defaults turned on as far as I can
      tell. If you have RedHat installed you should be able to compile this
      only and you're done.
      However, if /sbin/ipchains -L doesn't give you a nice message
      then your kernel probably isn't right.  Find a penguin person.  

  or

  2b) a FreeBSD kernel compiled with support for BPF and firewalls.  I
      suggest compiling a kernel with the following options in your config
      file:

      options         IPFIREWALL                   #firewall
      options         IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default
      options         NMBCLUSTERS=8192

      pseudo-device   bpfilter 16                  #Berkeley packet filter

  3) A root shell.  sting must be run by root or suid root because it
     writes raw sockets, installs firewall filters and packet filters.

     (Note: sprobe has not been checked for potential security exploits
      such as buffer overflow attacks, so should probably not be made
      available suid in an untrusted environment).

USING SPROBE
------------
To get the estimate from your host to a remote host type:

sprobe -p 100 -d targethost

-p shows an inactive port on the targethost. If 100 is active, change the
 port (try not to use port 23 or 21 since they are commonly in use).

-d shows the direction (downstream means from you to the remote host)

You can also use the following extra flags:
   - -t length - the train length used (see the description of how SProbe works
   off SProbe web page, see above). Currently the default it 6, which was
   set based on empirical tries (the six packets include the packet pair).

   - -c count - since SProbe tries to detect cross traffic (again see the web
      page for more info), SProbe can return unknown as an answer. With -c,
      you can specify the number of tests to try until SProbe gives
      up. Currenty the default is 1 (SProbe will give up after one try
      only).

To get an estimate from the remote host to the local host.

For Gnutella

The syntax is very easy:

sprobe -p port -g targethost

-p: is the port that the Gnutella host uses to listen too. Most of the
 people use 6346, but Gnutella can work on any port, therefore this port
 number can change.

-g: stands for Gnutella (therefore upstream from the remote host to the
 local host).

Here is the output from a sample session (128.95.3.93 is a random host and
65.3.185.75 is a host running Gnutella):

[root@catapault sprobe]# ./sprobe -p 100 -d 128.95.3.93
Estimate: 90909.090Kbps (rtt(fat): 0.000987, rtt(skn): 0.000708)
20 packets received by filter
0 packets dropped by kernel
[root@catapault sprobe]# ./sprobe -p 6346 -g 65.3.185.75
MSS: 1460 suggesting bandwidth > 128Kbps
Packet received w/ length: 1500 at 9358.644150
Packet received w/ length: 1500 at 9358.661005
Estimate: 474.637Kbps
13 packets received by filter
0 packets dropped by kernel


LICENSING & LIABILITY (same as sting's)
--------------------------
SProbe is being released under a BSD-style license and therefore can be
used for any and all purposes by any and all comers, the only
restriction being that the copyright information must be maintained
and credit provided to the contributors.

Going along with that is the abdication of all liability on my part,
on the university's part, and on the part of any and all external
contributors.  The legalese is in the source files for you to read but
in my mind it roughly translates to:  

"Look, this code was written in the wee hours of the night by
a financially un-compensated grad student who should have been working
on his thesis and whose last awarded degree was in History, so its
your own fault if you depend on this software to do what is claimed,
let alone work, without verifying it yourself and certainly don't
blame us if it doesn't.  So there."   

That being said, if you do use this code and find problems or make
improvements PLEASE send them back to me so I can improve
SProbe for later releases.  If you experience problems, please specify
the operating system you're using, the DNS name and IP address of the
target host, how SProbe failed, and (ideally) a tcpdump trace of the
complete conversation between the host pairs.  If you're _seriously_
considering adding services or doing a port, please send me a note so
I can coordinate and avoid the duplication of effort.


Have fun, and be careful out there.


- Stefan

tzoompy@cs.washington.edu
http://www.cs.washington.edu/homes/tzoompy
