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.
Fork of OmniWheels by
net_ipv6.c
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 #include "nsconfig.h" 00019 00020 #include <string.h> 00021 #include "ns_types.h" 00022 #include "nsdynmemLIB.h" 00023 00024 #include "Core/include/address.h" 00025 #include "Common_Protocols/ipv6_flow.h" 00026 #include "Common_Protocols/ipv6_fragmentation.h" 00027 #include "NWK_INTERFACE/Include/protocol.h" 00028 00029 #include "net_ipv6_api.h" 00030 00031 #include "ns_trace.h" 00032 00033 #define TRACE_GROUP "nip6" 00034 00035 int8_t arm_nwk_ipv6_frag_mru(uint16_t frag_mru) 00036 { 00037 uint16_t set_mru = ipv6_frag_set_mru(frag_mru); 00038 return set_mru >= frag_mru ? 0 : -1; 00039 } 00040 00041 int8_t arm_nwk_ipv6_max_cache_entries(uint16_t max_entries) 00042 { 00043 return ipv6_neighbour_set_current_max_cache(max_entries); 00044 } 00045 00046 void arm_nwk_ipv6_auto_flow_label(bool auto_flow_label) 00047 { 00048 ipv6_flow_auto_label = auto_flow_label; 00049 } 00050 00051 int8_t arm_nwk_ipv6_opaque_iid_key(const void *secret_key, uint8_t key_len) 00052 { 00053 return addr_opaque_iid_key_set(secret_key, key_len); 00054 } 00055 00056 int8_t arm_nwk_ipv6_opaque_iid_enable(int8_t interface_id, bool enable) 00057 { 00058 protocol_interface_info_entry_t *cur = protocol_stack_interface_info_get_by_id(interface_id); 00059 if (!cur ) { 00060 return -1; 00061 } 00062 00063 cur->opaque_slaac_iids = enable; 00064 return 0; 00065 }
Generated on Fri Jul 22 2022 04:53:57 by
