From 63633c57b1e2573890fa627dd63f7c79ee5777b8 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 25 Feb 2016 19:14:26 +0100 Subject: 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. --- include/ouroboros/sockets.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'include/ouroboros/sockets.h') 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); -- cgit v1.2.3