diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-07-07 19:01:00 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-07-07 20:54:06 +0200 |
commit | 27b36b690a4b048721f0a568ef0aff03bf8e9855 (patch) | |
tree | 36936ba283d5567c4c2533c1e56675290ff5fc67 /src/irmd/registry.h | |
parent | b3870ef695a256be4a4ed28a991c39aab37bd6f3 (diff) | |
download | ouroboros-27b36b690a4b048721f0a568ef0aff03bf8e9855.tar.gz ouroboros-27b36b690a4b048721f0a568ef0aff03bf8e9855.zip |
irmd: Prioritize local ipcp for local flows
For locally registered processes, the IRMd will first look for the
local, then the normal, then the shim-udp. It will look for a normal,
a shim-eth-llc and ultimately a shim-udp for non-local destinations.
It does not yet check if a remote destination is actually known in a
DIF.
Fixes #18.
Diffstat (limited to 'src/irmd/registry.h')
-rw-r--r-- | src/irmd/registry.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/irmd/registry.h b/src/irmd/registry.h index 83b9d393..927b2364 100644 --- a/src/irmd/registry.h +++ b/src/irmd/registry.h @@ -23,10 +23,13 @@ #ifndef OUROBOROS_IRMD_REGISTRY_H #define OUROBOROS_IRMD_REGISTRY_H +#include <ouroboros/config.h> #include <ouroboros/list.h> #include <stdint.h> +#include <stdbool.h> #include <pthread.h> +#include <string.h> #include <sys/types.h> #define reg_entry_has_api(e, id) (reg_entry_get_reg_instance(e, id) != NULL) @@ -78,6 +81,9 @@ struct reg_entry { /* known instances */ struct list_head ap_instances; + /* difs in which this name is registered */ + struct list_head difs; + char * req_ae_name; int response; @@ -96,6 +102,11 @@ struct reg_ap_name { char * ap_name; }; +struct reg_dif_name { + struct list_head next; + char * dif_name; +}; + struct reg_instance * reg_instance_create(pid_t api); void reg_instance_destroy(struct reg_instance * i); @@ -118,7 +129,12 @@ struct reg_auto * reg_entry_get_reg_auto(struct reg_entry * e, char * ap_name); pid_t reg_entry_resolve_api(struct reg_entry * e); char ** reg_entry_resolve_auto(struct reg_entry * e); - +bool reg_entry_is_local_in_dif(struct reg_entry * e, + char * dif_name); +int reg_entry_add_local_in_dif(struct reg_entry * e, + char * dif_name); +void reg_entry_del_local_from_dif(struct reg_entry * e, + char * dif_name); int registry_add_entry(struct list_head * registry, char * name, char * ap_name, |