[ns] Segmentation fault in PacketQueue/Semantic
Dear everyone, I tried to do simulation with the semantic queue in ns2.26. I changed nothing in ns2 original code. I set PacketQueue/Semantic in the tcl script, but got the segmentation fault. By using gdb, i got the following report for error: Program received signal SIGSEGV, Segmentation fault. 0x08054564 in Scheduler::dispatch(Event*, double) () (gdb) bt #0 0x08054564 in Scheduler::dispatch(Event*, double) () #1 0x080544c9 in Scheduler::run() () #2 0x08054665 in Scheduler::command(int, char const* const*) () #3 0x081f28ea in TclClass::dispatch_cmd(void*, Tcl_Interp*, int, char**) () #4 0x081f63e2 in OTclDispatch (cd=0x855c080, in=0x83b2e90, argc=3, argv=0xbfffdf00) at otcl.c:420 #5 0x081fabeb in TclInvokeStringCommand () #6 0x08214d72 in TclExecuteByteCode () #7 0x081fb599 in Tcl_EvalObjEx () #8 0x08214f60 in TclExecuteByteCode () #9 0x081fb599 in Tcl_EvalObjEx () #10 0x082366e5 in TclObjInterpProc () #11 0x08236294 in TclProcInterpProc () #12 0x081f657e in OTclDispatch (cd=0x855c080, in=0x83b2e90, argc=2, argv=0xbfffe750) at otcl.c:463 #13 0x081fabeb in TclInvokeStringCommand () #14 0x08214d72 in TclExecuteByteCode () #15 0x081fb599 in Tcl_EvalObjEx () #16 0x082366e5 in TclObjInterpProc () #17 0x08236294 in TclProcInterpProc () #18 0x081f63e2 in OTclDispatch (cd=0x8559590, in=0x83b2e90, argc=2, argv=0xbfffee20) at otcl.c:420 #19 0x081fabeb in TclInvokeStringCommand () #20 0x0822fde8 in EvalObjv () #21 0x08230477 in Tcl_EvalEx () #22 0x08227ad2 in Tcl_EvalFile () #23 0x0822a5b0 in Tcl_Main () #24 0x0804e6ab in main () #25 0x42015967 in __libc_start_main () from /lib/i686/libc.so.6 Could anybody tell me where's the segmentation fault? Your help is highly appreciated, Min
[ns] How to use semantic queue in ns2?
Hi everyone, I tried to use PacketQueue/Semantic as the queue protocol in my simulation, but segmentation fault occurs. Does anyone use PacketQueue/Semantic before? Did you have the same problem? Thank you very much, Maggie
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 peoriodically and transfer the state to mac? Or check it in the MAC? If it's the latter, we still need to access ifq() in the mac.cc, right? thanks, Min On Wed, 6 Dec 2006 14:03:15 +0900 ghada [EMAIL PROTECTED] wrote: I think you can solve this problem if you check first if the queue is null or not before using length() function. - Original Message - From: M. Shen [EMAIL PROTECTED] To: ns-users@ISI.EDU 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_)-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.h:136 136 int length() { return pq_-length(); } /* number of pkts currently in Does any one know how to deal with this problem? Thank you very much, Min
[ns] How to aquire current queue length in MAC?
Dear all, In 802_11 MAC, when one packet is received, how to aquire the current queue length information, i.e. how many packets have already been in the buffer of this receiver? I completely don't know what to do, since I'm a ns beginner. Does anyone know this? Thank you very much, Maggie