Skip to content

Repository files navigation

README for microTCP Project

Overview

MicroTCP is a lightweight TCP implementation written in C. The project is modularly organized with libraries, utilities, and demo (Mini-REDIS fileserver) in order to test it.

Requirements

  • CMAKE version 3.18 or higher
  • Clang compiler (GCC is not suggested)
  • POSIX library
  • Pthread library

Compilation Instructions

  1. Navigate to the project root directory.

  2. Create a build directory:

    $ mkdir build
    $ cd build
  3. To configure the project:

    $ cmake ..

    Use the following options to enable specific modes:

    • DEBUG_MODE: Enable debug-specific features; Extensive logging, sanitizers, etc.
    • VERBOSE_MODE: Enables verbose logging, focuses mainly on microTCP-specific logs, excluding memory logging or other lower-level details (not recommended for benchmarking).
    • OPTIMIZED_MODE: Enables optimizations that break the initial constraints of the project. (Recommended for benchmarking)
    • IWYU-ENABLE: Enables Include-What-You-Use. This is for developers/maintainers as there is no advantaje for users of MicroTCP or mini-REDIS.

    For example:

    $ cmake -DDEBUG_MODE=ON -DVERBOSE_MODE=ON ..

    or

    $ cmake -DOPTIMIZED_MODE=ON ..
  4. To build the project:

    $ make

Running Mini-REDIS demo (Demo for MicroTCP)

After building, the project, you can navigate to:

$ build/executables

In the directory mention above you will find two programs; The server, and the client-side of my Mini-REDIS application.

Notes

  • If any issues arise, verify that the CMake version meets the minimum requirement.
  • Enabling DEBUG_MODE activates complete logging, including detailed memory and system-level logs, also it activates sanitizers. In case you manually change my cmake, make sure that you do not use sanitizers that clash with each other (ex. -fsanitize=memory,address)
  • VERBOSE_MODE
  • Also cmake is configured to support Include-What-You-Use inorder to provide warnings in case something is missing from the redundant or is missing from the #included headers. That way we can avoid inclusion inheritance. Also it helps minimize binary sizes, as you only include what you need and opposed to single headers, but in case something is removed it breaks the project, or adds overhead to each binary.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages