Re: [ns] Could not schedule timer

2007-02-17 Thread Tarun Bansal

Scott,

 I also got the error in the same routine. The error surfaces when the
traffic increases a lot. Probably in that case it becomes difficult to
handle the increased number of timers.

If I change it to resched (as someone had suggested), then I start
getting segmentation fault.

If you come across some solution, please update me as well.

Tarun
http://bansal.tarun.googlepages.com/

On 2/17/07, Scott Ricketts [EMAIL PROTECTED] wrote:

 I am having the same problem (ns-2.30). The bad timer in my case is
 mhCS_, the carrier sense timer. It throws the error during the
 following call in SMAC::checkToSend() ...

 mhCS_.sched(CLKTICK2SEC(difs_) + cw);

 ...

 Tarun, can you investigate your code and try to find out when your
 error is getting thrown?

 Perhaps the author of this code might have some better intuition about
 the problem. Is it a bug in smac.cc, or am I doing something wrong? My
 code works fine when I replace Mac/SMAC with Mac for my MAC protocol
 -- but obviously I would prefer to use S-MAC.

 Thanks,
 Scott

 On 1/23/07, Tarun Bansal [EMAIL PROTECTED] wrote:
 
  I tried doing that...The error is coming from SMAC protocol.
  (I am simulating mobile wireless network with SMAC protocol using NS 2.29)
 
  SMAC is setting timer somewhere using sched and that gives the error.
  The error comes when timer is already scheduled and SMAC reschedules
  that.
 
  Anyone, who has faced this before?
  I would not like to play with SMAC code
 
  Regards
  Tarun
 
 
  On 1/23/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
   This query has been posted in past also but my search for the
   solutions was unsuccessful:
   
   When I run my NS script with heavy traffic, the execution sometimes
   stop in between giving the error as Couldn't schedule timer. I am
   also using my own timer for acknowledgement timeout.
   
   Does this refer to the internal timer or my own defined timer?
  
   It seems that this is the internal timer (common/timer-handler.cc), 
   unless you fprint the same text with your own timer. Make sure by e.g. 
   editing the line
  
   fprintf(stderr,Couldn't schedule timer);
  
   in common/timer-handler.cc to
  
   fprintf(stderr,Couldn't schedule timer from 
   timer-handler.cc);
  
   Then recompile ns-2, reinstall it, and run your tcl script. If the text 
   that ns-2 prints out matches your changes in common/timer-handler.cc, 
   then you know which timer this text refers to.
  
   How can I avoid this error?
  
   It seems that your ns-2 sets the timer to idle state somewhere. Try to 
   check where it does it.
  
   Tarun
  
   Regards,
   Filip
  
 
 





Re: [ns] node genration problem

2007-02-13 Thread Tarun Bansal

There seems to be a problem in your routing agent. Match your code
with that of DumbAgent (another routing protocol which does not do
anything): /ns/ns-allinone-2.30/ns-2.30/mobile/dumb-agent.*


Tarun Bansal
http://bansal.tarun.googlepages.com/


On 2/13/07, shams haq [EMAIL PROTECTED] wrote:



 - Forwarded Message 
 From: shams haq [EMAIL PROTECTED]
 To: ns-users@isi.edu
 Sent: Monday, February 12, 2007 10:38:05 AM
 Subject: tcl or routing agent problem

 hi all buddies i am stuck at a point and need immediate help if anybody can 
 do for me i have run script simple-wireless.tcl on my routing agent my 
 routing agent do nothing but i have construct structure for my agent. when i 
 ran make my object file has been made but when in simple-wireless.tcl, i use 
 my own routing agent it gives following errors plz help me out in this 
 situation thanx in advance


 num_nodes is set 2

 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl

 INITIALIZE THE LIST xListHead

 (_o17 cmd line 1)

 invoked from within

 _o17 cmd port-dmux _o26

 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 _o17 line 2)

 (SplitObject unknown line 2)

 invoked from within

 $agent port-dmux $dmux_

 (procedure _o14 line 11)

 (Node/MobileNode add-target-rtagent line 11)

 invoked from within

 $self add-target-rtagent $agent $port

 (procedure _o14 line 23)

 (Node/MobileNode add-target line 23)

 invoked from within

 $self add-target $agent $port

 (procedure _o14 line 15)

 (Node attach line 15)

 invoked from within

 $node attach $ragent [Node set rtagent_port_]

 (procedure _o3 line 71)

 (Simulator create-wireless-node line 71)

 invoked from within

 _o3 create-wireless-node

 (eval body line 1)

 invoked from within

 eval $self create-wireless-node $args

 (procedure _o3 line 14)

 (Simulator node line 14)

 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 ;# disable random motion

 }

 (file 
 /root/ns-allinone-2.28/ns-2.28/ns-tutorial/examples/simple-wireless.tcl 
 line 93)

 [EMAIL PROTECTED] ns-2.28]#




 regards;

 shams




 Now that's room service! Choose from over 150,000 hotels
 in 45,000 destinations on Yahoo! Travel to find your fit.






 
 Expecting? Get great news right away with email Auto-Check.
 Try the Yahoo! Mail Beta.
 http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html




