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.
Fork of OmniWheels by
thread_management_api.c
00001 /* 00002 * Copyright (c) 2015-2017, 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 ns_dyn_mem_free(this); 00291 return -1; 00292 } 00293 00294 ns_list_add_to_start(&instance_list, this); 00295 if(this->native_interface) { 00296 this->coap_service_id = coap_service_initialize(this->interface_id, THREAD_COMMISSIONING_PORT, COAP_SERVICE_OPTIONS_SECURE | COAP_SERVICE_OPTIONS_SECURE_BYPASS, NULL, NULL); 00297 /* Register for UDP_RX.ntf */ 00298 coap_service_register_uri(this->coap_service_id, THREAD_URI_UDP_RECVEIVE_NOTIFICATION, COAP_SERVICE_ACCESS_POST_ALLOWED, thread_management_udp_proxy_receive_cb); 00299 } else { 00300 this->coap_service_id = coap_service_initialize(this->interface_id, THREAD_MANAGEMENT_PORT, COAP_SERVICE_OPTIONS_NONE, NULL, NULL); 00301 } 00302 00303 /* Create virtual service for Native/External Commissioner */ 00304 this->coap_virtual_service_id = coap_service_initialize(this->interface_id, THREAD_COMMISSIONING_PORT, COAP_SERVICE_OPTIONS_VIRTUAL_SOCKET, NULL, NULL); 00305 coap_service_virtual_socket_set_cb(this->coap_virtual_service_id, thread_management_udp_proxy_virtual_socket_send_cb); 00306 00307 return instance_id; 00308 } 00309 00310 int thread_management_unregister(int8_t instance_id) 00311 { 00312 management_session_t *this = management_find(instance_id); 00313 if (!this) { 00314 return -1; 00315 } 00316 00317 coap_service_delete(this->coap_service_id); 00318 00319 ns_list_remove(&instance_list, this); 00320 ns_dyn_mem_free(this); 00321 return 0; 00322 } 00323 00324 int thread_management_set_security_policy(int8_t instance_id, uint8_t options, uint16_t rotation_time, management_set_response_cb *cb_ptr) 00325 { 00326 management_session_t *this = management_find(instance_id); 00327 uint8_t payload[7];/* 4 + 3 */ 00328 uint8_t tlv[3]; 00329 uint8_t *ptr; 00330 00331 if (!this || rotation_time < 1) { 00332 return -1; 00333 } 00334 00335 if (thread_management_get_remote_addr(this)) { 00336 return -2; 00337 } 00338 00339 this->set_response_cb_ptr = cb_ptr; 00340 common_write_16_bit(rotation_time, tlv); 00341 tlv[2] = options; 00342 00343 ptr = payload; 00344 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_SECURITY_POLICY, 3, tlv); 00345 00346 tr_debug("thread management set security policy options:%d rotation time %d", options, rotation_time); 00347 coap_service_request_send(this->coap_service_id, COAP_REQUEST_OPTIONS_NONE,this->destination_address, this->destination_port, 00348 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); 00349 return 0; 00350 } 00351 00352 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) 00353 { 00354 management_session_t *this = management_find(instance_id); 00355 uint8_t payload[24];/* 4 + 16 + 4*/ 00356 uint8_t *ptr; 00357 if (!this || steering_data_len > 16) { 00358 return -1; 00359 } 00360 00361 if (thread_management_get_remote_addr(this)) { 00362 return -2; 00363 } 00364 00365 protocol_interface_info_entry_t *cur = protocol_stack_interface_info_get_by_id(this->interface_id); 00366 if (!cur || !cur->thread_info) { 00367 return -3; 00368 } 00369 this->set_response_cb_ptr = cb_ptr; 00370 ptr = payload; 00371 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_STEERING_DATA, steering_data_len, steering_data_ptr); 00372 ptr = thread_meshcop_tlv_data_write_uint16(ptr, MESHCOP_TLV_COMMISSIONER_SESSION_ID, session_id); 00373 00374 tr_debug("thread management set steering data %s", trace_array(steering_data_ptr, steering_data_len)); 00375 //default uri for thread version 1.1 00376 char *uri = THREAD_URI_COMMISSIONER_SET; 00377 00378 coap_service_request_send(this->coap_service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00379 COAP_MSG_TYPE_CONFIRMABLE, COAP_MSG_CODE_REQUEST_POST, uri, COAP_CT_OCTET_STREAM, payload, ptr - payload, thread_management_recv_set_response_cb); 00380 00381 return 0; 00382 } 00383 00384 int thread_management_set_commissioning_data_timestamp(int8_t instance_id, uint64_t time, management_set_response_cb *cb_ptr) 00385 { 00386 management_session_t *this = management_find(instance_id); 00387 uint8_t payload[12];/* 4 + 8 */ 00388 uint8_t *ptr; 00389 00390 if (!this) { 00391 return -1; 00392 } 00393 00394 if (thread_management_get_remote_addr(this)) { 00395 return -2; 00396 } 00397 00398 this->set_response_cb_ptr = cb_ptr; 00399 ptr = payload; 00400 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_ACTIVE_TIME_STAMP, 8, (uint8_t *)&time); //TODO not network order? 00401 00402 tr_debug("thread management set commissioning timestamp %"PRIu64, time); 00403 coap_service_request_send(this->coap_service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00404 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); 00405 return 0; 00406 } 00407 00408 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) 00409 { 00410 management_session_t *this = management_find(instance_id); 00411 uint8_t payload[36];/* 4 + 32 */ 00412 uint8_t *ptr; 00413 int8_t service_id; 00414 bool wrap_to_udp_tx = false; // messages to Border Agent are send directly without wrapping to UDP_TX 00415 00416 if (!this || fields_count > 32 ) { 00417 return -1; 00418 } 00419 00420 if (!uri_ptr) { 00421 uri_ptr = THREAD_URI_ACTIVE_GET; 00422 } 00423 00424 if(!dst_addr) { 00425 if (thread_management_get_remote_addr(this)) { 00426 return -2; 00427 } 00428 memcpy(this->final_dest_address, this->destination_address, 16); 00429 } 00430 else{ 00431 if (this->native_interface) { 00432 memcpy(this->final_dest_address, dst_addr, 16); 00433 wrap_to_udp_tx = true; 00434 } else { 00435 memcpy(this->destination_address, dst_addr, 16); 00436 this->destination_port = THREAD_MANAGEMENT_PORT; 00437 } 00438 } 00439 00440 this->get_response_cb_ptr = cb_ptr; 00441 ptr = payload; 00442 if (fields_count > 0 && fields_ptr) { 00443 ptr = thread_meshcop_tlv_data_write(ptr, MESHCOP_TLV_GET, fields_count, fields_ptr); 00444 } 00445 00446 tr_debug("thread management info get TLVs: %s, uri: %s", trace_array(fields_ptr, fields_count), uri_ptr); 00447 tr_debug("dest_addr: %s", trace_ipv6(this->destination_address)); 00448 00449 if (this->native_interface && wrap_to_udp_tx) { 00450 service_id = this->coap_virtual_service_id; 00451 } else { 00452 service_id = this->coap_service_id; 00453 } 00454 00455 coap_service_request_send(service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00456 COAP_MSG_TYPE_CONFIRMABLE, COAP_MSG_CODE_REQUEST_POST, uri_ptr, COAP_CT_OCTET_STREAM, payload, ptr - payload, thread_management_recv_get_response_cb); 00457 return 0; 00458 } 00459 00460 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) 00461 { 00462 management_session_t *this = management_find(instance_id); 00463 int8_t service_id; 00464 bool wrap_to_udp_tx = false; 00465 00466 if (!this || !data_ptr || data_len < 2) { 00467 return -1; 00468 } 00469 if (uri_ptr == NULL){ 00470 uri_ptr = THREAD_URI_MANAGEMENT_SET; 00471 } 00472 00473 if(!dst_addr){ 00474 if (thread_management_get_remote_addr(this)) { 00475 return -2; 00476 } 00477 memcpy(this->final_dest_address, this->destination_address, 16); 00478 } 00479 else{ 00480 if (this->native_interface) { 00481 // native commissioner sending to address, need to encapsulate 00482 memcpy(this->final_dest_address, dst_addr, 16); 00483 wrap_to_udp_tx = true; 00484 } else { 00485 memcpy(this->destination_address, dst_addr, 16); 00486 this->destination_port = THREAD_MANAGEMENT_PORT; 00487 } 00488 } 00489 00490 this->set_response_cb_ptr = cb_ptr; 00491 00492 tr_debug("thread management set"); 00493 00494 if (this->native_interface && wrap_to_udp_tx) { 00495 // for non-native commissioner use virtual service to encapsulate messaes 00496 service_id = this->coap_virtual_service_id; 00497 } else { 00498 // for on-mesh commissioner use real service 00499 service_id = this->coap_service_id; 00500 } 00501 00502 coap_service_request_send(service_id, COAP_REQUEST_OPTIONS_NONE, this->destination_address, this->destination_port, 00503 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); 00504 return 0; 00505 } 00506 #else 00507 int thread_management_register(int8_t interface_id) { 00508 (void)interface_id; 00509 return -1; 00510 } 00511 00512 int thread_management_unregister(int8_t instance_id) { 00513 (void)instance_id; 00514 return -1; 00515 } 00516 00517 int thread_management_set_security_policy(int8_t instance_id, uint8_t options, uint16_t rotation_time, management_set_response_cb *cb_ptr) { 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 (void)instance_id; 00527 (void) session_id; 00528 (void) steering_data_ptr; 00529 (void)steering_data_len; 00530 (void)cb_ptr; 00531 return -1; 00532 } 00533 00534 int thread_management_set_commissioning_data_timestamp(int8_t instance_id, uint64_t time, management_set_response_cb *cb_ptr) { 00535 (void)instance_id; 00536 (void) time; 00537 (void)cb_ptr; 00538 return -1; 00539 } 00540 00541 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) 00542 { 00543 (void) instance_id; 00544 (void) dst_addr; 00545 (void) uri_ptr; 00546 (void) fields_ptr; 00547 (void) fields_count; 00548 (void) cb_ptr; 00549 return -1; 00550 } 00551 00552 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) 00553 { 00554 (void) instance_id; 00555 (void) dst_addr; 00556 (void) uri_ptr; 00557 (void) data_ptr; 00558 (void) data_len; 00559 (void) cb_ptr; 00560 return -1; 00561 } 00562 00563 #endif
Generated on Fri Jul 22 2022 04:54:03 by
1.7.2
