• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is part of the openHiTLS project.
3  *
4  * openHiTLS is licensed under the Mulan PSL v2.
5  * You can use this software according to the terms and conditions of the Mulan PSL v2.
6  * You may obtain a copy of Mulan PSL v2 at:
7  *
8  *     http://license.coscl.org.cn/MulanPSL2
9  *
10  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11  * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12  * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13  * See the Mulan PSL v2 for more details.
14  */
15 
16 #ifndef CONTROL_CHANNEL_H
17 #define CONTROL_CHANNEL_H
18 
19 #include "channel_res.h"
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /**
25  * @brief  Initialize the control channel
26  */
27 int ControlChannelInit(ControlChannelRes *info);
28 
29 /**
30  * @brief  Close the control channel
31  */
32 int ControlChannelClose(ControlChannelRes *info);
33 
34 /**
35  * @brief  Read data from the control channel
36  */
37 int ControlChannelRead(int32_t sockFd, ControlChannelBuf *dataBuf);
38 
39 /**
40  * @brief  Write data to the control channel
41  */
42 int ControlChannelWrite(int32_t sockFd, char *peerDomainPath, ControlChannelBuf *dataBuf);
43 
44 /**
45  * @brief  Control channel initiation
46  */
47 int ControlChannelConnect(ControlChannelRes *info);
48 
49 /**
50  * @brief  The control channel waits for a connection
51  */
52 int ControlChannelAccept(ControlChannelRes *info);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif // CONTROL_CHANNEL_H