Crypto Library on Omnet

1,298 views
Skip to first unread message

Can Yucel

unread,
Jul 17, 2009, 1:43:50 PM7/17/09
to Omne...@omnetpp.org
Hello everybody,

Some people wanted to use cryptographic functions on Omnet. For that purpose I have imported a Crypto library: Crypto++ (you can find it here http://www.cryptopp.com/).

I had some problems using it on Windows, but for Linux it seems to be working properly.

Importing the library is as follows:

1- After downloading the package, first of all you have to import the Crypto folder, and then have to compile it as usual.

2- Right Click On your project and then select properties.

3- In Project References you have to select the folder that contains the library.

4- Again in Project Properties OMNET++ -> Makemake select projectname: makemake (deep,recursive)... and then options

5- In Makemake options Select Link -> More and then add button (a file icon with a green plus sign)

6- Enter there cryptopp and then press ok

7- For the last time Project Properties ->C/C++ General -> Paths and Symbols -> Library Paths -> Add

8- Select the Crypto folder again

That's all. At least the library is working for me, if you encounter with any problems, I would be glad to answer all your questions.

See ya,

Can

mm

unread,
Jul 17, 2009, 9:28:54 PM7/17/09
to omn...@googlegroups.com
Hi dear Can
 
thank you very much for the library it is really exactly what I need.
 
I am using windows xp and omnetpp 4.  I open IDE to import the library and I do :
import->general->existing projects into workspace.
Then I select the cryptopp folder but the finish button is disabled and I cant import it.
could you please help me what is the problem.
 
thank you.

Can Yucel

unread,
Jul 18, 2009, 3:33:48 AM7/18/09
to omn...@googlegroups.com
Hello,

Because it is not an Eclipse project, you have to create a new project and then select import->File Folder. Then you should select all the files in Cryptopp folder.

But I had some compilation problems on windows. And I could not have much time to make it work on windows, so I have installed it on Linux.

Hopefully it works on your system.

You are welcome for all your questions
--
Can Yücel

Vitali Anselm

unread,
Jul 18, 2009, 4:01:49 AM7/18/09
to omn...@googlegroups.com
Hello,
 
could you help me to get the IP address of a interface entry in an InterfaceTable?
I would like to get the IP address and what I code for this, is folowing:
 
cModule
*bs = simulation.getModuleByPath("Net80211_aodv_VITA_2Radios.WiMAX_Basisstation[0]");
IInterfaceTable *ift_BS = check_and_cast< IInterfaceTable*>(findModuleWhereverInNode("interfaceTable", bs));
if (!ift_BS){
error("no interfaceTable found in module ", bs->getName());
}
InterfaceEntry *if_entry = ift_BS->getInterfaceByName("controlPlane");
 
// Debug
ev <<
"bs module: " << bs->getName();
ev <<
" , ift_BS: " << ift_BS->getFullPath();
ev <<
" , if_entry: " << if_entry->getFullName() << endl;
IPv4InterfaceData *tempor = if_entry->ipv4Data();
ev <<
" , ip4Address: " << tempor->getIPAddress().str() << endl;
 
and the last line produces error :      invalid use of incomplete type 'struct IPv4InterfaceData'
 
What does it mean and what must I do?
 
Thanks,
 
regards,
 
Vitali Anselm

Andras Varga

unread,
Jul 18, 2009, 5:54:12 AM7/18/09
to omn...@googlegroups.com

“invalid use of incomplete type” means that the type was only announced (with “class IPv4InterfaceData;”) but not defined, so the compiler doesn’t know what member functions it has etc. This usually means that the header file containing its definition needs to be also included.

 

In this case you probably only have “InterfaceEntry.h” included which only announces IPv4InterfaceData, but the definition is in “IPv4nterfaceData.h”. So you need to add

 

#include “IPv4InterfaceData.h”

 

Regards

Andras

 


Vitali Anselm

unread,
Jul 18, 2009, 6:33:07 AM7/18/09
to omn...@googlegroups.com
Thank you Andras, you are so right! It works now.
 
Information from ESET NOD32 Antivirus, version of virus signature database 4256 (20090718) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


mm

unread,
Jul 18, 2009, 7:33:08 AM7/18/09
to omn...@googlegroups.com
Hi and thanks for your response
 
I imported it but during compile I got an error in rijndael.cpp which said  :'alloca' was not declared in this scope.
 
Is it the same as your problem in windows? did you find some way to make it to work on windows since I don't use Linux.
 
I really appreciate your help.
Message has been deleted

Henry Chen

unread,
Jan 6, 2015, 3:27:49 AM1/6/15
to omn...@googlegroups.com, Omne...@omnetpp.org, can....@gmail.com
Hi dear Can
 
thank you very much for the library it is really exactly what I need.

But I have two question:
(1) is it compile in OMNeT++ or VC++ 6.0?
(2)as you say :- In Makemake options Select Link -> More and then add button , is it add in the block of  Additional libraries to link with :(-| option)?

as your advices ,when i building my own project , it runs like that :
d:/omnetpp-4.3.1-src-windows/omnetpp-4.3.1/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: cannot find -l-lD:/omnetpp-4.3.1-src-windows/omnetpp-4.3.1/samples/cryptopp562/

please help me, it is urgent ,thanks a lot!



在 2009年7月18日星期六UTC+8上午1时43分50秒,Can Yucel写道:

Maria Nelago Kanyama

unread,
Jan 9, 2017, 7:52:13 AM1/9/17
to OMNeT++ Users
I m trying to import crypto to INET _ omnet++5.0 in ubuntu. I tried all those above but I couldn't make it to work as I m trying to send data from one more to another.

Rawan Turab

unread,
Apr 28, 2019, 11:00:11 AM4/28/19
to OMNeT++ Users
I know my question is very late but please help me, The new project is Omnet++ project? or general project?? because  i do the steps but i have errors such as (multiple definition errors) when linking to crypto++ library 
Reply all
Reply to author
Forward
0 new messages