IIpv4

Package: inet.networklayer.ipv4

IIpv4

module interface

Module interface for IPv4 protocol implementations. Defines gates and parameters for modules that provide IPv4 protocol functionality. The IPv4 protocol provides datagram routing, fragmentation, and addressing between network interfaces and transport layer protocols.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Implemented by

Name Type Description
ExtLowerIpv4 compound module

Provides IPv4 layer functionality for network emulation that connects the simulation to a real network on the host computer. Sends packets from the simulation to the real network and receives packets from the real network into the simulation using raw sockets. Uses ~Ipv4Encap for packet encapsulation and ~ExtIpv4Socket for the connection to the host's networking stack.

ExtUpperIpv4 compound module

Provides IPv4 layer functionality for network emulation that connects simulated applications to a real network on the host computer. Uses a real TUN device on the host OS to capture and inject packets at the IP layer, allowing simulated applications to communicate with real-world network endpoints through the host's networking stack.

Ipv4 simple module

Implements the IPv4 protocol. The protocol header is represented by the ~Ipv4Header message class.

Used in compound modules

Name Type Description
ExtLowerIpv4NetworkLayer compound module

Provides a simplified network layer for emulation that connects the simulation to a real network on the host computer. Uses ~ExtLowerIpv4 to send packets from the simulation to the real network and receive packets from the real network into the simulation using raw sockets.

ExtUpperIpv4NetworkLayer compound module

Provides a network layer that connects the simulation to a real network on the host computer using a TUN device. Allows simulated applications to send and receive packets through the host's networking stack at the IP layer. Contains standard components like routing table and ARP, and uses ~ExtUpperIpv4 with a TUN device for external connectivity.

Ipv4NetworkLayer compound module

Network(1,2,3,4) layer of an IPv4 node.

Properties

Name Value Description
display i=block/routing

Source code

//
// Module interface for IPv4 protocol implementations. Defines gates and
// parameters for modules that provide IPv4 protocol functionality. The IPv4
// protocol provides datagram routing, fragmentation, and addressing between
// network interfaces and transport layer protocols.
//
moduleinterface IIpv4
{
    parameters:
        @display("i=block/routing");
    gates:
        input transportIn @labels(Ipv4ControlInfo/down,TcpHeader,UdpHeader,SctpHeader);
        output transportOut @labels(Ipv4ControlInfo/up,TcpHeader,UdpHeader,SctpHeader);
        input queueIn @labels(Ipv4Header,ArpPacket,Ieee802Ctrl);
        output queueOut @labels(Ipv4Header,ArpPacket,Ieee802Ctrl);
}

File: src/inet/networklayer/ipv4/Ipv4.ned