BA
/
BaBoRo1
Embed:
(wiki syntax)
Show/hide line numbers
protocol_ipv6.h
00001 /* 00002 * Copyright (c) 2014-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 #ifndef PROTOCOL_IPV6_H_ 00019 #define PROTOCOL_IPV6_H_ 00020 00021 #ifdef HAVE_ETHERNET 00022 00023 struct protocol_interface_info_entry; 00024 00025 /** 00026 * \brief Initialize Ethernet MAC and IPv6 base 00027 * 00028 * Call only once at bootstrap. 00029 * 00030 * \param mac_address pointer to 48-bit MAC address 00031 * 00032 * \return 0> Interface ID for IPv6 00033 * \return -1 Init fail 00034 * 00035 */ 00036 extern int8_t ipv6_MAC_init(int8_t ethernet_dev_driver_id); 00037 00038 void ipv6_interface_phy_sap_register(struct protocol_interface_info_entry *cur); 00039 00040 int8_t ipv6_interface_configure_ipv6_bootstrap_set(int8_t interface_id, net_ipv6_mode_e bootstrap_mode, const uint8_t *ipv6_prefix_pointer); 00041 00042 /** 00043 * \brief Ethernet IPv6 Interface Configure 00044 * 00045 * \param cur pointer to interface pointer. 00046 * 00047 */ 00048 extern int8_t ipv6_interface_up(struct protocol_interface_info_entry *cur); 00049 /** 00050 * \brief Disable IPv6 protocol stack 00051 */ 00052 extern int8_t ipv6_interface_down(struct protocol_interface_info_entry *cur); 00053 00054 struct ipv6_neighbour; 00055 struct ipv6_neighbour_cache; 00056 struct buffer; 00057 struct protocol_interface_info_entry; 00058 00059 void ipv6_core_timer_event_handle(struct protocol_interface_info_entry *cur, uint8_t event); 00060 void ipv6_core_slow_timer_event_handle(struct protocol_interface_info_entry *cur); 00061 00062 int ipv6_prefix_register(uint8_t *prefix_64, uint32_t lifetime, uint32_t prefer_lifetime); 00063 int ipv6_prefix_router_flag_activate(uint8_t *ipv6_address); 00064 00065 void ipv6_nd_ra_advert(struct protocol_interface_info_entry *cur, const uint8_t *dest); 00066 void ipv6_interface_slaac_handler(struct protocol_interface_info_entry *cur, uint8_t *slaacPrefix, uint8_t prefixLen, uint32_t validLifeTime, uint32_t preferredLifeTime); 00067 void ipv6_stack_route_advert_update(uint8_t *address, uint8_t prefixLength, uint8_t routePrefer); 00068 void ipv6_stack_route_advert_remove(uint8_t *address, uint8_t prefixLength); 00069 void ipv6_prefix_on_link_update(uint8_t *address); 00070 void ipv6_prefix_on_link_remove(uint8_t *address); 00071 int8_t ipv6_interface_accept_ra(int8_t interface_id, net_ipv6_accept_ra_e accept_ra); 00072 #else 00073 #define ipv6_interface_configure_ipv6_bootstrap_set(nwk_interface_id, bootstrap_mode, ipv6_prefix_pointer) -1 00074 #define ipv6_core_slow_timer_event_handle(cur) ((void)0) 00075 #define ipv6_core_timer_event_handle(cur, event) ((void)0) 00076 #define ipv6_interface_slaac_handler(cur, slaacPrefix, prefixLen, validLifeTime, preferredLifeTime) ((void)0) 00077 #define ipv6_nd_ra_advert(cur, dest) ((void)0) 00078 #define ipv6_interface_sitelocal_clone(buf) ((void)0) 00079 #define ipv6_stack_route_advert_remove(address, prefixLength) ((void)0) 00080 #define ipv6_prefix_on_link_update(address) ((void)0) 00081 #define ipv6_prefix_on_link_remove(address) ((void)0) 00082 #define ipv6_stack_route_advert_update(address, prefixLength, routePrefer) ((void)0) 00083 #define ipv6_interface_accept_ra(interface_id, accept_ra) -1 00084 #endif 00085 00086 #endif /* PROTOCOL_IPV6_H_ */
Generated on Tue Jul 12 2022 12:22:18 by
