When having problems, one should always do
"make clean; make depend; make" > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Jon de Andrés > Sent: segunda-feira, 19 de Dezembro de 2005 1:15 > To: ns-users@ISI.EDU > Subject: Re: [ns] [NS] Problem to access the neighbors list of mobile > nodes > > > I've never used 'make depend' in order to compile ns2. The error you paste > don't have any relation with aodv or the nb_delay atribute. > > I used the nb_delay attitrbute (double) in the neighbour class, in the > aodv_rtable.h file. Because you don't use it, you must delete this line: > > tcl.evalf("puts \"\t%d\t%f\"",nb->nb_addr, nb->nb_delay); > > or delete 'nb->nb_delay' and '%f' in it. > > Bye > > El Domingo 18 Diciembre 2005 16:24, olivier berho escribió: > > Hi, > > > > I tried the following code in order to access the neighbords list of a > node > > using AODV. > > > > > > > /************************************************************************* > * > >********************/ Code I used : > > > > Olivier, > > > > really i don't see anywhere the link between the neighbour list in C++ > and > > the > > variable neighbour_ you say. I'm making a job with AODV and QoS routing, > > and i've made a Tcl command for AODV agent to show its neighbour list > and > > their delays between the agent. > > > > I post it for you: > > > > if(strcmp(argv[1], "show-table")) { > > AODV_Neighbor *nb = nbhead.lh_first; > > > > tcl.evalf("puts \"\nDelay Table of Node: %d \"", index); > > tcl.evalf("puts \"\tNode\tDelay\""); > > for(;nb;nb=nb->nb_link.le_next ){ > > tcl.evalf("puts \"\t%d\t%f\"",nb->nb_addr, nb->nb_delay); > > } > > return TCL_OK; > > } > > You must paste it or something similar in the command function in the > AODV > > agent. However, the nb_delay attribute you can see should be deleted or > > implemented in the aodv_rtable. > > > > I hope this could help you. > > > > Bye Olivier. > > > > > /************************************************************************* > * > >****************/ > > > > > > Then when I tried to recompile ns, I made "make depend" and then "make" > in > > the ns directory and I got the following error : > > > > > /************************************************************************* > * > >****************/ error I got : > > > > In file included from ../../../config.h:54, > > from logparse.h:7, > > from tr-stat.cc:24: > > ../../../autoconf.h:85: error: namespace `CPP_NAMESPACE' undeclared > > > > > /************************************************************************* > * > >****************/ > > > > > > Is it because of this : "However, the nb_delay attribute you can see > should > > be deleted or > > implemented in the aodv_rtable" that I did not understand ? > > > > I really wish someone could explain me why I got that error and what I > > should do to correct it. > > > > Thanks a lot, > > > > Olivier. > > > > On 12/10/05, Olivier Berho <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > > > I am working on a project about communication between mobile nodes > and > > > I am nooby in tcl and NS2. > > > My first part is about sending packets to each nearly neighbors of a > > > node. > > > > > > I know that there is a variable "neighbors_" which contains the > > > neighbors of each node but I cannot access these informations. First > > > because I have some problems to access the list using tcl and second > > > because The list seems to be empty when the topology of my network is > > > created. > > > > > > I am using the AODV routing protocol which should update itself the > > > variable of the neighbors but I don't know how access it. > > > > > > Thanks a lot for help, > > > > > > Olivier. > > > > > > > > > P.S : I am a French student,and I apologize for the mistakes in my > > > English. > > -- > Jon de Andrés Frías > GPG: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x4E856203