This is a modified version of GPRS module for ns-2.1b9a, developed at the Networking and 
Telecommunications Research Group (GPRT).

+----------------+
| How to install |
+----------------+
To install the module, download ns-2.1b9a from ns page (it's recommended downloading all-in-one
version: ns-allinone-2.1b9a.tar.gz) and simply copy the files listed above to their correct 
location, then compile ns.

This patch contains the following files in ns-2.1b9a directory:
Makefile.in
aodv/aodv.tcl
common/packet.h
mac/arp.cc
mac/arp.h
mac/channel.cc
mac/channel.h
mac/ll.cc
mac/ll.h
mac/ll-timers.cc
mac/ll-times.h
mac/mac.cc
mac/mac.h
mac/mac-802_11.cc
mac/mac-802_3.cc
mac/mac-csma.cc
mac/mac-gprs.cc
mac/mac-gprs.h
mac/mac-multihop.cc
mac/mac-tdma.cc
mac/rlc.cc
mac/rlc.h
mac/rlc-timers.h
mac/rlc-timers.cc
mac/wireless-phy.h
mobile/mip.h
mobile/mip-reg.cc
noah/noah.cc
noah/noah.h
noah/sdist.cc
noah/sdist.h
queue/queue.h
tcl/lib/ns-default.tcl
tcl/lib/ns-lib.tcl
tcl/lib/ns-mobilenode.tcl
tcl/lib/ns-packet.tcl
tcl/mobility/com.tcl
tcl/mobility/dsdv.tcl
tcl/mobility/dsr.tcl
tcl/mobility/flood.tcl
tcl/mobility/landmark.tcl
tcl/mobility/noah.tcl
tcl/mobility/tora.tcl
tcp/tcp-sink.cc
tcp/tcp-sink.h
tools/loss-monitor.cc
tools/loss-monitor.h
trace/cmu-trace.cc

The files "tcp/tcp-sink.{h,cc}" and "tools/loss-monitor.{h,cc}" are not needed for the module to work. 
They are optional and were added because they were modified to get throughtput statistics.

+------------+
| How to use |
+------------+
To use GPRS module some steps must be followed in your OTcl script.

- Configuring GPRS parameters
	MAC, RLC and LL parameters can be changed in script
- Configuring hierarchical routing
	Hierarchical routing must be used
- Configuring node
	'adhocRouting' must be set to "NOAH"
	'rlcType' must be set to "RLC"
	'macType' must be set to "Mac/Gprs"

Besides, 

- The line bellow must be in script, to set propagation delay to zero:
	Channel/WirelessChannel set pdelay_ -1
- BS and all MSs must be initialized using the following lines:
    set mac_bs [$BS(0) set mac_(0)] 	   ;## getting BS MAC
    $mac_bs initialize-bs $rep		   ;## initializing BS, with the current replication as parameter
    set mac_ms [$MS($i) set mac_(0)]	   ;## getting MS MAC
    $mac_ms initialize-ms $i $mac_bs $rep  ;## initializing MS, with its index, BS MAC and current replication as parameters

An example is available within this patch to make it clear how to use the module (see gprs-example.tcl).

+------------+
| What's new |
+------------+

From users' point of view, the main changes are:

- More than one GPRS network may be created;
- The RLC (and LL) ACKED mode may be used with many MSs;
- The Coding Scheme (CS) of the RLC layer may be set in OTcl script;
- An adaptative model which migrates among the coding schemes according to dropped blocks percentage per window
  may be used (for more details, see D. Sadok, J. Kelner, S. Dantas, "A Dynamic Coding Scheme Selection for GPRS 
  Networks" In: ICTSM 10, 2002, Monterey-CA);
- The number of timeslots (channels) in downlink direction may be set in OTcl script;
- A model error based on BLER table (by Ericsson) may be used, and its parameters (like carrier-to-interference
  mean and variation) may be set by OTcl script.

+---------------+
| Documentation |
+---------------+
The original module (by Richa Jain) is available with a manual at the ns page (Contributed Modules section).
Changes made to this module are described in a Master's Degree Dissertation, available at:
	http://www.gprt.ufpe.br/~jeisa/msc/jpo_dissertacao_final_biblioteca.pdf
Unfortunately it's in Portuguese and there's no documentation in English, only comments in code.
