2 * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __TIZEN_NETWORK_CONNECTION_EXTENSION_H__
18 #define __TIZEN_NETWORK_CONNECTION_EXTENSION_H__
20 #include "net_connection.h"
21 #include "network-mptcp-intf.h"
28 * @file connection_extension.h
32 * @brief Start TCP Dump.
34 * @param[in] connection The connection handle
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
41 int connection_profile_start_tcpdump(connection_h connection);
44 * @brief Stop TCP Dump.
46 * @param[in] connection The connection handle
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
53 int connection_profile_stop_tcpdump(connection_h connection);
56 * @brief Get TCP Dump Running Status.
58 * @param[in] connection The connection handle
59 * @param[out] tcpdump_state The state of tcpdump, tcpdump is in progress or not
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
66 int connection_profile_get_tcpdump_state(connection_h connection, gboolean *tcpdump_state);
69 * @brief Creates a handle for managing data connections in C# API.
72 * @privilege %http://tizen.org/privilege/network.get
73 * @remarks You must release @a handle using connection_destroy_cs().
74 * @param[in] tid TID in C#
75 * @param[out] connection The connection handle
76 * @return @c 0 on success,
77 * otherwise a negative error value
78 * @retval #CONNECTION_ERROR_NONE Successful
79 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
80 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
81 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
82 * @see connection_destroy_cs()
84 int connection_create_cs(int tid, connection_h *connection);
87 * @brief Destroys the connection handle in C# API.
89 * @param[in] tid TID in C#
90 * @param[in] connection The connection handle
91 * @return @c 0 on success,
92 * otherwise a negative error value
93 * @retval #CONNECTION_ERROR_NONE Successful
94 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
95 * @see connection_create_cs()
97 int connection_destroy_cs(int tid, connection_h connection);
100 CONNECTION_MPTCP_DISABLE = 0,
101 CONNECTION_MPTCP_ENABLE_ALL = 1,
102 CONNECTION_MPTCP_ENABLE_SOCKOPT = 2,
103 } connection_mptcp_enable_e;
106 CONNECTION_MPTCP_PM_UNKNOWN,
107 CONNECTION_MPTCP_PM_DEFAULT,
108 CONNECTION_MPTCP_PM_FULLMESH,
109 } connection_mptcp_path_manager_e;
112 CONNECTION_MPTCP_SCHEDULER_UNKNOWN,
113 CONNECTION_MPTCP_SCHEDULER_DEFAULT,
114 CONNECTION_MPTCP_SCHEDULER_ROUNDROBIN,
115 } connection_mptcp_scheduler_e;
117 int connection_mptcp_enable(connection_mptcp_enable_e enable);
118 int connection_mptcp_disable(void);
119 int connection_mptcp_get_enabled(connection_mptcp_enable_e* enable);
121 int connection_mptcp_set_path_manager(connection_mptcp_path_manager_e pm);
122 int connection_mptcp_get_path_manager(connection_mptcp_path_manager_e* pm);
124 int connection_mptcp_set_scheduler(connection_mptcp_scheduler_e scheduler);
125 int connection_mptcp_get_scheduler(connection_mptcp_scheduler_e* scheduler);
134 #endif /* __cplusplus */
137 #endif /* __TIZEN_NETWORK_CONNECTION_EXTENSION_H__ */