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.
protocol_6lowpan.h
00001 /* 00002 * Copyright (c) 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 00018 /* 00019 * \file protocol_6lowpan.h 00020 * 00021 */ 00022 00023 #ifndef PROTOCOL_6LOWPAN_H_ 00024 #define PROTOCOL_6LOWPAN_H_ 00025 00026 struct protocol_interface_info_entry; 00027 struct route_info_entry_t; 00028 struct ns_sockaddr; 00029 struct rpl_domain; 00030 struct rpl_dodag; 00031 struct mlme_pan_descriptor_s; 00032 00033 00034 extern struct rpl_domain *protocol_6lowpan_rpl_domain; 00035 extern struct rpl_dodag *protocol_6lowpan_rpl_root_dodag; 00036 00037 #ifdef HAVE_RPL 00038 #ifndef NO_MLE 00039 typedef enum { 00040 PRIORITY_1ST, 00041 PRIORITY_2ND, 00042 } neighbor_priority; 00043 #endif 00044 #endif 00045 00046 void protocol_6lowpan_interface_common_init(struct protocol_interface_info_entry *cur); 00047 void protocol_6lowpan_host_init(struct protocol_interface_info_entry *cur, bool sleepy_host); 00048 void protocol_6lowpan_router_init(struct protocol_interface_info_entry *cur); 00049 void protocol_6lowpan_configure_core(struct protocol_interface_info_entry *cur); 00050 00051 #ifdef HAVE_6LOWPAN_ND 00052 int protocol_6lowpan_child_update(struct protocol_interface_info_entry *cur); 00053 void protocol_6lowpan_neighbor_priority_update(struct protocol_interface_info_entry *cur, uint8_t *removed_priority, uint8_t *updated_priority); 00054 00055 #ifdef HAVE_RPL 00056 #ifndef NO_MLE 00057 uint16_t protocol_6lowpan_neighbor_priority_set(int8_t interface_id, addrtype_t addr_type, const uint8_t *addr_ptr); 00058 uint16_t protocol_6lowpan_neighbor_second_priority_set(int8_t interface_id, addrtype_t addr_type, const uint8_t *addr_ptr); 00059 void protocol_6lowpan_neighbor_priority_clear_all(int8_t interface_id, neighbor_priority priority); 00060 #endif 00061 #endif 00062 00063 #else 00064 #define protocol_6lowpan_child_update(cur) (-1) 00065 #define protocol_6lowpan_neighbor_priority_update(cur, removed_priority, updated_priority) ((void)0) 00066 #endif 00067 00068 int8_t protocol_6lowpan_neighbor_address_state_synch(struct protocol_interface_info_entry *cur, const uint8_t eui64[8], const uint8_t iid[8]); 00069 int8_t protocol_6lowpan_neighbor_remove(struct protocol_interface_info_entry *cur, uint8_t *address_ptr, addrtype_t type); 00070 00071 void protocol_6lowpan_allocate_mac16(protocol_interface_info_entry_t *cur); 00072 00073 int8_t protocol_6lowpan_interface_compare_cordinator_netid(struct protocol_interface_info_entry *cur, uint8_t *adr_ptr); 00074 int8_t protocol_6lowpan_interface_get_link_local_cordinator_address(protocol_interface_info_entry_t *cur, uint8_t *adr_ptr); 00075 int8_t protocol_6lowpan_interface_get_mac_coordinator_address(protocol_interface_info_entry_t *cur, struct ns_sockaddr *adr_ptr); 00076 00077 int16_t protocol_6lowpan_rpl_global_priority_get(void); 00078 uint8_t protocol_6lowpan_beacon_join_priority_tx(int8_t interface_id); 00079 uint8_t protocol_6lowpan_beacon_compare_rx(int8_t interface_id, uint8_t join_priority, uint8_t link_quality); 00080 bool protocol_6lowpan_bootsrap_start(struct protocol_interface_info_entry *interface); 00081 bool protocol_6lowpan_bootsrap_link_set(struct protocol_interface_info_entry *interface, struct mlme_pan_descriptor_s *pan_descriptor, const uint8_t *beacon_payload, uint8_t beacon_length); 00082 00083 #endif /* PROTOCOL_6LOWPAN_H_ */
Generated on Tue Jul 12 2022 14:24:32 by
