LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 11-27-2013, 12:21 AM   #136
en.khalid82
Member
 
Registered: Apr 2013
Posts: 61

Rep: Reputation: Disabled

Dear Mr.nimacasino, may you help me how can I patch GPRS in ns 2.33.

Thanks
 
Old 01-15-2014, 01:12 PM   #137
Chakraborty
Member
 
Registered: Jan 2014
Location: India
Distribution: Linux-(Ubuntu 12.04,14.04.02). 32-bit for Research
Posts: 84

Rep: Reputation: Disabled
‘GPSRAgent::query_timer_’ will be initialized after

hello everybody,
I am trying to patch gpsr in ns-2.34, with Ubuntu 10.04.

I am facing these problems while going for 'make'

gpsr/gpsr.cc: In member function ‘void GPSRAgent::turnon()’:
gpsr/gpsr.cc:186: error: declaration does not declare anything
gpsr/gpsr.cc:199: warning: statement has no effect
gpsr/gpsr.h: In constructor ‘GPSRAgent::GPSRAgent()’:
gpsr/gpsr.h:140: warning: ‘GPSRAgent::query_timer_’ will be initialized after
gpsr/gpsr.h:123: warning: ‘nsaddr_t GPSRAgent::my_id_’
gpsr/gpsr.cc:210: warning: when initialized here
gpsr/gpsr.h:137: warning: ‘GPSRAgent::query_counter_’ will be initialized after
gpsr/gpsr.h:129: warning: ‘int GPSRAgent::isActor’
gpsr/gpsr.cc:210: warning: when initialized here
gpsr/gpsr.cc:250: error: ‘class EnergyModel’ has no member named ‘Set_er’
gpsr/gpsr.cc:251: error: ‘class EnergyModel’ has no member named ‘Set_et’
gpsr/gpsr.cc:252: error: ‘class EnergyModel’ has no member named ‘Set_ei’
gpsr/gpsr.cc:253: error: ‘class EnergyModel’ has no member named ‘Set_es’
gpsr/gpsr.cc:233: warning: unused variable ‘temp’
gpsr/gpsr.cc: In member function ‘void GPSRAgent::forwardData(Packet*)’:
gpsr/gpsr.cc:376: warning: comparison between signed and unsigned integer expressions
make: *** [gpsr/gpsr.o] Error 1

I have referred to the gpsr.h and gpsr.cc files.Couldn't find the fault . Need some help in this respect from ns-users.
 
Old 01-15-2014, 01:30 PM   #138
Chakraborty
Member
 
Registered: Jan 2014
Location: India
Distribution: Linux-(Ubuntu 12.04,14.04.02). 32-bit for Research
Posts: 84

Rep: Reputation: Disabled
NS2 issues raised in # include <wireless-phy.h>

NS2 issues raised in # include <wireless-phy.h>

NS2, if you want to quote WirelessPhy class, we need to #include <wireless-phy.h>, compile time, a lot of errors will be reported



. / Mac / wireless-phy.h: At global scope:
. / Mac / wireless-phy.h: 130: error: expected identifier before 'r'
. / Mac / wireless-phy.h: 130: error: expected '}' before 'r'
. / Mac / wireless-phy.h: 130: error: expected unqualified-id before 'r'
. / Mac / wireless-phy.h: In member function 'bool & WirelessPhy :: Is_node_on ()':
. / Mac / wireless-phy.h: 97: error: 'node_on_' was not declared in this scope
. / Mac / wireless-phy.h: In member function 'bool WirelessPhy :: Is_sleeping ()':
. / Mac / wireless-phy.h: 98: error: 'status_' was not declared in this scope
. / Mac / wireless-phy.h: At global scope:
. / Mac / wireless-phy.h: 132: error: no matching function for call to 'Sleep_Timer :: Sleep_Timer ()'
. / Mac / wireless-phy.h: 58: note: candidates are: Sleep_Timer :: Sleep_Timer (WirelessPhy *)
. / Mac / wireless-phy.h: 56: note: Sleep_Timer :: Sleep_Timer (const Sleep_Timer &)
. / Mac / wireless-phy.h: In function 'int initialized ()':




