diff options
author | Sander Vrijders <[email protected]> | 2016-02-25 19:14:26 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-02-25 19:14:26 +0100 |
commit | 63633c57b1e2573890fa627dd63f7c79ee5777b8 (patch) | |
tree | 003bcaee3d5e0e15a951a8a2fb5da63db2f1079d /include | |
parent | 3c21e9192fc64bd8c27501e524953b564afa50e4 (diff) | |
download | ouroboros-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')
-rw-r--r-- | include/ouroboros/common.h | 3 | ||||
-rw-r--r-- | include/ouroboros/sockets.h | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/include/ouroboros/common.h b/include/ouroboros/common.h index 09900a1f..02361f20 100644 --- a/include/ouroboros/common.h +++ b/include/ouroboros/common.h @@ -30,9 +30,8 @@ typedef uint32_t port_id_t; -/* FIXME: To be moved into a separate file */ typedef struct { - char * data; + uint8_t * data; size_t size; } buffer_t; 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); |