[ns] Channel.h: Compilation error for Mac/Csma/Ca?

2007-01-24 Thread Tarun Bansal

I was trying to compile mac/mac-csma.cc and mac/mac-csma.h by making
relevant changes in the makefile. But it seems to give some problems.
After making changes, when I do make depend and Make, it gives the
following errors:

mac/mac-csma.cc: In member function 'virtual void MacCsma::send(Packet*)':
mac/mac-csma.cc:107: error: 'class Channel' has no member named 'txstop'
mac/mac-csma.cc:135: error: 'class Channel' has no member named 'contention'
mac/mac-csma.cc: In member function 'virtual void
MacCsma::backoff(Handler*, Packet*, double)':
mac/mac-csma.cc:148: error: 'class Channel' has no member named 'txstop'
mac/mac-csma.cc: In member function 'virtual void
MacCsma::endofContention(Packet*)':
mac/mac-csma.cc:163: error: 'class Channel' has no member named 'send'
mac/mac-csma.cc: In member function 'virtual void
MacCsmaCd::endofContention(Packet*)':
mac/mac-csma.cc:173: error: 'class Channel' has no member named 'collision'
mac/mac-csma.cc:174: error: 'class Channel' has no member named 'jam'
mac/mac-csma.cc: In member function 'virtual void MacCsmaCa::send(Packet*)':
mac/mac-csma.cc:185: error: 'class Channel' has no member named 'txstop'
mac/mac-csma.cc:191: error: 'class Channel' has no member named 'contention'
make: *** [mac/mac-csma.o] Error 1

When I looked through channel.h, I found that all those variables have
been commented.
Just want to know why those variables have been commented?

I am using NS2.30 on FC4 machine

Thanks
Tarun Bansal



Re: [ns] Could not schedule timer

2007-01-23 Thread Tarun Bansal

I tried doing that...The error is coming from SMAC protocol.
(I am simulating mobile wireless network with SMAC protocol using NS 2.29)

SMAC is setting timer somewhere using sched and that gives the error.
The error comes when timer is already scheduled and SMAC reschedules
that.

Anyone, who has faced this before?
I would not like to play with SMAC code

Regards
Tarun


On 1/23/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 This query has been posted in past also but my search for the
 solutions was unsuccessful:
 
 When I run my NS script with heavy traffic, the execution sometimes
 stop in between giving the error as Couldn't schedule timer. I am
 also using my own timer for acknowledgement timeout.
 
 Does this refer to the internal timer or my own defined timer?

 It seems that this is the internal timer (common/timer-handler.cc), unless 
 you fprint the same text with your own timer. Make sure by e.g. editing the 
 line

 fprintf(stderr,Couldn't schedule timer);

 in common/timer-handler.cc to

 fprintf(stderr,Couldn't schedule timer from 
 timer-handler.cc);

 Then recompile ns-2, reinstall it, and run your tcl script. If the text that 
 ns-2 prints out matches your changes in common/timer-handler.cc, then you 
 know which timer this text refers to.

 How can I avoid this error?

 It seems that your ns-2 sets the timer to idle state somewhere. Try to check 
 where it does it.

 Tarun

 Regards,
 Filip




Re: [ns] error while loading shared libraries: libpcap.so.0.6.2

2007-01-15 Thread Tarun Bansal


Search for
Problem: Things built OK but don't run because of missing shared libraries
on http://www.isi.edu/nsnam/ns/ns-problems.html

Regards
Tarun

On 1/15/07, zenith siea [EMAIL PROTECTED] wrote:




error while loading shared libraries: libpcap.so.0.6.2:

the error:
[EMAIL PROTECTED] ~]$ ns
ns: error while loading shared libraries: libpcap.so.0.6.2: cannot
open shared object file: No such file or directory

There is an error when i am trying to exec some ns simulation script.
I have just installed FedoraCore4 Linux with all packages, and then i
downloaded and installed the latest ns2.30 succesfully.
this error occured whenever i execute ns simulation:

[EMAIL PROTECTED] ~]$ ns
ns: error while loading shared libraries: libpcap.so.0.6.2: cannot
open shared object file: No such file or directory
[EMAIL PROTECTED] ~]$ ns example.tcl
ns: error while loading shared libraries: libpcap.so.0.6.2: cannot
open shared object file: No such file or directory

