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
ws_bbr_api.h
00001 /* 00002 * Copyright (c) 2017-2019, 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 ws_bbr_api.h 00020 * \brief Wi-SUN backbone border router (BBR) application interface. 00021 * 00022 * This is Wi-SUN backbone Border router service. 00023 * When started the module takes care of starting the 00024 * components that enables default border router functionality in Wi-SUN network. 00025 * 00026 */ 00027 00028 #ifndef WS_BBR_API_H_ 00029 #define WS_BBR_API_H_ 00030 00031 #include "ns_types.h" 00032 00033 /** 00034 * Start backbone border router service. 00035 * 00036 * if backbone interface is enabled and allows routing. 00037 * Enables ND proxy for address found from backbone 00038 * 00039 * \param interface_id Wi-SUN network interface id. 00040 * \param backbone_interface_id backbone interface id. 00041 * 00042 * \return 0 on success 00043 * \return <0 in case of errors 00044 * 00045 */ 00046 int ws_bbr_start(int8_t interface_id, int8_t backbone_interface_id); 00047 00048 /** 00049 * Border router configuration options 00050 */ 00051 #define BBR_ULA_C 0x0001 /**< Static ULA prefix created automatically */ 00052 #define BBR_GUA_ROUTE 0x0002 /**< More specific route is added for GUA prefix */ 00053 #define BBR_BB_WAIT 0x0004 /**< Wait backbone availability before starting Wi-SUN network */ 00054 00055 /*Deprecated configuration values */ 00056 #define BBR_GUA_C 0x0000 /**< Routable prefix is learned from the backbone */ 00057 #define BBR_GUA_SLAAC 0x0000 /**< Use SLAAC addressing in routable prefix */ 00058 #define BBR_GUA_WAIT 0x0000 /**< Wait backbone availability before startingRPL dodag */ 00059 00060 /** 00061 * Configure border router features. 00062 * 00063 * \param interface_id interface ID of the Wi-SUN network 00064 * \param options Options configured to Border router 00065 * BBR_ULA_C Configure Mesh local ULA prefix with SLAAC address 00066 * BBR_GUA_ROUTE Add more specific route for GUA 00067 * BBR_BB_WAIT Start Wi-SUN network only when backbone is ready 00068 * 00069 * By default Wi-SUN network is started and is treated as separate interface even if backbone is not available. 00070 * 00071 * Default route RPL options when backbone is set up. RPL root is always Grounded 00072 * 00073 * \return 0 on success 00074 * \return <0 in case of errors 00075 * 00076 */ 00077 int ws_bbr_configure(int8_t interface_id, uint16_t options); 00078 /** 00079 * Stop backbone Border router. 00080 * 00081 * \param interface_id interface ID of the Wi-SUN network 00082 * 00083 * \return 0 on success 00084 * \return <0 in case of errors 00085 * 00086 */ 00087 void ws_bbr_stop(int8_t interface_id); 00088 00089 /** 00090 * Remove node's keys from border router 00091 * 00092 * Removes node's keys from border router i.e. Pairwise Master Key (PMK) 00093 * and Pairwise Transient Key (PTK). This function is used on revocation of 00094 * node's access procedure after authentication service is configured 00095 * to reject authentication attempts of the node (e.g. node's certificate is 00096 * revoked). Sub sequential calls to function can be used to remove several 00097 * nodes from border router. 00098 * 00099 * \param interface_id Network interface ID. 00100 * \param eui64 EUI-64 of revoked node 00101 * 00102 * \return 0, Node's keys has been removed 00103 * \return <0 Node's key remove has failed (e.g. unknown address) 00104 */ 00105 int ws_bbr_node_keys_remove(int8_t interface_id, uint8_t *eui64); 00106 00107 /** 00108 * Start revocation of node's access 00109 * 00110 * Starts revocation of node's access procedure on border router. Before 00111 * the call to this function, authentication service must be configured to 00112 * reject authentication attempts of the removed nodes (e.g. certificates 00113 * of the nodes are revoked). Also the keys for the nodes must be removed 00114 * from the border router. 00115 * 00116 * \param interface_id Network interface ID. 00117 * 00118 * \return 0, Revocation started OK. 00119 * \return <0 Revocation start failed. 00120 */ 00121 int ws_bbr_node_access_revoke_start(int8_t interface_id); 00122 00123 /** 00124 * Set EAPOL node limit 00125 * 00126 * Border router stores EAPOL key information for each authenticated node. 00127 * Sets the maximum number of EAPOL nodes stored by border router. If count 00128 * of node's exceed the limit, border router deletes the node information 00129 * starting from oldest node (node that has authenticated longest time 00130 * ago), to make room for new nodes. When network keys are updated, nodes 00131 * which have been removed from storage, must make full authentication again. 00132 * Value for this parameter should be set to be more than maximum amount of 00133 * nodes that are expected to be connected to border router. 00134 * 00135 * \param interface_id Network interface ID. 00136 * \param limit Limit for nodes 00137 * 00138 * \return 0, Node limit set 00139 * \return <0 Node limit set failed. 00140 */ 00141 int ws_bbr_eapol_node_limit_set(int8_t interface_id, uint16_t limit); 00142 00143 /** 00144 * Extended certificate validation 00145 */ 00146 #define BBR_CRT_EXT_VALID_NONE 0x00 /**< Do not make extended validations */ 00147 #define BBR_CRT_EXT_VALID_WISUN 0x01 /**< Validate Wi-SUN specific fields */ 00148 00149 /** 00150 * Sets extended certificate validation setting 00151 * 00152 * Sets extended certificate validation setting on border router. Function can be used 00153 * to set which fields on client certificate are validated. 00154 * 00155 * \param interface_id Network interface ID 00156 * \param validation Extended Certificate validation setting 00157 * BBR_CRT_EXT_VALID_NONE Do not make extended validations 00158 * BBR_CRT_EXT_VALID_WISUN Validate Wi-SUN specific fields 00159 * 00160 * \return 0 Validation setting was set 00161 * \return <0 Setting set failed 00162 */ 00163 int ws_bbr_ext_certificate_validation_set(int8_t interface_id, uint8_t validation); 00164 00165 #endif /* WS_BBR_API_H_ */
Generated on Tue Jul 12 2022 13:55:04 by
1.7.2