Skip to the content.

Deployment Guide

Installation

To install a release, use the command for your platform in the Quick Start — on the landing page, or in the root README on GitHub. This section builds and installs from a checkout instead: every block runs from the root of the checkout and leaves you there.

From Source

make -C sdk -j$(nproc)
sudo make -C sdk install

Default installation directory: /opt/mmt/dpi/

To install to a custom directory, build and install with the same MMT_BASE (make install refuses a build made for another prefix):

make -C sdk -j$(nproc) MMT_BASE=/path/to/install
sudo make -C sdk install MMT_BASE=/path/to/install

From Debian Package

make -C sdk deb
sudo dpkg -i sdk/mmt-dpi_*.deb

An ENABLESEC=1 build also produces mmt-dpi-security_*.deb, which holds the security and fuzz engines (GPL-3.0-or-later, issue #497). Install it alongside mmt-dpi; it requires the same version.

Release signing key

Release source tarballs (mmt-dpi-<version>.tar.gz.asc) are signed by Montimage Release Signing <developer@montimage.eu>; the same key signs the APT repository at https://montimage.github.io/packages. The public key is debian/upstream/signing-key.asc. Primary key fingerprint:

2163 0C36 2624 FB20 5C3D  0B18 4F95 AECC FEF4 8443

Key handling (rotation, expiry extension, revocation) is documented in Montimage/packages docs/signing-key.md.

Uninstall

sudo make -C sdk uninstall    # same MMT_BASE as the install; removes the loader drop-in too

Installed Files

After installation, the following files are placed:

/opt/mmt/
├── dpi/
│   ├── include/     # Header files for development
│   └── lib/         # Shared libraries (libmmt_core.so, etc.)
├── plugins/         # Protocol plugin libraries (rules/common.mk:7)
└── examples/        # Example sources (rules/common.mk:8)

The library path is configured via /etc/ld.so.conf.d/mmt-dpi.conf (sdk/Makefile:139,374): a root make install writes it whatever the prefix (opt out with LDCONF=0), and make uninstall removes it — see Agent Environment Notes §4.

Linking Against MMT-DPI

gcc -o myapp myapp.c \
    -I /opt/mmt/dpi/include \
    -L /opt/mmt/dpi/lib \
    -lmmt_core -ldl

For TCP/IP protocol attributes:

gcc -o myapp myapp.c \
    -I /opt/mmt/dpi/include \
    -L /opt/mmt/dpi/lib \
    -lmmt_core -ldl -lpcap

A consumer links libmmt_core only. The core loads the protocol plugins at run time, and mmt_tcpip.h’s class lookups go through it, so linking a plugin as well makes it a hard start-up dependency and maps a second copy of it.

Runtime Configuration

Plugin Loading

By default, plugins are loaded from /opt/mmt/plugins/ (rules/common.mk:7). They load only from that compiled-in $(MMT_BASE)/plugins directory, or from the absolute directory named by MMT_DPI_PLUGINS_DIR, read with secure_getenv() (src/mmt_core/src/plugins_engine.c:48-60); the working directory and the application binary’s directory are never scanned.

Environment Variables

The library reads these variables at run time; each is optional, and unset or empty leaves the built-in behaviour unchanged. Build-time paths, including the compiled-in plugin directory, follow MMT_BASE; that contract is stated once, in Agent Environment Notes §4 MMT_BASE Install-Prefix Behavior.

Variable Effect Read at
MMT_DPI_PLUGINS_DIR Absolute directory to load the plugins from instead of the compiled-in $(MMT_BASE)/plugins; a relative or unreadable value makes init_extraction() fail. Read with secure_getenv(), so a set-uid/set-gid process ignores it src/mmt_core/src/plugins_engine.c:50 (name: src/mmt_core/private_include/plugins_engine.h:27)
MMT_DPI_LOG_LEVEL Threshold of the stderr diagnostics logger (default off); levels and the SHOWLOG build in Agent Environment Notes §2 src/mmt_core/src/mmt_log.c:68
MMT_DPI_PROFILES_FILE File of custom DPI profiles, loaded before MMT_DPI_PROFILE is resolved — see DPI Profiles. Read with secure_getenv(), so a set-uid/set-gid process ignores it src/mmt_core/src/dpi_profiles.c:258
MMT_DPI_PROFILE Name of the DPI profile each new handler applies; an unknown name keeps the built-in defaults — see DPI Profiles src/mmt_core/src/dpi_profiles.c:270
MMT_DPI_PORT_MAP_FILE File of external port hints — see External Attribution. Read with secure_getenv(), so a set-uid/set-gid process ignores it src/mmt_tcpip/lib/mmt_tcpip_plugin_internal.c:676
MMT_DPI_IP_RANGES_FILE File of external IP-range attribution rules — see External Attribution. Read with secure_getenv(), so a set-uid/set-gid process ignores it src/mmt_tcpip/lib/mmt_tcpip_classif_utils.c:574
MMT_DETERMINISTIC_SEED Test and reproducibility knob: any non-empty value but 0 makes the hash-table seeds the fixed legacy sequence instead of a per-process random one. ⚠ It gives up the seeds’ resistance to hash flooding — never set it in production. A set-uid/set-gid process (AT_SECURE) ignores it src/mmt_core/src/hash_utils.c:253-255
MMT_SEC_REACTION_DIR ENABLESEC=1 security engine only: absolute folder for the reaction files, instead of the compiled-in $(MMT_BASE)/probe/conf; read with secure_getenv() src/mmt_security/tips_report.c:970

Production Considerations

See Deployment Considerations for detailed guidance on: