diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-07-08 13:34:38 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-07-08 13:41:22 +0200 |
commit | f224dbb901842b021e231e4f3d7c42e62babcdb3 (patch) | |
tree | 35c55d50cea6e77c23bf63472ad95f755846c145 | |
parent | 00dba20de7462c07866d321597697456a0ae8555 (diff) | |
download | ouroboros-f224dbb901842b021e231e4f3d7c42e62babcdb3.tar.gz ouroboros-f224dbb901842b021e231e4f3d7c42e62babcdb3.zip |
ipcpd: Deprecate ipcp_reg/ipcp_unreg
-rw-r--r-- | include/ouroboros/ipcp.h | 7 | ||||
-rw-r--r-- | src/ipcpd/ipcp-ops.h | 4 | ||||
-rw-r--r-- | src/ipcpd/ipcp.c | 21 | ||||
-rw-r--r-- | src/ipcpd/local/main.c | 2 | ||||
-rw-r--r-- | src/ipcpd/shim-eth-llc/main.c | 2 | ||||
-rw-r--r-- | src/ipcpd/shim-udp/main.c | 2 | ||||
-rw-r--r-- | src/lib/ipcp.c | 65 | ||||
-rw-r--r-- | src/lib/ipcpd_messages.proto | 14 |
8 files changed, 6 insertions, 111 deletions
diff --git a/include/ouroboros/ipcp.h b/include/ouroboros/ipcp.h index c1aa452b..74a8cc77 100644 --- a/include/ouroboros/ipcp.h +++ b/include/ouroboros/ipcp.h @@ -36,13 +36,6 @@ pid_t ipcp_create(enum ipcp_type ipcp_type); int ipcp_destroy(pid_t api); -int ipcp_reg(pid_t api, - char ** difs, - size_t difs_size); -int ipcp_unreg(pid_t api, - char ** difs, - size_t difs_size); - int ipcp_enroll(pid_t api, char * dif_name, char * n_1_dif); diff --git a/src/ipcpd/ipcp-ops.h b/src/ipcpd/ipcp-ops.h index 40c331ec..8f444a79 100644 --- a/src/ipcpd/ipcp-ops.h +++ b/src/ipcpd/ipcp-ops.h @@ -32,10 +32,6 @@ struct ipcp_ops { int (* ipcp_bootstrap)(struct dif_config * conf); int (* ipcp_enroll)(char * dif_name, char * n_1_dif); - int (* ipcp_reg)(char ** dif_names, - size_t len); - int (* ipcp_unreg)(char ** dif_names, - size_t len); int (* ipcp_name_reg)(char * name); int (* ipcp_name_unreg)(char * name); int (* ipcp_flow_alloc)(pid_t n_api, diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index 28004a92..444d17bb 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -188,27 +188,6 @@ void * ipcp_main_loop(void * o) msg->n_1_dif); break; - - case IPCP_MSG_CODE__IPCP_REG: - if (_ipcp->ops->ipcp_reg == NULL) { - LOG_ERR("Reg unsupported."); - break; - - } - ret_msg.has_result = true; - ret_msg.result = - _ipcp->ops->ipcp_reg(msg->dif_names, msg->len); - break; - case IPCP_MSG_CODE__IPCP_UNREG: - if (_ipcp->ops->ipcp_unreg == NULL) { - LOG_ERR("Unreg unsupported."); - break; - } - ret_msg.has_result = true; - ret_msg.result = - _ipcp->ops->ipcp_unreg(msg->dif_names, - msg->len); - break; case IPCP_MSG_CODE__IPCP_NAME_REG: if (_ipcp->ops->ipcp_name_reg == NULL) { LOG_ERR("Ap_reg unsupported."); diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index d72269b8..fcf5f879 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -557,8 +557,6 @@ static struct ipcp * ipcp_local_create() ops->ipcp_bootstrap = ipcp_local_bootstrap; ops->ipcp_enroll = NULL; /* shim */ - ops->ipcp_reg = NULL; /* shim */ - ops->ipcp_unreg = NULL; /* shim */ ops->ipcp_name_reg = ipcp_local_name_reg; ops->ipcp_name_unreg = ipcp_local_name_unreg; ops->ipcp_flow_alloc = ipcp_local_flow_alloc; diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c index f82438c6..87458359 100644 --- a/src/ipcpd/shim-eth-llc/main.c +++ b/src/ipcpd/shim-eth-llc/main.c @@ -1224,8 +1224,6 @@ static int eth_llc_ipcp_flow_dealloc(int port_id) static struct ipcp_ops eth_llc_ops = { .ipcp_bootstrap = eth_llc_ipcp_bootstrap, .ipcp_enroll = NULL, /* shim */ - .ipcp_reg = NULL, /* shim */ - .ipcp_unreg = NULL, /* shim */ .ipcp_name_reg = eth_llc_ipcp_name_reg, .ipcp_name_unreg = eth_llc_ipcp_name_unreg, .ipcp_flow_alloc = eth_llc_ipcp_flow_alloc, diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c index ddf4e80e..1b0bec07 100644 --- a/src/ipcpd/shim-udp/main.c +++ b/src/ipcpd/shim-udp/main.c @@ -1539,8 +1539,6 @@ static struct ipcp * ipcp_udp_create() ops->ipcp_bootstrap = ipcp_udp_bootstrap; ops->ipcp_enroll = NULL; /* shim */ - ops->ipcp_reg = NULL; /* shim */ - ops->ipcp_unreg = NULL; /* shim */ ops->ipcp_name_reg = ipcp_udp_name_reg; ops->ipcp_name_unreg = ipcp_udp_name_unreg; ops->ipcp_flow_alloc = ipcp_udp_flow_alloc; diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c index b0e593e4..3fd31f37 100644 --- a/src/lib/ipcp.c +++ b/src/lib/ipcp.c @@ -193,71 +193,6 @@ int ipcp_destroy(pid_t api) return 0; } -int ipcp_reg(pid_t api, - char ** dif_names, - size_t len) -{ - ipcp_msg_t msg = IPCP_MSG__INIT; - ipcp_msg_t * recv_msg = NULL; - int ret = -1; - - if (dif_names == NULL || - len == 0 || - dif_names[0] == NULL) - return -EINVAL; - - msg.code = IPCP_MSG_CODE__IPCP_REG; - msg.dif_names = dif_names; - msg.len = len; - - recv_msg = send_recv_ipcp_msg(api, &msg); - if (recv_msg == NULL) - return -1; - - if (recv_msg->has_result == false) { - ipcp_msg__free_unpacked(recv_msg, NULL); - return -1; - } - - ret = recv_msg->result; - ipcp_msg__free_unpacked(recv_msg, NULL); - - return ret; -} - -int ipcp_unreg(pid_t api, - char ** dif_names, - size_t len) -{ - ipcp_msg_t msg = IPCP_MSG__INIT; - ipcp_msg_t * recv_msg = NULL; - int ret = -1; - - if (dif_names == NULL || - len == 0 || - dif_names[0] == NULL) - return -EINVAL; - - msg.code = IPCP_MSG_CODE__IPCP_UNREG; - msg.dif_names = dif_names; - msg.len = len; - - recv_msg = send_recv_ipcp_msg(api, &msg); - if (recv_msg == NULL) - return -1; - - if (recv_msg->has_result == false) { - ipcp_msg__free_unpacked(recv_msg, NULL); - return -1; - } - - ret = recv_msg->result; - ipcp_msg__free_unpacked(recv_msg, NULL); - - return ret; -} - - int ipcp_bootstrap(pid_t api, dif_config_msg_t * conf) { diff --git a/src/lib/ipcpd_messages.proto b/src/lib/ipcpd_messages.proto index f9e0f972..eb764e18 100644 --- a/src/lib/ipcpd_messages.proto +++ b/src/lib/ipcpd_messages.proto @@ -3,14 +3,12 @@ import "dif_config.proto"; enum ipcp_msg_code { IPCP_BOOTSTRAP = 1; IPCP_ENROLL = 2; - IPCP_REG = 3; - IPCP_UNREG = 4; - IPCP_NAME_REG = 5; - IPCP_NAME_UNREG = 6; - IPCP_FLOW_ALLOC = 7; - IPCP_FLOW_ALLOC_RESP = 8; - IPCP_FLOW_DEALLOC = 9; - IPCP_REPLY = 10; + IPCP_NAME_REG = 3; + IPCP_NAME_UNREG = 4; + IPCP_FLOW_ALLOC = 5; + IPCP_FLOW_ALLOC_RESP = 6; + IPCP_FLOW_DEALLOC = 7; + IPCP_REPLY = 8; }; message ipcp_msg { |