Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-16-2011, 10:20 PM   #1
LQ Newbie
Registered: May 2011
Posts: 1

Rep: Reputation: 0
Network Simulator code for cognitive radio


I am using the following add-on with ns2 to be able to simulate cognitive radio networks.

While looking on the net, I also found this article which explains how to send Hello packets on multiple interfaces using the above mentioned simulator.

A Tutorial on Broadcasting Packets over Multiple-Channels in a Multi-Inferface Network Setting in NS-2

However, the project that I am working on asks for the mobile node to switch between channels, and not interfaces.

In addition to the code that the above article gives, here is what I am attempting to do:

if(nIfaces) //nIfaces is the number of interfaces on each radio
for(int i=0; i<nIfaces; i++)
Packet *p = p->copy();
struct hdr_cmn *ch_copy = HDR_CMN(p_copy);
for(int j=0; j<wcett_total_channels; j++) // wcett_total_channels is a global variable that contains the total number of channels
ch_copy->channelindex_ = j;
cout << "sendHello from node " << index << "On channel " << j << " on interface " << i << endl;
Scheduler::instance().schedule(targetlist[i], p_copy, 0.0);

However, this does not seem to work!

Any pointers to this will be appreciated!

Old 07-16-2014, 07:12 AM   #2
LQ Newbie
Registered: Jul 2014
Posts: 13

Rep: Reputation: Disabled
Yes , this program doesnot seem to work.
Did you simulate any other programs?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
channel sensing in CRCN (cognitive radio cognitive network) patch saywei89 Linux - Software 12 08-30-2014 01:28 PM
i need a network simulator code in c++ and perl not using tcl or otcl.... qwertyvelayudhan Linux - Networking 3 04-27-2011 12:52 PM
Will Cognitive Radio simulation work on NS-2.34 coolsunshines Linux - Software 2 03-07-2011 11:53 AM
ns-2 network simulator myrto Programming 14 03-01-2007 01:15 AM
Is there any network simulator? kizersouzay Linux - Networking 6 02-17-2006 12:00 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:06 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration