From 02f68ff5ccc637b2177f832a4f7ddf4f9f737d22 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 21 Jan 2024 10:59:17 +0100 Subject: include: Use common definition between lib and IRMd Some definitions/enums were different between the library and IRMd (flow_state, ipcp_state). This moves them to common ground. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- include/ouroboros/irm.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'include/ouroboros/irm.h') diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h index 9d55ebd4..30d461ab 100644 --- a/include/ouroboros/irm.h +++ b/include/ouroboros/irm.h @@ -31,27 +31,24 @@ /* Name binding options. */ #define BIND_AUTO 0x01 +#define NAME_SIZE 255 -#define NAME_SIZE 256 -#define LAYER_SIZE LAYER_NAME_SIZE - -/* Load balancing policy for incoming flows. */ enum pol_balance { LB_RR = 0, LB_SPILL, LB_INVALID }; +struct name_info { + char name[NAME_SIZE + 1]; + enum pol_balance pol_lb; +}; + struct ipcp_list_info { pid_t pid; enum ipcp_type type; char name[NAME_SIZE]; - char layer[LAYER_SIZE]; -}; - -struct name_info { - char name[NAME_SIZE]; - enum pol_balance pol_lb; + char layer[LAYER_NAME_SIZE]; }; __BEGIN_DECLS -- cgit v1.2.3