diff options
author | dimitri staessens <[email protected]> | 2017-04-12 16:57:48 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2017-04-13 11:30:20 +0200 |
commit | fc10a7587b1a642748ae0fd69f08d92b4a902248 (patch) | |
tree | e0b570cf30753a564855242c94d242f597b5c499 /src/irmd/ipcp.h | |
parent | a3d550ff972121641562d375f75bcf188fc7fe59 (diff) | |
download | ouroboros-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/ipcp.h')
-rw-r--r-- | src/irmd/ipcp.h | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/src/irmd/ipcp.h b/src/irmd/ipcp.h index bb868191..11adad7d 100644 --- a/src/irmd/ipcp.h +++ b/src/irmd/ipcp.h @@ -20,40 +20,44 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <ouroboros/irm_config.h> +#include <ouroboros/ipcp.h> #include <ouroboros/sockets.h> #include <ouroboros/shared.h> #include <sys/types.h> -#ifndef OUROBOROS_IPCP_H -#define OUROBOROS_IPCP_H +#ifndef OUROBOROS_IRMD_IPCP_H +#define OUROBOROS_IRMD_IPCP_H -pid_t ipcp_create(char * name, +pid_t ipcp_create(const char * name, enum ipcp_type ipcp_type); int ipcp_destroy(pid_t api); -int ipcp_enroll(pid_t api, - char * dif_name); +int ipcp_enroll(pid_t api, + const char * dst); int ipcp_bootstrap(pid_t api, - dif_config_msg_t * conf); + ipcp_config_msg_t * conf); -int ipcp_name_reg(pid_t api, - char * name); +int ipcp_reg(pid_t api, + const uint8_t * hash, + size_t len); -int ipcp_name_unreg(pid_t api, - char * name); +int ipcp_unreg(pid_t api, + const uint8_t * hash, + size_t len); -int ipcp_name_query(pid_t api, - char * name); +int ipcp_query(pid_t api, + const uint8_t * hash, + size_t len); -int ipcp_flow_alloc(pid_t api, - int port_id, - pid_t n_api, - char * dst_name, - qoscube_t qos); +int ipcp_flow_alloc(pid_t api, + int port_id, + pid_t n_api, + const uint8_t * dst, + size_t len, + qoscube_t qos); int ipcp_flow_alloc_resp(pid_t api, int port_id, @@ -63,4 +67,4 @@ int ipcp_flow_alloc_resp(pid_t api, int ipcp_flow_dealloc(pid_t api, int port_id); -#endif /* OUROBOROS_IPCP_H */ +#endif /* OUROBOROS_IRMD_IPCP_H */ |