LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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


Reply
  Search this Thread
Old 04-17-2015, 05:56 PM   #1
vpchitraa
LQ Newbie
 
Registered: Jan 2015
Posts: 8

Rep: Reputation: Disabled
Red face share mac parameters in routing protocol segmentationfault(core dumped)


Hi

When I try to share mac parameter macSuperframeOrder in routing protocol I got segmentation fault(core dumped)

bed.cc
...
#include "p802_15_4const.h"
#include "p802_15_4mac.h"
#include <cmu-trace.h>
#include <energy-model.h>
MobileNode *nadr[MAXI];
struct MAC_PIB *so;

...

if( df < du ) // if current ED is better than till now
{

if(so->macSuperframeOrder >1)
{
so->macSuperframeOrder -= 1;
}

...

#ifdef DEBUG

...

printf("superframe order = u \n", so->macSuperframeOrder);

#endif

...


I would like to tune the macSuperframeOrder TO IMPEOVE QOS. But when I try access and display the value in new bed routing protocol, it shows segmentaion fault. Kindly tell me how to share and tune mac parameters in routing.

Last edited by vpchitraa; 04-17-2015 at 05:58 PM.
 
Old 04-19-2015, 11:16 AM   #2
tyrolite
LQ Newbie
 
Registered: Apr 2015
Posts: 4

Rep: Reputation: Disabled
Build your application with debug symbols and use a debugger... If you didn't use one before, try and IDE with a graphical interface for 'gdb' like Qt Creator or Code::Blocks. After you loaded your project, put a breakpoint in the function that causes the segfault and run the code line-by-line until you get the faulty instruction.

You can use gdb from command line like this:
Code:
gdb <your-exe>
type 'continue' to skip the first breakpoint
do something that triggers the segmentation fault
type 'backtrace' to see the callstack
Also, your printf line is missing a '%' for the format specifier.

Last edited by tyrolite; 04-19-2015 at 11:17 AM.
 
  


Reply

Tags
ns2, zigbee-ns2


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
how to share mac parameters in routing protocol preethikrishnan Linux - Newbie 3 04-20-2015 01:01 AM
LXer: Tutorial: Border Gateway Protocol, The Routing Protocol of the Internet LXer Syndicated Linux News 0 11-13-2008 05:11 AM
core dumped......! vipul jain Programming 2 11-07-2008 06:16 PM
core-dumped dayalan_cse Programming 2 10-28-2007 03:32 AM
Core Dumped Nezar Linux - General 4 07-18-2001 02:29 AM

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

All times are GMT -5. The time now is 11:13 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