Description of sgb2ns
---------------------

This program is used to convert Geogia Tech's topology generator GT-ITM's 
output to ns-2 format. See 
http://www.cc.gatech.edu/fac/Ellen.Zegura/graphs.html for information
about GT-ITM.

Installation:

(1) Install gt-itm. 
(2) Assuming gt-itm/ is the directory for the gt-itm distribution:
	cd gt-itm
	tar xvfz <path to sgb2ns.tar.gz>
	cd sgb2ns
    If you expand sgb2ns.tar.gz in some arbitrary directory, you need to
    modify macro GT-ITM in sgb2ns' Makefile to the GT-ITM's path.
(3) Make sure that the name of your Stanford Graphics Base lib is libgb.a, 
    and it resides in gt-itm/lib. If you do not install Stanford Graphics
    Base and use the libraries with GT-ITM distribution (only for SunOS and
    Solaris), you'll need to modify sgb2ns's Makefile to have the correct
    library name. After this, do:
	make all
    Then you'll have sgb2ns executable in gt-itm/bin.

Usage:

    	sgb2ns <gt-itm's topology file> <output tcl file>

Format of the output Tcl file:

In the output Tcl file, you'll have 

	proc create-topology {nsns node linkBW}
where
	nsns: instance of ns, maybe get by [Simulator instance]
	node: node array where the nodes in the new topology will be stored
	linkBW: bandwidth for all links

This function will return the number of nodes in the topology. The link
delays will be set proportional to their length in the topology, in the 
unit of millisecond.

Files:

sgb2ns.c - source file
Makefile
README   - this file
ts20.gb  - example topology generated by GT-ITM
ts20.tcl - example output using "sgb2ns ts20.gb ts20.tcl"
