summaryrefslogtreecommitdiff
path: root/src/irmd/registry.h
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-12 16:57:48 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-13 11:30:20 +0200
commitfc10a7587b1a642748ae0fd69f08d92b4a902248 (patch)
treee0b570cf30753a564855242c94d242f597b5c499 /src/irmd/registry.h
parenta3d550ff972121641562d375f75bcf188fc7fe59 (diff)
downloadouroboros-fc10a7587b1a642748ae0fd69f08d92b4a902248.tar.gz
ouroboros-fc10a7587b1a642748ae0fd69f08d92b4a902248.zip
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.
Diffstat (limited to 'src/irmd/registry.h')
-rw-r--r--src/irmd/registry.h22
1 files changed, 13 insertions, 9 deletions
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 <ouroboros/config.h>
+#include <ouroboros/ipcp.h>
#include <ouroboros/list.h>
-#include <ouroboros/irm_config.h>
#include <ouroboros/shared.h>
#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);