From b0dfdd839e0704af4f4bf4d4271688af9294e8c9 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 31 Mar 2016 12:00:24 +0200 Subject: lib: Add flow related ops to ipcp.h This adds the operations related to flows to ipcp.h. Previously it only contained operations on the IPCP level. --- include/ouroboros/ipcp.h | 59 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/ouroboros/ipcp.h b/include/ouroboros/ipcp.h index 49b04908..b39a6b0d 100644 --- a/include/ouroboros/ipcp.h +++ b/include/ouroboros/ipcp.h @@ -35,19 +35,56 @@ pid_t ipcp_create(instance_name_t * api, char * ipcp_type); int ipcp_destroy(pid_t pid); -int ipcp_reg(pid_t pid, - char ** difs, - size_t difs_size); -int ipcp_unreg(pid_t pid, +int ipcp_reg(pid_t pid, char ** difs, size_t difs_size); +int ipcp_unreg(pid_t pid, + char ** difs, + size_t difs_size); + +int ipcp_bootstrap(pid_t pid, + struct dif_config * conf); +int ipcp_enroll(pid_t pid, + char * dif_name, + char * member_name, + char ** n_1_difs, + ssize_t n_1_difs_size); + +/* Flow related ops, these go from IRMd to IPCP */ + +int ipcp_ap_reg(pid_t pid, + uint32_t reg_api_id, + char * ap_name); +int ipcp_ap_unreg(pid_t pid, + char * ap_name); + +int ipcp_flow_alloc(pid_t pid, + uint32_t port_id, + char * dst_ap_name, + char * src_ap_name, + char * src_ae_name, + struct qos_spec * qos); +int ipcp_flow_alloc_resp(pid_t pid, + uint32_t port_id, + int result); + +/* These operations go from the IPCP to the IRMd */ + +/* Returns the port_id */ +int ipcp_flow_req_arr(pid_t pid, + uint32_t reg_api_id, + char * ap_name, + char * ae_name); +int ipcp_flow_alloc_reply(pid_t pid, + uint32_t port_id, + int result); + +/* + * This operation can go both ways + * pid == 0 means the IRMd is the destination + */ +int ipcp_flow_dealloc(pid_t pid, + uint32_t port_id); -int ipcp_bootstrap(pid_t pid, - struct dif_config * conf); -int ipcp_enroll(pid_t pid, - char * dif_name, - char * member_name, - char ** n_1_difs, - ssize_t n_1_difs_size); #endif /* OUROBOROS_IPCP_H */ -- cgit v1.2.3