IProtocolLayer

Package: inet.protocolelement.contract

module interface IProtocolLayer

Interface for all protocol layer modules that connect to a higher and to a lower protocol layer, both of which are optional.

Usage diagram

Inheritance diagram

Implemented by

Name

Type

Description

BridgingLayer

compound module

Provides various layer 2 services such as packet forwarding, interface selection, virtual LAN handling, stream handling.

DirectionReverserLayer

compound module

Provides a layer that combines the decision for local delivery with the service of reversing the direction of an incoming packet to outgoing for packet forwarding.

InterfaceRelayLayer

compound module

Combines the interface MAC address learning from incoming packets with the outgoing interface selection for outgoing packets into a single layer.

MacRelayUnit

simple module

Implements Ethernet switch functionality by relaying frames between different ports based on destination MAC addresses. Maintains a MAC address table that maps addresses to ports, learns addresses from incoming frames, and forwards frames appropriately. Handles unicast, multicast, and broadcast traffic according to standard Ethernet switching rules, with support for VLANs.

Ieee8021dRelay

simple module

Forwards frames (~EtherFrame) based on their destination MAC addresses to appropriate ports.

Ieee8021qLayer

compound module

Implements IEEE 802.1Q protocol functionality as a layered architecture with policy and protocol components. The policy submodule handles VLAN filtering and mapping, while the protocol submodule manages tag encapsulation/ decapsulation. Supports both C-VLAN (0x8100) and S-VLAN (0x88A8) tag types through configuration. Enables network segmentation and traffic control in Ethernet networks by processing VLAN tags according to configured policies.

Ieee8021qProtocol

compound module

Implements the IEEE 802.1Q protocol encapsulation/decapsulation. It also provides socket support so applications can use the protocol directly.

StreamFilterLayer

compound module

Combines two packet filters into a protocol layer so that it can be used in a layered compound module. There are separate submodules for ingress and egress traffic, but in most cases only the ingress filter is used.

StreamPolicyLayer

compound module

(no description)

Ieee8021rLayer

compound module

(no description)

Ieee8021rProtocol

compound module

Implements the IEEE 802.1r protocol encapsulation/decapsulation.

MrpRelay

simple module

Relay unit with support for the Media Redundancy Protocol (MRP), defined in IEC 62439-2.

VlanPolicyLayer

compound module

(no description)

Mpls

simple module

Implements the MPLS protocol.

EthernetPlca

simple module

Implements the Ethernet Phyisical Layer Collision Avoidance (PLCA) protocol defined in the IEEE 802.3cg-2019 standard. It can be used to build an Ethernet network interface that can be connected to 10BASE-T1S multidrop links.

OmittedProtocolLayer

compound module

Implements the module given interface and can be used as an omitted optional module that removes itself from the module hierarchy during initialization.

StreamCoderLayer

compound module

Combines a stream decoder and a stream encoder into a layer. For incoming packets, the stream decoder determines the stream of the packet. For outgoing packets, the stream encoder determines the VLAN id, etc. of the packet.

StreamIdentifierLayer

compound module

Wraps a stream identifier into a protocol layer so that it can be used in a layered compound module.

StreamRelayLayer

compound module

Combines a stream merger and a stream splitter module into a stream relay layer. For incoming packets, the identified streams are merged by the stream merger. For outgoing packets, the requested streams are split by the stream splitter.

Used in compound modules

Name

Type

Description

BridgingLayer

compound module

Provides various layer 2 services such as packet forwarding, interface selection, virtual LAN handling, stream handling.

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.

Known subclasses

Name

Type

Description

IIeee8021qLayer

module interface

(no description)

IIeee8021rLayer

module interface

(no description)

IMacRelayUnit

module interface

Module interface for modules providing Ethernet switch functionality. These modules handle the mapping between ports and MAC addresses, and forward frames to appropriate ports.

Properties

Name

Value

Description

display

i=block/layer

omittedTypename

OmittedProtocolLayer

Source code

//
// Interface for all protocol layer modules that
// connect to a higher and to a lower protocol layer, both of which are optional.
//
moduleinterface IProtocolLayer
{
    parameters:
        @omittedTypename(OmittedProtocolLayer);
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
}

File: src/inet/protocolelement/contract/IProtocolLayer.ned