LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Closed Thread
  Search this Thread
Old 02-03-2015, 09:56 AM   #1
hamdan
LQ Newbie
 
Registered: Nov 2014
Posts: 19

Rep: Reputation: Disabled
accessing physical layer from routing protocol OSLR


hi i am badly stuck here, so please help me out.
well,i am trying a basic cross-layering.OLSR is used as an example.
the steps are
1.include #include <mobilenode.h> in OLSR.h header file.
2.declare a Phy object within the OLSR class

Phy* netif_;

3.
Add the following code in the command () function in aodv.cc

int
OLSR:: command (int argc, const char * const * argv) {
. . .
. . .
else if (argc == 3) {
...
...
else if (strcmp (argv [1], "access-phy") == 0) {
netif_ = (Phy *) TclObject:: lookup (argv[2]);
if (netif_ == 0) {
fprintf (stderr, "Agent: %s lookup %s failed. \n", argv[1], argv[2]);
return TCL_ERROR;
} else {
double x, y, z;
((MobileNode*) netif_->node())->getLoc(&x, &y, &z);
printf ("This node's location: %f %f \n", x, y);
return TCL_OK;
}
}
}
. . .
. . .
}


refer:http://wmnatupdiliman.blogspot.in/20...1_archive.html

but i get the following error after making the changes:
Quote:
aodv/aodv.cc:82: error: ‘OLSR’ has not been declared
aodv/aodv.cc:82: error: a function-definition is not allowed here before ‘{’ token
aodv/aodv.cc:1412: error: expected ‘}’ at end of input
aodv/aodv.cc:1412: warning: no return statement in function returning non-void
make: *** [aodv/aodv.o] Error 1
Ns make failed!
i dont get why is says OLSR is not declared.please help me with this
thanks in advance.
 
Old 02-04-2015, 09:05 AM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread

Tags
ns2



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
COGNITIVE RADIO Physical layer MALLESHWAR Linux - Newbie 1 01-12-2015 09:35 AM
Help for my own transport layer protocol nicomedia41 Linux - Networking 4 07-26-2010 09:36 AM
Protocol on ethernet layer brunoczo Linux - Networking 1 11-05-2009 11:42 PM
hping: physical layer header size unknown Ephracis Linux - Software 4 03-27-2009 06:57 PM
LXer: Tutorial: Border Gateway Protocol, The Routing Protocol of the Internet LXer Syndicated Linux News 0 11-13-2008 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:29 PM.

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
Open Source Consulting | Domain Registration