diff options
author | Sander Vrijders <[email protected]> | 2016-07-05 15:43:13 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-07-05 15:43:13 +0200 |
commit | a315150a16c02f3cb694e639d5aba555fce4b4c3 (patch) | |
tree | 59525d68eec0cf5d2dae83891c7bc4eaabff9cf3 /src/lib/ipcp.c | |
parent | aca5db11a73e66377b8566e69c1baabb1df803ab (diff) | |
download | ouroboros-a315150a16c02f3cb694e639d5aba555fce4b4c3.tar.gz ouroboros-a315150a16c02f3cb694e639d5aba555fce4b4c3.zip |
lib: Provide first implementation of revised CDAP
This commit introduces a first version of the revised CDAP
specification. CACEP (for authentication purposes) has been separated
from CDAP. Application developers may use CDAP if they find it
useful. Within Ouroboros CDAP will be used to perform operations on
the RIB of an IPCP.
Diffstat (limited to 'src/lib/ipcp.c')
-rw-r--r-- | src/lib/ipcp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c index 2b6b6825..b336155e 100644 --- a/src/lib/ipcp.c +++ b/src/lib/ipcp.c @@ -32,6 +32,8 @@ #include <stdlib.h> #include <string.h> #include <signal.h> +#include <errno.h> +#include <stdbool.h> #include <sys/types.h> #include <sys/wait.h> @@ -54,8 +56,8 @@ static ipcp_msg_t * send_recv_ipcp_msg(pid_t api, return NULL; } - buf.size = ipcp_msg__get_packed_size(msg); - if (buf.size == 0) { + buf.len = ipcp_msg__get_packed_size(msg); + if (buf.len == 0) { close(sockfd); free(sock_path); return NULL; @@ -70,7 +72,7 @@ static ipcp_msg_t * send_recv_ipcp_msg(pid_t api, ipcp_msg__pack(msg, buf.data); - if (write(sockfd, buf.data, buf.size) == -1) { + if (write(sockfd, buf.data, buf.len) == -1) { free(sock_path); free(buf.data); close(sockfd); |