Posts Tagged With ‘Network&8217

Configure Eclipse NS3 on Mac OS X 10.10 Yosemite

To get ns3 running with Mac OS X 10.10 Yosemite:

Configure Development Environment

  1. Download Xcode from Apple App Store
  2. Install Xcode
  3. Download and install command line tools. You can type `xcode-select –install` terminal or
  4. gdb 7 has some problems with on Mac OS X so, install gdb 6 with macports using `sudo port install gdb-apple` or homebrew
  5. Download ns3 source code using web site or get with mercuriel `hg clone`
  6. Change ns3 directory and run `./waf -d debug configure`

Configure Eclipse

  1. Download Eclipse IDE for C/C++ Developers from
  2. From eclipse New->New Project select C++ Project
  3. Point location of the ns3 and name it
  4. Right click on the project and properties, C/C++ Build change build command to waf `${workspace_loc:/NS3Dev}/waf` and build directory to `${workspace_loc:/NS3Dev}/build`
  5. Change incremental build all to build
  6. Now build project
  7. If you get unnecessary errors,from Eclipse Preferences->C/C++->Code Analysis uncheck Syntax and Semantic Erros

Signing gdb

Mac OS X requires gdb to be signed to access memory locations so:

  1. Open Keychain Access, Keychain Access->Certificate Assistant->Create a Certificate…
  2. Name the cert as `gdb-cert` select `Self Signed Root` and `Code Signing` also check override defaults
  3. Next, until “Specify a Location The Certificate” and select `System`
  4. Find cert in Keychain Access and if its not trusted trust the cert.
  5. From terminal sign the gdb `sudo codesign -s gdb-cert $(which gdb)`

Configure Eclipse Debugger

  1. Debug Configurations add new configuration
  2. Select C/C++ Application from list `build/scratch/scratch-simulator`
  3. In Environmental’s tab select new and add `DYLD_LIBRARY_PATH` variable and `${workspace_loc:/NS3Dev}/build` value
  4. In debug section select debugger path to gdb

How to set EDCA/DCF parameters in NS3?

Having throughput problems in OMNET++, we have to switch to the NS3 as network simulation platform. It  doesn’t have a builtin IDE like OMNET and simulation language is either C++ or python. I prefer C++.

After a long time period of  searching, I’ve managed to set DCF and EDCA parameters (like contention window) for wireless simulations (802.11 networks).  The problem is when you get Dca pointer and try to set CwMin and CwMax values, it doesn’t apply to the all nodes in the network, it has to be setup every device in the network.  For eaxample;

Ptr<NetDevice> dev = node->GetDevice(0);

Ptr<WifiNetDevice> wifi_dev = DynamicCast<WifiNetDevice>(dev);

Ptr<WifiMac> mac = wifi_dev->GetMac();

PointerValue ptr;

mac->GetAttribute(“DcaTxop”, ptr);

Ptr<DcaTxop> dca = ptr.Get<DcaTxop>();





Ptr<EdcaTxopN> edca;

mac->GetAttribute(“VO_EdcaTxopN”, ptr);

edca = ptr.Get<EdcaTxopN>();





mac->GetAttribute(“VI_EdcaTxopN”, ptr);

edca = ptr.Get<EdcaTxopN>();





mac->GetAttribute(“BE_EdcaTxopN”, ptr);

edca = ptr.Get<EdcaTxopN>();





mac->GetAttribute(“BK_EdcaTxopN”, ptr);

edca = ptr.Get<EdcaTxopN>();





Internet of Things

Internet of Things(IoT) is an interesting topic in computer science. The idea behind IoT is, enabling everyday objects in the Internet through RFID tags, sensors, mobile devices …etc. There is an interesting study made by Latitude Labs with kids and their expectations from Internet. Sum results from study;

When Bogazici Guys Suck

When you need to access remote windows share over network, you just mount the share to your local linux folder like you do when mounting local disks.

mount -t cifs // -o username=merturk /media/remote/ –verbose

This command should ask the password of the user then mounts the remote win share to your local. However, if you cannot see what you are supposed to see in your local mount point, simply inspect the kernel message using dmesg. If you see an output like what I saw today

CIFS VFS: Error connecting to IPv4 socket. Aborting operation
CIFS VFS: cifs_mount failed w/return code = -512

then you should start to think if all windows I.T. managers sucks or just windows guys who are graduated from Bogazici.

In Brief, this log message tells you, you have a network issue, probably you are banned to access windows shares in some subnetworks of your network like me ….

Netbeans Social is a social network for developers. Try to search Turkey, not too much people.