From 23603e2d74298d0fd4df9858003ad3b7798f0254 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Tue, 12 Aug 2025 22:01:43 +0200 Subject: irmd: Resolve name when flow request arrives This makes the IRMd a bit simpler, and we only need to do the lookup to resolve the name for a hash on the server side only once. The logging is also symmetric now: irmd(II): Allocating flow for 93317 to unicast.1. irmd(II): Flow request arrived for unicast.1. Signed-off-by: Dimitri Staessens --- src/irmd/reg/reg.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/irmd/reg/reg.h') diff --git a/src/irmd/reg/reg.h b/src/irmd/reg/reg.h index f1899d65..00db8f0b 100644 --- a/src/irmd/reg/reg.h +++ b/src/irmd/reg/reg.h @@ -90,6 +90,10 @@ int reg_destroy_name(const char * name); bool reg_has_name(const char * name); +int reg_get_name_for_hash(char * buf, + enum hash_algo algo, + const uint8_t * hash); + /* TODO don't rely on protobuf here */ int reg_list_names(name_info_msg_t *** names); @@ -99,9 +103,8 @@ int reg_destroy_prog(const char * name); bool reg_has_prog(const char * name); -int reg_get_exec(enum hash_algo algo, - const uint8_t * hash, - char *** exec); +int reg_get_exec(const char * name, + char *** exec); int reg_bind_prog(const char * name, char ** exec, @@ -125,8 +128,7 @@ int reg_wait_flow_accepted(struct flow_info * info, buffer_t * pbuf, const struct timespec * abstime); -int reg_wait_flow_accepting(enum hash_algo algo, - const uint8_t * hash, +int reg_wait_flow_accepting(const char * name, const struct timespec * abstime); int reg_respond_accept(struct flow_info * info, -- cgit v1.2.3