summaryrefslogtreecommitdiff
path: root/src/ipcpd/broadcast
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2022-03-06 15:15:51 +0100
committerSander Vrijders <sander@ouroboros.rocks>2022-03-08 17:40:17 +0100
commit40ca5385e97f393d0c231446f117ad43465735a7 (patch)
tree019bfcefe5899c545403648807372d7b2e97ee73 /src/ipcpd/broadcast
parent22526848c5a7b48f8b45988bdfbc6e0ce7a9f712 (diff)
downloadouroboros-40ca5385e97f393d0c231446f117ad43465735a7.tar.gz
ouroboros-40ca5385e97f393d0c231446f117ad43465735a7.zip
ipdpd: Pass MPL to application at flow_allocation
The maximum packet lifetime (MPL) is a property of the flow that needs to be passed to the reliable transmission protocol (FRCP) for its correct operation. Previously, the value of MPL was set fixed as one of the (fixed) Delta-t parameters. This patch makes the MPL a property of the layer, and it can now be set per layer-type at build time. This is a step towards a proper MPL estimator in the flow allocator. 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.txt2
-rw-r--r--src/ipcpd/broadcast/main.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ipcpd/broadcast/CMakeLists.txt b/src/ipcpd/broadcast/CMakeLists.txt
index afcc8696..af0d8fcf 100644
--- a/src/ipcpd/broadcast/CMakeLists.txt
+++ b/src/ipcpd/broadcast/CMakeLists.txt
@@ -13,6 +13,8 @@ include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_BINARY_DIR}/include)
set(IPCP_BROADCAST_TARGET ipcpd-broadcast CACHE INTERNAL "")
+set(IPCP_BROADCAST_MPL 60 CACHE STRING
+ "Default maximum packet lifetime for the broadcast IPCP, in seconds")
set(SOURCE_FILES
# Add source files here
diff --git a/src/ipcpd/broadcast/main.c b/src/ipcpd/broadcast/main.c
index 522d1391..03c1e746 100644
--- a/src/ipcpd/broadcast/main.c
+++ b/src/ipcpd/broadcast/main.c
@@ -224,6 +224,7 @@ static int broadcast_ipcp_join(int fd,
qosspec_t qs)
{
struct conn conn;
+ time_t mpl = IPCP_BROADCAST_MPL;
(void) qs;
@@ -236,7 +237,7 @@ static int broadcast_ipcp_join(int fd,
notifier_event(NOTIFY_DT_CONN_ADD, &conn);
- ipcp_flow_alloc_reply(fd, 0, NULL, 0);
+ ipcp_flow_alloc_reply(fd, 0, mpl, NULL, 0);
return 0;
}