Omnet++ is a discrete event simulation Framework. Hierarchical nested modules are provided for a communication of messages through channels. Omnet++ simulation is written in C++, an object t oriented language. The source code also available for various simulation models such as Ipvb, mobility. Omnet++ source code is freely available to students and researchers.

Components of Omnet++ source code are:

  • NED compiler.

  • Omnet++ IDE based on eclipse.

  • Utilities.

  • Kernel library.

  • Simulation execution.

Components are basically not provided by Omnet++ network simulator. New simulations and framework are developed by Omnet++ are Mixim, Castalia, Inet. Developed framework is fully implemented of omnet++ and provides support for various simulations such as:

  • Queuing Network simulation.

  • System architecture simulation.

  • Computer network simulation.

Omnet++ source code:

  • Create directory.

  • Create topology using NED file to describe network.

Network is described as follows:

Simple xxx



input in;

output out;


network networkname



tic: xxx;

toc: xxx;


tic. out — > {delay=100ms ;} — >toc. in;

tic. in <– {delay=100ms ;} < — toc. out;


In the sample code, modules are defined as xxx with gates and parameters as input and output. After module defined, number of modules combined together to form network.

Network named as networkname which assemble a sub modules tic, toc. Instance modules are created by module xxx.

Connections are established by a network with input and output gates with certain time propagation delay.



Implementation of module:

Modules are written by a C++ language class. Here class name is xxx which contain subclass from cSimple module.

cSimple module contains two methods they are initialize (), handle message ().

Initialize() used to create message object and sent it through gate.

Handlemessage() method occurred whenever message arrive at module and it passed to next module through gate.

Each message contains packet, frame, jobs and represented as message (packets, frames, jobs). Event include events ( timers, timeouts) declared by cMessage objects on Omnet++

Implementation of utilities:

Utilities include various tools and they are described as follows:

  • Create file in directory:

$ opp-makemake1

Make1 is the makefile name in directory.

After create link the file.

  • Compile and link simulation:

$ make

  • Project execution:

network = networkname

By using this command, Network got executed.

  • Run project

$. /networkname.

By this command simulation window are displayed. To start simulation tic and toc are used for message communication with one another.

Omnet++ source code Benefits:

  • Highly modular structure.

  • Not limited with a network protocol simulations.

  • Well structured architecture.

Omnet++ which is open source software originally designed and developed many simulation frameworks to study and analyze various networks. Omnet++ source codes are easy to understand and analyze various network topology modules. Module can be rewritten and reused by many users based on our convenient. Omnet++ source code acts template to our code, so students are do their projects in Omnet++ with minimum cost and time in an efficient way and error free projects.