diff options
author | dimitri staessens <[email protected]> | 2017-08-28 20:10:22 +0000 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-08-28 20:10:22 +0000 |
commit | e8875c08ac04a1d9aca342d94d4f788239334f72 (patch) | |
tree | 4a96be10ea1b9f3d03bb2fd10f3f2e403c1dd934 /src/ipcpd/ipcp.c | |
parent | c3185b9a6e471b534a370b2d913425962af88654 (diff) | |
parent | 999b5dec615ce4cfb30ee909bdd16e79a5e2a1ce (diff) | |
download | ouroboros-e8875c08ac04a1d9aca342d94d4f788239334f72.tar.gz ouroboros-e8875c08ac04a1d9aca342d94d4f788239334f72.zip |
Merged in dstaesse/ouroboros/be-deprecate-gam (pull request #572)
Be deprecate gam
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r-- | src/ipcpd/ipcp.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index ff45407b..41ea4784 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -227,8 +227,6 @@ static void * mainloop(void * o) conf.fd_size = conf_msg->fd_size; conf.has_ttl = conf_msg->has_ttl; conf.addr_auth_type = conf_msg->addr_auth_type; - conf.dt_gam_type = conf_msg->dt_gam_type; - conf.rm_gam_type = conf_msg->rm_gam_type; conf.routing_type = conf_msg->routing_type; switch(conf_msg->dif_info->dir_hash_algo) { @@ -303,6 +301,32 @@ static void * mainloop(void * o) dif_info.dif_name = info.dif_name; } break; + case IPCP_MSG_CODE__IPCP_CONNECT: + ret_msg.has_result = true; + + if (ipcpi.ops->ipcp_connect == NULL) { + log_err("Connect unsupported."); + ret_msg.result = -ENOTSUP; + break; + } + + ret_msg.result = + ipcpi.ops->ipcp_connect(msg->dst_name, + msg->comp_name); + break; + case IPCP_MSG_CODE__IPCP_DISCONNECT: + ret_msg.has_result = true; + + if (ipcpi.ops->ipcp_disconnect == NULL) { + log_err("Disconnect unsupported."); + ret_msg.result = -ENOTSUP; + break; + } + + ret_msg.result = + ipcpi.ops->ipcp_disconnect(msg->dst_name, + msg->comp_name); + break; case IPCP_MSG_CODE__IPCP_REG: ret_msg.has_result = true; @@ -437,6 +461,8 @@ static void * mainloop(void * o) ipcpi.ops->ipcp_flow_dealloc(fd); break; default: + ret_msg.has_result = true; + ret_msg.result = -1; log_err("Don't know that message code"); break; } |