I have tried to use another old version ns2.26 in this FC4 system, the
same error comes out too. It seems that its not because ns but FC4.
I have googled this error, comes out only one result, it is just the
same as my error, is is in this ns maillist, but the only reply to
that mail is very simple, only one
url(http://gamma.isi.edu/pipermail/ns-users/attachments/20040221/e48d6fb7/attachment.html)
is given as the answer, but, I just can not conncet to this url!
so, i have to do it my self, i tried to do some trick by doing some ln:

[EMAIL PROTECTED] ~]$ ns
ns: error while loading shared libraries: libpcap.so.0.6.2: cannot
open shared object file: No such file or directory
[EMAIL PROTECTED] ~]$ whereis libpcap.*
libpcap: /usr/lib/libpcap.a /usr/lib/libpcap.so
[EMAIL PROTECTED] ~]$ cd /usr/lib/
[EMAIL PROTECTED] lib]$ ls -l -s -a libpcap.*
224 -rw-r--r--  1 root root 220660 2005-04-28  libpcap.a
  4 lrwxrwxrwx  1 root root 16  1月  6 11:53 libpcap.so - libpcap.so.0.8.3
  4 lrwxrwxrwx  1 root root 16  1月  6 11:53 libpcap.so.0 - libpcap.so.0.8.3
  4 lrwxrwxrwx  1 root root 16  1月  6 11:53 libpcap.so.0.8 -
libpcap.so.0.8.3
160 -rwxr-xr-x  1 root root 152240 2005-04-28  libpcap.so.0.8.3
160 -rwxr-xr-x  1 root root 152240  1月 11 16:13 libpcap.so.0.8.3.backup
[EMAIL PROTECTED] lib]$ ln -s libpcap.so.0.8.3 libpcap.so.0.6.2
ln: 正在创建连至'libpcap.so.0.8.3'的符号链接'libpcap.so.0.6.2': 权限不够
[EMAIL PROTECTED] lib]$ sudo ln -s libpcap.so.0.8.3 libpcap.so.0.6.2
Password:
[EMAIL PROTECTED] lib]$ ls -l -s -a libpcap.*
224 -rw-r--r--  1 root root 220660 2005-04-28  libpcap.a
  4 lrwxrwxrwx  1 root root 16  1月  6 11:53 libpcap.so - libpcap.so.0.8.3
  4 lrwxrwxrwx  1 root root 16  1月  6 11:53 libpcap.so.0 - libpcap.so.0.8.3
  4 lrwxrwxrwx  1 root root 16  1月 11 17:11 libpcap.so.0.6.2 -
libpcap.so.0.8.3
  4 lrwxrwxrwx  1 root root 16  1月  6 11:53 libpcap.so.0.8 -
libpcap.so.0.8.3
160 -rwxr-xr-x  1 root root 152240 2005-04-28  libpcap.so.0.8.3
160 -rwxr-xr-x  1 root root 152240  1月 11 16:13 libpcap.so.0.8.3.backup
[EMAIL PROTECTED] lib]$ ns
ns: /usr/lib/libstdc++.so.5: version `CXXABI_1.2' not found (required by ns)
ns: /usr/lib/libstdc++.so.5: version `GLIBCPP_3.2' not found (required by ns)
[EMAIL PROTECTED] lib]$

So, some more errors comes out, it is not a simple puzzle, and i do
not know what to do the next step.
Will ns be ok in FC4 if i make ns with out LBNL packet capture library?
I have read part viii emulation chapter 39 of the ns manual, also i
have read configure file and make file, i find no configure option to
disable emulation function of ns, what should i do?

How to let ns run in my FC4?








[ns] Broadcasting user defined packets

2007-01-02 Thread Tarun Bansal

Hi All,

 I was playing with the ping packet tutorial by Marc Greis. I want to
send ping packets over a broadcast address in wireless media. I was
able to port ping program to wireless media.

My question is how do I set the destination  address as broadcast
address. In mailing list, I found that the solution is:

hdr_ip* hdrip = (hdr_ip*)pkt-access(off_ip_);
hdrip-daddr() = IP_BROADCAST;

hdr_cmn* cmh = (hdr_cmn*)HDR_CMN(pkt);
   cmh-direction() = hdr_cmn::DOWN;
cmh-next_hop_ = IP_BROADCAST;
cmh-addr_type_ = NS_AF_INET;

However since PING is an user defined packet, there won't be an IP
part of it. So how do we set the next hop information so as to make it
as a broadcast packet?

Tarun