Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
thread_management_api.c
00001 /* 00002 * Copyright (c) 2015-2019, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: BSD-3-Clause 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions are met: 00007 * 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 3. Neither the name of the copyright holder nor the 00014 * names of its contributors may be used to endorse or promote products 00015 * derived from this software without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00018 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00019 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00020 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 00021 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00022 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00023 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00024 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00025 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00026 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00027 * POSSIBILITY OF SUCH DAMAGE. 00028 */ 00029 00030 #include "nsconfig.h" 00031 00032 #include "ns_types.h" 00033 #include "ns_list.h" 00034 #include "nsdynmemLIB.h" 00035 #include "randLIB.h" 00036 #include "common_functions.h" 00037 00038 #include "ns_trace.h" 00039 00040 /** 00041 * Thread includes 00042 * */ 00043 #include "thread_config.h" 00044 #include "thread_meshcop_lib.h" 00045 #include "thread_management_if.h" 00046 #include "thread_management_api.h" 00047 #include "thread_commissioning_api.h" 00048 #include "thread_common.h" 00049 #ifdef HAVE_THREAD 00050 #define TRACE_GROUP TRACE_GROUP_THREAD_MANAGEMENT_API 00051 00052 #include "coap_service_api.h" 00053 00054 typedef struct management_session { 00055 uint8_t destination_address[16]; 00056 uint8_t final_dest_address[16]; /* MGMT tmf message final destination */ 00057 uint16_t destination_port; 00058 management_set_response_cb *set_response_cb_ptr; 00059 management_get_response_cb *get_response_cb_ptr; 00060 bool native_interface: 1; 00061 int8_t instance_id; 00062 int8_t interface_id; 00063 int8_t coap_service_id; 00064 int8_t coap_virtual_service_id; 00065 ns_list_link_t link; 00066 } management_session_t; 00067 00068 static NS_LIST_DEFINE(instance_list, management_session_t, link); 00069 00070 /* management_session class handlers*/ 00071 static management_session_t *management_find(int8_t instance_id) 00072 { 00073 management_session_t *this = NULL; 00074 ns_list_foreach(management_session_t, cur_ptr, &instance_list) { 00075 if (cur_ptr->instance_id == instance_id) { 00076 this = cur_ptr; 00077 break; 00078 } 00079 } 00080 return this; 00081 } 00082 static management_session_t *commissioner_find_by_service(int8_t service_id) 00083 { 00084 management_session_t *this = NULL; 00085 ns_list_foreach(management_session_t, cur_ptr, &instance_list) { 00086 if (cur_ptr->coap_service_id == service_id || cur_ptr->coap_virtual_service_id == service_id) { 00087 this = cur_ptr; 00088 break; 00089 } 00090 } 00091 return this; 00092 } 00093 00094 /** Callback functions 00095 * 00096 */ 00097 int thread_management_recv_set_response_cb(int8_t service_id, uint8_t source_address[static 16], uint16_t source_port, sn_coap_hdr_s *response_ptr) 00098 { 00099 management_session_t *this = commissioner_find_by_service(service_id); 00100 management_state_e state = MANAGEMENT_STATE_REJECT; 00101 uint8_t *ptr; 00102 (void) source_address; 00103 (void) source_port; 00104 00105 /* Transaction failed */ 00106 if (!response_ptr) { 00107 return -1; 00108 } 00109 00110 tr_debug("Management Set response"); 00111 00112 if (!this) { 00113 return -1; 00114 } 00115 00116 if (1 <= thread_meshcop_tlv_find(response_ptr->payload_ptr, response_ptr->payload_len, MESHCOP_TLV_STATE, &ptr)) { 00117 // only handle success 00118 if (*ptr == 1) { 00119 state = MANAGEMENT_STATE_ACCEPT; 00120 } else if (*ptr == 0) { 00121 state = MANAGEMENT_STATE_PENDING; 00122 } 00123 } 00124 00125 if (this->set_response_cb_ptr) { 00126 this->set_response_cb_ptr(this->interface_id, state); 00127 } 00128 return 0; 00129 } 00130 00131 int thread_management_recv_get_response_cb(int8_t service_id, uint8_t source_address[static 16], uint16_t source_port, sn_coap_hdr_s *response_ptr) 00132 { 00133 management_session_t *this = commissioner_find_by_service(service_id); 00134 management_state_e state = MANAGEMENT_STATE_ACCEPT;// Default is accept if we get error it is rejected 00135 uint8_t *ptr; 00136 (void) source_address; 00137 (void) source_port; 00138 00139 /* Transaction failed */ 00140 if (!response_ptr) { 00141 return -1; 00142 } 00143 00144 tr_debug("management get response"); 00145 if (!this) { 00146 return -1; 00147 } 00148 00149 if (1 <= thread_meshcop_tlv_find(response_ptr->payload_ptr, response_ptr->payload_len, MESHCOP_TLV_STATE, &ptr)) { 00150 // only handle success 00151 if (*ptr == 1) { 00152 state = MANAGEMENT_STATE_ACCEPT; 00153 } else if (*ptr == 0) { 00154 state = MANAGEMENT_STATE_PENDING; 00155 } else { 00156 state = MANAGEMENT_STATE_REJECT; 00157 } 00158 } 00159 00160 if (this->get_response_cb_ptr) { 00161 this->get_response_cb_ptr(this->interface_id, state, response_ptr->payload_ptr, response_ptr->payload_len); 00162 } 00163 return 0; 00164 } 00165 00166 static int thread_management_get_remote_addr(management_session_t *this) 00167 { 00168 if (0 == thread_management_get_leader_aloc(this->interface_id, this->destination_address)) { 00169 tr_debug("on-mesh interface"); 00170 this->destination_port = THREAD_MANAGEMENT_PORT; 00171 this->native_interface = false; 00172 } else if (0 == thread_commissioning_native_commissioner_get_connection_info(this->interface_id, 00173 this->destination_address, &this->destination_port)) { 00174 tr_debug("native interface: dest addr=%s, dest port=%d", trace_ipv6(this->destination_address), this->destination_port); 00175 this->native_interface = true; 00176 } else { 00177 tr_error("No remote address"); 00178 return -4; 00179 } 00180 return 0; 00181 } 00182 00183 static int thread_management_udp_proxy_receive_cb(int8_t service_id, uint8_t source_address[static 16], uint16_t source_port, sn_coap_hdr_s *request_ptr) 00184 { 00185 tr_debug("Recv UDP_RX.ntf"); 00186 00187 management_session_t *this = commissioner_find_by_service(service_id); 00188 uint8_t *udp_encapsulation_ptr, *udp_tmf_ptr; 00189 uint16_t udp_encapsulation_len, udp_tmf_len; 00190 uint8_t *ipv6_addr_ptr; 00191 uint16_t ipv6_addr_len; 00192 uint16_t dest_port; 00193 00194 (void) source_port; 00195 00196 if (!this || !source_address || !request_ptr) { 00197 return -1; // goto error response 00198 } 00199 00200 udp_encapsulation_len = thread_meshcop_tlv_find(request_ptr->payload_ptr, request_ptr->payload_len, MESHCOP_TLV_UDP_ENCAPSULATION, &udp_encapsulation_ptr); 00201 ipv6_addr_len = thread_meshcop_tlv_find(request_ptr->payload_ptr, request_ptr->payload_len, MESHCOP_TLV_IPV6_ADDRESS, &ipv6_addr_ptr); 00202 00203 if (udp_encapsulation_len == 0 || ipv6_addr_len < 16) { 00204 tr_warn("Corrupted UDP_RX.ntf received (%d, %d)", udp_encapsulation_len, ipv6_addr_len); 00205 return -1; 00206 } 00207 00208 dest_port = common_read_16_bit(udp_encapsulation_ptr + 2); 00209 udp_tmf_len = udp_encapsulation_len - 4; 00210 udp_tmf_ptr = udp_encapsulation_ptr + 4; 00211 00212 tr_debug("UDP_RX tmf: %s", trace_array(udp_tmf_ptr, udp_tmf_len)); 00213 00214 coap_service_virtual_socket_recv(this->coap_virtual_service_id, ipv6_addr_ptr, dest_port, udp_tmf_ptr, udp_tmf_len); 00215 00216 return -1; // no response sent 00217 } 00218 00219 /* 00220 * Create UDP_TX.ntf and send it to target device 00221 */ 00222 static int thread_management_udp_proxy_virtual_socket_send_cb(int8_t service_id, uint8_t destination_addr_ptr[static 16], uint16_t port, const uint8_t *data_ptr, uint16_t data_len) 00223 { 00224 uint8_t *payload_ptr; 00225 uint8_t *ptr; 00226 uint16_t payload_len; 00227 uint16_t source_port; 00228 00229 management_session_t *this = commissioner_find_by_service(service_id); 00230 if (!this) { 00231 return -1; 00232 } 00233 00234 tr_debug("UDP_TX.ntf tmf: %s", trace_array(data_ptr, data_len)); 00235 if (!this || !destination_addr_ptr || !data_ptr) { 00236 return -1; 00237 } 00238 00239 payload_len = 2 + THREAD_IPV6_ADDRESS_TLV_LENGTH + 4 + 4 + data_len; // MESHCOP_TLV_IPV6_ADDRESS + MESHCOP_TLV_UDP_ENCAPSULATION 00240 00241 payload_ptr = ns_dyn_mem_alloc(payload_len); 00242 if (!payload_ptr) { 00243 return -3; 00244 } 00245 00246 ptr = payload_ptr; 00247 00248 /* MESHCOP_TLV_IPV6_ADDRESS */ 00249 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_IPV6_ADDRESS, THREAD_IPV6_ADDRESS_TLV_LENGTH, this->final_dest_address); 00250 00251 /* MESHCOP_TLV_UDP_ENCAPSULATION */ 00252 *ptr++ = MESHCOP_TLV_UDP_ENCAPSULATION; 00253 *ptr++ = 0xff; 00254 ptr = common_write_16_bit(2 + 2 + data_len, ptr); // length (Port x 2 + TMF message) 00255 source_port = randLIB_get_16bit(); // ephemeral port, 16-bit number 00256 ptr = common_write_16_bit(source_port, ptr); // source port, 00257 ptr = common_write_16_bit(THREAD_MANAGEMENT_PORT, ptr); // destination port 00258 memcpy(ptr, data_ptr, data_len); 00259 ptr += data_len; 00260 00261 /* Send UDP_TX.ntf */ 00262 coap_service_request_send(this->coap_service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, port, 00263 COAP_MSG_TYPE_NON_CONFIRMABLE, COAP_MSG_CODE_REQUEST_POST, THREAD_URI_UDP_TRANSMIT_NOTIFICATION, COAP_CT_OCTET_STREAM, payload_ptr, ptr - payload_ptr, NULL); 00264 00265 ns_dyn_mem_free(payload_ptr); 00266 00267 return 0; 00268 } 00269 00270 /** 00271 * Public methods 00272 * 00273 */ 00274 int thread_management_register(int8_t interface_id) 00275 { 00276 int8_t instance_id = 1; 00277 management_session_t *this = ns_dyn_mem_alloc(sizeof(management_session_t)); 00278 if (!this) { 00279 return 0; 00280 } 00281 while (management_find(instance_id)) { 00282 instance_id++; 00283 } 00284 this->instance_id = instance_id; 00285 this->interface_id = interface_id; 00286 this->set_response_cb_ptr = NULL; 00287 this->get_response_cb_ptr = NULL; 00288 00289 if (thread_management_get_remote_addr(this)) { 00290 return -1; 00291 } 00292 00293 ns_list_add_to_start(&instance_list, this); 00294 if (this->native_interface) { 00295 this->coap_service_id = coap_service_initialize(this->interface_id, THREAD_COMMISSIONING_PORT, COAP_SERVICE_OPTIONS_SECURE | COAP_SERVICE_OPTIONS_SECURE_BYPASS, NULL, NULL); 00296 /* Register for UDP_RX.ntf */ 00297 coap_service_register_uri(this->coap_service_id, THREAD_URI_UDP_RECVEIVE_NOTIFICATION, COAP_SERVICE_ACCESS_POST_ALLOWED, thread_management_udp_proxy_receive_cb); 00298 } else { 00299 this->coap_service_id = coap_service_initialize(this->interface_id, THREAD_MANAGEMENT_PORT, COAP_SERVICE_OPTIONS_NONE, NULL, NULL); 00300 } 00301 00302 /* Create virtual service for Native/External Commissioner */ 00303 this->coap_virtual_service_id = coap_service_initialize(this->interface_id, THREAD_COMMISSIONING_PORT, COAP_SERVICE_OPTIONS_VIRTUAL_SOCKET, NULL, NULL); 00304 coap_service_virtual_socket_set_cb(this->coap_virtual_service_id, thread_management_udp_proxy_virtual_socket_send_cb); 00305 00306 return instance_id; 00307 } 00308 00309 int thread_management_unregister(int8_t instance_id) 00310 { 00311 management_session_t *this = management_find(instance_id); 00312 if (!this) { 00313 return -1; 00314 } 00315 00316 coap_service_delete(this->coap_service_id); 00317 00318 ns_list_remove(&instance_list, this); 00319 ns_dyn_mem_free(this); 00320 return 0; 00321 } 00322 00323 int thread_management_set_security_policy(int8_t instance_id, uint8_t options, uint16_t rotation_time, management_set_response_cb *cb_ptr) 00324 { 00325 management_session_t *this = management_find(instance_id); 00326 uint8_t payload[7];/* 4 + 3 */ 00327 uint8_t tlv[3]; 00328 uint8_t *ptr; 00329 00330 if (!this || rotation_time < 1) { 00331 return -1; 00332 } 00333 00334 if (thread_management_get_remote_addr(this)) { 00335 return -2; 00336 } 00337 00338 this->set_response_cb_ptr = cb_ptr; 00339 common_write_16_bit(rotation_time, tlv); 00340 tlv[2] = options; 00341 00342 ptr = payload; 00343 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_SECURITY_POLICY, 3, tlv); 00344 00345 tr_debug("thread management set security policy options:%d rotation time %d", options, rotation_time); 00346 coap_service_request_send(this->coap_service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00347 COAP_MSG_TYPE_CONFIRMABLE, COAP_MSG_CODE_REQUEST_POST, THREAD_URI_MANAGEMENT_SET, COAP_CT_OCTET_STREAM, payload, ptr - payload, thread_management_recv_set_response_cb); 00348 return 0; 00349 } 00350 00351 int thread_management_set_steering_data(int8_t instance_id, uint16_t session_id, uint8_t *steering_data_ptr, uint8_t steering_data_len, management_set_response_cb *cb_ptr) 00352 { 00353 management_session_t *this = management_find(instance_id); 00354 uint8_t payload[24];/* 4 + 16 + 4*/ 00355 uint8_t *ptr; 00356 if (!this || steering_data_len > 16) { 00357 return -1; 00358 } 00359 00360 if (thread_management_get_remote_addr(this)) { 00361 return -2; 00362 } 00363 00364 protocol_interface_info_entry_t *cur = protocol_stack_interface_info_get_by_id(this->interface_id); 00365 if (!cur || !cur->thread_info) { 00366 return -3; 00367 } 00368 this->set_response_cb_ptr = cb_ptr; 00369 ptr = payload; 00370 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_STEERING_DATA, steering_data_len, steering_data_ptr); 00371 ptr = thread_meshcop_tlv_data_write_uint16(ptr, MESHCOP_TLV_COMMISSIONER_SESSION_ID, session_id); 00372 00373 tr_debug("thread management set steering data %s", trace_array(steering_data_ptr, steering_data_len)); 00374 //default uri for thread version 1.1 00375 char *uri = THREAD_URI_COMMISSIONER_SET; 00376 00377 coap_service_request_send(this->coap_service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00378 COAP_MSG_TYPE_CONFIRMABLE, COAP_MSG_CODE_REQUEST_POST, uri, COAP_CT_OCTET_STREAM, payload, ptr - payload, thread_management_recv_set_response_cb); 00379 00380 return 0; 00381 } 00382 00383 int thread_management_set_commissioning_data_timestamp(int8_t instance_id, uint64_t time, management_set_response_cb *cb_ptr) 00384 { 00385 management_session_t *this = management_find(instance_id); 00386 uint8_t payload[12];/* 4 + 8 */ 00387 uint8_t *ptr; 00388 00389 if (!this) { 00390 return -1; 00391 } 00392 00393 if (thread_management_get_remote_addr(this)) { 00394 return -2; 00395 } 00396 00397 this->set_response_cb_ptr = cb_ptr; 00398 ptr = payload; 00399 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_ACTIVE_TIME_STAMP, 8, (uint8_t *)&time); //TODO not network order? 00400 00401 tr_debug("thread management set commissioning timestamp %"PRIu64, time); 00402 coap_service_request_send(this->coap_service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00403 COAP_MSG_TYPE_CONFIRMABLE, COAP_MSG_CODE_REQUEST_POST, THREAD_URI_MANAGEMENT_SET, COAP_CT_OCTET_STREAM, payload, ptr - payload, thread_management_recv_set_response_cb); 00404 return 0; 00405 } 00406 00407 int thread_management_get(int8_t instance_id, uint8_t dst_addr[static 16], char *uri_ptr, uint8_t *fields_ptr, uint8_t fields_count, management_get_response_cb *cb_ptr) 00408 { 00409 management_session_t *this = management_find(instance_id); 00410 uint8_t payload[36];/* 4 + 32 */ 00411 uint8_t *ptr; 00412 int8_t service_id; 00413 bool wrap_to_udp_tx = false; // messages to Border Agent are send directly without wrapping to UDP_TX 00414 00415 if (!this || fields_count > 32) { 00416 return -1; 00417 } 00418 00419 if (!uri_ptr) { 00420 uri_ptr = THREAD_URI_ACTIVE_GET; 00421 } 00422 00423 if (!dst_addr) { 00424 if (thread_management_get_remote_addr(this)) { 00425 return -2; 00426 } 00427 memcpy(this->final_dest_address, this->destination_address, 16); 00428 } else { 00429 if (this->native_interface) { 00430 memcpy(this->final_dest_address, dst_addr, 16); 00431 wrap_to_udp_tx = true; 00432 } else { 00433 memcpy(this->destination_address, dst_addr, 16); 00434 this->destination_port = THREAD_MANAGEMENT_PORT; 00435 } 00436 } 00437 00438 this->get_response_cb_ptr = cb_ptr; 00439 ptr = payload; 00440 if (fields_count > 0 && fields_ptr) { 00441 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_GET, fields_count, fields_ptr); 00442 } 00443 00444 tr_debug("thread management info get TLVs: %s, uri: %s", trace_array(fields_ptr, fields_count), uri_ptr); 00445 tr_debug("dest_addr: %s", trace_ipv6(this->destination_address)); 00446 00447 if (this->native_interface && wrap_to_udp_tx) { 00448 service_id = this->coap_virtual_service_id; 00449 } else { 00450 service_id = this->coap_service_id; 00451 } 00452 00453 coap_service_request_send(service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00454 COAP_MSG_TYPE_CONFIRMABLE, COAP_MSG_CODE_REQUEST_POST, uri_ptr, COAP_CT_OCTET_STREAM, payload, ptr - payload, thread_management_recv_get_response_cb); 00455 return 0; 00456 } 00457 00458 int thread_management_set(int8_t instance_id, uint8_t dst_addr[static 16], char *uri_ptr, uint8_t *data_ptr, uint8_t data_len, management_set_response_cb *cb_ptr) 00459 { 00460 management_session_t *this = management_find(instance_id); 00461 int8_t service_id; 00462 bool wrap_to_udp_tx = false; 00463 00464 if (!this || !data_ptr || data_len < 2) { 00465 return -1; 00466 } 00467 if (uri_ptr == NULL) { 00468 uri_ptr = THREAD_URI_MANAGEMENT_SET; 00469 } 00470 00471 if (!dst_addr) { 00472 if (thread_management_get_remote_addr(this)) { 00473 return -2; 00474 } 00475 memcpy(this->final_dest_address, this->destination_address, 16); 00476 } else { 00477 if (this->native_interface) { 00478 // native commissioner sending to address, need to encapsulate 00479 memcpy(this->final_dest_address, dst_addr, 16); 00480 wrap_to_udp_tx = true; 00481 } else { 00482 memcpy(this->destination_address, dst_addr, 16); 00483 this->destination_port = THREAD_MANAGEMENT_PORT; 00484 } 00485 } 00486 00487 this->set_response_cb_ptr = cb_ptr; 00488 00489 tr_debug("thread management set"); 00490 00491 if (this->native_interface && wrap_to_udp_tx) { 00492 // for non-native commissioner use virtual service to encapsulate messaes 00493 service_id = this->coap_virtual_service_id; 00494 } else { 00495 // for on-mesh commissioner use real service 00496 service_id = this->coap_service_id; 00497 } 00498 00499 coap_service_request_send(service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00500 COAP_MSG_TYPE_CONFIRMABLE, COAP_MSG_CODE_REQUEST_POST, uri_ptr, COAP_CT_OCTET_STREAM, data_ptr, data_len, thread_management_recv_set_response_cb); 00501 return 0; 00502 } 00503 #else 00504 int thread_management_register(int8_t interface_id) 00505 { 00506 (void)interface_id; 00507 return -1; 00508 } 00509 00510 int thread_management_unregister(int8_t instance_id) 00511 { 00512 (void)instance_id; 00513 return -1; 00514 } 00515 00516 int thread_management_set_security_policy(int8_t instance_id, uint8_t options, uint16_t rotation_time, management_set_response_cb *cb_ptr) 00517 { 00518 (void)instance_id; 00519 (void) options; 00520 (void)rotation_time; 00521 (void)cb_ptr; 00522 return -1; 00523 } 00524 00525 int thread_management_set_steering_data(int8_t instance_id, uint16_t session_id, uint8_t *steering_data_ptr, uint8_t steering_data_len, management_set_response_cb *cb_ptr) 00526 { 00527 (void)instance_id; 00528 (void) session_id; 00529 (void) steering_data_ptr; 00530 (void)steering_data_len; 00531 (void)cb_ptr; 00532 return -1; 00533 } 00534 00535 int thread_management_set_commissioning_data_timestamp(int8_t instance_id, uint64_t time, management_set_response_cb *cb_ptr) 00536 { 00537 (void)instance_id; 00538 (void) time; 00539 (void)cb_ptr; 00540 return -1; 00541 } 00542 00543 int thread_management_get(int8_t instance_id, uint8_t dst_addr[static 16], char *uri_ptr, uint8_t *fields_ptr, uint8_t fields_count, management_get_response_cb *cb_ptr) 00544 { 00545 (void) instance_id; 00546 (void) dst_addr; 00547 (void) uri_ptr; 00548 (void) fields_ptr; 00549 (void) fields_count; 00550 (void) cb_ptr; 00551 return -1; 00552 } 00553 00554 int thread_management_set(int8_t instance_id, uint8_t dst_addr[static 16], char *uri_ptr, uint8_t *data_ptr, uint8_t data_len, management_set_response_cb *cb_ptr) 00555 { 00556 (void) instance_id; 00557 (void) dst_addr; 00558 (void) uri_ptr; 00559 (void) data_ptr; 00560 (void) data_len; 00561 (void) cb_ptr; 00562 return -1; 00563 } 00564 00565 #endif
Generated on Tue Jul 12 2022 13:54:59 by
