diff options
author | charan makkina <charan795m@gmail.com> | 2019-04-30 17:40:53 +0530 |
---|---|---|
committer | charan makkina <charan795m@gmail.com> | 2019-05-20 18:14:40 +0530 |
commit | a826fe833d3f2a8fe2673fa05811fe1a22baf045 (patch) | |
tree | da11a17c46ca9b8a002a52a290628574fa3f5eda /stacks/lwip_stack/lwip_src/socket/stackx_protocol_api.c | |
parent | 3e6bf7b64eea418c59959c18750261b815b2892c (diff) |
Feature: 19.04 part 1
Change-Id: Ibba924b8deca1f246b9dcb12d89d085b6fd33046
Signed-off-by: charan makkina <charan795m@gmail.com>
Diffstat (limited to 'stacks/lwip_stack/lwip_src/socket/stackx_protocol_api.c')
-rw-r--r-- | stacks/lwip_stack/lwip_src/socket/stackx_protocol_api.c | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/stacks/lwip_stack/lwip_src/socket/stackx_protocol_api.c b/stacks/lwip_stack/lwip_src/socket/stackx_protocol_api.c deleted file mode 100644 index 0be8d7b..0000000 --- a/stacks/lwip_stack/lwip_src/socket/stackx_protocol_api.c +++ /dev/null @@ -1,113 +0,0 @@ -/* -* -* Copyright (c) 2018 Huawei Technologies Co.,Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at: -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#include "sbr_protocol_api.h" -#include "stackx_epoll_api.h" -#include "stackx_socket.h" -#include "stackx_res_mgr.h" -#include "stackx_common_opt.h" -#include "common_mem_api.h" -#include "stackx_event.h" - -extern sbr_fdopt tcp_fdopt; -extern sbr_fdopt udp_fdopt; -extern sbr_fdopt raw_fdopt; -extern sbr_fdopt custom_fdopt; - -/***************************************************************************** -* Prototype : sbr_init_protocol -* Description : init protocol -* Input : None -* Output : None -* Return Value : int -* Calls : -* Called By : -* -*****************************************************************************/ -int -sbr_init_protocol () -{ - return sbr_init_stackx (); -} - -/***************************************************************************** -* Prototype : sbr_fork_protocol -* Description : init protocol -* Input : None -* Output : None -* Return Value : int -* Calls : -* Called By : -* -*****************************************************************************/ -int -sbr_fork_protocol () -{ - pid_t pid = update_sys_pid (); - - NSSBR_LOGINF ("update pid in child]pid=%d", pid); - return sbr_fork_stackx (); -} - -/***************************************************************************** -* Prototype : sbr_get_fdopt -* Description : get fdopt by domain type protocol -* Input : int domain -* int type -* int protocol -* Output : None -* Return Value : sbr_fdopt* -* Calls : -* Called By : -* -*****************************************************************************/ -sbr_fdopt * -sbr_get_fdopt (int domain, int type, int protocol) -{ - if (domain != AF_INET) - { - NSSBR_LOGERR ("domain is not AF_INET]domain=%d", domain); - sbr_set_errno (EAFNOSUPPORT); - return NULL; - } - - sbr_fdopt *fdopt = NULL; - - switch (type & (~(O_NONBLOCK | SOCK_CLOEXEC))) - { - case SOCK_DGRAM: - fdopt = &udp_fdopt; - break; - case SOCK_STREAM: - fdopt = &tcp_fdopt; - break; - - default: - NSSBR_LOGDBG ("type is unknown]type=%d", type); - sbr_set_errno (ESOCKTNOSUPPORT); - return NULL; - } - - return fdopt; -} - -/* app send its version info to nStackMain */ -extern void sbr_handle_app_touch (void); -void -sbr_app_touch_in (void) -{ - sbr_handle_app_touch (); -} |