summaryrefslogtreecommitdiff
path: root/src/ipcpd/broadcast
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2023-08-27 13:12:23 +0200
committerSander Vrijders <sander@ouroboros.rocks>2023-08-30 10:02:44 +0200
commite3d2677318030bfec170d7399f527dd6babf7a90 (patch)
tree6f1083b38159d8118393b004dc86413ff24e50bd /src/ipcpd/broadcast
parent8183983c2c1cc50e3e0c82a8ab08d5fd66e0dc86 (diff)
downloadouroboros-e3d2677318030bfec170d7399f527dd6babf7a90.tar.gz
ouroboros-e3d2677318030bfec170d7399f527dd6babf7a90.zip
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 <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/broadcast')
-rw-r--r--src/ipcpd/broadcast/CMakeLists.txt3
-rw-r--r--src/ipcpd/broadcast/enroll.c24
2 files changed, 1 insertions, 26 deletions
diff --git a/src/ipcpd/broadcast/CMakeLists.txt b/src/ipcpd/broadcast/CMakeLists.txt
index af0d8fcf..d85f335e 100644
--- a/src/ipcpd/broadcast/CMakeLists.txt
+++ b/src/ipcpd/broadcast/CMakeLists.txt
@@ -20,11 +20,10 @@ set(SOURCE_FILES
# Add source files here
connmgr.c
dt.c
- enroll.c
main.c
)
-add_executable(ipcpd-broadcast ${SOURCE_FILES} ${IPCP_SOURCES}
+add_executable(ipcpd-broadcast ${SOURCE_FILES} ${IPCP_SOURCES} ${COMMON_SOURCES}
${LAYER_CONFIG_PROTO_SRCS})
target_link_libraries(ipcpd-broadcast LINK_PUBLIC ouroboros-dev)
diff --git a/src/ipcpd/broadcast/enroll.c b/src/ipcpd/broadcast/enroll.c
deleted file mode 100644
index 140c582a..00000000
--- a/src/ipcpd/broadcast/enroll.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Ouroboros - Copyright (C) 2016 - 2023
- *
- * Enrollment Task
- *
- * Dimitri Staessens <dimitri@ouroboros.rocks>
- * Sander Vrijders <sander@ouroboros.rocks>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., http://www.fsf.org/about/contact/.
- */
-#define BUILD_IPCP_BROADCAST
-
-#include "common/enroll.c"