how to edit the layers in omnet++ or inet?

74 Views Asked by At

I want to create or edit the nodes in inet or omnet++.

Instead of having seven layers for example, I want a host with three layers (phys, mac and app)

enter image description here

1

There are 1 best solutions below

0
Rudi On BEST ANSWER

There are several approaches, from the most complex to the simplest:

  • Build your own node from scratch (you can use EthernetHost as an example)
  • Build your own host module but extend LinkLayerNodeBase. That will inherit only up to the link layer.
  • Just use StandardHost and disable the layers you don't need (i.e. set the parameter hasIpv4, hasUdp and hasTcp to false)
  • Just use StandardHost and ignore the unused layers. If an application opens a raw socket on layer 2 (like EthernetApp and all its descendant) then packets sent by the app will anyway directly sent to the linklayer and routed around the transport and network layers).