Error for the following reasons:


"In file wireless-phy.h, line enum ChannelStatus {SLEEP, IDLE, RECV, SEND}; with
In file cmu-trace.h, there are two lines: # define RECV .. # define SEND .. "

These two definitions are in conflict, leading to undefined so wrong (four errors or more)

Modification method:
One of them will change a name, for example:

Modify wireless-phy.h / c the {SLEEP, IDLE, RECV, SEND} to {SLEEP, IDLE, RRECV, SSEND}; c file and corresponding reference (if only one use) can

This looks like a relatively small change needs to be changed places enumerated types, only two documents referenced. The cmu-trace.h the use of the two macros I have not inquired, to be verified comparison.
 
Old 02-12-2014, 06:22 AM   #139
muthana
Member
 
Registered: Oct 2013
Posts: 61

Rep: Reputation: Disabled
hi bro how can get ubuntu 12.04
 
Old 02-12-2014, 07:12 AM   #140
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 139 .
Quote:
how can get ubuntu 12.04
Well, I guess you can find a way to download it, on some computer with Internet connection.

Link 12.04.4 http://mirrors.dotsrc.org/ubuntu-cd/...sktop-i386.iso
* Which you could find with Google .. ubuntu ..
https://www.google.com/webhp?hl=all#hl=all&q=ubuntu
http://www.ubuntu.com/download

-
 
1 members found this post helpful.
Old 02-18-2014, 04:13 AM   #141
Chakraborty
Member
 
Registered: Jan 2014
Location: India
Distribution: Linux-(Ubuntu 12.04,14.04.02). 32-bit for Research
Posts: 84

Rep: Reputation: Disabled
Dear Knudfl,
I am triying to patch GPSR in ns-2.33,after make and validate when I typed 'ns' at the terminal I got this message


The program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install ns2

The command sequences are as follows.
csdpadmin@csdpadmin-ThinkCentre-M70E:~/Desktop$ cd ns-allinone-2.33
csdpadmin@csdpadmin-ThinkCentre-M70E:~/Desktop/ns-allinone-2.33$ cd ns-2.33/
csdpadmin@csdpadmin-ThinkCentre-M70E:~/Desktop/ns-allinone-2.33/ns-2.33$ ns
The program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install ns2

Previously it was showing segmentation fault.
I need some help in this respect.
With thanks.
 
Old 02-18-2014, 06:54 AM   #142
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 141 .

$ 'cd /Desktop/ns-allinone-2.33/ns-2.33 && ns' doesn't work.
Right is $ 'cd /Desktop/ns-allinone-2.33/ns-2.33 && ./ns'
.. because 'ns' is in the current directory, not in a system PATH.


HOWTO install the "ns -crcn" to a system PATH :
My suggestion is to use a copy of 'ns' by name 'ns-crcn'.
$ cd ns-allinone-2.33/ns-2.33/ && cp ns ns-crcn
$ sudo cp ns-crcn /usr/local/bin/
... Then you can do the simulations with $ ns-crcn <file>.tcl

-
 
Old 02-24-2014, 07:20 AM   #143
Chakraborty
Member
 
Registered: Jan 2014
Location: India
Distribution: Linux-(Ubuntu 12.04,14.04.02). 32-bit for Research
Posts: 84

Rep: Reputation: Disabled
Dear Knudfl,

I have sorted the above problem, and your suggestion was valuable.
I am trying to patch GPSR with ns-2.33, at Ubuntu 12.04.
Now I am stuck with segmentation fault, as given below.

g++ -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
Segmentation fault (core dumped)
make: *** [gen/ptypes.cc] Error 139
root@chakraborty-desktop:/home/chakraborty/ns/ns-allinone-2.33/ns-2.33#


I had referred the thread and tried to find the fault by using gdb mand I got the following result

