summaryrefslogtreecommitdiff
path: root/src/lib/ipcp.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-10 13:03:33 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-10 13:03:33 +0200
commit9740c4bf2966d57d6f7e0d034a862211cb3814c4 (patch)
tree9b33b5d1888cd4fb338b57b7b1aa90349668eb8b /src/lib/ipcp.c
parentaca897331ff55c80d926b0bdb90f1c8962bf7a6e (diff)
parente5cb8042c9f0c6374c4f14bf7ff3f4fe3cdcd155 (diff)
downloadouroboros-9740c4bf2966d57d6f7e0d034a862211cb3814c4.tar.gz
ouroboros-9740c4bf2966d57d6f7e0d034a862211cb3814c4.zip
Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-bugfixing
Diffstat (limited to 'src/lib/ipcp.c')
-rw-r--r--src/lib/ipcp.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c
index 141db43d..9ff05e7b 100644
--- a/src/lib/ipcp.c
+++ b/src/lib/ipcp.c
@@ -168,6 +168,31 @@ pid_t ipcp_create(enum ipcp_type ipcp_type)
exit(EXIT_FAILURE);
}
+int ipcp_create_r(pid_t api)
+{
+ irm_msg_t msg = IRM_MSG__INIT;
+ irm_msg_t * recv_msg = NULL;
+ int ret = -1;
+
+ msg.code = IRM_MSG_CODE__IPCP_CREATE_R;
+ msg.has_api = true;
+ msg.api = api;
+
+ recv_msg = send_recv_irm_msg(&msg);
+ if (recv_msg == NULL)
+ return -1;
+
+ if (recv_msg->has_result == false) {
+ irm_msg__free_unpacked(recv_msg, NULL);
+ return -1;
+ }
+
+ ret = recv_msg->result;
+ irm_msg__free_unpacked(recv_msg, NULL);
+
+ return ret;
+}
+
int ipcp_destroy(pid_t api)
{
int status;