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"
28 * @file connection_extension.h
32 * @brief Enumeration for extended network connection type.
36 CONNECTION_PROFILE_TYPE_MESH = CONNECTION_PROFILE_TYPE_BT + 1, /**< Wi-Fi Mesh type */
37 } connection_profile_type_extended_e;
40 * @brief Start TCP Dump.
42 * @param[in] connection The connection handle
44 * @return @c 0 on success, otherwise a negative error value
45 * @retval #CONNECTION_ERROR_NONE Successful
46 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
47 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
49 int connection_profile_start_tcpdump(connection_h connection);
52 * @brief Stop TCP Dump.
54 * @param[in] connection The connection handle
56 * @return @c 0 on success, otherwise a negative error value
57 * @retval #CONNECTION_ERROR_NONE Successful
58 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
59 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
61 int connection_profile_stop_tcpdump(connection_h connection);
64 * @brief Get TCP Dump Running Status.
66 * @param[in] connection The connection handle
67 * @param[out] tcpdump_state The state of tcpdump, tcpdump is in progress or not
69 * @return @c 0 on success, otherwise a negative error value
70 * @retval #CONNECTION_ERROR_NONE Successful
71 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
72 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
74 int connection_profile_get_tcpdump_state(connection_h connection, gboolean *tcpdump_state);
77 * @brief Creates a handle for managing data connections in C# API.
80 * @privilege %http://tizen.org/privilege/network.get
81 * @remarks You must release @a handle using connection_destroy_cs().
82 * @param[in] tid TID in C#
83 * @param[out] connection The connection handle
84 * @return @c 0 on success,
85 * otherwise a negative error value
86 * @retval #CONNECTION_ERROR_NONE Successful
87 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
88 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
89 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
90 * @see connection_destroy_cs()
92 int connection_create_cs(int tid, connection_h *connection);
95 * @brief Destroys the connection handle in C# API.
97 * @param[in] tid TID in C#
98 * @param[in] connection The connection handle
99 * @return @c 0 on success,
100 * otherwise a negative error value
101 * @retval #CONNECTION_ERROR_NONE Successful
102 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
103 * @see connection_create_cs()
105 int connection_destroy_cs(int tid, connection_h connection);
108 CONNECTION_MPTCP_DISABLE = 0, // disable
109 CONNECTION_MPTCP_ENABLE_ALL = 1, // enable
110 CONNECTION_MPTCP_ENABLE_SOCKOPT = 2, // enable if the MPTCP_ENABLED socket option is set
111 } connection_mptcp_enable_e;
114 CONNECTION_MPTCP_PM_UNKNOWN, // Unknown path manager
115 CONNECTION_MPTCP_PM_DEFAULT, // Default path manager - Do nothing
116 CONNECTION_MPTCP_PM_FULLMESH, // Full mesh of subflows
117 } connection_mptcp_path_manager_e;
120 CONNECTION_MPTCP_SCHEDULER_UNKNOWN, // Unknown scheduler
121 CONNECTION_MPTCP_SCHEDULER_DEFAULT, // Default scheduler
122 CONNECTION_MPTCP_SCHEDULER_ROUNDROBIN, // Round robin scheduler
123 } connection_mptcp_scheduler_e;
126 * @brief Check if Multipath TCP is supported
128 * @param[in] connection The connection handle
129 * @param[out] supported true if Multipath TCP is supported, false otherwise
130 * @return @c 0 on success,
131 * otherwise a negative error value
132 * @retval #CONNECTION_ERROR_NONE Successful
134 int connection_mptcp_is_supported(connection_h connection, bool* supported);
137 * @brief Enable Multipath TCP
139 * @param[in] connection The connection handle
140 * @param[in] enable The enabled value
141 * @return @c 0 on success,
142 * otherwise a negative error value
143 * @retval #CONNECTION_ERROR_NONE Successful
144 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
145 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
146 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
147 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
149 int connection_mptcp_enable(connection_h connection, connection_mptcp_enable_e enable);
152 * @brief Disable Multipath TCP
154 * @param[in] connection The connection handle
155 * @return @c 0 on success,
156 * otherwise a negative error value
157 * @retval #CONNECTION_ERROR_NONE Successful
158 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
159 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
160 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
161 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
163 int connection_mptcp_disable(connection_h connection);
166 * @brief Get the enabled value for Multipath TCP
168 * @param[in] connection The connection handle
169 * @param[out] enable The enabled value
170 * @return @c 0 on success,
171 * otherwise a negative error value
172 * @retval #CONNECTION_ERROR_NONE Successful
173 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
174 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
175 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
176 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
178 int connection_mptcp_get_enabled(connection_h connection, connection_mptcp_enable_e* enable);
181 * @brief Set the path manager of Multipath TCP
183 * @param[in] connection The connection handle
184 * @param[in] pm The path manager of Multipath TCP
185 * @return @c 0 on success,
186 * otherwise a negative error value
187 * @retval #CONNECTION_ERROR_NONE Successful
188 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
189 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
190 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
191 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
193 int connection_mptcp_set_path_manager(connection_h connection, connection_mptcp_path_manager_e pm);
196 * @brief Get the path manager of Multipath TCP
198 * @param[in] connection The connection handle
199 * @param[out] pm The path manager of Multipath TCP
200 * @return @c 0 on success,
201 * otherwise a negative error value
202 * @retval #CONNECTION_ERROR_NONE Successful
203 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
204 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
205 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
206 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
208 int connection_mptcp_get_path_manager(connection_h connection, connection_mptcp_path_manager_e* pm);
211 * @brief Set the path manager of Multipath TCP
213 * @param[in] connection The connection handle
214 * @param[in] scheduler The schedduler of Multipath TCP
215 * @return @c 0 on success,
216 * otherwise a negative error value
217 * @retval #CONNECTION_ERROR_NONE Successful
218 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
219 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
220 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
221 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
223 int connection_mptcp_set_scheduler(connection_h connection, connection_mptcp_scheduler_e scheduler);
226 * @brief Set the path manager of Multipath TCP
228 * @param[in] connection The connection handle
229 * @param[out] scheduler The schedduler of Multipath TCP
230 * @return @c 0 on success,
231 * otherwise a negative error value
232 * @retval #CONNECTION_ERROR_NONE Successful
233 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
234 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
235 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation failed
236 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
238 int connection_mptcp_get_scheduler(connection_h connection, connection_mptcp_scheduler_e* scheduler);
241 * @brief Enumeration for EAP type.
245 CONNECTION_ETHERNET_EAP_TYPE_MD5 = 0, /**< EAP MD5 type */
246 CONNECTION_ETHERNET_EAP_TYPE_PEAP = 1, /**< EAP PEAP type */
247 CONNECTION_ETHERNET_EAP_TYPE_TLS = 2, /**< EAP TLS type */
248 CONNECTION_ETHERNET_EAP_TYPE_TTLS = 3, /**< EAP TTLS type */
249 CONNECTION_ETHERNET_EAP_TYPE_FAST = 4, /**< EAP FAST type */
250 } connection_ethernet_eap_type_e;
253 * @brief Enumeration for EAP phase2 authentication type.
257 CONNECTION_ETHERNET_EAP_AUTH_TYPE_NONE = 0, /**< EAP phase2 authentication none */
258 CONNECTION_ETHERNET_EAP_AUTH_TYPE_PAP = 1, /**< EAP phase2 authentication PAP */
259 CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAP = 2, /**< EAP phase2 authentication MSCHAP */
260 CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAPV2 = 3, /**< EAP phase2 authentication MSCHAPv2 */
261 CONNECTION_ETHERNET_EAP_AUTH_TYPE_GTC = 4, /**< EAP phase2 authentication GTC */
262 CONNECTION_ETHERNET_EAP_AUTH_TYPE_MD5 = 5, /**< EAP phase2 authentication MD5 */
263 } connection_ethernet_eap_auth_type_e;
266 * @brief Enumeration for PEAP version.
270 CONNECTION_ETHERNET_EAP_PEAP_VERSION_AUTO = 0, /**< PEAP version Automatic */
271 CONNECTION_ETHERNET_EAP_PEAP_VERSION_0 = 1, /**< PEAP version 0 */
272 CONNECTION_ETHERNET_EAP_PEAP_VERSION_1 = 2, /**< PEAP version 1 */
273 } connection_ethernet_eap_peap_version_e;
276 * @brief Called for each found ethernet configuration.
278 * @param[in] profile The profile handle
279 * @param[in] user_data The user data passed from the request function
280 * @return @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop \n
281 * @pre connection_profile_foreach_ethernet_eap_config() will invoke this callback.
282 * @see connection_profile_foreach_ethernet_eap_config()
284 typedef bool (*connection_profile_list_cb)(connection_profile_h profile, void *user_data);
287 * @brief Gets configurations of an ethernet.
290 * @privilege %http://tizen.org/privilege/network.profile
292 * @param[in] connection The connection handle
293 * @param[in] callback The callback to be called
294 * @param[in] user_data The user data passed to the callback function
295 * @return 0 on success, otherwise negative error value
296 * @retval #CONNECTION_ERROR_NONE Successful
297 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
298 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
299 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
300 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
301 * @pre This function needs connection_create() before use.
302 * @post This function invokes connection_profile_list_cb().
304 int connection_profile_foreach_ethernet_eap_config(connection_h connection,
305 connection_profile_list_cb callback, void *user_data);
308 * @brief Enable EAP over ethernet network
310 * @param[in] profile The profile handle
311 * @param[in] enable The flag to enable or disable EAP over ethernet
312 * @return @c 0 on success, otherwise a negative error value
313 * @retval #CONNECTION_ERROR_NONE Successful
314 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
315 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
316 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation Failed
317 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
319 int connection_profile_enable_ethernet_eap(connection_profile_h profile, bool enable);
322 * @brief Check if EAP over ethernet is enabled.
324 * @param[in] profile The profile handle
325 * @param[out] enabled true if EAP over ethernet is enabled, false otherwise
326 * @return @c 0 on success, otherwise a negative error value
327 * @retval #CONNECTION_ERROR_NONE Successful
328 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
329 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
330 * @retval #CONNECTION_ERROR_OPERATION_FAILED Operation Failed
331 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
333 int connection_profile_is_ethernet_eap_enabled(connection_profile_h profile, bool *enabled);
336 * @brief Sets the EAP type of ethernet.
338 * @param[in] profile The profile handle
339 * @param[in] type The type of EAP
340 * @return 0 on success, otherwise negative error value
341 * @retval #CONNECTION_ERROR_NONE Successful
342 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
343 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
344 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
346 int connection_profile_set_ethernet_eap_type(connection_profile_h profile, connection_ethernet_eap_type_e type);
349 * @brief Gets the EAP type of ethernet.
351 * @param[in] profile The profile handle
352 * @param[out] type The type of EAP
353 * @return 0 on success, otherwise negative error value
354 * @retval #CONNECTION_ERROR_NONE Successful
355 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
356 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
357 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
359 int connection_profile_get_ethernet_eap_type(connection_profile_h profile, connection_ethernet_eap_type_e *type);
362 * @brief Sets the type of EAP phase2 authentication of ethernet.
364 * @param[in] profile The profile handle
365 * @param[in] type The type of EAP phase2 authentication
366 * @return 0 on success, otherwise negative error value
367 * @retval #CONNECTION_ERROR_NONE Successful
368 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
369 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
370 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
371 * @pre This function needs connection_profile_set_ethernet_eap_type() before use.
373 int connection_profile_set_ethernet_eap_auth_type(connection_profile_h profile,
374 connection_ethernet_eap_auth_type_e type);
377 * @brief Gets the type of EAP phase2 authentication of ethernet.
379 * @param[in] profile The profile handle
380 * @param[out] type The type of EAP phase2 authentication
381 * @return 0 on success, otherwise negative error value
382 * @retval #CONNECTION_ERROR_NONE Successful
383 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
384 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
385 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
387 int connection_profile_get_ethernet_eap_auth_type(connection_profile_h profile,
388 connection_ethernet_eap_auth_type_e *type);
391 * @brief Sets anonymous identity of EAP over ethernet.
393 * @param[in] profile The profile handle
394 * @param[in] anonymous_identity The anonymous identity
395 * @return 0 on success, otherwise negative error value
396 * @retval #CONNECTION_ERROR_NONE Successful
397 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
398 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
399 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
401 int connection_profile_set_ethernet_eap_anonymous_identity(connection_profile_h profile,
402 const char *anonymous_identity);
405 * @brief Gets anonymous identity of EAP over ethernet.
407 * @remarks You must release @a anonymous_identity using free().
408 * @param[in] profile The profile handle
409 * @param[out] anonymous_identity The anonymous identity of ethernet.
410 * @return 0 on success, otherwise negative error value
411 * @retval #CONNECTION_ERROR_NONE Successful
412 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
413 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
414 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
415 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
417 int connection_profile_get_ethernet_eap_anonymous_identity(connection_profile_h profile,
418 char **anonymous_identity);
421 * @brief Sets the CA Certificate of EAP.
423 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS,
424 * #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
425 * @param[in] profile The profile handle
426 * @param[in] file The file path of CA Certificate
427 * @return 0 on success, otherwise negative error value
428 * @retval #CONNECTION_ERROR_NONE Successful
429 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
430 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
431 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
433 int connection_profile_set_ethernet_eap_ca_cert_file(connection_profile_h profile, const char *file);
436 * @brief Gets the CA Certificate of EAP.
438 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS,
439 * #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
440 * You must release @a file using free().
441 * @param[in] profile The profile handle
442 * @param[out] file The file path of CA Certificate
443 * @return 0 on success, otherwise negative error value
444 * @retval #CONNECTION_ERROR_NONE Successful
445 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
446 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
447 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
448 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
450 int connection_profile_get_ethernet_eap_ca_cert_file(connection_profile_h profile, char **file);
453 * @brief Sets the Client Certificate of EAP.
455 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
456 * @param[in] profile The profile handle
457 * @param[out] file The file path of Client Certificate
458 * @return 0 on success, otherwise negative error value
459 * @retval #CONNECTION_ERROR_NONE Successful
460 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
461 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
462 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
464 int connection_profile_set_ethernet_eap_client_cert_file(connection_profile_h profile, const char *file);
467 * @brief Gets the Client Certificate of EAP.
469 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
470 * You must release @a file using free().
471 * @param[in] profile The profile handle
472 * @param[out] file The file path of Client Certificate
473 * @return 0 on success, otherwise negative error value
474 * @retval #CONNECTION_ERROR_NONE Successful
475 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
476 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
477 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
478 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
480 int connection_profile_get_ethernet_eap_client_cert_file(connection_profile_h profile, char **file);
483 * @brief Sets the PAC file of EAP.
485 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_FAST.
486 * @param[in] profile The profile handle
487 * @param[out] file The path of PAC file
488 * @return 0 on success, otherwise negative error value
489 * @retval #CONNECTION_ERROR_NONE Successful
490 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
491 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
492 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
494 int connection_profile_set_ethernet_eap_pac_file(connection_profile_h profile, const char *file);
497 * @brief Gets the PAC file of EAP.
499 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_FAST.
500 * You must release @a file using free().
501 * @param[in] profile The profile handle
502 * @param[out] file The path of PAC file
503 * @return 0 on success, otherwise negative error value
504 * @retval #CONNECTION_ERROR_NONE Successful
505 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
506 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
507 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
508 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
510 int connection_profile_get_ethernet_eap_pac_file(connection_profile_h profile, char **file);
513 * @brief Sets the version of EAP-PEAP of ethernet.
515 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
516 * @param[in] profile The profile handle
517 * @param[in] version The version of EAP-PEAP.
518 * @return 0 on success, otherwise negative error value
519 * @retval #CONNECTION_ERROR_NONE Successful
520 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
521 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
522 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
524 int connection_profile_set_ethernet_eap_peap_version(connection_profile_h profile,
525 connection_ethernet_eap_peap_version_e version);
528 * @brief Gets the version of EAP-PEAP of ethernet.
530 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
531 * @param[in] profile The profile handle
532 * @param[out] version The version of EAP-PEAP.
533 * @return 0 on success, otherwise negative error value
534 * @retval #CONNECTION_ERROR_NONE Successful
535 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
536 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
537 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
539 int connection_profile_get_ethernet_eap_peap_version(connection_profile_h profile,
540 connection_ethernet_eap_peap_version_e *version);
543 * @brief Sets the identity of EAP over ethernet.
545 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
546 * @param[in] profile The profile handle
547 * @param[in] identity The identity
548 * @return 0 on success, otherwise negative error value
549 * @retval #CONNECTION_ERROR_NONE Successful
550 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
551 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
552 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
554 int connection_profile_set_ethernet_eap_identity(connection_profile_h profile, const char *identity);
557 * @brief Gets the identity of EAP over ethernet.
559 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
560 * You must release @a identity using free().
561 * @param[in] profile The profile handle
562 * @param[out] identity The identity of ethernet.
563 * @return 0 on success, otherwise negative error value
564 * @retval #CONNECTION_ERROR_NONE Successful
565 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
566 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
567 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
568 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
570 int connection_profile_get_ethernet_eap_identity(connection_profile_h profile, char **identity);
573 * @brief Sets the private key information of EAP.
575 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
576 * @param[in] profile The profile handle
577 * @param[in] file The file path of private key
578 * @param[in] password The password
579 * @return 0 on success, otherwise negative error value
580 * @retval #CONNECTION_ERROR_NONE Successful
581 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
582 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
583 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
585 int connection_profile_set_ethernet_eap_private_key_info(connection_profile_h profile,
586 const char *file, const char *password);
588 * @brief Gets the private key file of EAP.
590 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
591 * You must release @a file using free().
592 * @param[in] profile The profile handle
593 * @param[out] file The file path of private key
594 * @return 0 on success, otherwise negative error value
595 * @retval #CONNECTION_ERROR_NONE Successful
596 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
597 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
598 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
599 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
601 int connection_profile_get_ethernet_eap_private_key_file(connection_profile_h profile, char **file);
604 * @brief Sets the user name and passphrase of EAP.
606 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_MD5,
607 * #CONNECTION_ETHERNET_EAP_TYPE_PEAP, #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_FAST.
608 * @param[in] profile The profile handle
609 * @param[in] user_name The user name
610 * @param[in] password The password
611 * @return 0 on success, otherwise negative error value
612 * @retval #CONNECTION_ERROR_NONE Successful
613 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
614 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
615 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
617 int connection_profile_set_ethernet_eap_passphrase(connection_profile_h profile,
618 const char *user_name, const char *password);
621 * @brief Gets the username and password status of EAP.
623 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_MD5,
624 * #CONNECTION_ETHERNET_EAP_TYPE_PEAP, #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_FAST.
625 * You must release @a user_name using free().
626 * @param[in] profile The profile handle
627 * @param[out] user_name The user name
628 * @param[out] is_password_set @c true if password is set,
629 * otherwise @c false if password is not set.
630 * @return 0 on success, otherwise negative error value
631 * @retval #CONNECTION_ERROR_NONE Successful
632 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
633 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
634 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
635 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
637 int connection_profile_get_ethernet_eap_passphrase(connection_profile_h profile,
638 char **user_name, bool *is_password_set);
641 * @brief Removes configuration of ethernet profile.
644 * @privilege %http://tizen.org/privilege/network.profile
646 * @param[in] connection The connection handle
647 * @param[in] profile The profile handle
648 * @return 0 on success, otherwise negative error value
649 * @retval #CONNECTION_ERROR_NONE Successful
650 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
651 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
652 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
653 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
654 * @see connection_profile_create()
655 * @see connection_profile_foreach_ethernet_eap_config()
657 int connection_profile_remove_ethernet_eap_config(connection_h connection,
658 connection_profile_h profile);
661 * @brief Saves configuration of ethernet profile.
662 * @details When a configuration is changed, these changes will be not applied to the Connection Manager immediately.\n
663 * When you call this function, your changes affect the Connection Manager and the existing configuration is updated.
666 * @privilege %http://tizen.org/privilege/network.profile
668 * @param[in] connection The connection handle
669 * @param[in] profile The profile handle
670 * @return 0 on success, otherwise negative error value
671 * @retval #CONNECTION_ERROR_NONE Successful
672 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
673 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
674 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
675 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
676 * @see connection_profile_create()
678 int connection_profile_save_ethernet_eap_config(connection_h connection,
679 connection_profile_h profile);
688 #endif /* __cplusplus */
691 #endif /* __TIZEN_NETWORK_CONNECTION_EXTENSION_H__ */