root@chakraborty-desktop:/home/chakraborty/ns/ns-allinone-2.33/ns-2.33# gdb ./common/ptypes2tcl
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/chakraborty/ns/ns-allinone-2.33/ns-2.33/common/ptypes2tcl...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/chakraborty/ns/ns-allinone-2.33/ns-2.33/common/ptypes2tcl
static const char code[] = "\n\
global ptype pvals\n\
set ptype(error) -1\n\
set pvals(-1) error\n\
set ptype(tcp) 0\n\
set pvals(0) tcp\n\
set ptype(udp) 1\n\
set pvals(1) udp\n\
set ptype(cbr) 2\n\
set pvals(2) cbr\n\
set ptype(audio) 3\n\
set pvals(3) audio\n\
set ptype(video) 4\n\
set pvals(4) video\n\
set ptype(ack) 5\n\
set pvals(5) ack\n\
set ptype(start) 6\n\
set pvals(6) start\n\
set ptype(stop) 7\n\
set pvals(7) stop\n\
set ptype(prune) 8\n\
set pvals(8) prune\n\
set ptype(graft) 9\n\
set pvals(9) graft\n\
set ptype(graftack) 10\n\
set pvals(10) graftAck\n\
set ptype(join) 11\n\
set pvals(11) join\n\
set ptype(assert) 12\n\
set pvals(12) assert\n\
set ptype(message) 13\n\
set pvals(13) message\n\
set ptype(rtcp) 14\n\
set pvals(14) rtcp\n\
set ptype(rtp) 15\n\
set pvals(15) rtp\n\
set ptype(rtprotodv) 16\n\
set pvals(16) rtProtoDV\n\
set ptype(ctrmcast_encap) 17\n\
set pvals(17) CtrMcast_Encap\n\
set ptype(ctrmcast_decap) 18\n\
set pvals(18) CtrMcast_Decap\n\
set ptype(srm) 19\n\
set pvals(19) SRM\n\
set ptype(sa_req) 20\n\
set pvals(20) sa_req\n\
set ptype(sa_accept) 21\n\
set pvals(21) sa_accept\n\
set ptype(sa_conf) 22\n\
set pvals(22) sa_conf\n\
set ptype(sa_teardown) 23\n\
set pvals(23) sa_teardown\n\
set ptype(live) 24\n\
set pvals(24) live\n\
set ptype(sa_reject) 25\n\
set pvals(25) sa_reject\n\
set ptype(telnet) 26\n\
set pvals(26) telnet\n\
set ptype(ftp) 27\n\
set pvals(27) ftp\n\
set ptype(pareto) 28\n\
set pvals(28) pareto\n\
set ptype(exp) 29\n\
set pvals(29) exp\n\
set ptype(httpinval) 30\n\
set pvals(30) httpInval\n\
set ptype(http) 31\n\
set pvals(31) http\n\
set ptype(encap) 32\n\
set pvals(32) encap\n\
set ptype(mftp) 33\n\
set pvals(33) mftp\n\
set ptype(arp) 34\n\
set pvals(34) ARP\n\
set ptype(mac) 35\n\
set pvals(35) MAC\n\
set ptype(tora) 36\n\
set pvals(36) TORA\n\
set ptype(dsr) 37\n\
set pvals(37) DSR\n\
set ptype(aodv) 38\n\
set pvals(38) AODV\n\
set ptype(imep) 39\n\
set pvals(39) IMEP\n\
set ptype(rap_data) 40\n\
set pvals(40) rap_data\n\
set ptype(rap_ack) 41\n\
set pvals(41) rap_ack\n\
set ptype(tcpfriend) 42\n\
set pvals(42) tcpFriend\n\
set ptype(tcpfriendctl) 43\n\
set pvals(43) tcpFriendCtl\n\
set ptype(ping) 44\n\
set pvals(44) ping\n\
set ptype(pbc) 45\n\
set pvals(45) PBC\n\
set ptype(diffusion) 46\n\
set pvals(46) diffusion\n\
set ptype(rtprotols) 47\n\
set pvals(47) rtProtoLS\n\
set ptype(ldp) 48\n\
set pvals(48) LDP\n\
set ptype(gaf) 49\n\
set pvals(49) gaf\n\
set ptype(ra) 50\n\
set pvals(50) ra\n\
set ptype(pushback) 51\n\
set pvals(51) pushback\n\
set ptype(pgm) 52\n\
set pvals(52) PGM\n\
set ptype(lms) 53\n\
set pvals(53) LMS\n\
set ptype(lms_setup) 54\n\
set pvals(54) LMS_SETUP\n\
set ptype(sctp) 55\n\
set pvals(55) sctp\n\
set ptype(sctp_app1) 56\n\
set pvals(56) sctp_app1\n\
set ptype(smac) 57\n\
set pvals(57) smac\n\
set ptype(xcp) 58\n\
set pvals(58) xcp\n\
set ptype(hdlc) 59\n\
set pvals(59) HDLC\n\
set ptype(belllabstrace) 60\n\
set pvals(60) BellLabsTrace\n\

