Skip to content

Commit e9115cb

Browse files
committed
WIP: MPTCP and ID-INT
SCION-CPP: * Parse and emit MPTCP options * Improve handling of TCP * Improve checksum update * Add ID-INT client API and tests Scitra-TUN: * Add support for MPTCP * mptcpd connector (WIP) * Add --daemon option Applications: * idint-traceroute port from Go (WIP)
1 parent 21af945 commit e9115cb

122 files changed

Lines changed: 11748 additions & 863 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitmodules‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
[submodule "deps/spdlog"]
1717
path = deps/spdlog
1818
url = https://github.com/gabime/spdlog.git
19+
[submodule "deps/mptcpd"]
20+
path = deps/mptcpd
21+
url = https://github.com/multipath-tcp/mptcpd.git

‎.vscode/c_cpp_properties.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"${workspaceFolder}/deps/imtui/include",
1313
"${workspaceFolder}/deps/imtui/third-party/imgui",
1414
"${workspaceFolder}/deps/spdlog/include",
15+
"${workspaceFolder}/deps/mptcpd/include",
1516
"${workspaceFolder}/examples/c/include",
1617
"${workspaceFolder}/examples/include",
1718
"${workspaceFolder}/include",

‎.vscode/settings.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,15 @@
153153
"C_Cpp.default.cppStandard": "c++23",
154154
"C_Cpp.default.cStandard": "c17",
155155
"cSpell.words": [
156+
"demultiplex",
156157
"drkey",
158+
"MPTCP",
159+
"mptcpd",
157160
"pmtu",
158161
"recvmmsg",
159162
"sendmmsg",
163+
"subflow",
164+
"subflows",
160165
"urgptr"
161166
],
162167
"python.analysis.extraPaths": [

‎CMakeLists.txt‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,12 @@ target_sources(scion-cpp
199199
"src/addr/generic_ip.cpp"
200200
"src/addr/isd_asn.cpp"
201201
"src/bit_stream.cpp"
202+
"src/crypto/aes.cpp"
202203
"src/daemon/client.cpp"
203204
"src/default_address.cpp"
205+
"src/detect_cpu.cpp"
204206
"src/error_codes.cpp"
207+
"src/extensions/idint.cpp"
205208
"src/hdr/details.cpp"
206209
"src/murmur_hash3.cpp"
207210
"src/path/path_meta.cpp"
@@ -223,6 +226,7 @@ target_sources(scion-cpp
223226
"include/scion/asio/scmp_socket.hpp"
224227
"include/scion/asio/udp_socket.hpp"
225228
"include/scion/bit_stream.hpp"
229+
"include/scion/crypto/aes.hpp"
226230
"include/scion/daemon/client.hpp"
227231
"include/scion/daemon/co_client.hpp"
228232
"include/scion/details/bit.hpp"
@@ -231,9 +235,13 @@ target_sources(scion-cpp
231235
"include/scion/details/flags.hpp"
232236
"include/scion/details/from_chars.hpp"
233237
"include/scion/details/protobuf_time.hpp"
238+
"include/scion/detect_cpu.hpp"
234239
"include/scion/drkey/drkey.hpp"
240+
"include/scion/drkey/key_cache.hpp"
235241
"include/scion/error_codes.hpp"
236242
"include/scion/extensions/extension.hpp"
243+
"include/scion/extensions/idint_instr.hpp"
244+
"include/scion/extensions/idint.hpp"
237245
"include/scion/extensions/idint.hpp"
238246
"include/scion/hdr/details.hpp"
239247
"include/scion/hdr/ethernet.hpp"
@@ -364,6 +372,9 @@ set(SRC_TEST
364372
"tests/asio/test_addresses.cpp"
365373
"tests/asio/test_scmp_socket.cpp"
366374
"tests/asio/test_udp_socket.cpp"
375+
"tests/crypto/test_aes.cpp"
376+
"tests/drkey/test_key_cache.cpp"
377+
"tests/extensions/test_idint_api.cpp"
367378
"tests/hdr/test_checksum.cpp"
368379
"tests/hdr/test_idint.cpp"
369380
"tests/hdr/test_ip.cpp"
@@ -418,6 +429,12 @@ endif()
418429

419430
add_subdirectory(scitra)
420431

432+
# ============
433+
# Applications
434+
# ============
435+
436+
add_subdirectory(applications/idint-traceroute)
437+
421438
# ========
422439
# Examples
423440
# ========

‎Doxyfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PROJECT_NAME = "SCION-CPP"
4848
# could be handy for archiving the generated documentation or if some version
4949
# control system is used.
5050

51-
PROJECT_NUMBER = "0.0.4"
51+
PROJECT_NUMBER = "0.0.5"
5252

5353
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5454
# for a project that appears at the top of each page and should give viewer a

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ BUILD_DIR := $(SRC_ROOT)/build
77
PKG_DIR := $(SRC_ROOT)/out
88
PYTHONPATH := $(PYTHONPATH):$(SRC_ROOT)/python
99

10-
DOCKER_TAG := 0.0.4
10+
DOCKER_TAG := 0.0.5
1111
HOST_UID := $(shell id -u):$(shell id -g)
1212

1313
TEST_DATA=$(addsuffix .bin,$(basename $(shell find tests scitra/tests -name '*.py')))

‎README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ with SCION-aware wrappers.
4040
- [Scitra-TUN](scitra/docs/scitra-tun.md) A SCION-IP translator using TUN interfaces on Linux.
4141
- [SCION API Interposers](interposer/): Deep SCION integration without touching application code.
4242
Currently only available for glibc in Linux-like environments.
43+
- [ID-INT Traceroute](applications/idint-traceroute/): TODO
4344

4445
### Documentation ###
4546
API documentation is generated with Doxygen.
@@ -133,6 +134,7 @@ test .............. scion++ and scionc unit tests
133134
For scitra-tun (Linux only):
134135
- libmnl >= 1.0.5
135136
- libcap >= 3.1.3
137+
- libsystemd-dev >= 255.4
136138
- [ImTui](https://github.com/ggerganov/imtui) (included as submodule)
137139
- [spdlog](https://github.com/gabime/spdlog) (included as submodule)
138140

@@ -144,7 +146,8 @@ Most dependencies can be built and installed with vcpkg:
144146
```bash
145147
vcpkg install
146148
```
147-
In Linux, `libmnl` and `libcap` must be installed using the system's package manager.
149+
In Linux, `libmnl`, `libcap`, and `libsystemd-dev` must be installed using the system's package
150+
manager.
148151

149152
All required build tools and dependencies can also be installed with apt (Ubuntu 24.04).
150153
```bash

‎applications/README.md‎

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cmake_minimum_required(VERSION 3.28)
2+
3+
set(IDINT_TRACEROUTE_SRC
4+
"main.cpp"
5+
"tables.cpp"
6+
)
7+
add_executable(idint-traceroute ${IDINT_TRACEROUTE_SRC})
8+
target_link_libraries(idint-traceroute PRIVATE scion-cpp CLI11::CLI11)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright (c) 2026 Lars-Christian Schulz
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in all
11+
// copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
// SOFTWARE.
20+
21+
#pragma once
22+
23+
#include <scion/scion.hpp>
24+
25+
#include <string>
26+
27+
28+
struct ServerCfg
29+
{
30+
bool verbose = false;
31+
};
32+
33+
struct ClientCfg
34+
{
35+
scion::ScIPEndpoint remote;
36+
float timeout = 1.0f;
37+
float period = 1.0f;
38+
std::uint8_t skip = 0;
39+
unsigned limit = 0;
40+
int path = -1;
41+
scion::idint::Instr instrs[4] = {};
42+
scion::idint::AM agrMode = scion::idint::AM::Off;
43+
scion::idint::AF agrFuncs[4] = {};
44+
bool stun = false;
45+
bool reqNodeId = false;
46+
bool reqNodeCnt = false;
47+
bool reqIgr = false;
48+
bool reqEgr = false;
49+
bool noVerify = false;
50+
bool encrypt = false;
51+
bool tui = false;
52+
};
53+
54+
struct Config
55+
{
56+
std::string sciond = "127.0.0.1:30255";
57+
scion::generic::IPEndpoint local;
58+
bool serverMode = false;
59+
ServerCfg server;
60+
ClientCfg client;
61+
};

0 commit comments

Comments
 (0)