Hi guys,
I wanna to get the current queue length in mac-802_11.cc. Actually, I
followed the instruction on website
http://mailman.isi.edu/pipermail/ns-users/2003-January/028599.html,
which said that we need to add "ifq_ =
(Queue*)TclObject::lookup(argv[2]);" in ll.cc and add "else
if(strcmp(argv[
Dear guys,
I tried to access queue length in MAC. So I wrote
int pkt_num = ((LL *)uptarget_)->ifq()->length();
When I run the simulation us gdb, segmentation fault occurs. I shows
that
Program received signal SIGSEGV, Segmentation fault.
0x080c3ad4 in Queue::length() (this=0x0) at queue/queue
TECTED]>
> To:
> Sent: Wednesday, December 06, 2006 12:10 PM
> Subject: Re: [ns] accessing queue length in 802.11 MAC
>
>
> >
> > Dear guys,
> >
> > I tried to access queue length in MAC. So I wrote
> > int pkt_num = ((LL *)uptarget_)-&g
> I tried to access queue length in MAC. So I wrote
> int pkt_num = ((LL *)uptarget_)->ifq()->length();
>
> When I run the simulation us gdb, segmentation fault occurs. I shows
> that
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x080c3ad4 in Queue::length() (this=0x0) at queue
t: quarta-feira, 6 de Dezembro de 2006 14:56
> To: ghada; ns-users@ISI.EDU
> Subject: Re: [ns] accessing queue length in 802.11 MAC
>
>
> Dear ghada,
>
> Thank you very much for your reply. But how to check if the queue is
> null or not? Should I do it in the queue.cc pe
> Do you know why ((LL *)uptarget_)->ifq() returns a null pointer?
It means some part of the code could / should initialize that pointer, and
it is not being done.
Study the ns2 manual on the chapter of mobile nodes to try to find out whats
going on with these pointers - I don't know the C++ code
Hi, anyone as tested this method?
I've insert following code in mac-802_11.cc in recvDATA() but i've
segmentation fault problem...why if i test if the pointer is non-null?
int pkt_in_q = 0;
//Thesis
if ( ((LL *)uptarget_)->ifq()){
//code if non-null