51863b92eeaecf5593d64da806e02636b919d696
[platform/core/api/thread.git] / include / thread.h
1 /*
2  * Copyright (c) 2021 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
18 #ifndef __TIZEN_NETWORK_THREAD_H__
19 #define __TIZEN_NETWORK_THREAD_H__
20
21 #include <stdlib.h>
22 #include <unistd.h>
23 #include <stdbool.h>
24 #include <tizen_error.h>
25 #include <tizen.h>
26
27 #include <thread-type.h>
28
29 #ifndef TIZEN_DEPRECATED_API
30 #define TIZEN_DEPRECATED_API __attribute__((__visibility__("default"), deprecated))
31 #endif
32
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif /* __cplusplus */
37
38 /**
39  * @file        thread.h
40  * @brief       API to control the Thread adapter and devices and communications.
41  * @ingroup     CAPI_NETWORK_THREAD_MODULE
42  */
43
44
45 /**
46  * @ingroup CAPI_NETWORK_THREAD_MODULE
47  * @brief Initializes the thread API.
48  * @since_tizen 7.0
49  *
50  * @remarks This function must be called before thread API starts. \n
51  *
52  * @return 0 on success, otherwise a negative error value.
53  * @retval #THREAD_ERROR_NONE  Successful
54  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
55  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
56  *
57  * @see  thread_deinitialize()
58  */
59 int thread_initialize(void);
60
61 /**
62  * @ingroup CAPI_NETWORK_THREAD_MODULE
63  * @brief Releases all resources of the thread API.
64  * @since_tizen 7.0
65  *
66  * @remarks This function must be called if thread API is no longer needed.
67  *
68  * @return 0 on success, otherwise a negative error value.
69  * @retval #THREAD_ERROR_NONE  Successful
70  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
71  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
72  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
73  *
74  * @pre thread API must be initialized with thread_initialize().
75  *
76  * @see thread_initialize()
77  */
78 int thread_deinitialize(void);
79
80 /**
81  * @ingroup CAPI_NETWORK_THREAD_MODULE
82  * @brief Enable thread Module
83  * @since_tizen 7.0
84  *
85  * @return 0 on success, otherwise a negative error value.
86  * @retval #THREAD_ERROR_NONE  Successful
87  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
88  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
89  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
90  *
91  * @pre thread API must be initialized with thread_initialize().
92  *
93  * @see thread_initialize()
94  */
95 int thread_enable(thread_instance_h *instance);
96
97 /**
98  * @ingroup CAPI_NETWORK_THREAD_MODULE
99  * @brief Disable thread Module
100  * @since_tizen 7.0
101  *
102  * @return 0 on success, otherwise a negative error value.
103  * @retval #THREAD_ERROR_NONE  Successful
104  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
105  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
106  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
107  *
108  * @pre thread API must be initialized with thread_initialize().
109  *
110  * @see thread_enable()
111  */
112 int thread_disable(thread_instance_h instance);
113
114 /**
115  * @ingroup CAPI_NETWORK_THREAD_MODULE
116  * @brief Start Thread
117  * @since_tizen 7.0
118  *
119  * @return 0 on success, otherwise a negative error value.
120  * @retval #THREAD_ERROR_NONE  Successful
121  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
122  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
123  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
124  *
125  * @pre thread API must be initialized with thread_initialize().
126  * @see thread_stop()
127  */
128 int thread_start(thread_instance_h instance);
129
130 /**
131  * @ingroup CAPI_NETWORK_THREAD_MODULE
132  * @brief Stop Thread
133  * @since_tizen 7.0
134  *
135  * @return 0 on success, otherwise a negative error value.
136  * @retval #THREAD_ERROR_NONE  Successful
137  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
138  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
139  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
140  *
141  * @pre thread API must be initialized with thread_initialize().
142  * @see thread_start()
143  */
144 int thread_stop(thread_instance_h instance);
145
146 /**
147  * @ingroup CAPI_NETWORK_THREAD_MODULE
148  * @brief Perform reset of OT hardware, tries to resume the network after reset
149  * @since_tizen 7.0
150  *
151  * @return 0 on success, otherwise a negative error value.
152  * @retval #THREAD_ERROR_NONE  Successful
153  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
154  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
155  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
156  *
157  * @pre thread API must be initialized with thread_initialize().
158  *
159  * @see thread_enable()
160  */
161 int thread_reset(thread_instance_h instance);
162
163 /**
164  * @ingroup CAPI_NETWORK_THREAD_MODULE
165  * @brief Perform Factory reset of OT hardware, wipes all Thread persistent data
166  * @since_tizen 7.0
167  *
168  * @return 0 on success, otherwise a negative error value.
169  * @retval #THREAD_ERROR_NONE  Successful
170  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
171  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
172  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
173  *
174  * @pre thread API must be initialized with thread_initialize().
175  *
176  * @see thread_enable()
177  */
178 int thread_factoryreset(thread_instance_h instance);
179
180 /**
181  * @ingroup CAPI_NETWORK_THREAD_MODULE
182  * @brief Get Thread Device Role
183  * @since_tizen 7.0
184  *
185  * @return 0 on success, otherwise a negative error value.
186  * @retval #THREAD_ERROR_NONE  Successful
187  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
188  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
189  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
190  *
191  * @pre thread API must be initialized with thread_initialize().
192  */
193 int thread_get_device_role(thread_instance_h instance, thread_device_role_e *device_role);
194
195 /**
196  * @ingroup CAPI_NETWORK_THREAD_MODULE
197  * @brief Set Thread Device Role changed callback
198  * @since_tizen 7.0
199  *
200  * @return 0 on success, otherwise a negative error value.
201  * @retval #THREAD_ERROR_NONE  Successful
202  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
203  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
204  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
205  *
206  * @pre thread API must be initialized with thread_initialize().
207  */
208 int thread_set_device_role_changed_cb(thread_instance_h instance,
209                 thread_device_role_cb callback, void *user_data);
210
211 /**
212  * @ingroup CAPI_NETWORK_THREAD_MODULE
213  * @brief Set Thread Device Type
214  * @since_tizen 7.0
215  *
216  * @return 0 on success, otherwise a negative error value.
217  * @retval #THREAD_ERROR_NONE  Successful
218  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
219  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
220  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
221  *
222  * @pre thread API must be initialized with thread_initialize().
223  */
224 int thread_set_device_type(thread_instance_h instance, thread_device_type_e device_type);
225
226 /**
227  * @ingroup CAPI_NETWORK_THREAD_MODULE
228  * @brief Get Thread Device Type
229  * @since_tizen 7.0
230  *
231  * @return 0 on success, otherwise a negative error value.
232  * @retval #THREAD_ERROR_NONE  Successful
233  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
234  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
235  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
236  *
237  * @pre thread API must be initialized with thread_initialize().
238  */
239 int thread_get_device_type(thread_instance_h instance, thread_device_type_e *device_type);
240
241 /**
242  * @ingroup CAPI_NETWORK_THREAD_MODULE
243  * @brief Create Thread Network Scan param
244  * @since_tizen 7.0
245  *
246  * @return 0 on success, otherwise a negative error value.
247  * @retval #THREAD_ERROR_NONE  Successful
248  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
249  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
250  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
251  *
252  * @pre thread API must be initialized with thread_initialize().
253  *
254  * @see thread_network_scan_result_cb()
255  */
256 int thread_scan_param_create(thread_instance_h instance,
257         uint16_t duration, thread_scan_param_h *param_handle);
258
259 /**
260  * @ingroup CAPI_NETWORK_THREAD_MODULE
261  * @brief Destroys Thread Network Scan param
262  * @since_tizen 7.0
263  *
264  * @return 0 on success, otherwise a negative error value.
265  * @retval #THREAD_ERROR_NONE  Successful
266  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
267  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
268  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
269  *
270  * @pre thread API must be initialized with thread_initialize().
271  *
272  * @see thread_network_scan_result_cb()
273  */
274 int thread_scan_param_destroy(thread_instance_h instance,
275         thread_scan_param_h param_handle);
276
277 /**
278  * @ingroup CAPI_NETWORK_THREAD_MODULE
279  * @brief Scan Thread Network
280  * @since_tizen 7.0
281  *
282  * @return 0 on success, otherwise a negative error value.
283  * @retval #THREAD_ERROR_NONE  Successful
284  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
285  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
286  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
287  *
288  * @pre thread API must be initialized with thread_initialize().
289  *
290  * @see thread_network_scan_result_cb()
291  */
292 int thread_scan(thread_instance_h instance, thread_scan_param_h handle,
293         thread_network_scan_result_cb callback, void *user_data);
294
295 /**
296  * @ingroup CAPI_NETWORK_THREAD_MODULE
297  * @brief Gets the extended address
298  * @since_tizen 7.0
299  *
300  * @return 0 on success, otherwise a negative error value.
301  * @retval #THREAD_ERROR_NONE  Successful
302  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
303  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
304  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
305  *
306  * @pre thread API must be initialized with thread_initialize().
307  */
308 int thread_get_extended_address(thread_instance_h instance, uint64_t *extended_address);
309
310 /**
311  * @ingroup CAPI_NETWORK_THREAD_MODULE
312  * @brief Gets the extended uuid(EUI-64) of the Thread Device
313  * @since_tizen 7.0
314  *
315  * @return 0 on success, otherwise a negative error value.
316  * @retval #THREAD_ERROR_NONE  Successful
317  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
318  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
319  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
320  *
321  * @pre thread API must be initialized with thread_initialize().
322  */
323 int thread_get_extended_uuid(thread_instance_h instance, const char **uuid);
324
325 /**
326  * @ingroup CAPI_NETWORK_THREAD_MODULE
327  * @brief Set Active operational Network dataset
328  * @since_tizen 7.0
329  *
330  * @return 0 on success, otherwise a negative error value.
331  * @retval #THREAD_ERROR_NONE  Successful
332  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
333  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
334  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
335  *
336  * @pre thread API must be initialized with thread_initialize().
337  *
338  * @see thread_active_dataset_tlvs_s
339  */
340 int thread_network_set_active_dataset_tlvs(thread_instance_h instance,
341         const uint8_t *tlvs_buffer, int length);
342
343 /**
344  * @ingroup CAPI_NETWORK_THREAD_MODULE
345  * @brief Get Active operational Network dataset
346  * @since_tizen 7.0
347  *
348  * @return 0 on success, otherwise a negative error value.
349  * @retval #THREAD_ERROR_NONE  Successful
350  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
351  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
352  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
353  *
354  * @remarks copy the data returned by buffer. It will go out of scope after API returns
355  *
356  * @pre thread API must be initialized with thread_initialize().
357  *
358  * @see thread_active_dataset_tlvs_s
359  * @see thread_set_active_dataset_tlvs()
360  */
361 int thread_network_get_active_dataset_tlvs(thread_instance_h instance,
362         uint8_t **tlvs_buffer, int *buf_len);
363
364 /**
365  * @ingroup CAPI_NETWORK_THREAD_MODULE
366  * @brief Get the PanId from Operational Network
367  * @since_tizen 7.0
368  *
369  * @param[out] panid The PanId
370  *
371  * @return 0 on success, otherwise a negative error value.
372  * @retval #THREAD_ERROR_NONE  Successful
373  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
374  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
375  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
376  *
377  * @pre thread API must be initialized with thread_initialize().
378  * @pre Active Operational Dataset must be set using thread_set_active_dataset_tlvs().
379  *
380  * @see thread_network_create()
381  * @see thread_set_operational_network()
382  * @see thread_set_active_dataset_tlvs()
383  */
384 int thread_network_get_panid(thread_instance_h instance, uint16_t *panid);
385
386 /**
387  * @ingroup CAPI_NETWORK_THREAD_MODULE
388  * @brief Attach the OT hardware to the active Operational Network, which is pre-set
389  * @since_tizen 7.0
390  *
391  * @return 0 on success, otherwise a negative error value.
392  * @retval #THREAD_ERROR_NONE  Successful
393  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
394  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
395  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
396  *
397  * @pre thread API must be initialized with thread_initialize().
398  * @pre Active Operational Dataset must be set using thread_set_active_dataset_tlvs().
399  *
400  * @see thread_set_active_dataset_tlvs()
401  */
402 int thread_network_attach(thread_instance_h instance);
403
404 /**
405  * @ingroup CAPI_NETWORK_THREAD_MODULE
406  * @brief Detach the OT hardware from the active Operational Network
407  * @since_tizen 7.0
408  *
409  * @return 0 on success, otherwise a negative error value.
410  * @retval #THREAD_ERROR_NONE  Successful
411  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
412  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
413  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
414  *
415  * @pre thread API must be initialized with thread_initialize().
416  * @pre Active Operational Dataset must be attached.
417  *
418  * @see thread_network_attach()
419  */
420 int thread_network_detach(thread_instance_h instance);
421
422 /**
423  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
424  * @brief Enable OT Border Routing
425  * @since_tizen 7.0
426  *
427  * @return 0 on success, otherwise a negative error value.
428  * @retval #THREAD_ERROR_NONE  Successful
429  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
430  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
431  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
432  *
433  * @pre thread API must be initialized with thread_initialize().
434  *
435  * @see thread_br_disable()
436  */
437 int thread_br_enable(thread_instance_h instance);
438
439 /**
440  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
441  * @brief Disable OT Border Routing
442  * @since_tizen 7.0
443  *
444  * @return 0 on success, otherwise a negative error value.
445  * @retval #THREAD_ERROR_NONE  Successful
446  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
447  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
448  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
449  *
450  * @pre thread API must be initialized with thread_initialize().
451  *
452  * @see thread_br_enable()
453  */
454 int thread_br_disable(thread_instance_h instance);
455
456 /**
457  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
458  * @brief Get All External Route informations
459  * @since_tizen 7.0
460  *
461  * @return 0 on success, otherwise a negative error value.
462  * @retval #THREAD_ERROR_NONE  Successful
463  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
464  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
465  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
466  *
467  * @pre thread API must be initialized with thread_initialize().
468  *
469  * @see thread_external_route_foreach_cb()
470  */
471 int thread_br_get_external_routes(thread_instance_h instance,
472         thread_external_route_foreach_cb callback, void *user_data);
473
474 /**
475  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
476  * @brief Get ipv6 prefix for route
477  * @since_tizen 7.0
478  *
479  * @return 0 on success, otherwise a negative error value.
480  * @retval #THREAD_ERROR_NONE  Successful
481  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
482  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
483  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
484  *
485  * @pre thread API must be initialized with thread_initialize().
486  *
487  * @see thread_external_route_foreach_cb()
488  */
489 int thread_br_get_ipv6_prefix(thread_route_info_h route,
490         uint8_t *ipv6_prefix, uint8_t *ipv6_prefix_len);
491
492 /**
493  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
494  * @brief Get rloc16 for route
495  * @since_tizen 7.0
496  *
497  * @return 0 on success, otherwise a negative error value.
498  * @retval #THREAD_ERROR_NONE  Successful
499  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
500  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
501  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
502  *
503  * @pre thread API must be initialized with thread_initialize().
504  *
505  * @see thread_external_route_foreach_cb()
506  */
507 int thread_br_get_rloc16(thread_route_info_h route,
508         uint16_t *rloc16);
509
510 /**
511  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
512  * @brief Get preference for route
513  * @since_tizen 7.0
514  *
515  * @return 0 on success, otherwise a negative error value.
516  * @retval #THREAD_ERROR_NONE  Successful
517  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
518  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
519  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
520  *
521  * @pre thread API must be initialized with thread_initialize().
522  *
523  * @see thread_external_route_foreach_cb()
524  */
525 int thread_br_get_preference(thread_route_info_h route,
526         int8_t *preference);
527
528 /**
529  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
530  * @brief Get stable for route
531  * @since_tizen 7.0
532  *
533  * @return 0 on success, otherwise a negative error value.
534  * @retval #THREAD_ERROR_NONE  Successful
535  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
536  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
537  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
538  *
539  * @pre thread API must be initialized with thread_initialize().
540  *
541  * @see thread_external_route_foreach_cb()
542  */
543 int thread_br_check_stable(thread_route_info_h route,
544         bool *is_stable);
545
546 /**
547  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
548  * @brief Get device next hop for route
549  * @since_tizen 7.0
550  *
551  * @return 0 on success, otherwise a negative error value.
552  * @retval #THREAD_ERROR_NONE  Successful
553  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
554  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
555  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
556  *
557  * @pre thread API must be initialized with thread_initialize().
558  *
559  * @see thread_external_route_foreach_cb()
560  */
561 int thread_br_check_device_nexthop(thread_route_info_h route,
562         bool *is_device_nexthop);
563
564 /**
565  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
566  * @brief Add an external border routing rule to the network.
567  * @since_tizen 7.0
568  *
569  * @return 0 on success, otherwise a negative error value.
570  * @retval #THREAD_ERROR_NONE  Successful
571  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
572  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
573  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
574  *
575  * @pre thread API must be initialized with thread_initialize().
576  *
577  * @see thread_remove_external_route()
578  */
579 int thread_br_add_external_route(thread_instance_h instance,
580         const uint8_t *ipv6_prefix, uint8_t ipv6_prefix_len,
581         uint16_t rloc16, int8_t preference,
582         bool is_stable, bool is_device_nexthop,
583         thread_route_info_h *route_handle);
584
585 /**
586  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
587  * @brief Remove an external border routing rule from the network
588  * @since_tizen 7.0
589  *
590  * @return 0 on success, otherwise a negative error value.
591  * @retval #THREAD_ERROR_NONE  Successful
592  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
593  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
594  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
595  *
596  * @pre thread API must be initialized with thread_initialize().
597  *
598  * @see thread_add_external_route()
599  */
600 int thread_br_remove_external_route(thread_instance_h instance, thread_route_info_h route_handle);
601
602 /**
603  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
604  * @brief Create an on-mesh prefix info
605  * @since_tizen 7.0
606  *
607  * @return 0 on success, otherwise a negative error value.
608  * @retval #THREAD_ERROR_NONE  Successful
609  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
610  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
611  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
612  *
613  * @pre thread API must be initialized with thread_initialize().
614  *
615  * @see thread_onmesh_prefix_destroy()
616  */
617 int thread_onmesh_prefix_create(thread_instance_h instance,
618         thread_onmesh_prefix_info_h *onmesh_prefix);
619
620 /**
621  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
622  * @brief Destroy on-mesh prefix info
623  * @since_tizen 7.0
624  *
625  * @return 0 on success, otherwise a negative error value.
626  * @retval #THREAD_ERROR_NONE  Successful
627  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
628  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
629  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
630  *
631  * @pre thread API must be initialized with thread_initialize().
632  *
633  * @see thread_onmesh_prefix_create()
634  */
635 int thread_onmesh_prefix_destroy(thread_instance_h instance,
636         thread_onmesh_prefix_info_h onmesh_prefix);
637
638 /**
639  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
640  * @brief Set ipv6 prefix to on-mesh prefix info
641  * @since_tizen 7.0
642  *
643  * @return 0 on success, otherwise a negative error value.
644  * @retval #THREAD_ERROR_NONE  Successful
645  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
646  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
647  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
648  *
649  * @pre thread API must be initialized with thread_initialize().
650  *
651  * @see thread_onmesh_prefix_create()
652  * @see thread_onmesh_prefix_destroy()
653  */
654 int thread_onmesh_prefix_set_ipv6_prefix(thread_onmesh_prefix_info_h onmesh_prefix,
655         const uint8_t *ipv6_prefix, uint8_t ipv6_prefix_len);
656
657 /**
658  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
659  * @brief Get ipv6 prefix to on-mesh prefix info
660  * @since_tizen 7.0
661  *
662  * @return 0 on success, otherwise a negative error value.
663  * @retval #THREAD_ERROR_NONE  Successful
664  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
665  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
666  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
667  *
668  * @pre thread API must be initialized with thread_initialize().
669  *
670  * @see thread_onmesh_prefix_create()
671  * @see thread_onmesh_prefix_destroy()
672  */
673 int thread_onmesh_prefix_get_ipv6_prefix(thread_onmesh_prefix_info_h onmesh_prefix,
674         uint8_t **ipv6_prefix, uint8_t *ipv6_prefix_len);
675
676 /**
677  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
678  * @brief Set preference to on-mesh prefix info
679  * @since_tizen 7.0
680  *
681  * @return 0 on success, otherwise a negative error value.
682  * @retval #THREAD_ERROR_NONE  Successful
683  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
684  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
685  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
686  *
687  * @pre thread API must be initialized with thread_initialize().
688  *
689  * @see thread_onmesh_prefix_create()
690  * @see thread_onmesh_prefix_destroy()
691  */
692 int thread_onmesh_prefix_set_preference(thread_onmesh_prefix_info_h onmesh_prefix,
693         uint8_t preference);
694
695 /**
696  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
697  * @brief Get preference to on-mesh prefix info
698  * @since_tizen 7.0
699  *
700  * @return 0 on success, otherwise a negative error value.
701  * @retval #THREAD_ERROR_NONE  Successful
702  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
703  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
704  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
705  *
706  * @pre thread API must be initialized with thread_initialize().
707  *
708  * @see thread_onmesh_prefix_create()
709  * @see thread_onmesh_prefix_destroy()
710  */
711 int thread_onmesh_prefix_get_preference(thread_onmesh_prefix_info_h onmesh_prefix,
712         uint8_t *preference);
713
714 /**
715  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
716  * @brief Set rloc to on-mesh prefix info
717  * @since_tizen 7.0
718  *
719  * @return 0 on success, otherwise a negative error value.
720  * @retval #THREAD_ERROR_NONE  Successful
721  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
722  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
723  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
724  *
725  * @pre thread API must be initialized with thread_initialize().
726  *
727  * @see thread_onmesh_prefix_create()
728  * @see thread_onmesh_prefix_destroy()
729  */
730 int thread_onmesh_prefix_set_rloc(thread_onmesh_prefix_info_h onmesh_prefix,
731         uint16_t rloc);
732
733 /**
734  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
735  * @brief Get rloc to on-mesh prefix info
736  * @since_tizen 7.0
737  *
738  * @return 0 on success, otherwise a negative error value.
739  * @retval #THREAD_ERROR_NONE  Successful
740  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
741  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
742  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
743  *
744  * @pre thread API must be initialized with thread_initialize().
745  *
746  * @see thread_onmesh_prefix_create()
747  * @see thread_onmesh_prefix_destroy()
748  */
749 int thread_onmesh_prefix_get_rloc(thread_onmesh_prefix_info_h onmesh_prefix,
750         uint16_t *rloc);
751
752 /**
753  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
754  * @brief Set preferred to on-mesh prefix info
755  * @since_tizen 7.0
756  *
757  * @return 0 on success, otherwise a negative error value.
758  * @retval #THREAD_ERROR_NONE  Successful
759  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
760  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
761  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
762  *
763  * @pre thread API must be initialized with thread_initialize().
764  *
765  * @see thread_onmesh_prefix_create()
766  * @see thread_onmesh_prefix_destroy()
767  */
768 int thread_onmesh_prefix_set_preferred(thread_onmesh_prefix_info_h onmesh_prefix,
769         bool is_preferred);
770
771 /**
772  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
773  * @brief Get preferred to on-mesh prefix info
774  * @since_tizen 7.0
775  *
776  * @return 0 on success, otherwise a negative error value.
777  * @retval #THREAD_ERROR_NONE  Successful
778  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
779  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
780  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
781  *
782  * @pre thread API must be initialized with thread_initialize().
783  *
784  * @see thread_onmesh_prefix_create()
785  * @see thread_onmesh_prefix_destroy()
786  */
787 int thread_onmesh_prefix_get_preferred(thread_onmesh_prefix_info_h onmesh_prefix,
788         bool *is_preferred);
789
790 /**
791  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
792  * @brief Set slaac to on-mesh prefix info
793  * @since_tizen 7.0
794  *
795  * @return 0 on success, otherwise a negative error value.
796  * @retval #THREAD_ERROR_NONE  Successful
797  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
798  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
799  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
800  *
801  * @pre thread API must be initialized with thread_initialize().
802  *
803  * @see thread_onmesh_prefix_create()
804  * @see thread_onmesh_prefix_destroy()
805  */
806 int thread_onmesh_prefix_set_slaac(thread_onmesh_prefix_info_h onmesh_prefix,
807         bool is_slaac);
808
809 /**
810  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
811  * @brief Get slaac to on-mesh prefix info
812  * @since_tizen 7.0
813  *
814  * @return 0 on success, otherwise a negative error value.
815  * @retval #THREAD_ERROR_NONE  Successful
816  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
817  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
818  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
819  *
820  * @pre thread API must be initialized with thread_initialize().
821  *
822  * @see thread_onmesh_prefix_create()
823  * @see thread_onmesh_prefix_destroy()
824  */
825 int thread_onmesh_prefix_get_slaac(thread_onmesh_prefix_info_h onmesh_prefix,
826         bool *is_slaac);
827
828 /**
829  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
830  * @brief Set dhcp to on-mesh prefix info
831  * @since_tizen 7.0
832  *
833  * @return 0 on success, otherwise a negative error value.
834  * @retval #THREAD_ERROR_NONE  Successful
835  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
836  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
837  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
838  *
839  * @pre thread API must be initialized with thread_initialize().
840  *
841  * @see thread_onmesh_prefix_create()
842  * @see thread_onmesh_prefix_destroy()
843  */
844 int thread_onmesh_prefix_set_dhcp(thread_onmesh_prefix_info_h onmesh_prefix,
845         bool is_dhcp);
846
847 /**
848  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
849  * @brief Get dhcp to on-mesh prefix info
850  * @since_tizen 7.0
851  *
852  * @return 0 on success, otherwise a negative error value.
853  * @retval #THREAD_ERROR_NONE  Successful
854  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
855  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
856  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
857  *
858  * @pre thread API must be initialized with thread_initialize().
859  *
860  * @see thread_onmesh_prefix_create()
861  * @see thread_onmesh_prefix_destroy()
862  */
863 int thread_onmesh_prefix_get_dhcp(thread_onmesh_prefix_info_h onmesh_prefix,
864         bool *is_dhcp);
865
866 /**
867  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
868  * @brief Set configure to on-mesh prefix info
869  * @since_tizen 7.0
870  *
871  * @return 0 on success, otherwise a negative error value.
872  * @retval #THREAD_ERROR_NONE  Successful
873  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
874  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
875  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
876  *
877  * @pre thread API must be initialized with thread_initialize().
878  *
879  * @see thread_onmesh_prefix_create()
880  * @see thread_onmesh_prefix_destroy()
881  */
882 int thread_onmesh_prefix_set_configure(thread_onmesh_prefix_info_h onmesh_prefix,
883         bool is_configure);
884
885 /**
886  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
887  * @brief Get configure to on-mesh prefix info
888  * @since_tizen 7.0
889  *
890  * @return 0 on success, otherwise a negative error value.
891  * @retval #THREAD_ERROR_NONE  Successful
892  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
893  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
894  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
895  *
896  * @pre thread API must be initialized with thread_initialize().
897  *
898  * @see thread_onmesh_prefix_create()
899  * @see thread_onmesh_prefix_destroy()
900  */
901 int thread_onmesh_prefix_get_configure(thread_onmesh_prefix_info_h onmesh_prefix,
902         bool *is_configure);
903
904 /**
905  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
906  * @brief Get on mesh to on-mesh prefix info
907  * @since_tizen 7.0
908  *
909  * @return 0 on success, otherwise a negative error value.
910  * @retval #THREAD_ERROR_NONE  Successful
911  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
912  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
913  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
914  *
915  * @pre thread API must be initialized with thread_initialize().
916  *
917  * @see thread_onmesh_prefix_create()
918  * @see thread_onmesh_prefix_destroy()
919  */
920 int thread_onmesh_prefix_get_on_mesh(thread_onmesh_prefix_info_h onmesh_prefix,
921         bool *is_on_mesh);
922
923 /**
924  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
925  * @brief Set on mesh to on-mesh prefix info
926  * @since_tizen 7.0
927  *
928  * @return 0 on success, otherwise a negative error value.
929  * @retval #THREAD_ERROR_NONE  Successful
930  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
931  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
932  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
933  *
934  * @pre thread API must be initialized with thread_initialize().
935  *
936  * @see thread_onmesh_prefix_create()
937  * @see thread_onmesh_prefix_destroy()
938  */
939 int thread_onmesh_prefix_set_on_mesh(thread_onmesh_prefix_info_h onmesh_prefix,
940         bool is_on_mesh);
941
942 /**
943  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
944  * @brief Get stable to on-mesh prefix info
945  * @since_tizen 7.0
946  *
947  * @return 0 on success, otherwise a negative error value.
948  * @retval #THREAD_ERROR_NONE  Successful
949  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
950  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
951  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
952  *
953  * @pre thread API must be initialized with thread_initialize().
954  *
955  * @see thread_onmesh_prefix_create()
956  * @see thread_onmesh_prefix_destroy()
957  */
958 int thread_onmesh_prefix_get_stable(thread_onmesh_prefix_info_h onmesh_prefix,
959         bool *is_stable);
960
961 /**
962  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
963  * @brief Set stable to on-mesh prefix info
964  * @since_tizen 7.0
965  *
966  * @return 0 on success, otherwise a negative error value.
967  * @retval #THREAD_ERROR_NONE  Successful
968  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
969  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
970  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
971  *
972  * @pre thread API must be initialized with thread_initialize().
973  *
974  * @see thread_onmesh_prefix_create()
975  * @see thread_onmesh_prefix_destroy()
976  */
977 int thread_onmesh_prefix_set_stable(thread_onmesh_prefix_info_h onmesh_prefix,
978         bool is_stable);
979
980 /**
981  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
982  * @brief Get default route to on-mesh prefix info
983  * @since_tizen 7.0
984  *
985  * @return 0 on success, otherwise a negative error value.
986  * @retval #THREAD_ERROR_NONE  Successful
987  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
988  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
989  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
990  *
991  * @pre thread API must be initialized with thread_initialize().
992  *
993  * @see thread_onmesh_prefix_create()
994  * @see thread_onmesh_prefix_destroy()
995  */
996 int thread_onmesh_prefix_get_default_route(thread_onmesh_prefix_info_h onmesh_prefix,
997         bool *is_default_route);
998
999 /**
1000  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
1001  * @brief Set default route to on-mesh prefix info
1002  * @since_tizen 7.0
1003  *
1004  * @return 0 on success, otherwise a negative error value.
1005  * @retval #THREAD_ERROR_NONE  Successful
1006  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1007  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1008  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1009  *
1010  * @pre thread API must be initialized with thread_initialize().
1011  *
1012  * @see thread_onmesh_prefix_create()
1013  * @see thread_onmesh_prefix_destroy()
1014  */
1015 int thread_onmesh_prefix_set_default_route(thread_onmesh_prefix_info_h onmesh_prefix,
1016         bool is_default_route);
1017
1018 /**
1019  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
1020  * @brief Get ND DNS to on-mesh prefix info
1021  * @since_tizen 7.0
1022  *
1023  * @return 0 on success, otherwise a negative error value.
1024  * @retval #THREAD_ERROR_NONE  Successful
1025  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1026  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1027  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1028  *
1029  * @pre thread API must be initialized with thread_initialize().
1030  *
1031  * @see thread_onmesh_prefix_create()
1032  * @see thread_onmesh_prefix_destroy()
1033  */
1034 int thread_onmesh_prefix_get_nd_dns(thread_onmesh_prefix_info_h onmesh_prefix,
1035         bool *is_nd_dns);
1036
1037 /**
1038  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
1039  * @brief Set ND DNS to on-mesh prefix info
1040  * @since_tizen 7.0
1041  *
1042  * @return 0 on success, otherwise a negative error value.
1043  * @retval #THREAD_ERROR_NONE  Successful
1044  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1045  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1046  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1047  *
1048  * @pre thread API must be initialized with thread_initialize().
1049  *
1050  * @see thread_onmesh_prefix_create()
1051  * @see thread_onmesh_prefix_destroy()
1052  */
1053 int thread_onmesh_prefix_set_nd_dns(thread_onmesh_prefix_info_h onmesh_prefix,
1054         bool is_nd_dns);
1055
1056 /**
1057  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
1058  * @brief Get DP to on-mesh prefix info
1059  * @since_tizen 7.0
1060  *
1061  * @return 0 on success, otherwise a negative error value.
1062  * @retval #THREAD_ERROR_NONE  Successful
1063  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1064  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1065  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1066  *
1067  * @pre thread API must be initialized with thread_initialize().
1068  *
1069  * @see thread_onmesh_prefix_create()
1070  * @see thread_onmesh_prefix_destroy()
1071  */
1072 int thread_onmesh_prefix_get_dp(thread_onmesh_prefix_info_h onmesh_prefix,
1073         bool *is_dp);
1074
1075 /**
1076  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
1077  * @brief Set DP to on-mesh prefix info
1078  * @since_tizen 7.0
1079  *
1080  * @return 0 on success, otherwise a negative error value.
1081  * @retval #THREAD_ERROR_NONE  Successful
1082  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1083  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1084  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1085  *
1086  * @pre thread API must be initialized with thread_initialize().
1087  *
1088  * @see thread_onmesh_prefix_create()
1089  * @see thread_onmesh_prefix_destroy()
1090  */
1091 int thread_onmesh_prefix_set_dp(thread_onmesh_prefix_info_h onmesh_prefix,
1092         bool is_dp);
1093
1094 /**
1095  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
1096  * @brief Get on-mesh prefixes to the network
1097  * @since_tizen 7.0
1098  *
1099  * @return 0 on success, otherwise a negative error value.
1100  * @retval #THREAD_ERROR_NONE  Successful
1101  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1102  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1103  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1104  *
1105  * @pre thread API must be initialized with thread_initialize().
1106  *
1107  * @see thread_add_onmesh_prefix()
1108  * @see thread_remove_onmesh_prefix()
1109  */
1110 int thread_br_get_onmesh_prefixes(thread_instance_h instance,
1111         thread_onmesh_prefix_foreach_cb callback, void *user_data);
1112
1113 /**
1114  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
1115  * @brief Add an on-mesh prefix to the network
1116  * @since_tizen 7.0
1117  *
1118  * @return 0 on success, otherwise a negative error value.
1119  * @retval #THREAD_ERROR_NONE  Successful
1120  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1121  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1122  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1123  *
1124  * @pre thread API must be initialized with thread_initialize().
1125  *
1126  * @see thread_remove_onmesh_prefix()
1127  */
1128 int thread_br_add_onmesh_prefix(thread_instance_h instance,
1129         thread_onmesh_prefix_info_h onmesh_prefix);
1130
1131 /**
1132  * @ingroup CAPI_NETWORK_THREAD_BORDERROUTER_MODULE
1133  * @brief Remove on-mesh prefix from the network
1134  * @since_tizen 7.0
1135  *
1136  * @return 0 on success, otherwise a negative error value.
1137  * @retval #THREAD_ERROR_NONE  Successful
1138  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1139  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1140  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1141  *
1142  * @pre thread API must be initialized with thread_initialize().
1143  *
1144  * @see thread_add_onmesh_prefix()
1145  */
1146 int thread_br_remove_onmesh_prefix(thread_instance_h instance,
1147         thread_onmesh_prefix_info_h onmesh_prefix);
1148
1149 /**
1150  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1151  * @brief Create thread network
1152  * @since_tizen 7.0
1153  *
1154  * @return 0 on success, otherwise a negative error value.
1155  * @retval #THREAD_ERROR_NONE  Successful
1156  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1157  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1158  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1159  *
1160  * @pre thread API must be initialized with thread_initialize().
1161  */
1162 int thread_network_create(thread_network_h *network);
1163
1164 /**
1165  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1166  * @brief Destroy thread network
1167  * @since_tizen 7.0
1168  *
1169  * @return 0 on success, otherwise a negative error value.
1170  * @retval #THREAD_ERROR_NONE  Successful
1171  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1172  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1173  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1174  *
1175  * @pre thread API must be initialized with thread_initialize().
1176  */
1177 int thread_network_destroy(thread_network_h network);
1178
1179 /**
1180  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1181  * @brief Set the thread network name
1182  * @since_tizen 7.0
1183  *
1184  * @return 0 on success, otherwise a negative error value.
1185  * @retval #THREAD_ERROR_NONE  Successful
1186  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1187  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1188  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1189  *
1190  * @pre thread API must be initialized with thread_initialize().
1191  */
1192 int thread_network_set_name(thread_network_h network, const char *name);
1193
1194 /**
1195  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1196  * @brief Set the thread network key
1197  * @since_tizen 7.0
1198  *
1199  * @return 0 on success, otherwise a negative error value.
1200  * @retval #THREAD_ERROR_NONE  Successful
1201  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1202  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1203  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1204  *
1205  * @pre thread API must be initialized with thread_initialize().
1206  */
1207 int thread_network_set_key(thread_network_h network, const char *key);
1208
1209 /**
1210  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1211  * @brief Set the thread network pskc
1212  * @since_tizen 7.0
1213  *
1214  * @return 0 on success, otherwise a negative error value.
1215  * @retval #THREAD_ERROR_NONE  Successful
1216  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1217  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1218  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1219  *
1220  * @pre thread API must be initialized with thread_initialize().
1221  */
1222 int thread_network_set_pskc(thread_network_h network, const char *pskc);
1223
1224 /**
1225  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1226  * @brief Set the thread network channel
1227  * @since_tizen 7.0
1228  *
1229  * @return 0 on success, otherwise a negative error value.
1230  * @retval #THREAD_ERROR_NONE  Successful
1231  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1232  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1233  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1234  *
1235  * @pre thread API must be initialized with thread_initialize().
1236  */
1237 int thread_network_set_channel(thread_network_h network, uint32_t channel);
1238
1239 /**
1240  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1241  * @brief Set the thread network extended pan id
1242  * @since_tizen 7.0
1243  *
1244  * @return 0 on success, otherwise a negative error value.
1245  * @retval #THREAD_ERROR_NONE  Successful
1246  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1247  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1248  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1249  *
1250  * @pre thread API must be initialized with thread_initialize().
1251  */
1252 int thread_network_set_extended_panid(thread_network_h network, uint64_t extended_panid);
1253
1254 /**
1255  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1256  * @brief Set the thread network pan id
1257  * @since_tizen 7.0
1258  *
1259  * @return 0 on success, otherwise a negative error value.
1260  * @retval #THREAD_ERROR_NONE  Successful
1261  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1262  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1263  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1264  *
1265  * @pre thread API must be initialized with thread_initialize().
1266  */
1267 int thread_network_set_panid(thread_network_h network, uint16_t panid);
1268
1269 /**
1270  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1271  * @brief Set the thread network to instance
1272  * @since_tizen 7.0
1273  *
1274  * @return 0 on success, otherwise a negative error value.
1275  * @retval #THREAD_ERROR_NONE  Successful
1276  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1277  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1278  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1279  *
1280  * @pre thread API must be initialized with thread_initialize().
1281  */
1282 int thread_set_operational_network(thread_instance_h instance, thread_network_h network);
1283
1284 /**
1285  * @ingroup CAPI_NETWORK_THREAD_NETWORK_MODULE
1286  * @brief Unset the thread network from instance
1287  * @since_tizen 7.0
1288  *
1289  * @return 0 on success, otherwise a negative error value.
1290  * @retval #THREAD_ERROR_NONE  Successful
1291  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1292  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1293  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1294  *
1295  * @pre thread API must be initialized with thread_initialize().
1296  */
1297 int thread_unset_operational_network(thread_instance_h instance);
1298
1299 /**
1300  * @ingroup CAPI_NETWORK_THREAD_JOINER_MODULE
1301  * @brief Start Thread joining with detailed informations
1302  * @since_tizen 7.0
1303  *
1304  * @return 0 on success, otherwise a negative error value.
1305  * @retval #THREAD_ERROR_NONE  Successful
1306  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1307  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1308  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1309  *
1310  * @pre thread API must be initialized with thread_initialize().
1311  * @see thread_joiner_stop()
1312  */
1313 int thread_joiner_start(thread_instance_h instance,
1314         const char *pskd, const char *prov_url,
1315         const char *vendor_name, const char *vendor_model,
1316         const char *vendor_sw_ver, const char *vendor_data,
1317         thread_joiner_result_cb callback, void *user_data);
1318
1319 /**
1320  * @ingroup CAPI_NETWORK_THREAD_JOINER_MODULE
1321  * @brief Stop Thread Joining
1322  * @since_tizen 7.0
1323  *
1324  * @return 0 on success, otherwise a negative error value.
1325  * @retval #THREAD_ERROR_NONE  Successful
1326  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1327  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1328  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1329  *
1330  * @pre thread API must be initialized with thread_initialize().
1331  * @see thread_joiner_start()
1332  */
1333 int thread_joiner_stop(thread_instance_h instance);
1334
1335 /**
1336  * @ingroup CAPI_NETWORK_THREAD_JOINER_MODULE
1337  * @brief Join Thread Network by Network key (Out-Of-Band Commisioning)
1338  * network key must be obtained by the commissioner via any trusted Out-Of-Band method
1339  * @since_tizen 7.0
1340  *
1341  * @return 0 on success, otherwise a negative error value.
1342  * @retval #THREAD_ERROR_NONE  Successful
1343  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1344  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1345  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1346  *
1347  * @pre thread API must be initialized with thread_initialize().
1348  */
1349 int thread_joiner_join_by_network_key(thread_instance_h instance, const char *network_key, const char *panid);
1350
1351 /**
1352  * @ingroup CAPI_NETWORK_THREAD_COMMISSIONER_MODULE
1353  * @brief Start thread commissioner (In-Band Commissioning)
1354  * @since_tizen 7.0
1355  *
1356  * @return 0 on success, otherwise a negative error value.
1357  * @retval #THREAD_ERROR_NONE  Successful
1358  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1359  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1360  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1361  *
1362  * @pre thread API must be initialized with thread_initialize().
1363  */
1364 int thread_commissioner_start(thread_instance_h instance);
1365
1366 /**
1367  * @ingroup CAPI_NETWORK_THREAD_COMMISSIONER_MODULE
1368  * @brief Set commissioning Data (In-Band Commissioning)
1369  * @since_tizen 7.0
1370  *
1371  * @return 0 on success, otherwise a negative error value.
1372  * @retval #THREAD_ERROR_NONE  Successful
1373  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1374  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1375  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1376  *
1377  * @pre thread API must be initialized with thread_initialize().
1378  */
1379 int thread_commissioner_set_commissioning_data(thread_instance_h instance, const char *joiner_uuid,
1380         const char *joiner_passphrase);
1381
1382 /**
1383  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1384  * @brief Start SRP Client
1385  * @since_tizen 7.0
1386  *
1387  * @return 0 on success, otherwise a negative error value.
1388  * @retval #THREAD_ERROR_NONE  Successful
1389  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1390  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1391  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1392  *
1393  * @pre thread API must be initialized with thread_initialize().
1394  * @see thread_srp_client_stop()
1395  */
1396 int thread_srp_client_start(thread_instance_h instance);
1397
1398 /**
1399  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1400  * @brief Stop SRP Client
1401  * @since_tizen 7.0
1402  *
1403  * @return 0 on success, otherwise a negative error value.
1404  * @retval #THREAD_ERROR_NONE  Successful
1405  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1406  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1407  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1408  *
1409  * @pre thread API must be initialized with thread_initialize().
1410  * @see thread_srp_client_start()
1411  */
1412 int thread_srp_client_stop(thread_instance_h instance);
1413
1414 /**
1415  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1416  * @brief Remove already registered SRP host service
1417  * @since_tizen 7.0
1418  *
1419  * @return 0 on success, otherwise a negative error value.
1420  * @retval #THREAD_ERROR_NONE  Successful
1421  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1422  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1423  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1424  *
1425  * @pre thread API must be initialized with thread_initialize().
1426  * @see thread_srp_client_start()
1427  */
1428 int thread_srp_client_remove_host(thread_instance_h instance);
1429
1430 /**
1431  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1432  * @brief Set Host name
1433  * @since_tizen 7.0
1434  *
1435  * @return 0 on success, otherwise a negative error value.
1436  * @retval #THREAD_ERROR_NONE  Successful
1437  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1438  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1439  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1440  *
1441  * @pre thread API must be initialized with thread_initialize().
1442  * @see thread_srp_client_start()
1443  */
1444 int thread_srp_client_set_host_name(thread_instance_h instance, const char *host_name);
1445
1446 /**
1447  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1448  * @brief Set Host address
1449  * @since_tizen 7.0
1450  *
1451  * @return 0 on success, otherwise a negative error value.
1452  * @retval #THREAD_ERROR_NONE  Successful
1453  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1454  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1455  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1456  *
1457  * @pre thread API must be initialized with thread_initialize().
1458  * @see thread_srp_client_start()
1459  */
1460 int thread_srp_client_set_host_address(thread_instance_h instance, const char *ipv6_address);
1461
1462 /**
1463  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1464  * @brief Register Service to SRP server
1465  * @since_tizen 7.0
1466  *
1467  * @return 0 on success, otherwise a negative error value.
1468  * @retval #THREAD_ERROR_NONE  Successful
1469  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1470  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1471  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1472  *
1473  * @pre thread API must be initialized with thread_initialize().
1474  * @see thread_srp_client_start()
1475  * @see thread_srp_client_set_host_address()
1476  */
1477 int thread_srp_client_register_service(thread_instance_h instance,
1478         const char *service_name, const char *service_type, uint64_t port);
1479
1480 /**
1481  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1482  * @brief Start SRP Server
1483  * @since_tizen 7.0
1484  *
1485  * @return 0 on success, otherwise a negative error value.
1486  * @retval #THREAD_ERROR_NONE  Successful
1487  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1488  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1489  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1490  *
1491  * @pre thread API must be initialized with thread_initialize().
1492  * @see thread_srp_server_stop()
1493  */
1494 int thread_srp_server_start(thread_instance_h instance);
1495
1496 /**
1497  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1498  * @brief Stop SRP Server
1499  * @since_tizen 7.0
1500  *
1501  * @return 0 on success, otherwise a negative error value.
1502  * @retval #THREAD_ERROR_NONE  Successful
1503  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1504  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1505  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1506  *
1507  * @pre thread API must be initialized with thread_initialize().
1508  * @see thread_srp_server_start()
1509  */
1510 int thread_srp_server_stop(thread_instance_h instance);
1511
1512 /**
1513  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1514  * @brief Get registered service detail from the SRP server
1515  * @since_tizen 7.0
1516  *
1517  * @return 0 on success, otherwise a negative error value.
1518  * @retval #THREAD_ERROR_NONE  Successful
1519  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1520  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1521  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1522  *
1523  * @pre thread API must be initialized with thread_initialize().
1524  * @see thread_srp_server_start()
1525  */
1526 int thread_srp_server_get_registered_service(thread_instance_h instance, const char **service_name,
1527         const char **address, uint64_t *port, bool *is_deleted);
1528
1529 /**
1530  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1531  * @brief Get node ip address of the thread network node
1532  * @since_tizen 7.0
1533  *
1534  * @return 0 on success, otherwise a negative error value.
1535  * @retval #THREAD_ERROR_NONE  Successful
1536  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1537  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1538  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1539  *
1540  * @pre thread API must be initialized with thread_initialize() and
1541  * enabled with thread_enable().
1542  * @see thread_initialize() and thread_enable()
1543  */
1544 int thread_get_ipaddr(thread_instance_h instance, thread_ipaddr_foreach_cb callback,
1545                 thread_ipaddr_type_e ipaddr_type, void *user_data);
1546
1547 /**
1548  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1549  * @brief Up the netwotk interface for the thread node.
1550  * @since_tizen 7.0
1551  *
1552  * @return 0 on success, otherwise a negative error value.
1553  * @retval #THREAD_ERROR_NONE  Successful
1554  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1555  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1556  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1557  *
1558  * @pre thread API must be initialized with thread_initialize() and
1559  * enabled with thread_enable().
1560  * @see thread_initialize() and thread_enable()
1561  */
1562 int thread_ifconfig_up(thread_instance_h instance);
1563
1564 /**
1565  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1566  * @brief Add Ipv6 address to the thread node.
1567  * @since_tizen 7.0
1568  *
1569  * @param[in] ipv6_address Byte list
1570  *
1571  * @return 0 on success, otherwise a negative error value.
1572  * @retval #THREAD_ERROR_NONE  Successful
1573  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1574  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1575  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1576  *
1577  * @pre thread API must be initialized with thread_initialize() and
1578  * enabled with thread_enable().
1579  * @see thread_initialize() and thread_enable()
1580  */
1581 int thread_add_ipaddr(thread_instance_h instance, const uint8_t *ipv6_address);
1582
1583 /**
1584  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
1585  * @brief Remove Ipv6 address from the thread node.
1586  * @since_tizen 7.0
1587  *
1588  * @param[in] ipv6_address Byte list
1589  *
1590  * @return 0 on success, otherwise a negative error value.
1591  * @retval #THREAD_ERROR_NONE  Successful
1592  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
1593  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
1594  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
1595  *
1596  * @pre thread API must be initialized with thread_initialize() and
1597  * enabled with thread_enable().
1598  * @see thread_initialize() and thread_enable()
1599  */
1600 int thread_remove_ipaddr(thread_instance_h instance, const uint8_t *ipv6_address);
1601
1602 #ifdef __cplusplus
1603 }
1604 #endif /* __cplusplus */
1605
1606 #endif /* __TIZEN_NETWORK_THREAD_H__ */