InterfaceTable

Package: inet.networklayer.common

simple module InterfaceTable

Keeps the table of network interfaces.

Interfaces are dynamically registered by the corresponding L2 modules, e.g. PppInterface. In addition to registered interfaces, a loopback interface will also be created. This table only contains protocol-independent properties of interfaces – IPv4 or IPv6 specific per-interface data (addresses etc) are kept in Ipv4RoutingTable and Ipv6RoutingTable. Must be named as interfaceTable.

This module has no gates; all functionality can be accessed via member functions of the C++ module class. For detailed info, please see the C++ documentation of the class (Doxygen).

inet.networklayer.common.InterfaceTableInterfaceTablesimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

LinkLayerNodeBase

compound module

An extension of the basic node infrastructure with link layer functionality. Provides support for various network interfaces and link layer protocols, forming the foundation for network connectivity.

EthernetHost

compound module

A simplified network device that communicates directly over Ethernet without higher layer protocols like IP or TCP. It provides a basic host model for Ethernet-only simulations.

EthernetSwitch

compound module

EthernetSwitch models a Layer 2 Ethernet switch with support for various IEEE 802.1 protocols and features. It provides frame forwarding based on MAC addresses and implements multiple switching technologies.

AccessPoint

compound module

A wireless access point device that connects wireless stations (like WirelessHost) to a wired network. Supports multiple wireless radios and multiple Ethernet ports.

Extends

Name

Type

Description

SimpleModule

simple module

Base module for all INET simple modules.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“{numInterfaces} interfaces”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

displayAddresses

bool

false

Whether to display IP addresses on links

Properties

Name

Value

Description

class

InterfaceTable

display

i=block/table

Signals

Name

Type

Unit

Description

interfaceConfigChanged

inet::NetworkInterfaceChangeDetails

interfaceCreated

inet::NetworkInterface

interfaceDeleted

inet::NetworkInterface

interfaceGnpConfigChanged

inet::NetworkInterfaceChangeDetails

interfaceIpv4ConfigChanged

inet::NetworkInterfaceChangeDetails

interfaceIpv6ConfigChanged

inet::NetworkInterfaceChangeDetails

interfaceStateChanged

inet::NetworkInterfaceChangeDetails

ipv4McastChange

inet::Ipv4MulticastGroupSourceInfo

ipv4MulticastGroupJoined

inet::Ipv4MulticastGroupInfo

ipv4MulticastGroupLeft

inet::Ipv4MulticastGroupInfo

ipv4MulticastGroupRegistered

inet::Ipv4MulticastGroupInfo

ipv4MulticastGroupUnregistered

inet::Ipv4MulticastGroupInfo

ipv4MulticastListenerChange

inet::Ipv4MulticastGroupSourceInfo

ipv6AddressAssigned

inet::Ipv6AddressInfo

ipv6AddressRemoved

inet::Ipv6AddressInfo

ipv6McastChange

inet::Ipv6MulticastGroupSourceInfo

ipv6MulticastGroupJoined

inet::Ipv6MulticastGroupInfo

ipv6MulticastGroupLeft

inet::Ipv6MulticastGroupInfo

ipv6MulticastGroupRegistered

inet::Ipv6MulticastGroupInfo

ipv6MulticastGroupUnregistered

inet::Ipv6MulticastGroupInfo

ipv6MulticastListenerChange

inet::Ipv6MulticastGroupSourceInfo

Source code

//
// Keeps the table of network interfaces.
//
// Interfaces are dynamically registered by the corresponding L2 modules, e.g.
// ~PppInterface. In addition to registered interfaces, a loopback interface
// will also be created. This table only contains protocol-independent
// properties of interfaces -- IPv4 or IPv6 specific per-interface data
// (addresses etc) are kept in ~Ipv4RoutingTable and ~Ipv6RoutingTable.
// Must be named as `interfaceTable`.
//
// This module has no gates; all functionality can be accessed via member
// functions of the C++ module class. For detailed info, please see the C++
// documentation of the class (Doxygen).
//
simple InterfaceTable extends SimpleModule
{
    parameters:
        @class(InterfaceTable);
        bool displayAddresses = default(false);  // Whether to display IP addresses on links
        displayStringTextFormat = default("{numInterfaces} interfaces");
        @display("i=block/table");
        @signal[interfaceCreated](type=inet::NetworkInterface);
        @signal[interfaceDeleted](type=inet::NetworkInterface);
        @signal[interfaceStateChanged](type=inet::NetworkInterfaceChangeDetails);
        @signal[interfaceConfigChanged](type=inet::NetworkInterfaceChangeDetails);
        @signal[interfaceIpv4ConfigChanged](type=inet::NetworkInterfaceChangeDetails);
        @signal[interfaceIpv6ConfigChanged](type=inet::NetworkInterfaceChangeDetails);
        @signal[interfaceGnpConfigChanged](type=inet::NetworkInterfaceChangeDetails);
        @signal[ipv4MulticastGroupJoined](type=inet::Ipv4MulticastGroupInfo);
        @signal[ipv4MulticastGroupLeft](type=inet::Ipv4MulticastGroupInfo);
        @signal[ipv4McastChange](type=inet::Ipv4MulticastGroupSourceInfo);
        @signal[ipv4MulticastGroupRegistered](type=inet::Ipv4MulticastGroupInfo);
        @signal[ipv4MulticastGroupUnregistered](type=inet::Ipv4MulticastGroupInfo);
        @signal[ipv4MulticastListenerChange](type=inet::Ipv4MulticastGroupSourceInfo);
        @signal[ipv6MulticastGroupJoined](type=inet::Ipv6MulticastGroupInfo);
        @signal[ipv6MulticastGroupLeft](type=inet::Ipv6MulticastGroupInfo);
        @signal[ipv6McastChange](type=inet::Ipv6MulticastGroupSourceInfo);
        @signal[ipv6MulticastGroupRegistered](type=inet::Ipv6MulticastGroupInfo);
        @signal[ipv6MulticastGroupUnregistered](type=inet::Ipv6MulticastGroupInfo);
        @signal[ipv6MulticastListenerChange](type=inet::Ipv6MulticastGroupSourceInfo);
        @signal[ipv6AddressAssigned](type=inet::Ipv6AddressInfo);
        @signal[ipv6AddressRemoved](type=inet::Ipv6AddressInfo);
}

File: src/inet/networklayer/common/InterfaceTable.ned