Package: inet.linklayer.base


simple module

Module base for different MAC protocols.

Inheritance diagram

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

Known subclasses

Name Type Description
AckingMac compound module

This module implements a trivial MAC protocol for use in AckingWirelessInterface.

BMac compound module

Implementation of B-MAC (called also Berkeley MAC, Low Power Listening or LPL). See C++ documentation for details.

CsmaCaMac compound module

Implements an imaginary CSMA/CA-based MAC protocol with optional acknowledgements and a retry mechanism. With the appropriate settings, it can approximate basic 802.11b ad-hoc mode operation.

Ieee80211Mac compound module

Implementation of the 802.11 MAC protocol. This module is intended to be used in combination with the Ieee80211Radio module as the physical layer.

Ieee802154Mac compound module

Generic CSMA protocol supporting Mac-ACKs as well as constant, linear or exponential backoff times.

LMac compound module

Implementation of L-MAC (Lightweight Medium Access Protocol for Wireless Sensor Networks).

ShortcutMac simple module

This module implements a simple shortcut to peer MAC protocol that completely bypasses the physical layer. Packets received from the upper layer protocols are never lost. The MAC protocol directly sends packets to the destination MAC protocol without any physical layer processing. Physical layer overhead is simply simulated by overhead bits, overhead transmission duration and a propagation delay.

XMac compound module

Implementation of X-MAC. See C++ documentation for details.


Name Type Description
LayeredProtocolBase simple module

Module base for different layered protocols.


Name Type Default value Description
interfaceTableModule string


Name Value Description
display i=block/rxtx


Name Direction Size Description
upperLayerIn input
upperLayerOut output
lowerLayerIn input
lowerLayerOut output


Name Type Unit
packetReceivedFromUpper cPacket
packetReceivedFromLower cPacket
packetDropped cPacket
packetSentToLower cPacket
packetSentToUpper cPacket

Source code

// Module base for different MAC protocols.
simple MacProtocolBase extends LayeredProtocolBase
        string interfaceTableModule;
        input upperLayerIn @labels(INetworkHeader/down);
        output upperLayerOut @labels(INetworkHeader/up);
        input lowerLayerIn @labels(ILinkLayerFrame/up);
        output lowerLayerOut @labels(ILinkLayerFrame/down);

File: src/inet/linklayer/base/MacProtocolBase.ned