diff options
| author | xuzhuoyi <[email protected]> | 2018-11-16 20:09:46 +0800 |
|---|---|---|
| committer | xuzhuoyi <[email protected]> | 2018-11-16 20:09:46 +0800 |
| commit | 37db67d94a269e1a9893d076ab2bb6b9883cfa8c (patch) | |
| tree | faaea1c497b8b50e638f768ed6fcc4ec83e6a90f /components/net/sal_socket/include | |
| parent | 305307c90c8723dcdb79663f65a8933b5cb1b934 (diff) | |
| parent | 63a6f6c4d2540b003296594c4b916cc1ba8d0b16 (diff) | |
Merge remote-tracking branch 'upstream/master'
# Conflicts:
# src/thread.c
Diffstat (limited to 'components/net/sal_socket/include')
| -rw-r--r-- | components/net/sal_socket/include/dfs_net/dfs_net.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/dfs_net/sys_select/sys/select.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/sal.h | 63 | ||||
| -rw-r--r-- | components/net/sal_socket/include/sal_ipaddr.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/sal_netdb.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/sal_socket.h | 22 | ||||
| -rw-r--r-- | components/net/sal_socket/include/sal_tls.h | 68 | ||||
| -rw-r--r-- | components/net/sal_socket/include/sal_type.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/socket/arpa/inet.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/socket/netdb.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/socket/netinet/in.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/socket/netinet/tcp.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/socket/netinet/udp.h | 18 | ||||
| -rw-r--r-- | components/net/sal_socket/include/socket/sys_socket/sys/socket.h | 21 |
14 files changed, 127 insertions, 227 deletions
diff --git a/components/net/sal_socket/include/dfs_net/dfs_net.h b/components/net/sal_socket/include/dfs_net/dfs_net.h index 242d3c5334..ad28b8ec2a 100644 --- a/components/net/sal_socket/include/dfs_net/dfs_net.h +++ b/components/net/sal_socket/include/dfs_net/dfs_net.h @@ -1,21 +1,7 @@ /* - * File : dfs_net.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2015-2016, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/dfs_net/sys_select/sys/select.h b/components/net/sal_socket/include/dfs_net/sys_select/sys/select.h index c2e2d54d3a..8899daee96 100644 --- a/components/net/sal_socket/include/dfs_net/sys_select/sys/select.h +++ b/components/net/sal_socket/include/dfs_net/sys_select/sys/select.h @@ -1,21 +1,7 @@ /* - * File : select.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/sal.h b/components/net/sal_socket/include/sal.h index 480167c91d..17d44eef77 100644 --- a/components/net/sal_socket/include/sal.h +++ b/components/net/sal_socket/include/sal.h @@ -1,21 +1,7 @@ /* - * File : sal.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes @@ -39,7 +25,7 @@ extern "C" { typedef uint32_t socklen_t; #endif -/* sal socket magic word */ +/* SAL socket magic word */ #define SAL_SOCKET_MAGIC 0x5A10 /* The maximum number of sockets structure */ @@ -52,12 +38,12 @@ typedef uint32_t socklen_t; #define SAL_PROTO_FAMILIES_NUM 4 #endif -/* sal socket offset */ +/* SAL socket offset */ #ifndef SAL_SOCKET_OFFSET #define SAL_SOCKET_OFFSET 0 #endif -struct proto_ops +struct sal_socket_ops { int (*socket) (int domain, int type, int protocol); int (*closesocket)(int s); @@ -78,30 +64,38 @@ struct proto_ops #endif }; +struct sal_proto_ops +{ + struct hostent* (*gethostbyname) (const char *name); + int (*gethostbyname_r)(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop); + int (*getaddrinfo) (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res); + void (*freeaddrinfo) (struct addrinfo *ai); +}; + struct sal_socket { - uint32_t magic; /* sal socket magic word */ + uint32_t magic; /* SAL socket magic word */ - int socket; /* sal socket descriptor */ + int socket; /* SAL socket descriptor */ int domain; int type; int protocol; - const struct proto_ops *ops; /* socket options */ - void *user_data; /* specific sal socket data */ + const struct sal_socket_ops *ops; /* socket options */ + + void *user_data; /* user-specific data */ +#ifdef SAL_USING_TLS + void *user_data_tls; /* user-specific TLS data */ +#endif }; -struct proto_family +struct sal_proto_family { - char name[RT_NAME_MAX]; int family; /* primary protocol families type */ int sec_family; /* secondary protocol families type */ - int (*create)(struct sal_socket *sal_socket, int type, int protocol); /* register socket options */ + int (*create)(struct sal_socket *sal_socket, int type, int protocol); /* register socket options */ - struct hostent* (*gethostbyname) (const char *name); - int (*gethostbyname_r)(const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop); - void (*freeaddrinfo) (struct addrinfo *ai); - int (*getaddrinfo) (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res); + struct sal_proto_ops *ops; /* protocol family options */ }; /* SAL(Socket Abstraction Layer) initialize */ @@ -109,10 +103,11 @@ int sal_init(void); struct sal_socket *sal_get_socket(int sock); -/* protocol family register and unregister operate */ -int sal_proto_family_register(const struct proto_family *pf); -int sal_proto_family_unregister(const struct proto_family *pf); -struct proto_family *sal_proto_family_find(const char *name); +/* SAL protocol family register and unregister operate */ +int sal_proto_family_register(const struct sal_proto_family *pf); +int sal_proto_family_unregister(int family); +rt_bool_t sal_proto_family_is_registered(int family); +struct sal_proto_family *sal_proto_family_find(int family); #ifdef __cplusplus } diff --git a/components/net/sal_socket/include/sal_ipaddr.h b/components/net/sal_socket/include/sal_ipaddr.h index c40fc18374..c0562436f0 100644 --- a/components/net/sal_socket/include/sal_ipaddr.h +++ b/components/net/sal_socket/include/sal_ipaddr.h @@ -1,21 +1,7 @@ /* - * File : sal_ipaddr.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/sal_netdb.h b/components/net/sal_socket/include/sal_netdb.h index 0a31f26fae..3f70832083 100644 --- a/components/net/sal_socket/include/sal_netdb.h +++ b/components/net/sal_socket/include/sal_netdb.h @@ -1,21 +1,7 @@ /* - * File : sal_netdb.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/sal_socket.h b/components/net/sal_socket/include/sal_socket.h index 477112392c..0a8597df6e 100644 --- a/components/net/sal_socket/include/sal_socket.h +++ b/components/net/sal_socket/include/sal_socket.h @@ -1,21 +1,7 @@ /* - * File : sal_socket.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes @@ -85,13 +71,15 @@ typedef uint16_t in_port_t; #define AF_INET6 10 #define AF_CAN 29 /* Controller Area Network */ #define AF_AT 45 /* AT socket */ +#define AF_WIZ 46 /* WIZnet socket */ #define PF_INET AF_INET #define PF_INET6 AF_INET6 #define PF_UNSPEC AF_UNSPEC #define PF_CAN AF_CAN #define PF_AT AF_AT +#define PF_WIZ AF_WIZ -#define AF_MAX (AF_AT + 1) /* For now.. */ +#define AF_MAX (AF_WIZ + 1) /* For now.. */ #define IPPROTO_IP 0 #define IPPROTO_ICMP 1 diff --git a/components/net/sal_socket/include/sal_tls.h b/components/net/sal_socket/include/sal_tls.h new file mode 100644 index 0000000000..7681b313bd --- /dev/null +++ b/components/net/sal_socket/include/sal_tls.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-11-10 ChenYong First version + */ +#ifndef __SAL_TLS_H__ +#define __SAL_TLS_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <rtthread.h> + +/* Protocol level for TLS. + * Here, the same socket protocol level for TLS as in Linux was used. + */ +#define SOL_TLS 282 + +/* Socket options for TLS */ + +/* Socket option to select TLS credentials to use. */ +#define TLS_CRET_LIST 1 +/* Socket option to set select ciphersuites to use. */ +#define TLS_CIPHERSUITE_LIST 2 +/* Socket option to set peer verification level for TLS connection. */ +#define TLS_PEER_VERIFY 3 +/* Socket option to set role for DTLS connection. */ +#define TLS_DTLS_ROLE 4 + +/* Protocol numbers for TLS protocols */ +#define PROTOCOL_TLS 256 +#define PROTOCOL_DTLS 257 + + +struct sal_proto_tls_ops +{ + int (*init)(void); + void* (*socket)(int socket); + int (*connect)(void *sock); + int (*send)(void *sock, const void *data, size_t size); + int (*recv)(void *sock, void *mem, size_t len); + int (*closesocket)(void *sock); + + int (*set_cret_list)(void *sock, const void *cert, size_t size); /* Set TLS credentials */ + int (*set_ciphersurite)(void *sock, const void* ciphersurite, size_t size); /* Set select ciphersuites */ + int (*set_peer_verify)(void *sock, const void* peer_verify, size_t size); /* Set peer verification */ + int (*set_dtls_role)(void *sock, const void *dtls_role, size_t size); /* Set role for DTLS */ +}; + +struct sal_proto_tls +{ + char name[RT_NAME_MAX]; /* TLS protocol name */ + const struct sal_proto_tls_ops *ops; /* SAL TLS protocol options */ +}; + +/* SAL TLS protocol register */ +int sal_proto_tls_register(const struct sal_proto_tls *pt); + +#ifdef __cplusplus +} +#endif + +#endif /* __SAL_TLS_H__ */ diff --git a/components/net/sal_socket/include/sal_type.h b/components/net/sal_socket/include/sal_type.h index 907b3d02b4..6e107ae126 100644 --- a/components/net/sal_socket/include/sal_type.h +++ b/components/net/sal_socket/include/sal_type.h @@ -1,21 +1,7 @@ /* - * File : sal_type.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/socket/arpa/inet.h b/components/net/sal_socket/include/socket/arpa/inet.h index e7d856d434..f477df5c23 100644 --- a/components/net/sal_socket/include/socket/arpa/inet.h +++ b/components/net/sal_socket/include/socket/arpa/inet.h @@ -1,21 +1,7 @@ /* - * File : inet.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/socket/netdb.h b/components/net/sal_socket/include/socket/netdb.h index c1ffbb826c..17f83efe00 100644 --- a/components/net/sal_socket/include/socket/netdb.h +++ b/components/net/sal_socket/include/socket/netdb.h @@ -1,21 +1,7 @@ /* - * File : netdb.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/socket/netinet/in.h b/components/net/sal_socket/include/socket/netinet/in.h index d01a9b3f89..57c417d7b6 100644 --- a/components/net/sal_socket/include/socket/netinet/in.h +++ b/components/net/sal_socket/include/socket/netinet/in.h @@ -1,21 +1,7 @@ /* - * File : in.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/socket/netinet/tcp.h b/components/net/sal_socket/include/socket/netinet/tcp.h index aafb0f15d0..2ac4d6f40d 100644 --- a/components/net/sal_socket/include/socket/netinet/tcp.h +++ b/components/net/sal_socket/include/socket/netinet/tcp.h @@ -1,21 +1,7 @@ /* - * File : tcp.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/socket/netinet/udp.h b/components/net/sal_socket/include/socket/netinet/udp.h index 4b84755e68..485d7d142c 100644 --- a/components/net/sal_socket/include/socket/netinet/udp.h +++ b/components/net/sal_socket/include/socket/netinet/udp.h @@ -1,21 +1,7 @@ /* - * File : udp.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/net/sal_socket/include/socket/sys_socket/sys/socket.h b/components/net/sal_socket/include/socket/sys_socket/sys/socket.h index ec7f7b87ea..04470aa84a 100644 --- a/components/net/sal_socket/include/socket/sys_socket/sys/socket.h +++ b/components/net/sal_socket/include/socket/sys_socket/sys/socket.h @@ -1,21 +1,7 @@ /* - * File : socket.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes @@ -28,6 +14,9 @@ #include <rtthread.h> #include <sal_socket.h> +#ifdef SAL_USING_TLS +#include <sal_tls.h> +#endif #ifdef __cplusplus extern "C" { |
