summaryrefslogtreecommitdiff
path: root/include/ouroboros/sockets.h
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-02-25 19:14:26 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-02-25 19:14:26 +0100
commit63633c57b1e2573890fa627dd63f7c79ee5777b8 (patch)
tree003bcaee3d5e0e15a951a8a2fb5da63db2f1079d /include/ouroboros/sockets.h
parent3c21e9192fc64bd8c27501e524953b564afa50e4 (diff)
downloadouroboros-63633c57b1e2573890fa627dd63f7c79ee5777b8.tar.gz
ouroboros-63633c57b1e2573890fa627dd63f7c79ee5777b8.zip
lib, irmd, tools: Support to create IPCPs
Provides the initial support to create IPCPs via a command-line tool. It extends the socket layer with a message that is sent over a socket to the irmd when the irm_create_ipcp library function is called from a program.
Diffstat (limited to 'include/ouroboros/sockets.h')
-rw-r--r--include/ouroboros/sockets.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/ouroboros/sockets.h b/include/ouroboros/sockets.h
index fb2fa7db..ad9bd408 100644
--- a/include/ouroboros/sockets.h
+++ b/include/ouroboros/sockets.h
@@ -32,15 +32,18 @@ enum irm_msg_code {
IRM_LIST_IPCPS
};
-struct irm_msg_sock {
+struct irm_msg {
enum irm_msg_code code;
union {
struct {
- rina_name_t name;
+ rina_name_t * name;
char * ipcp_type;
} create_ipcp;
- } irm_msg;
+ } msgs;
};
-int client_socket_open(char * file_name);
-int server_socket_open(char * file_name);
+int client_socket_open(char * file_name);
+int server_socket_open(char * file_name);
+
+buffer_t * serialize_irm_msg(struct irm_msg * msg);
+struct irm_msg * deserialize_irm_msg(buffer_t * data);