Program received signal SIGSEGV, Segmentation fault.
0x080489b5 in lcase(char const*) ()
(gdb) bt
#0 0x080489b5 in lcase(char const*) ()
#1 0x08048a6e in main ()

I examined the code but could not find the fault, also matched it with your linked files in #14

http://www.linuxquestions.org/questi...roblem-866379/

Please help me in this regard.

With Thanks.
 
Old 02-24-2014, 08:40 AM   #144
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 143 .
Quote:
g++ -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
`g++' is wrong. Should be g++41.

The build is $ cd ns-allinone-2.33/ && export CC=gcc41 CXX=g++41 && ./install
If you for some reason is reconfiguring in ns-allinone-2.33/ns-2.33/,
.. the command is $ export CC=gcc41 CXX=g++41 && ./configure

The Ubuntu 12.04 compilers (!for a 32bits 12.04!) see post #18 here
http://www.linuxquestions.org/questi...022/page2.html

-
 
Old 02-25-2014, 05:34 AM   #145
Chakraborty
Member
 
Registered: Jan 2014
Location: India
Distribution: Linux-(Ubuntu 12.04,14.04.02). 32-bit for Research
Posts: 84

Rep: Reputation: Disabled
Dear Knudfl,

Sorry for going beyond thread scope.

I was struggling with the above quoted problem,analysing the code.
The problem was in PT_NYPE.

Make of GPSR successful with 'Make done'

now I am tring to run the default 'wireless-gpsr.tcl'
but got the msg.

csdpadmin@csdpadmin-ThinkCentre-M70E:~/Desktop/ns-allinone-2.33/ns-2.33/gpsr$ ns wireless-gpsr.tcl
num_nodes is set 100
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
GPSR configuration file
INITIALIZE THE LIST xListHead
Grid info:150 150 15 (10 10)
Segmentation fault (core dumped)

I don't understand what is the problem.
Should I OFF trace-all.
or something else.

Please suggest.

With Thanks
 
Old 02-25-2014, 06:20 AM   #146
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 145 .
Quote:
Make of GPSR successful with 'Make done'
Doesn't matter if it's seemingly ""successful with 'Make done' "".

Using the wrong compiler will still produce a result, that you cannot use.
Please start from scratch with a new unpacked ns-allinone-2.33.tar.gz .
! And then use $ export CC=gcc41 CXX=g++41 && ./install

? Are you doing GPSR-KeLiu ? Or ?

-
 
Old 02-25-2014, 11:16 AM   #147
Chakraborty
Member
 
Registered: Jan 2014
Location: India
Distribution: Linux-(Ubuntu 12.04,14.04.02). 32-bit for Research
Posts: 84

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 145 .

Doesn't matter if it's seemingly ""successful with 'Make done' "".

Using the wrong compiler will still produce a result, that you cannot use.
Please start from scratch with a new unpacked ns-allinone-2.33.tar.gz .
! And then use $ export CC=gcc41 CXX=g++41 && ./install

? Are you doing GPSR-KeLiu ? Or ?

-
Ok ! Knudfl!

Yes. I am doing with GPSR-KLiu.
I am addressing multimedia data transfer in WSN.
According to your suggestion I am going so.
But you have mentioned to 'export' the compiler to 4.1
and then install.
That is just from th scratch before going for the ./install command export is needed.
Or is that a single line command, as I have never tried like that.

Awaiting for a confirmation.
With thanks.

Last edited by Chakraborty; 02-25-2014 at 11:19 AM. Reason: somthing to add.
 
Old 02-25-2014, 12:20 PM   #148
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 147 .

Chain commands : $ command1 && command2 && command3
... You can of course do 1) $ command1 2) $ command2 3) etc. etc.

But : If you exit the terminal after $ export CC=gcc41 CXX=g++41,
then the settings are lost, and you will have to repeat $ export CC=gcc41 CXX=g++41

* Hence the safe way : $ export CC=gcc41 CXX=g++41 && ./install


About GPSR-KeLiu : There is also "gpsr-KeLiu-patched-ns234.tar.gz"
https://drive.google.com/file/d/0B7S...it?usp=sharing
... which is mentioned in http://www.linuxquestions.org/questi...-4175448663/#3


-
 
Old 02-26-2014, 11:02 PM   #149
Chakraborty
Member
 
Registered: Jan 2014
Location: India
Distribution: Linux-(Ubuntu 12.04,14.04.02). 32-bit for Research
Posts: 84

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 147 .

Chain commands : $ command1 && command2 && command3
... You can of course do 1) $ command1 2) $ command2 3) etc. etc.

But : If you exit the terminal after $ export CC=gcc41 CXX=g++41,
then the settings are lost, and you will have to repeat $ export CC=gcc41 CXX=g++41

* Hence the safe way : $ export CC=gcc41 CXX=g++41 && ./install


About GPSR-KeLiu : There is also "gpsr-KeLiu-patched-ns234.tar.gz"
https://drive.google.com/file/d/0B7S...it?usp=sharing
... which is mentioned in http://www.linuxquestions.org/questi...-4175448663/#3


-
Dear Knudfl,

Thank you once again for the prompt reply.

If at all the commands are chained, but as you said their effect are temporarily.
So for multiple simulation for chnaging do I need to execute the command everytime we are talking about.
If 'yes' then suggest some permanent way.
If 'NO' then is it('export') again required if I open a new terminal for working on ns2, side-by-side.

Additionally if at all GPSR was patched before your suggested 'export command'
It was giving Segmentation fault while runnning the TCL script.
And to extreme there is no trace of fault in the terminal, except with the msg "Sementation Fault
Core Dumped".
What could be the fault.

Please help !

With Thanks !

Chakraborty.
 
Old 02-27-2014, 12:03 AM   #150
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 149 .
Quote:
If at all the commands are chained, but as you said their effect are temporarily.
Post #148: "If you exit the terminal after $ export <something>, the settings are lost".
... I.e. nothing to do with chain commands, it's about 'export'.


# 147 .
Quote:
Yes. I am doing with GPSR-KLiu.
Which patch are you using ? Patch name and a link, please.
If I remember right, the GPSR-KeLiu is for ns-2.34.

-
 
  


Closed Thread

Tags
gdb, gpsr, gpsr-hls, gpsr-keliu, xgraph#195


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
patch for working leach protocol in ns2.34 fedora rajcek Linux - Wireless Networking 4 02-04-2013 06:59 AM
LXer: Tutorial: Border Gateway Protocol, The Routing Protocol of the Internet LXer Syndicated Linux News 0 11-13-2008 05:11 AM
free routing protocol in fedora wahaha Linux - Networking 2 10-26-2006 01:16 AM
RIP(Routing Information protocol) cranium2004 Linux - Networking 2 05-01-2005 06:08 AM
Routing Protocol karunesh Linux - Networking 3 09-04-2002 04:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:30 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
Open Source Consulting | Domain Registration