OMNET++ INET TUTORIAL

OMNeT++ is a Open source modular framework which is best suited for wired,wireless and mobile networks.INET evolves through contributions and feedback from user community.INET is also a Open source framework which is largely depend on user forum and contributions.

OMNeT++ INET

INET versions:

  • INET 3.0.0
  • INET 2.99.1
  • INET 2.6.0

 

Modules parameter ip address in INET:

  • literal IPv4 address: “186.54.66.2”
  • literal IPv6 address: “3011:7cd6:750b:5fd6:aba3:c231:e9f9:6a43”
  • module name: “server”, “subnet.server[3]”
  • interface of a host or router: “server/eth0”, “subnet.server[3]/eth0”
  • IPv4 or IPv6 address of a host or router: “server(ipv4)”, “subnet.server[3](ipv6)”
  • IPv4 or IPv6 address of an interface of a host or router: “server/eth0(ipv4)”, “sub-net.server[3]/eth0(ipv6)

Download Sample Source Code for OMNeT++ INET TUTORIAL


void PPP::initialize(
int stage){
if (stage==0) 
{
...
interfaceEntry = registerInterface(datarate);
...
}
InterfaceEntry *PPP::registerInterface(double datarate)
{
InterfaceEntry *e = new InterfaceEntry();
e->setName(OPP_Global::stripnonalnum(getParentModule()->getFullName()).c_str());
e->setDatarate(datarate);
InterfaceToken token(0, simulation.getUniqueNumber(), 64);e->setInterfaceToken(token);
e->setMtu(par("mtu"));
e->setMulticast(true);e->setPointToPoint(true);
IInterfaceTable *ift = InterfaceTableAccess().get();ift->addInterface(e, this);
return e;
}