Wednesday

OMNeT++ and MANET Routing (aodv, dsr, etc) using INETMANET Framework

Download and install WinPcap v4.1.2 from
http://www.winpcap.org/install/default.htm.
Winpcap is used by INET to capture network packets from external interfaces.
This step will install Driver and DLL files like C:\Windows\System32\wpcap.dll.
Q: How can I see if WinPcap is currently running on my Win2K/XP/2k3/Win7 machine?
A: Click on the Start button and then on run. Type msinfo32. The System Information panel will show up. Choose Software Environment, then System Drivers. The entry NPF should appear there. If you launched a WinPcap application previously, the state should be running. Remember that WinPcap should have been run at least one time in order to appear in this list.
Name: npf
Description: NetGroup Packet Filter Driver
File: c:\windows\system32\drivers\npf.sys
Type: Kernel Driver
Started: Yes
Start Mode: Auto
State: Running

Download and extract WinPcap 4.1.2 Developer's Pack from
http://www.winpcap.org/devel.htm.

Copy all files from D:\WinpcapDeveloperPack_4_1_2\WpdPack\Include to
C:\omnetpp-4.1-rc2-src-windows\mingw\include and
C:\omnetpp-4.1-rc2-src-windows\mingw\lib\gcc\mingw32\4.5.0\include.

Copy all files from D:\WinpcapDeveloperPack_4_1_2\WpdPack\Lib to
C:\omnetpp-4.1-rc2-src-windows\mingw\lib and
C:\omnetpp-4.1-rc2-src-windows\mingw\lib\gcc\mingw32\4.5.0.

Make a copy of D:\WinpcapDeveloperPack_4_1_2\WpdPack\Lib\wpcap.lib.
Name the new copy as pcap.lib.
Copy to C:\omnetpp-4.1-rc2-src-windows\mingw\lib\pcap.lib.

Make a copy of D:\WinpcapDeveloperPack_4_1_2\WpdPack\Lib\libwpcap.a.
Name the new copy as libpcap.a.
Copy to C:\omnetpp-4.1-rc2-src-windows\mingw\lib\libpcap.lib.

Download inetmanet-20101013-src.tgz for OMNeT++ from
https://github.com/inetmanet/inetmanet.
If you intend to use inetmanet-2.0-integration.zip, download it from
https://github.com/aarizaq/inetmanet-2.0.

Extract inetmanet-20101013-src.tgz into OMNeT++ workspace directory
C:\omnetpp-4.1-rc2-src-windows\samples\inetmanet-20101013-src.
The extracted directory must be a subdirectory of the workspace directory.

Double-click to open OMNeT++ IDE.

Import the project using: File | Import... | General | Existing Projects into Workspace.
Select root directory: C:\omnetpp-4.1-rc2-src-windows\samples.
Make sure "inetmanet-20101013-src" project is checked.
Be sure NOT to check the "Copy projects into workspace" box.
Click Finish.

Open the "inetmanet-20101013-src" project if it is not open and wait until the indexer finishes.
Build the inetmanet project by pressing Ctrl+B (Project | Build all). Wait until it finish building.
If you get not enough memory error, restart your PC first.

To run an example from the OMNeT++ IDE open the example's directory in the Project Explorer view, find the corresponding omnetpp.ini file. Right click on it and select Run As / OMNeT++ Simulation. This should create a Launch Configuration with two Simulator windows (Network Animation and Timeline) for this example.

If the build was successful, you may try running the OMNeT++ Demo Simulations from the MSYS Bash Shell.
Welcome to OMNeT++ 4.1!
$ cd samples
$ pwd
/c/omnetpp-4.1-rc2-src-windows/samples
$ cd inetmanet-20101013-src
$ cd examples/
{username}@{computername} ~/samples/inetmanet-20101013-src/examples
$ ./rundemo
{username}@{computername} ~/samples/inetmanet-20101013-src/examples
$

Notes:
Recognized Environment Variables:
%WINDIR% = %SYSTEMROOT% = C:\Windows
%WINDIR%\system32 = C:\Windows\System32 //32-bit system
%WINDIR%\system = C:\Windows\system //16-bit system
%USERPROFILE% = C:\Users\{username}
%TEMP% = %TMP% = C:\Users\{username}\AppData\Local\Temp

C:\>echo %path%
D:\xerces-c-2.8.0-vc-8.0\bin;C:\Qt\2010.05\qt\bin;C:\Qt\2010.05\mingw\bin;
C:\Perl\bin;C:\Program Files\Java\jdk1.6.0_24\bin;
C:\Python26;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Program Files\Notepad++;

C:\>echo %comspec%
C:\Windows\system32\cmd.exe

C:\>echo %date%
Wed 11/05/2011

C:\>echo %cd%
C:\

C:\>echo %random% //returns a random number between 0 and 32767
27081

C:\>echo %time%
8:57:25.75

%AppData% = C:\Users\{username}\AppData\Roaming
%SystemDrive% = C:\
%ProgramFiles% = C:\Program Files
%CommonProgramFiles% = C:\Program Files\Common Files

No comments:

Measure execution time with Julia, example using sorting algorithms

# random integers between 1 and 100 inclusive, generate thousands of them x = rand ( 1 : 100 , 100000 ) @time sort (x; alg=InsertionSort, r...