Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers thread_router_bootstrap.h Source File

thread_router_bootstrap.h

00001 /*
00002  * Copyright (c) 2015-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 
00030 /*
00031  * \file thread_router_bootstrap.h
00032  * \brief Add short description about this file!!!
00033  *
00034  */
00035 
00036 #ifndef THREAD_ROUTER_BOOTSTRAP_H_
00037 #define THREAD_ROUTER_BOOTSTRAP_H_
00038 #include "Service_Libs/mle_service/mle_service_api.h"
00039 
00040 #ifdef HAVE_THREAD_ROUTER
00041 
00042 struct protocol_interface_info_entry;
00043 struct thread_info_s;
00044 struct mle_security_header;
00045 struct buffer;
00046 struct mac_neighbor_table_entry;
00047 
00048 void thread_router_bootstrap_reed_advertisements_start(protocol_interface_info_entry_t *cur);
00049 void thread_router_bootstrap_reed_merge_advertisement(protocol_interface_info_entry_t *cur);
00050 int thread_router_bootstrap_mle_advertise(struct protocol_interface_info_entry *cur);
00051 
00052 void thread_router_bootstrap_child_information_clear(protocol_interface_info_entry_t *cur);
00053 int thread_router_bootstrap_reset_child_info(protocol_interface_info_entry_t *cur, struct mac_neighbor_table_entry *child);
00054 uint16_t thread_router_bootstrap_child_count_get(protocol_interface_info_entry_t *cur);
00055 
00056 // max_child_timeout is longest MLE Timeout a router has registered for all of its active MTD children
00057 int thread_router_bootstrap_child_max_timeout_get(protocol_interface_info_entry_t *cur, uint32_t *max_child_timeout);
00058 void thread_router_bootstrap_child_id_handler(struct protocol_interface_info_entry *cur);
00059 void thread_router_bootstrap_child_id_reject(struct protocol_interface_info_entry *cur);
00060 void thread_router_bootstrap_router_id_request(struct protocol_interface_info_entry *cur, uint8_t status);
00061 void thread_router_bootstrap_router_id_release(struct protocol_interface_info_entry *cur);
00062 
00063 
00064 int thread_router_bootstrap_link_synch_start(struct protocol_interface_info_entry *cur);
00065 bool thread_router_bootstrap_router_downgrade(struct protocol_interface_info_entry *cur);
00066 bool thread_router_bootstrap_reed_upgrade(struct protocol_interface_info_entry *cur);
00067 void thread_router_bootstrap_active_router_attach(struct protocol_interface_info_entry *cur);
00068 int thread_router_bootstrap_route_tlv_push(protocol_interface_info_entry_t *cur, uint8_t *route_tlv, uint8_t route_len, uint8_t linkMargin, struct mac_neighbor_table_entry *entry);
00069 void thread_router_bootstrap_mle_receive_cb(int8_t interface_id, mle_message_t *mle_msg, struct mle_security_header *security_headers);
00070 void thread_router_bootstrap_timer(protocol_interface_info_entry_t *cur, uint32_t ticks);
00071 uint32_t thread_router_bootstrap_random_upgrade_jitter(void);
00072 void thread_router_bootstrap_advertiment_analyze(protocol_interface_info_entry_t *cur, uint8_t *src_address, struct mac_neighbor_table_entry *entry_temp, uint16_t shortAddress);
00073 
00074 void thread_router_bootstrap_multicast_forwarder_enable(protocol_interface_info_entry_t *cur, buffer_t *buf);
00075 void thread_router_bootstrap_anycast_address_register(protocol_interface_info_entry_t *cur);
00076 void thread_router_bootstrap_network_data_distribute(protocol_interface_info_entry_t *cur);
00077 bool thread_router_bootstrap_routing_allowed(struct protocol_interface_info_entry *cur);
00078 void thread_router_bootstrap_address_change_notify_send(protocol_interface_info_entry_t *cur);
00079 void thread_router_bootstrap_delay_reed_jitter(int8_t interface_id, uint16_t delay);
00080 
00081 #else
00082 
00083 #define thread_router_bootstrap_reed_advertisements_start(cur)
00084 #define thread_router_bootstrap_mle_advertise(cur) (-1)
00085 
00086 #define thread_router_bootstrap_child_information_clear(cur)
00087 #define thread_router_bootstrap_child_count_get(cur) 0
00088 #define thread_router_bootstrap_child_max_timeout_get(cur, max_child_timeout) 0
00089 #define thread_router_bootstrap_child_id_handler(cur)
00090 #define thread_router_bootstrap_child_id_reject(cur)
00091 #define thread_router_bootstrap_router_id_request(cur, status)
00092 #define thread_router_bootstrap_router_id_release(cur)
00093 
00094 #define thread_router_bootstrap_link_synch_start(cur) (-1)
00095 #define thread_router_bootstrap_router_downgrade(cur) false
00096 #define thread_router_bootstrap_reed_upgrade(cur) false
00097 #define thread_router_bootstrap_active_router_attach(cur)
00098 #define thread_router_bootstrap_routing_activate(cur)
00099 #define thread_router_bootstrap_route_tlv_push(cur, route_tlv, route_len, linkMargin, entry)
00100 #define thread_router_bootstrap_mle_receive_cb(interface_id,mle_msg, security_headers)
00101 #define thread_router_bootstrap_timer(cur, ticks)
00102 #define thread_router_bootstrap_random_upgrade_jitter() 0;
00103 #define thread_router_bootstrap_advertiment_analyze(cur, src_address, entry_temp, shortAddress)
00104 #define thread_router_bootstrap_reset_child_info(cur, child) 0
00105 
00106 #define thread_router_bootstrap_multicast_forwarder_enable(cur, buf) NULL
00107 #define thread_router_bootstrap_anycast_address_register(cur)
00108 #define thread_router_bootstrap_network_data_distribute(cur)
00109 #define thread_router_bootstrap_routing_allowed(cur) false
00110 #define thread_router_bootstrap_address_change_notify_send(cur)
00111 #define thread_router_bootstrap_reed_merge_advertisement(cur)
00112 #define thread_router_bootstrap_delay_reed_jitter(interface_id, delay)
00113 #endif/*HAVE_THREAD_ROUTER*/
00114 
00115 #endif /* THREAD_ROUTER_BOOTSTRAP_H_ */