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_ipv6_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_ipv6_api.h 00020 * \brief IPv6 configuration API. 00021 */ 00022 00023 #ifndef NET_IPV6_API_H_ 00024 #define NET_IPV6_API_H_ 00025 00026 #include "ns_types.h" 00027 00028 /** 00029 * \brief Set maximum IPv6 fragmented datagram reception size. 00030 * 00031 * Set the maximum size limit for fragmented datagram reception. 00032 * 00033 * RFC 2460 requires this to be at least 1500. It should also be at least 00034 * as large as the MTU of each attached link. 00035 * 00036 * \param frag_mru The fragmented Maximum Receive Unit in octets. 00037 * \return 0 Change OK - actual MRU is at least the requested value. 00038 * \return <0 Change invalid - unable to set the specified MRU. 00039 */ 00040 int8_t arm_nwk_ipv6_frag_mru(uint16_t frag_mru); 00041 00042 /** 00043 * \brief Set the maximum number of entries for the neighbour cache and 00044 * destination cache. Default value is 64 and minimum allowed value is 4. 00045 * 00046 * Note: This must be called before arm_nwk_interface_lowpan_init() 00047 * 00048 * \param max_entries The absolute maximum entries allowed in cache at any time. 00049 * \return 0 Change OK. 00050 * \return <0 Change invalid - unable to change the maximum for cache. 00051 */ 00052 int8_t arm_nwk_ipv6_max_cache_entries(uint16_t max_entries); 00053 00054 /** 00055 * \brief Configure automatic flow label calculation. 00056 * 00057 * Enable or disable automatic generation of IPv6 flow labels for outgoing 00058 * packets. 00059 * 00060 * \param auto_flow_label True to enable auto-generation. 00061 */ 00062 void arm_nwk_ipv6_auto_flow_label(bool auto_flow_label); 00063 00064 /** 00065 * \brief Set the key for opaque IPv6 interface identifiers 00066 * 00067 * This call sets the secret key used to generate opaque interface identifiers, 00068 * as per RFC 7217. Once this has been set, all interfaces will use opaque 00069 * interface identifiers by default. If secret_key is NULL, opaque interface 00070 * identifiers will be disabled. 00071 * 00072 * Correct implementation of RFC 7217 would require that this key be 00073 * randomly generated at first bootstrap, and thereafter remain constant, which 00074 * would require non-volatile storage. The next closest alternative would be 00075 * to base this on a MAC address. 00076 * 00077 * \param secret_key A pointer to secret key (will be copied by call). 00078 * \param key_len The length of the key. 00079 * 00080 * \return 0 key set okay. 00081 * \return <0 key set failed (for example due to memory allocation). 00082 */ 00083 int8_t arm_nwk_ipv6_opaque_iid_key(const void *secret_key, uint8_t key_len); 00084 00085 /** 00086 * \brief Enable/disable opaque IPv6 interface identifiers by interface 00087 * 00088 * Enable or disable RFC 7217 opaque IIDs generated by SLAAC, per interface. 00089 * By default opaque IIDs are enabled if the opaque key is set. If disabled, 00090 * SLAAC IIDs will be EUI-64-based as per RFC 4291. 00091 * 00092 * \param interface_id Interface ID. 00093 * \param enable True to enable. 00094 * \return 0 enabled/disabled OK. 00095 * \return <0 failed (for example invalid interface ID). 00096 * 00097 */ 00098 int8_t arm_nwk_ipv6_opaque_iid_enable(int8_t interface_id, bool enable); 00099 00100 #endif /* NET_IPV6_API_H_ */
Generated on Tue Jul 12 2022 12:45:36 by
