I have tried to use OLSR in 2.29 but I cant. I have followed this steps : 1. untar the package into your ns source tree directory you should have done this already if you are reading this or get it from pf.itd.nrl.navy.mil 2. Change your makefile.in to include the nrlolsr code should be something like... add "nrlolsr/nrlolsr.o nrlolsr/nbr_queue.o" in the OBJ_CC = section if you have mdp and debug.o already then skip to step 3 (I am currently working on removing the mdp debug dependancies but for now) add "OBJ_NRLOLSR_CPP = nrlolsr/debug.o" add "$(OBJ_NRLOLSR_CPP:.o=.cpp)" to the SRC = section add "$(OBJ_NRLOLSR_CPP)" to the OBJ = section in your debug.h file that you downloaded add add "#define MDP_DEBUG" before the #ifdef MDP_DEBUG 3. Run configure to recreate your Makefile with the added source info 4. Change your pakcet.h file to include info about nrlolsr add "#define HDR_NRLOLSR(p) (hdr_nrlolsr::access(p))" add "PT_NRLOLSR," in the enum packet_t section add "name_[PT_NRLOLSR]= "NRLOLSR";" in the p_info() section 5a. Change your cmu-trace.h file to include method info about nrlolsr by adding add "void format_nrlolsr (Packet *p, int offset);" 5b. Change your cmu-trace.cc file to include tracing info about nrlolsr add "#include <nrlolsr/nrlolsr_packet.h>" add " void CMUTrace::format_nrlolsr(Packet *p, int offset) { struct hdr_nrlolsr_message *sh; struct hdr_nrlolsr_main *mh = HDR_NRLOLSR(p); struct hdr_cmn *ch = HDR_CMN(p); struct hdr_ip *ih = HDR_IP(p); struct hdr_nrlolsr_hello *asymlink,*symlink,*mprlink, *hdr_hello; struct hdr_nrlolsr_tc *hdr_tc; //this is empty for as of right now int local_offset=sizeof(struct hdr_nrlolsr_main); sh=HDR_NRLOLSR_SUB(p,local_offset); switch(sh->ms_type){ case NRLOLSR_HELLO: sprintf(wrk_ + offset,"[%d %d %d %d %d %d](HELLO)", sh->ms_oAddr, sh->ms_size, sh->ms_ttl, sh->ms_hopc, sh->ms_type, sh->ms_seqno); break; case NRLOLSR_TC_MESSAGE: local_offset+=sizeof(struct hdr_nrlolsr_message); hdr_tc=HDR_NRLOLSR_TC(p,local_offset); sprintf(wrk_ + offset,"[%d %d %d %d %d %d [%d]] (TC)", sh->ms_oAddr, sh->ms_size, sh->ms_ttl, sh->ms_hopc, sh->ms_type, sh->ms_seqno, hdr_tc->mssn); break; default: #ifdef WIN32 fprintf(stderr, "CMUTrace::format_aodv: invalid NRLOLSR packet type\n"); #else fprintf(stderr, "%s: invalid NRLOLSR packet type\n", __FUNCTION__); #endif abort(); } } " to the source add the case " case PT_NRLOLSR: format_nrlolsr(p,offset); break; " to the switch statement in the format method (if someone knows how to make a patch file to make these changes please contact me) 6. Change your tcl/lib/ns-lib.tcl file starting from your ns directory by adding first add the following to the $routingAgent_ case statement (line 591) add" NRLOLSR { set ragent [$self create-nrlolsr-agent $node] } " then add" Simulator instproc create-nrlolsr-agent { node } { # Creating nrlolsr routing agent set ragent [new Agent/NRLOLSR [$node id]] $self at 0.0 "$ragent start" ;# start BEACON/HELLO Messages $node set ragent_ $ragent return $ragent } " along with the other Simulator statments
7. Edit your priqueue.cc file to give preferenct to NRLOLSR add "case PT_NRLOLSR:" to the switch statement in the if(Prefer_Routing_Protocols) conditional 8. Compile the code by typing make in your ns directory It compiles well, but it does not work. I get this error (_o14 cmd line 1) invoked from within "_o14 cmd addr" invoked from within "catch "$self cmd $args" ret" invoked from within "if [catch "$self cmd $args" ret] { set cls [$self info class] global errorInfo set savedInfo $errorInfo error "error when calling class $cls: $args" $..." (procedure "_o14" line 2) (SplitObject unknown line 2) invoked from within "_o14 addr" ("eval" body line 1) invoked from within "eval $node addr $args" ("default" arm line 2) invoked from within "switch -exact $routingAgent_ { DSDV { set ragent [$self create-dsdv-agent $node] } DSR { $self at 0.0 "$node start-dsr" } AODV { set ragent [$self cre..." (procedure "_o3" line 11) (Simulator create-wireless-node line 11) invoked from within "_o3 create-wireless-node" ("eval" body line 1) invoked from within "eval $self create-wireless-node $args" (procedure "_o3" line 23) (Simulator node line 23) invoked from within "$ns_ node" ("for" body line 2) invoked from within "for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# dis..." (file "dsr.tcl" line 101) What the matter?? In nrlolsr directory I have this files readme nrlolsr.h nrlolsr.cc nrlolsr_packet.h nbr_queue.h nbr_queue.cc sysdefs.h debug.h debug.cpp (you may or may not have these alread from mdp ns source) basicmhop.tcl (tcl test script) ====Files that are included but may be removed soon==== nrlolsr_rqueue.h nrlolsr_rqueue.cc nrlolsr_rtable.h nrlolsr_rtable.cc Thanks --------------------------------- Sé un Mejor Amante del Cine ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!. --------------------------------- Sé un Mejor Amante del Cine ¿Quieres saber cómo? ¡Deja que otras personas te ayuden!.