summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/irm.h28
-rw-r--r--include/ouroboros/sockets.h3
2 files changed, 19 insertions, 12 deletions
diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h
index ed0b2f71..fe6d2e9f 100644
--- a/include/ouroboros/irm.h
+++ b/include/ouroboros/irm.h
@@ -35,19 +35,27 @@
/* Name binding options. */
#define BIND_AUTO 0x01
+#define NAME_SIZE 256
+#define LAYER_SIZE LAYER_NAME_SIZE
+
+struct ipcp_info {
+ pid_t pid;
+ enum ipcp_type type;
+ char name[NAME_SIZE];
+ char layer[LAYER_SIZE];;
+};
+
__BEGIN_DECLS
pid_t irm_create_ipcp(const char * name,
- enum ipcp_type ipcp_type);
+ enum ipcp_type type);
int irm_destroy_ipcp(pid_t pid);
-/* pids is an out-parameter */
-ssize_t irm_list_ipcps(const char * name,
- pid_t ** pids);
+ssize_t irm_list_ipcps(struct ipcp_info ** ipcps);
int irm_enroll_ipcp(pid_t pid,
- const char * layer_name);
+ const char * dst);
int irm_bootstrap_ipcp(pid_t pid,
const struct ipcp_config * conf);
@@ -75,13 +83,11 @@ int irm_bind_process(pid_t pid,
int irm_unbind_process(pid_t pid,
const char * name);
-int irm_reg(const char * name,
- char ** layers,
- size_t len);
+int irm_reg(pid_t pid,
+ const char * name);
-int irm_unreg(const char * name,
- char ** layers,
- size_t len);
+int irm_unreg(pid_t pid,
+ const char * name);
__END_DECLS
diff --git a/include/ouroboros/sockets.h b/include/ouroboros/sockets.h
index da3e36d0..36ea4da9 100644
--- a/include/ouroboros/sockets.h
+++ b/include/ouroboros/sockets.h
@@ -31,6 +31,7 @@ typedef LayerInfoMsg layer_info_msg_t;
#include "irmd_messages.pb-c.h"
typedef IrmMsg irm_msg_t;
+typedef IpcpInfoMsg ipcp_info_msg_t;
#include "ipcpd_messages.pb-c.h"
typedef IpcpMsg ipcp_msg_t;
@@ -39,7 +40,7 @@ typedef IpcpMsg ipcp_msg_t;
#define SOCK_PATH_SUFFIX ".sock"
#define IRM_SOCK_PATH SOCK_PATH "irm" SOCK_PATH_SUFFIX
-#define IRM_MSG_BUF_SIZE 256
+#define IRM_MSG_BUF_SIZE 2048
#define IPCP_SOCK_PATH_PREFIX SOCK_PATH "ipcp"
#define IPCP_MSG_BUF_SIZE IRM_MSG_BUF_SIZE