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
icmpv6_radv.h
00001 /* 00002 * Copyright (c) 2014-2015, 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 #ifndef _ICMPV6_RADV_H 00018 #define _ICMPV6_RADV_H 00019 00020 /* Slightly awkward - want to use a positive define internally, but avoid the 00021 * need for normal people to define it. So library configurations can set 00022 * NO_RADV_TX to disable Router Advertisements. Current saving is a little over 00023 * 2K of code. 00024 */ 00025 #if !defined NO_RADV_TX && !defined RADV_TX 00026 #define RADV_TX 00027 #endif 00028 00029 #ifdef RADV_TX 00030 struct protocol_interface_info_entry; 00031 struct buffer; 00032 00033 void icmpv6_radv_init(struct protocol_interface_info_entry *cur); 00034 struct buffer *icmpv6_rs_handler(struct buffer *buf , struct protocol_interface_info_entry *cur); 00035 void icmpv6_radv_timer(uint16_t ticks); 00036 void icmpv6_restart_router_advertisements(struct protocol_interface_info_entry *cur, const uint8_t abro[16]); 00037 void icmpv6_stop_router_advertisements(struct protocol_interface_info_entry *cur, const uint8_t *abro); 00038 void icmpv6_trigger_ra_from_rs(struct protocol_interface_info_entry *cur, const uint8_t dest[16], const uint8_t abro[16]); 00039 00040 #define icmpv6_radv_enable(cur) ((void) ((cur)->adv_send_advertisements = true)) 00041 #define icmpv6_radv_disable(cur) ((void) ((cur)->adv_send_advertisements = false)) 00042 #define icmpv6_radv_is_enabled(cur) (cur)->adv_send_advertisements 00043 #define icmpv6_radv_max_rtr_adv_interval(cur) (cur)->max_rtr_adv_interval 00044 00045 #else /* RADV_TX */ 00046 00047 /* Dummy definitions */ 00048 #define icmpv6_radv_init(cur) ((void) 0) 00049 #define icmpv6_rs_handler(buf, cur) buffer_free(buf) 00050 #define icmpv6_radv_timer(x) ((void) 0) 00051 #define icmpv6_restart_router_advertisements(cur, abro) ((void) 0) 00052 #define icmpv6_stop_router_advertisements(cur, abro) ((void) 0) 00053 #define icmpv6_trigger_ra_from_rs(cur, dest, abro) ((void) 0) 00054 00055 #define icmpv6_radv_enable(cur) ((void) (0)) 00056 #define icmpv6_radv_disable(cur) ((void) (0)) 00057 #define icmpv6_radv_is_enabled(cur) false 00058 #define icmpv6_radv_max_rtr_adv_interval(cur) 6000 /* RFC 4861 default */ 00059 #endif /* RADV_TX */ 00060 00061 #endif /* _ICMPV6_RADV_H */
Generated on Tue Jul 12 2022 13:54:24 by
