Skip to content
Daniel Stolpmann edited this page Apr 19, 2024 · 2 revisions

In FlowEmu, the emulation model is represented by a graph that consists of modules. The packets enter and leave the graph via socket modules. The packets are then forwarded from one module to the next, where each module applies an impairment to the packets. FlowEmu is designed for a single bidirectional data flow and assumes the main flow of data to go from the source on the left-hand side to the sink on the right-hand side.

Modules

The network emulation logic of FlowEmu is implemented in modules. Each module implements an impairment that is applied to the packets. The modules can be connected to each other to form the graph.

Types

FlowEmu contains a variety of module types that can be composed to create the emulation model. If the provided modules are not sufficient for the task at hand, own modules can be added.

Raw Socket

The raw socket module is a special module that is instantiated by FlowEmu itself twice to connected to the source and the sink interface. These modules cannot be removed by the user and no further modules of this type can be added.

Screenshot of a raw socket module

The source socket has its port on the right-hand side, while the sink socket has its port on the left-hand side.

Included Modules

FlowEmu come with the following modules included:

Components

A module can define different components that are used to interact with it and to connect the modules to each other. All components are visible to the user in the GUI.

Ports

Ports are used to connect the modules to each other. A module can have an arbitrary number of ports. FlowEmu supports four different port types:

  • Receiving: A receiving port can be connected to a sending port to get packets in push convention. This port is marked by orange color and an inward facing arrow.
    Screenshot of a receiving port
  • Sending: A sending port can be connected to a receiving port to sent packets in push convention. This port is marked by orange color and an outward facing arrow.
    Screenshot of a sending port
  • Requesting: A requesting port can be connected to a responding port to get packets in pull convention. This port is marked by purple color and a rectangular end.
    Screenshot of a requesting port
  • Responding A responding port can be connected to a requesting port to sent packets in pull convention. This port is marked by purple color and a round end.
    Screenshot of a responding port

In summary, there are ports for both, push and pull, packet forwarding conventions and only different ports of the same color can be connected.

Parameters

Parameters provide configuration input to a module. A module can have an arbitrary number of parameters, each with its own label and unit. FlowEmu supports different parameter types:

  • Double: A double parameter is shown in the GUI as a numeric input field with buttons for decrementing and incrementing the value. A numerical value can be entered either directly or by using the buttons. The parameter has a default value, optional minimum and maximum values, and a step width that is applied by the decrementing and incrementing buttons. If a value is provided that is out of range, it will be set to the minimum or maximum value, respectively.
  • Bool: A boolean parameter is shown in the GUI as a checkbox. The parameter has a default value.
  • String: A string parameter is shown in the GUI as a text input field. The parameter has a default value.
  • StringSelect: A string select parameter is shown in the GUI as a drop-down list. The parameter has a default value and list of options from which the user can choose a value.

Statistics

Statistics provide numeric output from a module. A module can have an arbitrary number of statistics, each with its own label and unit. A statistic value is represented by a single double precision floating-point value.

Paths

A path is a connection from a port of a module to a port of another module. Paths can only be created between the corresponding ports for a particular packet forwarding convention.

Save to/load from file

FlowEmu graphs can be stored in a file. For this, the graph is serialized into JSON format. The graphs are stored in config/graphs. When starting/stopping FlowEmu, the graph is automatically loaded from/save to autosave.json.