LinuxQuestions.org
Help answer threads with 0 replies.
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-26-2015, 06:32 AM   #1
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Rep: Reputation: Disabled
segmentation fault (core dumped ) error in ns2.34


I did some changes in the LAR protocol and suppose the new protocol is named as ABC .
When i am doing make clean and then make.
object file "ABC.o" was successfully created.
Then i tried to run tcl file , nothing has been written in the trace file and it gave me the following error

21052015$ ns234 new.tcl scen1 setting other default settings...
removing unecessary packet headers...
num_nodes is set 100
INITIALIZE THE LIST xListHead
loading mobility file
loading traffic file
Starting Simulation...
Segmentation fault (core dumped)

I tried a lot but unable to find out where is the error. I am unable to find out the point of error . Is it in .cc file or in .tcl file.
Could someone please help me.
My work is stucked and i searched a lot but didn't get anything.

please please .............. help me
 
Old 05-27-2015, 03:07 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
Generally : LAR works best with ns-2.32 .
A default LAR setup can also course instability with ns-2.33, ns-2.34 .


About your "ABC.cc" : Impossible to answer ....
Your c++ code is unknown ,,,
and your simulation files ( new.tcl etc.) are also unknown files.


-
 
Old 05-27-2015, 03:46 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
About "Segmentation fault" in ns2, please follow the links in post #2 here :

http://www.linuxquestions.org/questi...-4175530493/#2
 
Old 05-29-2015, 08:17 AM   #4
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Original Poster
Rep: Reputation: Disabled
Thanks for ur kind reply.
That error is resolved.

Could you please help me regarding the following problem

in lar.cc , command function , argc == 5 "sendData"
there is a line
nsaddr_t destID = (nsaddr_t)atoi(argv[2]);

Basically this line is taking the argument_2 from box.tcl
$ns_ at $k "$g(0) sendData 49 64 B" [ # the format now for the lar send is # # "$nodeId sendData <dest ID> <size> <method>" ]

But i want destID should be taken automatically from traffic file as we do in our other routing protocols like GPSR or AODV etc.

traffic file --- some lines are as

# 1 connecting to 2 at time 2.5568388786897245
#
set udp_(0) [new Agent/UDP]
$ns_ attach-agent $node_(1) $udp_(0)
set null_(0) [new Agent/Null]
$ns_ attach-agent $node_(2) $null_(0)
set cbr_(0) [new Application/Traffic/CBR]
$cbr_(0) set packetSize_ 512
$cbr_(0) set interval_ 0.25
$cbr_(0) set random_ 1
$cbr_(0) set maxpkts_ 10000
$cbr_(0) attach-agent $udp_(0)
$ns_ connect $udp_(0) $null_(0)
$ns_ at 2.5568388786897245 "$cbr_(0) start"
#

How can i do this .........
or if possible plz tell me how this value is automatically goes in AODV or GPSR or any other routing protocol.

kindly advise further.

rgds
 
  


Reply

Tags
lar, 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
Segmentation fault (core dumped) error in mobiwan script simz Linux - Software 6 02-09-2015 05:49 AM
Segmentation fault (core dumped) Khaled ELmishad Programming 1 06-16-2012 12:13 PM
After du -akL command on a directorI get the error: Segmentation Fault - core dumped jglenton Solaris / OpenSolaris 0 11-23-2010 10:03 AM
Segmentation Fault (core dumped) doing su - Blinker_Fluid Solaris / OpenSolaris 5 10-07-2008 07:04 PM
Segmentation fault (core dumped) hasanaydin Linux - General 0 03-27-2002 08:47 AM


All times are GMT -5. The time now is 01:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration