summaryrefslogtreecommitdiff
path: root/src/lib/ipcp.c
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2016-04-11 17:02:55 +0200
committerDimitri Staessens <[email protected]>2016-04-11 17:02:55 +0200
commitdbe01cb34001f06519a42e9c21d144f52e7d8758 (patch)
tree046635cd3ca941f0debad37fa0865357b5b62a41 /src/lib/ipcp.c
parent1d5c9ae5c7c77f200e9670bbee714adad983136e (diff)
parent9906ac98c45530e530d7aa439937aedf526c3508 (diff)
downloadouroboros-dbe01cb34001f06519a42e9c21d144f52e7d8758.tar.gz
ouroboros-dbe01cb34001f06519a42e9c21d144f52e7d8758.zip
Merged in sandervrijders/ouroboros/be (pull request #54)
Dif config now correctly passed to the IPCP
Diffstat (limited to 'src/lib/ipcp.c')
-rw-r--r--src/lib/ipcp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c
index d61fcb50..a0febe4e 100644
--- a/src/lib/ipcp.c
+++ b/src/lib/ipcp.c
@@ -100,7 +100,7 @@ static ipcp_msg_t * send_recv_ipcp_msg(pid_t pid,
}
pid_t ipcp_create(instance_name_t * api,
- char * ipcp_type)
+ enum ipcp_type ipcp_type)
{
pid_t pid = 0;
char * api_id = NULL;
@@ -108,11 +108,6 @@ pid_t ipcp_create(instance_name_t * api,
char * ipcp_dir = "bin/ipcpd";
char * full_name = NULL;
- if (ipcp_type == NULL)
- return -1;
-
- LOG_DBG("%lu", _POSIX_C_SOURCE);
-
pid = fork();
if (pid == -1) {
LOG_ERR("Failed to fork");
@@ -146,7 +141,7 @@ pid_t ipcp_create(instance_name_t * api,
char * argv[] = {full_name,
api->name, api_id,
- ipcp_type, 0};
+ 0};
char * envp[] = {0};
@@ -241,14 +236,19 @@ int ipcp_unreg(pid_t pid,
return ret;
}
+
int ipcp_bootstrap(pid_t pid,
- struct dif_config * conf)
+ dif_config_msg_t * conf)
{
ipcp_msg_t msg = IPCP_MSG__INIT;
ipcp_msg_t * recv_msg = NULL;
int ret = -1;
+ if (conf == NULL)
+ return -EINVAL;
+
msg.code = IPCP_MSG_CODE__IPCP_BOOTSTRAP;
+ msg.conf = conf;
recv_msg = send_recv_ipcp_msg(pid, &msg);
if (recv_msg == NULL)