summaryrefslogtreecommitdiff
path: root/src/irmd/reg/reg.h
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2025-08-12 22:01:43 +0200
committerDimitri Staessens <dimitri@ouroboros.rocks>2025-08-15 11:47:58 +0200
commit23603e2d74298d0fd4df9858003ad3b7798f0254 (patch)
treef8f6a078cffb260e24abe05850184d1e2605c136 /src/irmd/reg/reg.h
parent1c9f509cdaf0233ae4848c05c8bcd0de98bde89a (diff)
downloadouroboros-23603e2d74298d0fd4df9858003ad3b7798f0254.tar.gz
ouroboros-23603e2d74298d0fd4df9858003ad3b7798f0254.zip
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 <dimitri@ouroboros.rocks>
Diffstat (limited to 'src/irmd/reg/reg.h')
-rw-r--r--src/irmd/reg/reg.h12
1 files changed, 7 insertions, 5 deletions
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,