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.
thread_common.h
00001 /* 00002 * Copyright (c) 2014-2018, 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 #ifndef LOWPAN_THREAD_H_ 00030 #define LOWPAN_THREAD_H_ 00031 00032 #include "ns_list.h" 00033 #include "libDHCPv6/libDHCPv6.h" 00034 #include "libDHCPv6/libDHCPv6_server.h" 00035 #include "6LoWPAN/Thread/thread_routing.h" 00036 #include "6LoWPAN/Thread/thread_network_data_storage.h" 00037 #include "thread_management_if.h" 00038 #include "thread_commissioning_api.h" 00039 #include "thread_border_router_api.h" 00040 #include "eventOS_event_timer.h" 00041 #include "MLE/mle_tlv.h" 00042 00043 struct mac_neighbor_table_entry; 00044 00045 #define MAX_MLE_CHALLENGE_LENGTH 32 00046 00047 /* 00048 * How long a Leader must wait after a router ID has become unassigned before it can be reused. 00049 * 00050 */ 00051 #define ROUTER_ID_REUSE_DELAY 100 //Seconds 00052 00053 #define LEADER_NVM_SYNC_DELAY 30 // Leader router ids write delay to NVM 00054 00055 #define ROUTER_ID_INFINITY_DELAY 90 //Seconds 00056 00057 #define NETWORK_ID_TIMEOUT 120 //seconds 00058 00059 // Values when adverticements are made faster when leader connection is restored 00060 #define NETWORK_ID_SPEEDUP 55 //seconds 00061 #define NETWORK_ID_SPEEDUP_MAX 80 //seconds 00062 00063 #define DHCPV6_ENTERPRISE_THREAD 0x0000AFAA 00064 #define DHCPV6_OPTION_VENDOR_SPESIFIC_INFO_LEN 0x0011 00065 #define DHCPV6_ROUTER_ID_OPTION 0x0000 00066 #define DHCPV6_ROUTER_ID_OPTION_LEN 0x0009 00067 00068 #define THREAD_KEY_INDEX(seq) ((uint8_t) (((seq) & 0x0000007f) + 1)) 00069 00070 extern uint8_t thread_version; 00071 extern uint32_t thread_delay_timer_default; 00072 extern uint32_t thread_router_selection_jitter; 00073 extern uint16_t thread_joiner_port; 00074 00075 typedef enum { 00076 THREAD_STATE_NETWORK_DISCOVER, // Not commissioned to Thread network 00077 THREAD_STATE_REATTACH, // Connection to leader lost, searching for new parent 00078 THREAD_STATE_REATTACH_RETRY, // Connection to leader lost, searching for new parent with REED bit is set 00079 THREAD_STATE_ATTACH_ANY, // Searching for all partitions with leader connectivity 00080 THREAD_STATE_CONNECTED, // Attached to Thread network - can't route 00081 THREAD_STATE_CONNECTED_ROUTER, // Attached to Thread network - Routing enabled 00082 } thread_attach_state_e; 00083 00084 typedef enum { 00085 THREAD_DEVICE_MODE_ROUTER, 00086 THREAD_DEVICE_MODE_FULL_END_DEVICE, 00087 THREAD_DEVICE_MODE_END_DEVICE, 00088 THREAD_DEVICE_MODE_SLEEPY_END_DEVICE, 00089 } thread_attach_device_mode_e; 00090 00091 typedef enum { 00092 THREAD_COMMISSIONER_NOT_REGISTERED, 00093 THREAD_COMMISSIONER_REGISTRATION_OBSOLETE, 00094 THREAD_COMMISSIONER_REGISTERED 00095 } thread_commissioner_register_status_e; 00096 00097 typedef struct thread_neigh_table_entry_s { 00098 uint8_t mlEid[8]; 00099 uint32_t last_contact_time; /*!< monotonic time - hard to define "contact"; used for Thread Leasequery replies */ 00100 uint16_t link_margin; 00101 bool secured_data_request:1; 00102 bool request_full_data_set:1; 00103 } thread_neigh_table_entry_t ; 00104 00105 /** 00106 * Neighbor info data base 00107 */ 00108 typedef struct thread_neighbor_class_s { 00109 thread_neigh_table_entry_t *neigh_info_list ; /*!< Allocated Neighbour info array*/ 00110 uint8_t list_size ; /*!< List size*/ 00111 } thread_neighbor_class_t; 00112 00113 typedef struct thread_mcast_child { 00114 uint8_t mac64[8]; 00115 ns_list_link_t link; 00116 } thread_mcast_child_t; 00117 00118 typedef NS_LIST_HEAD (thread_mcast_child_t, link) thread_mcast_children_list_t; 00119 00120 typedef struct thread_registered_mcast_addr { 00121 uint8_t address[16]; 00122 thread_mcast_children_list_t children; 00123 ns_list_link_t link; 00124 } thread_registered_mcast_addr_t; 00125 00126 typedef NS_LIST_HEAD (thread_registered_mcast_addr_t, link) thread_registered_mcast_addr_list_t; 00127 00128 typedef struct thread_pending_child_id_req { 00129 uint8_t euid64[8]; 00130 uint8_t eiid[8]; 00131 uint8_t linkMargin; 00132 uint8_t mode; 00133 uint32_t keySeq; 00134 uint8_t keyId; 00135 bool request_active_config; 00136 uint64_t active_timestamp; 00137 uint64_t pending_timestamp; 00138 uint32_t frameCounter; 00139 uint32_t mleFrameCounter; 00140 uint32_t timeout; 00141 uint16_t version; 00142 bool shortAddressReq: 1; 00143 bool networkDataReq: 1; 00144 bool routeReq: 1; 00145 ns_list_link_t link; /*!< List link entry */ 00146 } thread_pending_child_id_req_t; 00147 00148 typedef NS_LIST_HEAD (thread_pending_child_id_req_t, link) thread_pending_id_req_list_t; 00149 00150 typedef struct thread_router_id_entry_s { 00151 uint8_t eui64[8]; 00152 uint32_t validLifeTime; 00153 bool reUsePossible; 00154 } thread_router_id_entry_t; 00155 00156 typedef struct thread_network_data_req_s { 00157 uint8_t request_destination[16]; 00158 uint8_t timeout; 00159 bool active; 00160 } thread_network_data_req_t; 00161 00162 typedef struct thread_leader_info_s { 00163 //DHCPv6 Allocated Router Id's 00164 thread_router_id_entry_t thread_router_id_list[64]; 00165 uint8_t leader_id_seq_timer; 00166 uint8_t master_router_id_mask[8]; 00167 uint8_t maskSeq; 00168 uint8_t leader_nvm_sync_timer; 00169 } thread_leader_info_t; 00170 00171 typedef struct thread_leader_data_s { 00172 uint32_t partitionId; //Unique partition ID 00173 uint8_t dataVersion; //Leader data version number 00174 uint8_t stableDataVersion; //Leader data stable version number 00175 uint8_t leaderRouterId; //Leader Router ID 00176 uint8_t weighting; //Data weighting 00177 } thread_leader_data_t; 00178 00179 typedef struct thread_connectivity_s { 00180 uint16_t SEDBufferSize; 00181 int8_t parentPriority; 00182 uint8_t linkQuality3; 00183 uint8_t linkQuality2; 00184 uint8_t linkQuality1; 00185 uint8_t leaderCost; 00186 uint8_t idSequence; 00187 uint8_t activeRouters; 00188 uint8_t SEDDatagramCount; 00189 } thread_connectivity_t; 00190 00191 typedef struct thread_parent_info_s { 00192 uint8_t mac64[8]; 00193 uint16_t shortAddress; 00194 uint8_t router_id; 00195 uint8_t pathCostToLeader; 00196 bool childUpdatePending: 1; 00197 bool childUpdateProcessActive: 1; 00198 } thread_parent_info_t; 00199 00200 00201 typedef struct thread_scanned_parent_s { 00202 thread_leader_data_t leader_data; 00203 uint8_t mac64[8]; 00204 uint8_t challengeData[MAX_MLE_CHALLENGE_LENGTH]; 00205 uint32_t linLayerFrameCounter; 00206 uint32_t mleFrameCounter; 00207 uint32_t keySequence; 00208 uint16_t shortAddress; 00209 uint8_t chal_len; 00210 uint8_t linkMarginFromParent; 00211 uint8_t linkMarginToParent; 00212 uint8_t security_key_index; 00213 uint8_t routeCostToLeader; 00214 uint8_t linkQuality3; 00215 uint8_t linkQuality2; 00216 uint8_t linkQuality1; 00217 int8_t parentPriority; 00218 uint8_t activeRouters; 00219 uint16_t version; 00220 uint16_t child_id_request_id; 00221 } thread_scanned_parent_t; 00222 00223 typedef struct thread_ula_prefix_s { 00224 uint8_t ulaPrefix[8]; 00225 bool ulaValid; 00226 } thread_ula_prefix_t; 00227 00228 typedef struct thread_master_secret_material_s { 00229 uint8_t historyKey[32]; 00230 uint32_t keySwitchGuardTimer; 00231 uint32_t keyRotation; 00232 bool historyKeyValid:1; 00233 bool valid_Info:1; 00234 uint8_t historyKeyId; 00235 } thread_master_secret_material_t; 00236 00237 /*This structure is used for storing active commissioner information*/ 00238 typedef struct thread_commissioner { 00239 uint8_t steering_data[16]; 00240 uint8_t border_router_address[16]; 00241 timeout_t *commissioner_timeout; 00242 char *commissioner_id_ptr; 00243 uint16_t session_id; /* session_id is valid even if commissioner is not valid */ 00244 thread_commissioner_register_status_e commissioner_registration; /* Only for Leader */ 00245 uint8_t steering_data_len; 00246 bool commissioner_valid:1; 00247 } thread_commissioner_t; 00248 00249 typedef struct thread_announcement_s { 00250 timeout_t *timer; 00251 uint64_t timestamp; 00252 uint16_t channel; 00253 uint16_t panid; 00254 uint8_t channel_page; 00255 uint8_t count; 00256 uint16_t period; 00257 bool announce_success; 00258 } thread_announcement_t; 00259 00260 typedef struct thread_router_select { 00261 uint8_t routerUpgradeThresHold; 00262 uint8_t routerDowngradeThresHold; 00263 uint8_t possibleDefaultParent; 00264 bool jitterTimerActive; 00265 uint16_t reedAdvertisementInterval; 00266 uint16_t reedAdvertisementJitterInterval; 00267 timeout_t *reedAdvertisementTimeout; 00268 } thread_router_select_t; 00269 00270 struct thread_extension_info; 00271 struct thread_extension_credentials; 00272 00273 typedef struct thread_previous_partition_info_s { 00274 uint32_t partitionId; //partition ID of the previous partition 00275 uint8_t idSequence; //idSequence last heard from the previous partition 00276 uint8_t weighting; //weighting last heard from the previous partition 00277 } thread_previous_partition_t; 00278 00279 00280 typedef struct thread_info_s { 00281 thread_routing_info_t routing; 00282 thread_neighbor_class_t neighbor_class; 00283 thread_master_secret_material_t masterSecretMaterial; 00284 thread_network_data_cache_entry_t networkDataStorage; 00285 thread_network_local_data_cache_entry_t localServerDataBase; 00286 thread_pending_id_req_list_t childIdReqPending; 00287 thread_commissioner_t registered_commissioner; 00288 thread_ula_prefix_t threadPrivatePrefixInfo; 00289 thread_router_select_t routerSelectParameters; 00290 thread_previous_partition_t previous_partition_info; 00291 thread_leader_info_t *leader_private_data; //Leader Proxy 00292 thread_parent_info_t *thread_endnode_parent; 00293 thread_leader_data_t *thread_leader_data; //Dynamic Learned Network Data 00294 thread_scanned_parent_t *thread_attach_scanned_parent; 00295 thread_commissioning_link_configuration_s *native_commissioner_link; 00296 thread_commissioning_native_select_cb *native_commissioner_cb; 00297 thread_network_data_tlv_cb *network_data_tlv_cb; 00298 thread_announcement_t *announcement_info; 00299 struct thread_extension_info *extension_info; 00300 struct thread_extension_credentials *extension_credentials_ptr; 00301 thread_attach_device_mode_e thread_device_mode; 00302 thread_attach_state_e thread_attached_state; //Indicate Thread stack state 00303 thread_registered_mcast_addr_list_t child_mcast_list; 00304 uint32_t host_link_timeout; 00305 uint32_t sleepy_host_poll_time; 00306 uint32_t testRandomPartitionId; 00307 uint16_t lastAllocatedChildAddress; 00308 uint16_t native_commissioner_port; 00309 uint16_t routerShortAddress; 00310 uint16_t reedJitterTimer; 00311 uint16_t reedMergeAdvTimer; 00312 uint16_t routerIdReqCoapID; // COAP msg id of RouterID request 00313 int16_t childUpdateReqTimer; 00314 uint16_t childUpdateReqMsgId; 00315 uint16_t proactive_an_timer; 00316 //uint8_t lastValidRouteMask[8]; 00317 int8_t interface_id; //Thread Interface ID 00318 uint8_t version; 00319 uint8_t testMaxActiveRouterIdLimit; //Default for this is 32 00320 uint8_t maxChildCount; //Default for this is 24 00321 uint8_t partition_weighting; 00322 bool rfc6775: 1; 00323 bool requestFullNetworkData: 1; 00324 bool leaderCab: 1; 00325 bool releaseRouterId: 1; 00326 bool networkSynch: 1; 00327 bool networkDataRequested: 1; 00328 bool end_device_link_synch: 1; 00329 bool router_mc_addrs_registered: 1; 00330 bool leader_synced:1; // flag used by leader after restart 00331 } thread_info_t; 00332 00333 #ifdef HAVE_THREAD 00334 00335 struct link_configuration; 00336 struct if_group_entry; 00337 00338 /* Ceil log2 function Needed to calculate specific values for thread TLVs. 00339 * This is very approximate 00340 */ 00341 uint16_t thread_log2_aprx(uint32_t n); 00342 00343 void thread_anycast_address_policy_update(const thread_info_t *thread_info, bool addPolicy); 00344 00345 #define thread_info(cur) ((cur)->thread_info) 00346 #define thread_am_reed(cur) ((cur)->thread_info && (cur)->thread_info->thread_attached_state == THREAD_STATE_CONNECTED && (cur)->thread_info->thread_device_mode == THREAD_DEVICE_MODE_ROUTER) 00347 #define thread_am_router(cur) ((cur)->thread_info && (cur)->thread_info->thread_attached_state == THREAD_STATE_CONNECTED_ROUTER && (cur)->thread_info->thread_device_mode == THREAD_DEVICE_MODE_ROUTER) 00348 #define thread_is_connected(cur) ((cur)->thread_info && ((cur)->thread_info->thread_attached_state == THREAD_STATE_CONNECTED || (cur)->thread_info->thread_attached_state == THREAD_STATE_CONNECTED_ROUTER)) 00349 #define thread_am_host(cur) ((cur)->thread_info && \ 00350 ((cur)->thread_info->thread_device_mode == THREAD_DEVICE_MODE_SLEEPY_END_DEVICE ||\ 00351 (cur)->thread_info->thread_device_mode == THREAD_DEVICE_MODE_END_DEVICE ||\ 00352 (cur)->thread_info->thread_device_mode == THREAD_DEVICE_MODE_FULL_END_DEVICE)) 00353 00354 //int thread_configuration_save(thread_info_t *thread_info, link_configuration_s *leader_link_setup); 00355 00356 bool thread_leader_commissioner_create(thread_info_t *thread_info); 00357 void thread_leader_commissioner_free(thread_info_t *thread_info); 00358 00359 bool thread_leader_data_parse(uint8_t *ptr, uint16_t dataLength, thread_leader_data_t *leaderDataBuf); 00360 bool thread_connectivity_tlv_parse(uint8_t *ptr, uint16_t dataLength, thread_connectivity_t *connectivityTlv); 00361 00362 thread_leader_data_t *thread_leader_data_get(thread_info_t *info); 00363 thread_parent_info_t *thread_parent_data_allocate(thread_info_t *info); 00364 void thread_data_base_init(thread_info_t *thread_info, int8_t interfaceId); 00365 int thread_info_allocate_and_init(protocol_interface_info_entry_t *cur); 00366 void thread_info_deallocate(protocol_interface_info_entry_t *cur); 00367 int thread_init(protocol_interface_info_entry_t *cur); 00368 int thread_attach_ready(protocol_interface_info_entry_t *cur); 00369 bool thread_attach_active_router(protocol_interface_info_entry_t *cur); 00370 bool thread_scan_mask_validation(protocol_interface_info_entry_t *cur, uint8_t mask); 00371 int thread_route_ready_to_leader(protocol_interface_info_entry_t *cur); 00372 void thread_timer(protocol_interface_info_entry_t *cur, uint8_t ticks); 00373 void thread_seconds_timer(protocol_interface_info_entry_t *cur, uint32_t ticks); 00374 bool thread_insist_that_mesh_isnt_a_link(const protocol_interface_info_entry_t *cur); 00375 bool thread_addr_is_mesh_local(const uint8_t *addr, const protocol_interface_info_entry_t *cur); 00376 bool thread_on_mesh_route_possible_add(thread_attach_device_mode_e threadMode); 00377 bool thread_addr_is_mesh_local_16(const uint8_t *addr, const protocol_interface_info_entry_t *cur); 00378 uint8_t *thread_addr_write_mesh_local_16(uint8_t ip_addr_out[16], uint16_t addr16, const thread_info_t *thread_info); 00379 int thread_leader_ul16_address_get(thread_info_t *thread_info, uint8_t *address_ptr); 00380 void thread_network_data_request_send(protocol_interface_info_entry_t *cur, uint8_t *requestDstAddress, bool delaydTrig); 00381 uint16_t thread_network_data_generate_stable_set(protocol_interface_info_entry_t *cur, uint8_t *result_ptr); 00382 00383 void thread_set_active_router(protocol_interface_info_entry_t *cur, if_address_entry_t *address_entry, uint8_t *routerId); 00384 uint8_t thread_get_router_count_from_route_tlv(mle_tlv_info_t *routeTlv); 00385 void thread_reset_neighbour_info(protocol_interface_info_entry_t *cur, struct mac_neighbor_table_entry *neighbour); 00386 00387 void thread_child_id_request_entry_clean(protocol_interface_info_entry_t *cur); 00388 thread_pending_child_id_req_t *thread_child_id_request_entry_get(protocol_interface_info_entry_t *cur, uint8_t *euid64); 00389 void thread_child_id_request_entry_remove(protocol_interface_info_entry_t *cur, thread_pending_child_id_req_t *entry); 00390 thread_pending_child_id_req_t *thread_child_id_request_entry_get_from_the_list(protocol_interface_info_entry_t *cur); 00391 00392 thread_mcast_child_t *thread_child_mcast_entry_get(protocol_interface_info_entry_t *cur, const uint8_t *mcast_addr, const uint8_t *mac64); 00393 void thread_registered_mcast_addr_entry_clean(protocol_interface_info_entry_t *cur); 00394 thread_registered_mcast_addr_t *thread_registered_mcast_addr_entry_find(protocol_interface_info_entry_t *cur, const uint8_t *mcast_addr); 00395 void thread_child_mcast_entries_remove(protocol_interface_info_entry_t *cur, const uint8_t *mac64); 00396 00397 uint8_t thread_leader_data_tlv_size(protocol_interface_info_entry_t *cur); 00398 uint8_t *thread_leader_data_tlv_write(uint8_t *ptr, protocol_interface_info_entry_t *cur); 00399 uint8_t *thread_address_registration_tlv_write(uint8_t *ptr, protocol_interface_info_entry_t *cur); 00400 int thread_link_reject_send(protocol_interface_info_entry_t *interface, const uint8_t *ll64); 00401 thread_leader_info_t *thread_allocate_and_init_leader_private_data(void); 00402 thread_route_cost_t thread_link_quality_to_cost(thread_link_quality_e quality); 00403 thread_route_cost_t thread_link_cost_sum(thread_route_cost_t a, thread_route_cost_t b); 00404 thread_link_quality_e thread_link_margin_to_quality(thread_link_margin_t margin); 00405 uint_fast8_t thread_sum_rx_path_cost_and_link_cost(uint8_t inMargim, uint8_t outMargin, uint8_t pathCost); 00406 /* 00407 * Thread beacon payload handling functions 00408 */ 00409 int8_t thread_beacon_create_payload(struct protocol_interface_info_entry *cur); 00410 uint8_t thread_beacon_indication(uint8_t *ptr, uint8_t len, protocol_interface_info_entry_t *cur); 00411 00412 int thread_network_data_propagation(struct protocol_interface_info_entry *cur, uint8_t *childUnicastAddress, bool fullList); 00413 00414 uint8_t thread_route_option_size(protocol_interface_info_entry_t *cur); 00415 uint8_t *thread_route_option_write(protocol_interface_info_entry_t *cur, uint8_t *ptr); 00416 00417 /*Generic Thread TLV write*/ 00418 uint8_t *thread_connectivity_tlv_write(uint8_t *ptr, protocol_interface_info_entry_t *cur, uint8_t mode); 00419 00420 /*Network data TLV write*/ 00421 uint16_t thread_network_data_tlv_size(struct protocol_interface_info_entry *cur, bool fulllist); 00422 uint8_t *thread_network_data_tlv_write(struct protocol_interface_info_entry *cur, uint8_t *ptr, bool fulllist); 00423 00424 /* Active and pending operational dataset write*/ 00425 uint8_t *thread_active_timestamp_write(protocol_interface_info_entry_t *cur, uint8_t *ptr); 00426 uint16_t thread_active_operational_dataset_size(protocol_interface_info_entry_t *cur); 00427 uint8_t *thread_active_operational_dataset_write(protocol_interface_info_entry_t *cur, uint8_t *ptr); 00428 bool thread_active_operational_dataset_process(protocol_interface_info_entry_t *cur, uint8_t *ptr, uint16_t len, uint64_t dataset_timestamp); 00429 uint8_t *thread_pending_timestamp_write(protocol_interface_info_entry_t *cur, uint8_t *ptr); 00430 uint16_t thread_pending_operational_dataset_size(protocol_interface_info_entry_t *cur); 00431 uint8_t *thread_pending_operational_dataset_write(protocol_interface_info_entry_t *cur, uint8_t *ptr); 00432 bool thread_pending_operational_dataset_process(protocol_interface_info_entry_t *cur, uint64_t mle_pending_timestamp, uint8_t *ptr, uint16_t len); 00433 /*Write optional thread leader data TLV if leader data is known*/ 00434 uint8_t thread_pending_timestamp_tlv_size(protocol_interface_info_entry_t *cur); 00435 void thread_key_guard_timer_calculate(protocol_interface_info_entry_t *cur, link_configuration_s *linkConfiguration, bool is_init); 00436 void thread_key_guard_timer_reset(protocol_interface_info_entry_t *cur); 00437 void thread_set_link_local_address(protocol_interface_info_entry_t *cur); 00438 void thread_mcast_group_change(struct protocol_interface_info_entry *interface, struct if_group_entry *group, bool group_added); 00439 void thread_partition_data_purge(protocol_interface_info_entry_t *cur); 00440 bool thread_partition_match(protocol_interface_info_entry_t *cur, thread_leader_data_t *leaderData); 00441 void thread_partition_info_update(protocol_interface_info_entry_t *cur, thread_leader_data_t *leaderData); 00442 void thread_neighbor_communication_update(protocol_interface_info_entry_t *cur, uint8_t neighbor_attribute_index); 00443 bool thread_stable_context_check(protocol_interface_info_entry_t *cur, buffer_t *buf); 00444 #else // HAVE_THREAD 00445 00446 NS_DUMMY_DEFINITIONS_OK 00447 #define thread_stable_context_check(cur, buf) (false) 00448 #define thread_info(cur) ((thread_info_t *) NULL) 00449 #define thread_am_router(cur) (false) 00450 #define thread_am_host(cur) (false) 00451 00452 #define thread_addr_is_mesh_local(addr, cur) false 00453 #define thread_addr_is_mesh_local_16(addr, cur) false 00454 #define thread_timer(cur, ticks) ((void) 0) 00455 #define thread_seconds_timer(cur, ticks) ((void) 0) 00456 #define thread_insist_that_mesh_isnt_a_link(cur) false 00457 #define thread_attach_ready(cur) 0 00458 #define thread_info_allocate_and_init(cur) (-1) 00459 #define thread_info_deallocate(cur) ((void)0) 00460 #define thread_network_data_propagation(cur, childUnicastAddress, fullList) (void(-1)) 00461 #define thread_link_reject_send(interface, ll64) 0 00462 #define thread_addr_is_mesh_local_16(addr, cur) false 00463 #define thread_mcast_group_change(interface, group, group_added) ((void)0) 00464 #define thread_neighbor_communication_update(cur, neighbor_attribute_index) ((void)0) 00465 #endif // HAVE_THREAD 00466 00467 #endif /* LOWPAN_THREAD_H_ */
Generated on Tue Aug 9 2022 00:37:22 by
1.7.2