LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
Network Simulator code for cognitive radio


Hello,

I am using the following add-on with ns2 to be able to simulate cognitive radio networks.
http://www.ece.mtu.edu/~ljialian/

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!

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

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


Reply


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 12:28 PM
i need a network simulator code in c++ and perl not using tcl or otcl.... qwertyvelayudhan Linux - Networking 3 04-27-2011 11:52 AM
Will Cognitive Radio simulation work on NS-2.34 coolsunshines Linux - Software 2 03-07-2011 10:53 AM
ns-2 network simulator myrto Programming 14 03-01-2007 12:15 AM
Is there any network simulator? kizersouzay Linux - Networking 6 02-16-2006 11:00 PM


All times are GMT -5. The time now is 12:09 AM.

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