doip-server

CI/CD Pipeline Coverage codecov License C++17 CMake doctest

C/C++ server library for ISO 13400-2 Diagnostics over IP (DoIP).

Features

CAUTION: The current API is under construction and may change at any time.

Dependencies

doip-server uses spdlog for logging and CLI11 for command line parsing. The library is downloaded automatically, or you may install it locally via:

sudo apt install libspdlog-dev libcli11-dev
# For unit tests
sudo apt install doctest-dev
# For coverage tests
sudo apt install gcovr

See Logging for details.

Getting started

Quick start — read the generated tutorial for the example server:

If you want to generate the docs locally, install Doxygen and Graphviz and run:

# Install Doxygen and Graphviz
sudo apt install doxygen graphviz
doxygen Doxyfile
xdg-open docs/html/index.html

Examples

  1. Minimal client/server
  2. UDP discover
  3. UDS download (test)

Installation

  1. To install the library on the system, first get the source files with:
git clone https://github.com/Magolves/doip-server.git
  1. Enter the directory ‘doip-server’ and build the library with:
cmake . -Bbuild
cd build
make
  1. To install the library into /usr/lib/doip-server, use:
sudo make install

Installing doctest

sudo apt install doctest

Debugging

Dump UDP

sudo tcpdump -i any udp port 13400 -X

Examples

The project includes a small example DoIP server demonstrating how to use the DoIPServer and DoIPServerModel APIs and how to register UDS handlers.

See the “Examples” section in the generated Doxygen main page for additional annotated links to these files.

Acknowledgments

This project was initially inspired by and based on https://github.com/AVL-DiTEST-DiagDev/libdoip by AndiAn94 and GerritRiesch94. Over time, the codebase has been substantially rewritten and evolved in a different (server) direction. The original license (Apache 2.0) was therefore kept.

The original fork is no longer maintained.

References