Add Multipath TCP
[platform/core/api/connection.git] / include / connection_extension.h
1 /*
2  * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __TIZEN_NETWORK_CONNECTION_EXTENSION_H__
18 #define __TIZEN_NETWORK_CONNECTION_EXTENSION_H__
19
20 #include "net_connection.h"
21 #include "network-mptcp-intf.h"
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /**
28  * @file connection_extension.h
29  */
30
31 /**
32  * @brief Start TCP Dump.
33  *
34  * @param[in] connection        The connection handle
35  *
36  * @return @c 0 on success, otherwise a negative error value
37  * @retval #CONNECTION_ERROR_NONE                    Successful
38  * @retval #CONNECTION_ERROR_OPERATION_FAILED        Operation failed
39  * @retval #CONNECTION_ERROR_INVALID_PARAMETER       Invalid parameter
40 */
41 int connection_profile_start_tcpdump(connection_h connection);
42
43 /**
44  * @brief Stop TCP Dump.
45  *
46  * @param[in] connection        The connection handle
47  *
48  * @return @c 0 on success, otherwise a negative error value
49  * @retval #CONNECTION_ERROR_NONE                    Successful
50  * @retval #CONNECTION_ERROR_OPERATION_FAILED        Operation failed
51  * @retval #CONNECTION_ERROR_INVALID_PARAMETER       Invalid parameter
52 */
53 int connection_profile_stop_tcpdump(connection_h connection);
54
55 /**
56  * @brief Get TCP Dump Running Status.
57  *
58  * @param[in] connection        The connection handle
59  * @param[out] tcpdump_state    The state of tcpdump, tcpdump is in progress or not
60  *
61  * @return @c 0 on success, otherwise a negative error value
62  * @retval #CONNECTION_ERROR_NONE                    Successful
63  * @retval #CONNECTION_ERROR_OPERATION_FAILED        Operation failed
64  * @retval #CONNECTION_ERROR_INVALID_PARAMETER       Invalid parameter
65 */
66 int connection_profile_get_tcpdump_state(connection_h connection, gboolean *tcpdump_state);
67
68
69 typedef enum {
70         CONNECTION_MPTCP_DISABLE = 0,
71         CONNECTION_MPTCP_ENABLE_ALL = 1,
72         CONNECTION_MPTCP_ENABLE_SOCKOPT = 2,
73 } connection_mptcp_enable_e;
74
75 typedef enum {
76         CONNECTION_MPTCP_PM_UNKNOWN,
77         CONNECTION_MPTCP_PM_DEFAULT,
78         CONNECTION_MPTCP_PM_FULLMESH,
79 } connection_mptcp_path_manager_e;
80
81 typedef enum {
82         CONNECTION_MPTCP_SCHEDULER_UNKNOWN,
83         CONNECTION_MPTCP_SCHEDULER_DEFAULT,
84         CONNECTION_MPTCP_SCHEDULER_ROUNDROBIN,
85 } connection_mptcp_scheduler_e;
86
87 int connection_mptcp_enable(connection_mptcp_enable_e enable);
88 int connection_mptcp_disable(void);
89 int connection_mptcp_get_enabled(connection_mptcp_enable_e* enable);
90
91 int connection_mptcp_set_path_manager(connection_mptcp_path_manager_e pm);
92 int connection_mptcp_get_path_manager(connection_mptcp_path_manager_e* pm);
93
94 int connection_mptcp_set_scheduler(connection_mptcp_scheduler_e scheduler);
95 int connection_mptcp_get_scheduler(connection_mptcp_scheduler_e* scheduler);
96
97 /**
98 * @}
99 */
100
101
102 #ifdef __cplusplus
103 }
104 #endif /* __cplusplus */
105
106
107 #endif /* __TIZEN_NETWORK_CONNECTION_EXTENSION_H__ */