xref: /f-stack/tools/compat/rtioctl.h (revision 2317ada5)
1fa74a859Slogwang /*
2*2317ada5Sfengbojiang  * Copyright (C) 2017-2021 THL A29 Limited, a Tencent company.
3fa74a859Slogwang  * All rights reserved.
4fa74a859Slogwang  *
5fa74a859Slogwang  * Redistribution and use in source and binary forms, with or without
6fa74a859Slogwang  * modification, are permitted provided that the following conditions are met:
7fa74a859Slogwang  *
8fa74a859Slogwang  * 1. Redistributions of source code must retain the above copyright notice, this
9fa74a859Slogwang  *   list of conditions and the following disclaimer.
10fa74a859Slogwang  * 2. Redistributions in binary form must reproduce the above copyright notice,
11fa74a859Slogwang  *   this list of conditions and the following disclaimer in the documentation
12fa74a859Slogwang  *   and/or other materials provided with the distribution.
13fa74a859Slogwang  *
14fa74a859Slogwang  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15fa74a859Slogwang  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16fa74a859Slogwang  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17fa74a859Slogwang  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18fa74a859Slogwang  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19fa74a859Slogwang  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20fa74a859Slogwang  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21fa74a859Slogwang  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22fa74a859Slogwang  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23fa74a859Slogwang  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24fa74a859Slogwang  *
25fa74a859Slogwang  */
26fa74a859Slogwang 
27fa74a859Slogwang #ifndef RTIOCTL_H
28fa74a859Slogwang #define RTIOCTL_H
29fa74a859Slogwang 
30fa74a859Slogwang extern int rt_shutdown_rd;
31fa74a859Slogwang extern int rt_sofib;
32fa74a859Slogwang 
33fa74a859Slogwang int rtioctl(char *data, unsigned len, unsigned read_len);
34fa74a859Slogwang 
35fa74a859Slogwang int rt_socket(int domain, int type, int protocol);
36fa74a859Slogwang int rt_shutdown(int fd, int how);
37fa74a859Slogwang int rt_setsockopt(int sockfd, int level, int optname,
38fa74a859Slogwang     const void *optval, socklen_t optlen);
39fa74a859Slogwang void rt_close(int fd);
40fa74a859Slogwang 
41fa74a859Slogwang #endif
42