From e3d2677318030bfec170d7399f527dd6babf7a90 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 27 Aug 2023 13:12:23 +0200 Subject: ipcpd: Simplify including common enrollment code The common enrollment code between the unicast and broadcast IPCP included the same C source from a source file in the unicast and broadcast directories. Now it's handled by defining COMMON_SOURCES for the unicast and broadcast IPCP. For now, only the enrollment component is common. Two things are needed for the connection manager: * Routing to be fixed to use a supporting broadcast layer. Then management flows can be removed from the unicast IPCP (as they are in fact data transfer flows of the broadcast layer that supports the routing dissemination traffic). * DHT to enroll as part of IPCP enrollment. Now it enrolls when a data transfer flow is established to be more akin to how Kademlia nodes join a Kademlia DHT, but this should be revised to adhere more to O7s enrollment concepts. After that, the connection manager code will also be completely shared between the unicast and broadcast layer and the connmgr will also be common code. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/CMakeLists.txt | 3 +-- src/ipcpd/unicast/enroll.c | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 src/ipcpd/unicast/enroll.c (limited to 'src/ipcpd/unicast') diff --git a/src/ipcpd/unicast/CMakeLists.txt b/src/ipcpd/unicast/CMakeLists.txt index e1fe1074..c87a58c4 100644 --- a/src/ipcpd/unicast/CMakeLists.txt +++ b/src/ipcpd/unicast/CMakeLists.txt @@ -38,7 +38,6 @@ set(SOURCE_FILES connmgr.c dir.c dt.c - enroll.c fa.c main.c pff.c @@ -57,7 +56,7 @@ set(SOURCE_FILES routing/graph.c ) -add_executable(ipcpd-unicast ${SOURCE_FILES} ${IPCP_SOURCES} +add_executable(ipcpd-unicast ${SOURCE_FILES} ${IPCP_SOURCES} ${COMMON_SOURCES} ${KAD_PROTO_SRCS} ${LAYER_CONFIG_PROTO_SRCS}) target_link_libraries(ipcpd-unicast LINK_PUBLIC ouroboros-dev) diff --git a/src/ipcpd/unicast/enroll.c b/src/ipcpd/unicast/enroll.c deleted file mode 100644 index 500a3895..00000000 --- a/src/ipcpd/unicast/enroll.c +++ /dev/null @@ -1,3 +0,0 @@ -#define BUILD_IPCP_UNICAST - -#include "common/enroll.c" -- cgit v1.2.3