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.
net_mle_api.h
00001 /* 00002 * Copyright (c) 2016-2017, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 /** 00019 * \file net_mle_api.h 00020 * \brief 6LoWPAN MLE options control API 00021 * 00022 */ 00023 #ifndef _NET_MLE_API_H 00024 #define _NET_MLE_API_H 00025 00026 #include "ns_types.h" 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 /** 00033 * \brief Set default MLE neighbor lifetime for a router. 00034 * 00035 * \param interface_id Interface ID. 00036 * \param lifetime Lifetime in seconds. 64 to 2560. 00037 * 00038 * \return 0, Lifetime update OK. 00039 * \return < 0, Lifetime update fail. 00040 * 00041 */ 00042 int8_t arm_nwk_6lowpan_mle_router_lifetime_set(int8_t interface_id, uint16_t lifetime); 00043 00044 /** 00045 * \brief Set default MLE neighbor lifetime for a host. 00046 * 00047 * \param interface_id Interface ID. 00048 * \param lifetime Lifetime in seconds. 64 to 2560. 00049 * 00050 * \return 0, Lifetime update OK. 00051 * \return < 0, Lifetime update fail. 00052 * 00053 */ 00054 int8_t arm_nwk_6lowpan_mle_host_lifetime_set(int8_t interface_id, uint16_t lifetime); 00055 00056 /** 00057 * \brief Set MLE neighbor list limits. 00058 * 00059 * The MLE neighbor limits configuration settings limit the number of neighbors 00060 * added to the MLE neighbor list. 00061 * 00062 * If the number of neighbors reaches the lower threshold, MLE starts to limit addition 00063 * of new neighbors. Multicast MLE messages from unknown neighbors are ignored (ignore probability is randomized). 00064 * The value must be smaller than the upper threshold and maximum value. 00065 * 00066 * If the number of neighbors reaches the upper threshold, MLE stops adding new neighbors 00067 * based on the multicast MLE messages. Only nodes that select this node for a 00068 * parent during the bootstrap will be accepted. The value must be smaller than or the same as 00069 * the maximum value. 00070 * 00071 * If the number of neighbors reaches the maximum value, no new neighbors are added. 00072 * 00073 * If the MLE neighbor list limits are not used, all values must be set to 0. 00074 * 00075 * \param interface_id Interface ID. 00076 * \param lower_threshold Lower threshold. 5 to 499. 0 limits not used. 00077 * \param upper_threshold Upper threshold. 5 to 500. 0 limits not used. 00078 * \param max Maximum number of neighbors. 5 to 500. 0 limits not used. 00079 * 00080 * \return 0, Limits update OK. 00081 * \return < 0, Limits update fail. 00082 * 00083 */ 00084 int8_t arm_nwk_6lowpan_mle_neighbor_limits_set(int8_t interface_id, uint16_t lower_threshold, uint16_t upper_threshold, uint16_t max); 00085 00086 /** 00087 * \brief Set MLE message token bucket settings 00088 * 00089 * The MLE message token bucket limits the MLE message sending rate. The token bucket size 00090 * controls the bucket size. The token bucket rate controls the rate in which 00091 * new tokens are added. The count defines how many tokens at a time are added to the bucket. 00092 * 00093 * The rate is entered in multiplies of 0.1 second minimum interval (for example, if rate is 3 00094 * and count is 4 then 4 new tokens are added to bucket every 0.3 seconds). 00095 * 00096 * If the token bucket is not used, all values must be set to 0. 00097 * 00098 * \param interface_id Interface ID. 00099 * \param size Bucket size. 1 to 255. 0 token bucket not used. 00100 * \param rate Token rate. 1 to 255. 0 token bucket not used. 00101 * \param count Token count. 1 to 255. 0 token bucket not used. 00102 * 00103 * \return 0, Token bucket settings update OK. 00104 * \return < 0, Token bucket settings update fail. 00105 * 00106 */ 00107 int8_t arm_nwk_6lowpan_mle_token_bucket_settings_set(int8_t interface_id, uint8_t size, uint8_t rate, uint8_t count); 00108 00109 #ifdef __cplusplus 00110 } 00111 #endif 00112 #endif /* _NET_MLE_API_H */
Generated on Tue Jul 12 2022 14:24:29 by
