[ns] From mac-802_11, how to access member function in wireless-phy

2008-07-15 Thread jj niu

Hi, all.
   
  From mac-802_11, I want to call node_sleep()- a function in wireless-phy. The 
variable netif_ or downtartget_ is used as pointer to the object of 
wireless-phy. But the compiler always tell me that the node_sleep() function 
does not exit.
   
  Why?
   
  I need your help. Any suggestion will be welcom.
   
  Vandlu

   
-
 雅虎邮箱,您的终生邮箱!

[ns] Error bailing in Tcl::eval

2008-07-15 Thread FNKK

Dear ns users,

I got a problem when using ns2 simulator
When I excute ns MyCode.tcl for a while
It stopped and leave an error message bailing in Tcl::eval
The error message seems to be written in tclcl-1.19/Tcl.cc as follows

void Tcl::eval() {
  char* p = bp_;
  bp_ = p + strlen(p) + 1;
  /*XXX*/
  if (bp_ = buffer_[1024]) {
fprintf(stderr, bailing in Tcl::eval\n);
assert(0);
exit(1);
  }
  eval(p);
  bp_ = p;
}

It's weird that I never use eval command in my code.
My code is a wireless application written in Tcl and there are about
200 nodes in it.
When I decrease the number of node to about 10~50, this error
sometimes disappeared .
The version of ns2 is 2.33
How should I solve this problem?

Thanks!



[ns] TTDD simulation code

2008-07-15 Thread Pankaj Gupta

Hello all,

I am looking for simulation code of Two Tier Data Dissemination in NS2.
Can some one mail code to me or suggest some pointers.
Any help would be appreciated.

Thanks,
Pankaj



Re: [ns] packet drop and delay through tcl script

2008-07-15 Thread Saqib Ilyas

You may find some useful scripts on www.geocities.com/shezy22. He did a
Masters Thesis and wrote some scripts to do exactly that.

On Thu, Jul 10, 2008 at 9:42 PM, VijayaLaxmi Madasu [EMAIL PROTECTED]
wrote:


 Hi,
 how to calculate the delay and the packet loss rate through tcl script in
 wireless networks?

 Thanks in advance
  vijaya




-- 
Muhammad Saqib Ilyas
PhD Student, Computer Science and Engineering
Lahore University of Management Sciences


[ns] Simulation halting after ARP request in Wifi, ns3

2008-07-15 Thread Amit Soni

Hello ns users,

I am simulating a small Adhoc-wifi network of 4 nodes in ns3. Two nodes
are OnOff sources and other two of them are OnOff sinks. I am starting two
source nodes at the same time. The problem I am facing is that, after ARP
request the simulation just halts, not even a single data packet is sent.
Following is my script:

#include iostream
#include fstream
#include ns3/core-module.h
#include ns3/common-module.h
#include ns3/node-module.h
#include ns3/helper-module.h
#include ns3/mobility-module.h
#include ns3/contrib-module.h
#include ns3/wifi-module.h

using namespace ns3;
int main (int argc, char *argv[])
{
  Packet::EnableMetadata ();
  Config::SetDefault (ns3::WifiRemoteStationManager::RtsCtsThreshold,
StringValue (0));   // enable rts cts all the time.

  WifiHelper wifi;
  MobilityHelper mobility;
  NodeContainer stas;
  NetDeviceContainer staDevs;
  InternetStackHelper stack;

  stas.Create (4);

  PtrWifiChannel channel = CreateObjectWifiChannel ();
  channel-SetPropagationDelayModel
(CreateObjectConstantSpeedPropagationDelayModel ());
  PtrLogDistancePropagationLossModel log =
CreateObjectLogDistancePropagationLossModel ();
  log-SetReferenceModel (CreateObjectFriisPropagationLossModel ());
  channel-SetPropagationLossModel (log);

  wifi.SetPhy (ns3::WifiPhy);
  wifi.SetRemoteStationManager (ns3::ArfWifiManager);
  wifi.SetMac (ns3::AdhocWifiMac);

  mobility.SetPositionAllocator (ns3::GridPositionAllocator,

MinX, DoubleValue (0.0),

MinY, DoubleValue (0.0),

DeltaX, DoubleValue (5.0),

DeltaY, DoubleValue (10.0),

GridWidth, UintegerValue (3),

LayoutType, StringValue (RowFirst));

  mobility.SetMobilityModel (ns3::StaticMobilityModel);
  mobility.Install (stas);

  staDevs = wifi.Install (stas, channel);
  stack.Install (stas);
  Ipv4AddressHelper ipv;
  ipv.SetBase (10.1.1.0, 255.255.255.0);
  Ipv4InterfaceContainer ipvcontain = ipv.Assign (staDevs);

  OnOffHelper onoff1 (ns3::UdpSocketFactory, InetSocketAddress
(ipvcontain.GetAddress (1), 9));
  onoff1.SetAttribute (OnTime, RandomVariableValue
(ConstantVariable
(10)));
  onoff1.SetAttribute (OffTime, RandomVariableValue
(ConstantVariable
(0)));
  ApplicationContainer apps1 = onoff1.Install (stas.Get (0));
  apps1.Start (Seconds (0.5));
  apps1.Stop (Seconds (10.0));
  PacketSinkHelper sink (ns3::UdpSocketFactory, Address
(InetSocketAddress (Ipv4Address::GetAny (), 9)));
  sink.Install (stas.Get (1));
  onoff1.SetAttribute (Remote, AddressValue (InetSocketAddress
(ipvcontain.GetAddress (3), 9)));
  ApplicationContainer apps2 = onoff1.Install (stas.Get (2));
  sink.Install (stas.Get (3));
  apps2.Start(Seconds (0.5));
  apps2.Stop (Seconds (10.0));

  std::ofstream ascii(out.tr);
  WifiHelper::EnableAsciiAll(ascii);

  Simulator::Stop (Seconds (10.0));
  Simulator::Run ();
  Simulator::Destroy ();
  return 0;
}


Following is content of out.tr after simulation:

+ 508192000ns /NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Phy/Tx
ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0, MoreData=0
Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:01,
BSSID=ff:ff:ff:ff:ff:ff, FragNumber=0, SeqNumber=0) ns3::LlcSnapHeader
(type 0x806) ns3::ArpHeader (request source mac: 00-06-00:00:00:00:00:01
source ipv4: 10.1.1.1 dest ipv4: 10.1.1.2) ns3::WifiMacTrailer ()
+ 508192000ns /NodeList/2/DeviceList/0/$ns3::WifiNetDevice/Phy/Tx
ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0, MoreData=0
Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:03,
BSSID=ff:ff:ff:ff:ff:ff, FragNumber=0, SeqNumber=0) ns3::LlcSnapHeader
(type 0x806) ns3::ArpHeader (request source mac: 00-06-00:00:00:00:00:03
source ipv4: 10.1.1.3 dest ipv4: 10.1.1.4) ns3::WifiMacTrailer ()
r 508304033ns /NodeList/3/DeviceList/0/$ns3::WifiNetDevice/Phy/RxOk
ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0, MoreData=0
Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:01,
BSSID=ff:ff:ff:ff:ff:ff, FragNumber=0, SeqNumber=0) ns3::LlcSnapHeader
(type 0x806) ns3::ArpHeader (request source mac: 00-06-00:00:00:00:00:01
source ipv4: 10.1.1.1 dest ipv4: 10.1.1.2) ns3::WifiMacTrailer ()


