Multimedia & Internetworking Research Group
University of Oreg
on





Software Release



Source code of PRIME is written in C++.  The PRIME.tar.gz contains the source code and executable binary. Upon uncompressing and unzipping the file you will get the following directories:
    • PRIME : Contains source and executable files for prime.
    • TCL: Contains sample tcl files generating the underlay topology for NS-2, the required input files and a README.tex that explains how to run the code.
To compile and run the PRIME code with NS-2 you should modify the NS-2 as follows:

  • common/ns-process.h:
    • Under "// Application-level data unit types" in "enum AppDataType {" add
       
                // PALS ADU
                 SPAL_DATA,
                 RPAL_DATA,
                //PRIME ADU
                 RPRIME_Boot,
                 RPRIME_Sig, 
                 RPAL_DATA3,
                 SPRIME_MSG,


    • In "class Process : public TclObject {" under "public:"  add

                virtual void process_udp_data(int size, AppData* data);
                virtual void process_rap_data(int size, AppData* data);
                virtual AppData* get_prime_data(int& size, int tfrcaddr);


  • apps/udp.cc:
    • In function "UdpAgent::recv(Packet* pkt, Handler*)" replace

                app_->process_data(h->size(), pkt->userdata()) 
                by
                app_->process_udp_data(h->size(), pkt->userdata())


  • rap/rap.cc:
    • In function "RapAgent::recv(Packet* pkt, Handler*)" replace

                app_->process_data(pkt->datalen(), pkt->userdata())        
                by
                app_->process_rap_data(hdr->seqno(), pkt->userdata())


    • In "void RapAgent::IpgTimeout()" after "if (app_) {" replace

                AppData* data = app_->get_data(nbytes) by
                AppData* data = app_->get_prime_data(nbytes,this->daddr())


  • Makefile:
    • Add the location of binary of RPRIME.o and SPRIME.o under OBJ_CC section.