Questions tagged [ns-3]

ns-3 (Network Simulator 3) is a event driven simulator to model different types of networks. It is used extensively in networking research.

ns-3 (Network Simulator 3) is a event driven simulator to model different types of networks. It is used extensively in networking research. It supports simulation scripts in python and C++.

Homepage of ns-3 project

436 questions
27
votes
2 answers

what if notify() is called before wait()?

I have a situation where a notify() 'can' be called before a wait(). I am trying to make a simulator to schedule its next event when I 'notify' him by sending him messages. So I have devised a wait->notify->scedule chain void Broker::pause() { …
rahman
  • 4,820
  • 16
  • 52
  • 86
22
votes
3 answers

Ubuntu, remove network TAP interface

I'm creating a network interface via a program in order to build a bridge between a simulated network (NS-3) and the real Linux host. So when the "bridged" node receive a packet in NS-3, the real Linux host receive the packet. But when I run the…
user2561112
  • 221
  • 1
  • 2
  • 3
15
votes
3 answers

Converting a string to uint8_t array in C++

I want an std::string object (such as a name) to a uint8_t array in C++. The function reinterpret_cast rejects my string. And since I'm coding using NS-3, some warnings are being interpreted as errors.
Carlo
  • 323
  • 1
  • 2
  • 13
7
votes
3 answers

How to setup CLion to use waf as build system

I am trying to configure my Intellij Clion IDE for working with ns-3. Since ns-3 is using waf, it is more tricky than i thought and would be really happy to hear any advice
6
votes
1 answer

Choosing between OMNET++ or NS3

Me and my friend are going to start a project. We are going to simulate basic communication between a server and a client. We have a pseudo code that we are going to implement. Using this communication we are going to try to detect failures in…
Timo Cengiz
  • 3,367
  • 4
  • 23
  • 45
5
votes
1 answer

g++ fatal error: killed signal terminated program cc1plus when trying to install NS3 in ubuntu

I'm trying to install ns3 version 3.32 in my ubuntu 20.04 LTS (using oracle virtualbox). I used the following commands: sudo apt update sudo apt install build-essential autoconf automake libxmu-dev python3-pygraphviz cvs mercurial bzr git cmake…
ConfusedCoder
  • 79
  • 1
  • 2
  • 8
5
votes
3 answers

Kill the previous command in a pipeline

I am running a simulation like this ./waf --run scratch/myfile | awk -f filter.awk How can I kill the waf command as soon as filter.awk detects that something happened (e.g. after a specific line is read)? I cannot change waf or myfile. I can…
user000001
  • 32,226
  • 12
  • 81
  • 108
4
votes
2 answers

How to link a static library using WAF?

I'm using OpenSSL in my C++ program, and I need to link crypto and ssl with it. If it were for example gcc, I would just pass: -lcrypto -lssl I am adding this dependency in Network-Simulator 3. But I don't know how to do this in WAF. How should I…
thenakulchawla
  • 5,024
  • 7
  • 30
  • 42
4
votes
1 answer

Unable to locate package python-gnomedesktop: Installing PyViz in ns3

I am following the commands here to install PyViz. I get the error: ~$ sudo apt-get install python-gnome2-desktop Reading package lists... Done Building dependency tree Reading state information... Done Package python-gnome2-desktop is not…
Dinesh Reddy
  • 119
  • 1
  • 7
4
votes
1 answer

ns3, c++, expression with side effects will be evaluated despite being used as an operand to 'typeid'

Something strange happens: I didn't modify any part of my ns3 c++ code, and running a compilation this is the error that appear: [ 815/1681] cxx: scratch/initial-scenario.cc -> build/scratch/initial-scenario.cc.1.o In file included from…
rebatoma
  • 734
  • 1
  • 17
  • 32
4
votes
0 answers

Propagation Loss Model Not Working Properly

I have been experimenting with wifi ad-hoc networks in NS-3 and am currently trying to demonstrate that the farther away the two nodes reside, the worse the connection gets. There are no compile or run-time errors when running WAF. The…
Mike
  • 413
  • 2
  • 12
4
votes
1 answer

Why are number of instructions non-deterministic in Linux performance counters

To be able to profile application runtimes whose binaries will actually be run under a simulator (NS-3/DCE). I wanted to use the linux performance counters, I expected the instruction count for an application which has no source of non-determinism…
hbogert
  • 4,198
  • 5
  • 24
  • 38
4
votes
3 answers

Implement Simple TCP with NS3

hi, I'm new to NS3, I'm trying to modify first.cc to do TCP rather than UDP. I didn't get any error, but no data exchange happened as well. Could anyone help me on this?˜˜ many thanks˜~ here is the code: in the main: NS_LOG_INFO ("Creating…
Meng Wang
  • 111
  • 1
  • 9
3
votes
1 answer

Is ns2 installable for M1 Mac?

In our Lab, we were asked to install ns2. I tried running a script from a GitHub repo. But, after executing, it failed to run. I saw this ns3 google group. It mentioned that ns-3.33 was able to install in her system. But it didn't mention ns2. I…
3
votes
2 answers

Waf can't be invoked - ImportError: cannot import name Scripting

I'm trying to install ns-3 network simulator, and I'm building a simple script that would install all prerequisites on fresh install of latest Ubuntu LTS OS(18.04). Everything goes smooth but once I try to run any test, I get following…
Rorschach
  • 734
  • 2
  • 7
  • 22
1
2 3
28 29