May 3, 2007

This is a hack for NS FEC sender and receiver agents. The sender agent waits for a request from the receiver and then sends the file. Below is a description on integration of these agents into NS. (For more information, please refer to the ping tutorial)

Forward error correction (FEC) is a system of error control for data transmission, whereby the sender adds redundant data to its messages, which allows the receiver to detect and correct errors (within some bound) without the need to ask the sender for additional data. The advantage of forward error correction is that retransmission of data can often be avoided, at the cost of higher bandwidth requirements on average, and is therefore applied in situations where retransmissions are relatively costly or impossible.

Steps :

Get the following files to put in your NS Agent C++ directory:

FEC Agent fec.h fec.cc

FEC Sender Agent fec_snd.h fec_snd.cc

FEC Receiver Agent fec_rcv.h fec_rcv.cc

2. Add fec.o, fec_snd.o, and fec_rcv.o to NS Makefile

In packet.h, add "PT_FEC," to the "enum packet_t" list and add "name_[PT_FEC]= "fec";" to the class p_info p_info() function.

Perform a "make depend". Ignore any warnings.

Add the following to the end of tcl/lib/ns-default.tcl:

Agent/FEC/Snd set packetSize_ 64

Agent/FEC/Snd set rate_ 100Kbps

Agent/FEC/Snd set extraPkts_ 0

Agent/FEC/Snd set debug_ false

Agent/FEC/Rcv set debug_ false

Add the following to the "foreach pair" list in tcl/lib/ns-packet.tcl: