From e6c2d4c9c6b8b12bbcf7bc8bd494b3ba56133e1f Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 23 Feb 2024 09:29:47 +0100 Subject: lib: Revise app flow allocation This revises the application flow allocator to use the flow_info struct/message between the components. Revises the messaging to move the use protocol buffers to its own source (serdes-irm). Adds a timeout to the IRMd flow allocator to make sure flow allocations don't hang forever (this was previously taken care of by the sanitize thread). Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- include/ouroboros/sockets.h.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/ouroboros/sockets.h.in') diff --git a/include/ouroboros/sockets.h.in b/include/ouroboros/sockets.h.in index cd198781..095674a9 100644 --- a/include/ouroboros/sockets.h.in +++ b/include/ouroboros/sockets.h.in @@ -23,18 +23,17 @@ #ifndef OUROBOROS_LIB_SOCKETS_H #define OUROBOROS_LIB_SOCKETS_H -#include +#include -#include "irm.pb-c.h" -typedef IrmMsg irm_msg_t; +#include -#define SOCK_PATH "/var/run/ouroboros/" -#define SOCK_PATH_SUFFIX ".sock" +#define SOCK_PATH "/var/run/ouroboros/" +#define SOCK_PATH_SUFFIX ".sock" -#define IRM_SOCK_PATH SOCK_PATH "irm" SOCK_PATH_SUFFIX +#define IRM_SOCK_PATH SOCK_PATH "irm" SOCK_PATH_SUFFIX #define IPCP_SOCK_PATH_PREFIX SOCK_PATH "ipcp" -#define SOCK_BUF_SIZE @SOCK_BUF_SIZE@ +#define SOCK_BUF_SIZE @SOCK_BUF_SIZE@ /* Returns the full socket path of an IPCP */ char * ipcp_sock_path(pid_t pid); @@ -43,8 +42,9 @@ int server_socket_open(char * file_name); int client_socket_open(char * file_name); -irm_msg_t * send_recv_irm_msg(irm_msg_t * msg); +int send_recv_msg(buffer_t * buf); +irm_msg_t * send_recv_irm_msg(irm_msg_t * msg); /* cleanup socket when cancelling thread */ void __cleanup_close_ptr(void * o); -- cgit v1.2.3