Simple Module EtherLLC

Package: inet.linklayer.ethernet
File: src/linklayer/ethernet/EtherLLC.ned

C++ definition

Provides Ethernet 802.3 encapsulation/decapsulation and dispatching to the appropriate higher layer by DSAP values.

Expected environment:

Functionality:

Processes commands received from upper layers, as described in Communication between LLC and higher layers. The following commands are supported:

Processing of packets received from the lower layers:

EtherLLC

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Used in compound modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

EtherHost (compound module)

An example host with one Ethernet port and traffic generators that generate Ethernet traffic directly. This host model does not contain higher layer protocols (IP, TCP).

EtherHost2 (compound module)

Example host model with one Ethernet port and several traffic generators to create traffic in the test network.

Properties:

Name Value Description
display i=block/fork

Gates:

Name Direction Size Description
upperLayerIn [ ] input

higher layer protocols or applications

upperLayerOut [ ] output

higher layer protocols or applications

lowerLayerIn input

to Ethernet MAC

lowerLayerOut output

to Ethernet MAC

Source code:

//
// Provides Ethernet 802.3 encapsulation/decapsulation and dispatching
// to the appropriate higher layer by DSAP values.
//
// Expected environment:
// - lowerLayerIn, lowerLayerOut gates should be connected
//   to Ethernet EtherMAC
// - upperLayerIn[], upperLayerOut[] gates should be connected to
//   higher layer protocols or applications
//
// Functionality:
//
// Processes commands received from upper layers, as described in
// <a href="llc-app.html">Communication between LLC and higher layers</a>.
// The following commands are supported:
// - IEEE802CTRL_DATA: send a frame.
//   Encapsulates packet into EtherFrameWithLLC. This includes assigning
//   dest address, ssap and dsap from the Ieee802Ctrl structure acompanying
//   the message. Src address will be filled in by EtherMAC.
// - IEEE802CTRL_REGISTER_DSAP: register application in LLC, as described in
//   <a href="appreg.html">Application registration</a>.
// - IEEE802CTRL_DEREGISTER_DSAP: deregister application, as described in
//   <a href="appreg.html">Application registration</a>.
// - IEEE802CTRL_SENDPAUSE: send PAUSE frame, as described in
//   <a href="ether-pause.html">PAUSE frames</a>.
//
// Processing of packets received from the lower layers:
// - decapsulate frames received from EtherMAC
// - sends received frames to corresponding application, based on dsap.
// - only servicetype=0 is implemented (connectionless)
// - reception of non-EtherFrameWithLLC objects (e.g. EthernetIIFrame,
//   EtherFrameWithSNAP) will cause a runtime error.
//
simple EtherLLC
{
    parameters:
        @display("i=block/fork");
    gates:
        input upperLayerIn[];   // higher layer protocols or applications
        output upperLayerOut[]; // higher layer protocols or applications
        input lowerLayerIn @labels(EtherFrame);     // to Ethernet MAC
        output lowerLayerOut @labels(EtherFrame);   // to Ethernet MAC
}