LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2007, 05:17 PM   #1
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Rep: Reputation: 35
Compiling ns2 with openssl libraries


Hello!

I'd like to simulate some authentication protocols with ns2, but the problem is i need openssl headers. For example, i need function RAND_bytes (which needs openssl/rand.h), i inserted appropriate #include, but make yields 'undefined reference to RAND_bytes' error! I tried to configure ns2 with --with-openssl=yes switch, but it doens't work either. How can i include outside libraries into ns2? (Or is maybe the cause for errors somewhere else?)
 
Old 02-20-2007, 06:21 PM   #2
zWaR
Member
 
Registered: Dec 2003
Distribution: Slackware, Alpine Linux, Ubuntu, Debian
Posts: 219

Original Poster
Rep: Reputation: 35
I figured it out!

I had to add -L/usr/include/openssl -lssl to the LIB variable in Makefile (ns2 was compiled with --with-openssl switch).

That's it! Thanks anyway.
 
Old 10-01-2012, 05:32 AM   #3
poo2789
LQ Newbie
 
Registered: Oct 2012
Posts: 2

Rep: Reputation: Disabled
how to compile ns2.34 with openssl

hello

I would like to know how to add the path -L/usr/local/ssl/include/openssl -lssl path in the Makefile

I would like to know the required changes to be made in the configure file.

This is required to compile openssl libaries with ns
 
Old 10-01-2012, 06:02 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Are you sure your libraries are in /usr/local/ssl/include/openssl ? Please try these:

Code:
ls -l /usr/local/ssl/include/openssl/*.so
ls -l /usr/local/lib/*.so
 
Old 01-21-2015, 02:27 AM   #5
salwa
Member
 
Registered: Dec 2014
Posts: 36

Rep: Reputation: Disabled
Hi all,

please can some one tell me how can I add openssl to ns2 ? it is urgent. Thank you in advance
 
Old 01-21-2015, 03:19 AM   #6
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
1. Forget 'urgent', it is not urgent for us.
2. Please explicitly state what have you done so far, what documentations you read, what commands you tried, what problems you encountered.

PS: Also specify exactly what software are you talking about (download URL of source).

Last edited by NevemTeve; 01-21-2015 at 03:31 AM.
 
Old 01-21-2015, 03:57 AM   #7
salwa
Member
 
Registered: Dec 2014
Posts: 36

Rep: Reputation: Disabled
I installed openssl 1.0.1e in ubuntu 13.10, I want to secure a routing protocol with ns2.35 I need to apply a hash function and encryption function which are existing in openssl. I want so to compile ns2 with openssl. can you tell me please how can I resolve this problem (recompile ns2 with openssl). Thank you in advance
 
Old 01-21-2015, 04:05 AM   #8
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
As a start, could you compile ns-2.35 without openssl? If no, what was the problem?

PS: Also specify exactly what software are you talking about (download URL of source).

PS2: Of course, you will need package 'libssl-dev' too.

Last edited by NevemTeve; 01-21-2015 at 04:10 AM.
 
Old 01-21-2015, 04:22 AM   #9
salwa
Member
 
Registered: Dec 2014
Posts: 36

Rep: Reputation: Disabled
Yes sir I compile ns2 without openssl but now I want to recompile with openssl.
The URL of openssl which I install in ubuntu is: http://www.openssl.org/source/openssl-1.0.1e.tar.gz. I hope that you understand me well
 
Old 01-21-2015, 04:35 AM   #10
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Dear Sir, the current openssl is 1.0.1k, but I asked about the source of ns-2.35, not the source of openssl.
 
Old 01-21-2015, 05:11 AM   #11
salwa
Member
 
Registered: Dec 2014
Posts: 36

Rep: Reputation: Disabled
The URL of ns-2.35 which I installed is: http://sourceforge.net/projects/nsna...ar.gz/download
 
Old 01-21-2015, 05:12 AM   #12
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
The 2011 ns-allinone-2.35 : See post #11.

2014, Oct. : ns-allinone-2.35_gcc482.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing

2014, Dec. : ns-allinone-2.35_gcc491.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Latest is : ns-allinone-2.36.rc1.tar.gz
http://nsnam.isi.edu/nsnam/index.php/Roadmap
http://www.isi.edu/nsnam/dist/releas....36.rc1.tar.gz


-

Last edited by knudfl; 01-21-2015 at 05:21 AM.
 
Old 01-21-2015, 05:43 AM   #13
salwa
Member
 
Registered: Dec 2014
Posts: 36

Rep: Reputation: Disabled
Dear knudfl,
thank you for your response but I have not a problem with the installation of ns2. I installed it suuccefully but my problem is how can I recompile ns2 with openSSL (which is installed in ubuntu) to apply some function in library of openSSL.
 
Old 01-21-2015, 07:23 AM   #14
salwa
Member
 
Registered: Dec 2014
Posts: 36

Rep: Reputation: Disabled
@ NevemTeve, please sir if you have an anser for my question post it. I need your help thank you
 
Old 01-21-2015, 07:42 AM   #15
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
← Post #13 ←

I guess you have a solution in post #2.

Prerequisites : $ sudo apt-get install libssl-dev


Recompile : Please don't.
Much smarter to start from scratch, in /home/<name>/new-folder/,
with a new unpacked ns-allinone-2.35_gcc482.tar.gz .
.. Then edit the configure line for ns-2.35 in the script install : EDIT
Line 586. EDIT : See post #17.
Next : run ./install


Note : 1) ns-allinone-2.35_gcc482.tar.gz is for gcc -4.8.2 and 4.9.x
.. so you can run plain ./install
2) ns-allinone-2.35_gcc491.tar.gz :
Is also including the official ns2 patches for Codel etc.


-

Last edited by knudfl; 01-21-2015 at 12:15 PM.
 
  


Reply

Tags
ns2, ns2-ssl, ns235



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
Compiling ns2 on FC4 sita Linux - Software 0 11-04-2005 02:25 PM
FC2 compiling openssl/openssh TSJoshB Fedora 4 07-04-2005 02:25 PM
Trouble compiling nmap with openssl glenik Linux - Software 2 06-19-2004 11:34 AM
Trouble compiling nmap with openssl glenik Linux - Software 0 06-19-2004 10:48 AM
Problem compiling squid with openssl Terayon Linux - Software 4 05-12-2004 12:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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