diff options
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); |