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
372 int connection_profile_set_ethernet_eap_auth_type(connection_profile_h profile,
373 connection_ethernet_eap_auth_type_e type);
376 * @brief Gets the type of EAP phase2 authentication of ethernet.
378 * @param[in] profile The profile handle
379 * @param[out] type The type of EAP phase2 authentication
380 * @return 0 on success, otherwise negative error value
381 * @retval #CONNECTION_ERROR_NONE Successful
382 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
383 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
384 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
386 int connection_profile_get_ethernet_eap_auth_type(connection_profile_h profile,
387 connection_ethernet_eap_auth_type_e *type);
390 * @brief Sets anonymous identity of EAP over ethernet.
392 * @param[in] profile The profile handle
393 * @param[in] anonymous_identity The anonymous identity
394 * @return 0 on success, otherwise negative error value
395 * @retval #CONNECTION_ERROR_NONE Successful
396 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
397 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
398 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
400 int connection_profile_set_ethernet_eap_anonymous_identity(connection_profile_h profile,
401 const char *anonymous_identity);
404 * @brief Gets anonymous identity of EAP over ethernet.
406 * @remarks You must release @a anonymous_identity using free().
407 * @param[in] profile The profile handle
408 * @param[out] anonymous_identity The anonymous identity of ethernet.
409 * @return 0 on success, otherwise negative error value
410 * @retval #CONNECTION_ERROR_NONE Successful
411 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
412 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
413 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
414 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
416 int connection_profile_get_ethernet_eap_anonymous_identity(connection_profile_h profile,
417 char **anonymous_identity);
420 * @brief Sets the CA Certificate of EAP.
422 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS,
423 * #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
424 * @param[in] profile The profile handle
425 * @param[in] file The file path of CA Certificate
426 * @return 0 on success, otherwise negative error value
427 * @retval #CONNECTION_ERROR_NONE Successful
428 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
429 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
430 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
432 int connection_profile_set_ethernet_eap_ca_cert_file(connection_profile_h profile, const char *file);
435 * @brief Gets the CA Certificate of EAP.
437 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS,
438 * #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
439 * You must release @a file using free().
440 * @param[in] profile The profile handle
441 * @param[out] file The file path of CA Certificate
442 * @return 0 on success, otherwise negative error value
443 * @retval #CONNECTION_ERROR_NONE Successful
444 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
445 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
446 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
447 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
449 int connection_profile_get_ethernet_eap_ca_cert_file(connection_profile_h profile, char **file);
452 * @brief Sets the Client Certificate of EAP.
454 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
455 * @param[in] profile The profile handle
456 * @param[out] file The file path of Client Certificate
457 * @return 0 on success, otherwise negative error value
458 * @retval #CONNECTION_ERROR_NONE Successful
459 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
460 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
461 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
463 int connection_profile_set_ethernet_eap_client_cert_file(connection_profile_h profile, const char *file);
466 * @brief Gets the Client Certificate of EAP.
468 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
469 * You must release @a file using free().
470 * @param[in] profile The profile handle
471 * @param[out] file The file path of Client Certificate
472 * @return 0 on success, otherwise negative error value
473 * @retval #CONNECTION_ERROR_NONE Successful
474 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
475 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
476 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
477 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
479 int connection_profile_get_ethernet_eap_client_cert_file(connection_profile_h profile, char **file);
482 * @brief Sets the PAC file of EAP.
484 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_FAST.
485 * @param[in] profile The profile handle
486 * @param[out] file The path of PAC file
487 * @return 0 on success, otherwise negative error value
488 * @retval #CONNECTION_ERROR_NONE Successful
489 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
490 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
491 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
493 int connection_profile_set_ethernet_eap_pac_file(connection_profile_h profile, const char *file);
496 * @brief Gets the PAC file of EAP.
498 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_FAST.
499 * You must release @a file using free().
500 * @param[in] profile The profile handle
501 * @param[out] file The path of PAC file
502 * @return 0 on success, otherwise negative error value
503 * @retval #CONNECTION_ERROR_NONE Successful
504 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
505 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
506 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
507 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
509 int connection_profile_get_ethernet_eap_pac_file(connection_profile_h profile, char **file);
512 * @brief Sets the version of EAP-PEAP of ethernet.
514 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
515 * @param[in] profile The profile handle
516 * @param[in] version The version of EAP-PEAP.
517 * @return 0 on success, otherwise negative error value
518 * @retval #CONNECTION_ERROR_NONE Successful
519 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
520 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
521 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
523 int connection_profile_set_ethernet_eap_peap_version(connection_profile_h profile,
524 connection_ethernet_eap_peap_version_e version);
527 * @brief Gets the version of EAP-PEAP of ethernet.
529 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_PEAP.
530 * @param[in] profile The profile handle
531 * @param[out] version The version of EAP-PEAP.
532 * @return 0 on success, otherwise negative error value
533 * @retval #CONNECTION_ERROR_NONE Successful
534 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
535 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
536 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
538 int connection_profile_get_ethernet_eap_peap_version(connection_profile_h profile,
539 connection_ethernet_eap_peap_version_e *version);
542 * @brief Sets the identity of EAP over ethernet.
544 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
545 * @param[in] profile The profile handle
546 * @param[in] identity The identity
547 * @return 0 on success, otherwise negative error value
548 * @retval #CONNECTION_ERROR_NONE Successful
549 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
550 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
551 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
553 int connection_profile_set_ethernet_eap_identity(connection_profile_h profile, const char *identity);
556 * @brief Gets the identity of EAP over ethernet.
558 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
559 * You must release @a identity using free().
560 * @param[in] profile The profile handle
561 * @param[out] identity The identity of ethernet.
562 * @return 0 on success, otherwise negative error value
563 * @retval #CONNECTION_ERROR_NONE Successful
564 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
565 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
566 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
567 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
569 int connection_profile_get_ethernet_eap_identity(connection_profile_h profile, char **identity);
572 * @brief Sets the private key information of EAP.
574 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
575 * @param[in] profile The profile handle
576 * @param[in] file The file path of private key
577 * @param[in] password The password
578 * @return 0 on success, otherwise negative error value
579 * @retval #CONNECTION_ERROR_NONE Successful
580 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
581 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
582 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
584 int connection_profile_set_ethernet_eap_private_key_info(connection_profile_h profile,
585 const char *file, const char *password);
587 * @brief Gets the private key file of EAP.
589 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_TLS.
590 * You must release @a file using free().
591 * @param[in] profile The profile handle
592 * @param[out] file The file path of private key
593 * @return 0 on success, otherwise negative error value
594 * @retval #CONNECTION_ERROR_NONE Successful
595 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
596 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
597 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
598 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
600 int connection_profile_get_ethernet_eap_private_key_file(connection_profile_h profile, char **file);
603 * @brief Sets the user name and passphrase of EAP.
605 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_MD5,
606 * #CONNECTION_ETHERNET_EAP_TYPE_PEAP, #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_FAST.
607 * @param[in] profile The profile handle
608 * @param[in] user_name The user name
609 * @param[in] password The password
610 * @return 0 on success, otherwise negative error value
611 * @retval #CONNECTION_ERROR_NONE Successful
612 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
613 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
614 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
616 int connection_profile_set_ethernet_eap_passphrase(connection_profile_h profile,
617 const char *user_name, const char *password);
620 * @brief Gets the username and password status of EAP.
622 * @remarks This function is valid only if the EAP type is #CONNECTION_ETHERNET_EAP_TYPE_MD5,
623 * #CONNECTION_ETHERNET_EAP_TYPE_PEAP, #CONNECTION_ETHERNET_EAP_TYPE_TTLS or #CONNECTION_ETHERNET_EAP_TYPE_FAST.
624 * You must release @a user_name using free().
625 * @param[in] profile The profile handle
626 * @param[out] user_name The user name
627 * @param[out] is_password_set @c true if password is set,
628 * otherwise @c false if password is not set.
629 * @return 0 on success, otherwise negative error value
630 * @retval #CONNECTION_ERROR_NONE Successful
631 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
632 * @retval #CONNECTION_ERROR_OUT_OF_MEMORY Out of memory
633 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
634 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
636 int connection_profile_get_ethernet_eap_passphrase(connection_profile_h profile,
637 char **user_name, bool *is_password_set);
640 * @brief Removes configuration of ethernet profile.
643 * @privilege %http://tizen.org/privilege/network.profile
645 * @param[in] connection The connection handle
646 * @param[in] profile The profile handle
647 * @return 0 on success, otherwise negative error value
648 * @retval #CONNECTION_ERROR_NONE Successful
649 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
650 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
651 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
652 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
653 * @see connection_profile_create()
654 * @see connection_profile_foreach_ethernet_eap_config()
656 int connection_profile_remove_ethernet_eap_config(connection_h connection,
657 connection_profile_h profile);
660 * @brief Saves configuration of ethernet profile.
661 * @details When a configuration is changed, these changes will be not applied to the Connection Manager immediately.\n
662 * When you call this function, your changes affect the Connection Manager and the existing configuration is updated.
665 * @privilege %http://tizen.org/privilege/network.profile
667 * @param[in] connection The connection handle
668 * @param[in] profile The profile handle
669 * @return 0 on success, otherwise negative error value
670 * @retval #CONNECTION_ERROR_NONE Successful
671 * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation
672 * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter
673 * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied
674 * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported
675 * @see connection_profile_create()
677 int connection_profile_save_ethernet_eap_config(connection_h connection,
678 connection_profile_h profile);
687 #endif /* __cplusplus */
690 #endif /* __TIZEN_NETWORK_CONNECTION_EXTENSION_H__ */