From c26f215a55718d31d8d0778f750325c0dcdb915d Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 6 Aug 2025 12:29:03 +0200 Subject: ipcpd: Add protocol debug option for link-state The link-state routing component now has a protocol debugging option, activated by enabling the DEBUG_PROTO_LS flag at build time in a debug build. Example output (sender and receiver): LSU [81:8a:1f:9b -- 50:c6:2d:03 seq: 000000000] --> 50:c6:2d:03 LSU [81:8a:1f:9b -- 50:c6:2d:03 seq: 000000000] <-- 50:c6:2d:03 In larger networks, forwarded LSUs are marked as such: LSU [ee:53:ae:f8 -- e5:33:e4:8d seq: 000000006] --> e5:33:e4:8d [forwarded] This also aligns the address printing using a similar ethernet-like formatting such as the DHT component. Small code cleanup in the graph component. Note: eventually the link state dissemination should move to a broadcast Layer instead of the link state component doing the forwarding. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/dir/dht.c | 2 +- src/ipcpd/unicast/dir/tests/CMakeLists.txt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'src/ipcpd/unicast/dir') diff --git a/src/ipcpd/unicast/dir/dht.c b/src/ipcpd/unicast/dir/dht.c index c7205505..4a243059 100644 --- a/src/ipcpd/unicast/dir/dht.c +++ b/src/ipcpd/unicast/dir/dht.c @@ -2863,7 +2863,7 @@ static void do_dht_kv_store(const dht_store_msg_t * store) tm = gmtime(&exp); strftime(tmstr, sizeof(tmstr), RIB_TM_FORMAT, tm); - log_info(KV_FMT " Stored value until %s.", KV_VAL(key, val), tmstr); + log_dbg(KV_FMT " Stored value until %s.", KV_VAL(key, val), tmstr); } static dht_msg_t * do_dht_kv_find_node_req(const dht_find_req_msg_t * req) diff --git a/src/ipcpd/unicast/dir/tests/CMakeLists.txt b/src/ipcpd/unicast/dir/tests/CMakeLists.txt index 41a18c27..f62ed993 100644 --- a/src/ipcpd/unicast/dir/tests/CMakeLists.txt +++ b/src/ipcpd/unicast/dir/tests/CMakeLists.txt @@ -15,9 +15,6 @@ include_directories(${CMAKE_BINARY_DIR}/include) get_filename_component(PARENT_PATH ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) get_filename_component(PARENT_DIR ${PARENT_PATH} NAME) -set(DEBUG_PROTO_DHT FALSE CACHE BOOL - "Add DHT protocol message output to debug logging") - create_test_sourcelist(${PARENT_DIR}_tests test_suite.c # Add new tests here dht_test.c -- cgit v1.2.3