I have hacked 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. Let me know if you have any problems or comments on these instructions. I assume you have suceeded at the Ping tutorial

  1. Get the following files to put in your NS Agent C++ directory:
  2. Add fec.o, fec_snd.o, and fec_rcv.o to NS Makefile
  3. 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.
  4. Perform a "make depend". Ignore any warnings.
  5. 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
  6. Add the following to the "foreach pair" list in tcl/lib/ns-packet.tcl:
    { FEC off_fec_ }
  7. Run "make"
  8. Try ns on the example TCL script, fec.tcl
  9. You can also try this TCL multicast script, mfec.tcl