It appears that the ARP request does collide (I dont' know why?) since the
node 3 is receiveing the ARP request sent by node 0 for node 2. But
simulation doesn't carry on. This is the whole trace file that I have
shown.
Please help me in simulating more than 1 application in wifi ns3 because
any example does not show us how to do so.
Any help would be greatly appreciated.

Thank you,
BR, Amit Soni



Re: [ns] Ns-users Digest, Vol 55, Issue 9 NAM problem(valentina Timcenko)

2008-07-15 Thread gede mangku sarjana

ok...i try help you...may be you dont right configure the PATH...so please
check them or you can add in bashcr file in /etc directory like in profile
file in /etc...so just that...i hope can help you

2008/7/10 [EMAIL PROTECTED]:

 Send Ns-users mailing list submissions to
ns-users@isi.edu

 To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.isi.edu/mailman/listinfo/ns-users
 or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

 You can reach the person managing the list at
[EMAIL PROTECTED]

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Ns-users digest...


 Today's Topics:

   1. NAM problem (Valentina Timcenko)
   2. Agregation of Multiple Poisson Sources (Alessandro Vivas)


 --

 Message: 1
 Date: Wed, 9 Jul 2008 03:18:46 -0700 (PDT)
 From: Valentina Timcenko [EMAIL PROTECTED]
 Subject: [ns] NAM problem
 To: ns-users@ISI.EDU
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=iso-8859-1

 Please,

 Could you be so kind to help me resolve the problem with NAM.

 After starting the simulation of varios scripts I get the message of this
 form:

 invalid command name n
 ??? while executing
 n -t * -s 0? -x 0 -y 0 -Z 0 -z 100? -v circle -c black
 ??? (file ceda_mob_2.nam line 1)

 I am using ns-allinone-ns2.32 (nam version 1.13) on Linux Fedora 8, kernel
 2.6.

 Thank you very much in advance...

 Val







 --

 Message: 2
 Date: Wed, 9 Jul 2008 11:00:34 -0300
 From: Alessandro Vivas [EMAIL PROTECTED]
 Subject: [ns] Agregation of Multiple Poisson Sources
 To: ns-users@ISI.EDU
 Message-ID:
[EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1

 Hi, I'm working with aggregation of multiple Poisson Sources
 (heterogeneous sources) in Network Simulator in a queue FiFO with 2
 nodes. I would like to know what is the expression (formula) to
 calculate the time delay of packet transit in one link (transit time +
 enqueue time).

 Thanks,

 Alessandro Vivas Andrade
 --
 aita pea pea



 --

 ___
 Ns-users mailing list
 Ns-users@isi.edu
 http://mailman.isi.edu/mailman/listinfo/ns-users


 End of Ns-users Digest, Vol 55, Issue 9
 ***



[ns] ZigBee routing simulation

2008-07-15 Thread Ning Wen

Hi All,

I am new to ns2 and I am working on a project related to
ZigBee routing. After searching the web, I found Jianliang Zheng had
developed an IEEE 802.15.4 module for ns2 
(http://ees2cy.engr.ccny.cuny.edu/zheng/pub/).
He also mentioned that ZigBee routing is now maintained by ZigBee NWK
WG and no longer included in this release. But I cannot find the
implementation by ZigBee WG. 

Can anyone give me some advise on if there is any public available 
implementation of ZigBee routing? 

Thanks in advance!
Best,
Ning



  


[ns] ns-2 and multicell

2008-07-15 Thread spiros kar

Does NS-2 suport the frequency reuse of Wimax model? I don't care about the 
version only if it is possible. If that so how can I do that? Because I thing 
that we only initialize one frequency for all the BS in the bigining. Thanks



  
___ 
Χρησιμοποιείτε Yahoo!; 
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail 
διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών 
μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr 


[ns] how to simulate wireless mesh network in ns-2.31

2008-07-15 Thread shweta s k



hi ,
   to all please tell me how to simulate wireless mesh networks.
  thank u...
 
 


  


Re: [ns] Simulation halting after ARP request in Wifi, ns3

2008-07-15 Thread Tom Henderson

Amit Soni wrote:
 Hello ns users,
 
 I am simulating a small Adhoc-wifi network of 4 nodes in ns3. Two nodes
 are OnOff sources and other two of them are OnOff sinks. I am starting two
 source nodes at the same time. The problem I am facing is that, after ARP
 request the simulation just halts, not even a single data packet is sent.
 Following is my script:
 
 #include iostream
 #include fstream
 #include ns3/core-module.h
 #include ns3/common-module.h
 #include ns3/node-module.h
 #include ns3/helper-module.h
 #include ns3/mobility-module.h
 #include ns3/contrib-module.h
 #include ns3/wifi-module.h
 
 using namespace ns3;
 int main (int argc, char *argv[])
 {
   Packet::EnableMetadata ();
   Config::SetDefault (ns3::WifiRemoteStationManager::RtsCtsThreshold,
 StringValue (0));   // enable rts cts all the time.
 
   WifiHelper wifi;
   MobilityHelper mobility;
   NodeContainer stas;
   NetDeviceContainer staDevs;
   InternetStackHelper stack;
 
   stas.Create (4);
 
   PtrWifiChannel channel = CreateObjectWifiChannel ();
   channel-SetPropagationDelayModel
 (CreateObjectConstantSpeedPropagationDelayModel ());
   PtrLogDistancePropagationLossModel log =
 CreateObjectLogDistancePropagationLossModel ();
   log-SetReferenceModel (CreateObjectFriisPropagationLossModel ());
   channel-SetPropagationLossModel (log);
 
   wifi.SetPhy (ns3::WifiPhy);
   wifi.SetRemoteStationManager (ns3::ArfWifiManager);
   wifi.SetMac (ns3::AdhocWifiMac);
 
   mobility.SetPositionAllocator (ns3::GridPositionAllocator,
 
 MinX, DoubleValue (0.0),
 
 MinY, DoubleValue (0.0),
 
 DeltaX, DoubleValue (5.0),
 
 DeltaY, DoubleValue (10.0),
 
 GridWidth, UintegerValue (3),
 
 LayoutType, StringValue (RowFirst));
 
   mobility.SetMobilityModel (ns3::StaticMobilityModel);
   mobility.Install (stas);
 
   staDevs = wifi.Install (stas, channel);
   stack.Install (stas);
   Ipv4AddressHelper ipv;
   ipv.SetBase (10.1.1.0, 255.255.255.0);
   Ipv4InterfaceContainer ipvcontain = ipv.Assign (staDevs);
 
   OnOffHelper onoff1 (ns3::UdpSocketFactory, InetSocketAddress
 (ipvcontain.GetAddress (1), 9));
   onoff1.SetAttribute (OnTime, RandomVariableValue
 (ConstantVariable
 (10)));
   onoff1.SetAttribute (OffTime, RandomVariableValue
 (ConstantVariable
 (0)));
   ApplicationContainer apps1 = onoff1.Install (stas.Get (0));
   apps1.Start (Seconds (0.5));
   apps1.Stop (Seconds (10.0));
   PacketSinkHelper sink (ns3::UdpSocketFactory, Address
 (InetSocketAddress (Ipv4Address::GetAny (), 9)));
   sink.Install (stas.Get (1));
   onoff1.SetAttribute (Remote, AddressValue (InetSocketAddress
 (ipvcontain.GetAddress (3), 9)));
   ApplicationContainer apps2 = onoff1.Install (stas.Get (2));
   sink.Install (stas.Get (3));
   apps2.Start(Seconds (0.5));
   apps2.Stop (Seconds (10.0));
 
   std::ofstream ascii(out.tr);
   WifiHelper::EnableAsciiAll(ascii);
 
   Simulator::Stop (Seconds (10.0));
   Simulator::Run ();
   Simulator::Destroy ();
   return 0;
 }
 
 
 Following is content of out.tr after simulation:
 
 + 508192000ns /NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Phy/Tx
 ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0, MoreData=0
 Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:01,
 BSSID=ff:ff:ff:ff:ff:ff, FragNumber=0, SeqNumber=0) ns3::LlcSnapHeader
 (type 0x806) ns3::ArpHeader (request source mac: 00-06-00:00:00:00:00:01
 source ipv4: 10.1.1.1 dest ipv4: 10.1.1.2) ns3::WifiMacTrailer ()
 + 508192000ns /NodeList/2/DeviceList/0/$ns3::WifiNetDevice/Phy/Tx
 ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0, MoreData=0
 Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:03,
 BSSID=ff:ff:ff:ff:ff:ff, FragNumber=0, SeqNumber=0) ns3::LlcSnapHeader
 (type 0x806) ns3::ArpHeader (request source mac: 00-06-00:00:00:00:00:03
 source ipv4: 10.1.1.3 dest ipv4: 10.1.1.4) ns3::WifiMacTrailer ()
 r 508304033ns /NodeList/3/DeviceList/0/$ns3::WifiNetDevice/Phy/RxOk
 ns3::WifiMacHeader (DATA ToDS=0, FromDS=0, MoreFrag=0, Retry=0, MoreData=0
 Duration/ID=0usDA=ff:ff:ff:ff:ff:ff, SA=00:00:00:00:00:01,
 BSSID=ff:ff:ff:ff:ff:ff, FragNumber=0, SeqNumber=0) ns3::LlcSnapHeader
 (type 0x806) ns3::ArpHeader (request source mac: 00-06-00:00:00:00:00:01
 source ipv4: 10.1.1.1 dest ipv4: 10.1.1.2) ns3::WifiMacTrailer ()
 
 
 It appears that the ARP request does collide (I dont' know why?) since the
 node 3 is receiveing the ARP request sent by node 0 for node 2. But
 simulation doesn't carry on. This is the whole trace file that I have
 shown.
 Please help me in simulating more than 1 application in wifi ns3 because
 any example does not show us how to do so.
 Any help would be greatly appreciated.
 
 Thank you,
 BR, Amit Soni
 
 

Amit,
I'll cross-post this to ns-3-users list as well; please do any
follow-ups on the ns-3-users list only.

I had a quick look at your script tonight.  First thing that I did was
to try to localize the problem.  I