diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ouroboros/errno.h | 1 | ||||
-rw-r--r-- | include/ouroboros/irm.h | 28 | ||||
-rw-r--r-- | include/ouroboros/sockets.h.in | 1 |
3 files changed, 25 insertions, 5 deletions
diff --git a/include/ouroboros/errno.h b/include/ouroboros/errno.h index 560bcf08..e393e10d 100644 --- a/include/ouroboros/errno.h +++ b/include/ouroboros/errno.h @@ -32,5 +32,6 @@ #define EIPCPSTATE 1004 /* Target in wrong state */ #define EFLOWDOWN 1005 /* Flow is down */ #define ECRYPT 1006 /* Encryption error */ +#define ENAME 1007 /* Naming error */ #endif /* OUROBOROS_ERRNO_H */ diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h index 69a23c47..2bb284b0 100644 --- a/include/ouroboros/irm.h +++ b/include/ouroboros/irm.h @@ -39,11 +39,22 @@ #define NAME_SIZE 256 #define LAYER_SIZE LAYER_NAME_SIZE +/* Load balancing policy for incoming flows. */ +enum pol_balance { + LB_RR = 0, + LB_SPILL +}; + struct ipcp_info { pid_t pid; enum ipcp_type type; char name[NAME_SIZE]; - char layer[LAYER_SIZE];; + char layer[LAYER_SIZE]; +}; + +struct name_info { + char name[NAME_SIZE]; + enum pol_balance pol_lb; }; __BEGIN_DECLS @@ -85,11 +96,18 @@ int irm_bind_process(pid_t pid, int irm_unbind_process(pid_t pid, const char * name); -int irm_reg(pid_t pid, - const char * name); +int irm_create_name(const char * name, + enum pol_balance pol); + +int irm_destroy_name(const char * name); + +ssize_t irm_list_names(struct name_info ** names); + +int irm_reg_name(const char * name, + pid_t pid); -int irm_unreg(pid_t pid, - const char * name); +int irm_unreg_name(const char * name, + pid_t pid); __END_DECLS diff --git a/include/ouroboros/sockets.h.in b/include/ouroboros/sockets.h.in index 67d57eeb..9ab2314f 100644 --- a/include/ouroboros/sockets.h.in +++ b/include/ouroboros/sockets.h.in @@ -34,6 +34,7 @@ typedef LayerInfoMsg layer_info_msg_t; #include "irmd_messages.pb-c.h" typedef IrmMsg irm_msg_t; typedef IpcpInfoMsg ipcp_info_msg_t; +typedef NameInfoMsg name_info_msg_t; #include "ipcpd_messages.pb-c.h" typedef IpcpMsg ipcp_msg_t; |