From fc10a7587b1a642748ae0fd69f08d92b4a902248 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 12 Apr 2017 16:57:48 +0200 Subject: lib, ipcpd, irmd: Register hash instead of name All information passed over the IRMd/IPCP boundary for using IPC services (flow allocation, registration) is now hashed. This effectively fixes the shared namespace between DIFs and the IRMDs. This PR also fixes some API issues (adding const identifiers), shuffles the include headers a bit and some small bugs. --- src/irmd/registry.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/irmd/registry.h') diff --git a/src/irmd/registry.h b/src/irmd/registry.h index 08e78019..771ca83c 100644 --- a/src/irmd/registry.h +++ b/src/irmd/registry.h @@ -24,8 +24,8 @@ #define OUROBOROS_IRMD_REGISTRY_H #include +#include #include -#include #include #include "api_table.h" @@ -71,7 +71,7 @@ int reg_entry_add_apn(struct reg_entry * e, struct apn_entry * a); void reg_entry_del_apn(struct reg_entry * e, - char * apn); + const char * apn); char * reg_entry_get_apn(struct reg_entry * e); @@ -101,10 +101,10 @@ int reg_entry_wait_state(struct reg_entry * e, struct timespec * timeout); struct reg_entry * registry_add_name(struct list_head * registry, - char * name); + const char * name); void registry_del_name(struct list_head * registry, - char * name); + const char * name); void registry_del_api(struct list_head * registry, pid_t api); @@ -112,16 +112,20 @@ void registry_del_api(struct list_head * registry, void registry_sanitize_apis(struct list_head * registry); struct reg_entry * registry_get_entry(struct list_head * registry, - char * name); + const char * name); + +struct reg_entry * registry_get_entry_by_hash(struct list_head * registry, + const uint8_t * hash, + size_t len); int registry_add_name_to_dif(struct list_head * registry, - char * name, - char * dif_name, + const char * name, + const char * dif_name, enum ipcp_type type); void registry_del_name_from_dif(struct list_head * registry, - char * name, - char * dif_name); + const char * name, + const char * dif_name); void registry_destroy(struct list_head * registry); -- cgit v1.2.3