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
lowpan6_ble.h
00001 /** 00002 * @file 00003 * 6LowPAN over BLE for IPv6 (RFC7668). 00004 */ 00005 00006 /* 00007 * Copyright (c) 2017 Benjamin Aigner 00008 * Copyright (c) 2015 Inico Technologies Ltd. , Author: Ivan Delamer <delamer@inicotech.com> 00009 * 00010 * All rights reserved. 00011 * 00012 * Redistribution and use in source and binary forms, with or without modification, 00013 * are permitted provided that the following conditions are met: 00014 * 00015 * 1. Redistributions of source code must retain the above copyright notice, 00016 * this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above copyright notice, 00018 * this list of conditions and the following disclaimer in the documentation 00019 * and/or other materials provided with the distribution. 00020 * 3. The name of the author may not be used to endorse or promote products 00021 * derived from this software without specific prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00024 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00025 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00026 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00027 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00028 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00029 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00030 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00031 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00032 * OF SUCH DAMAGE. 00033 * 00034 * Author: Benjamin Aigner <aignerb@technikum-wien.at> 00035 * 00036 * Based on the original 6lowpan implementation of lwIP ( @see 6lowpan.c) 00037 */ 00038 00039 #ifndef LWIP_HDR_LOWPAN6_BLE_H 00040 #define LWIP_HDR_LOWPAN6_BLE_H 00041 00042 #include "netif/lowpan6_opts.h" 00043 00044 #if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ 00045 00046 #include "netif/lowpan6_common.h" 00047 #include "lwip/pbuf.h" 00048 #include "lwip/ip.h" 00049 #include "lwip/ip_addr.h" 00050 #include "lwip/netif.h" 00051 00052 #ifdef __cplusplus 00053 extern "C" { 00054 #endif 00055 00056 err_t rfc7668_output(struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr); 00057 err_t rfc7668_input(struct pbuf * p, struct netif *netif); 00058 err_t rfc7668_set_local_addr_eui64(struct netif *netif, const u8_t *local_addr, size_t local_addr_len); 00059 err_t rfc7668_set_local_addr_mac48(struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr); 00060 err_t rfc7668_set_peer_addr_eui64(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len); 00061 err_t rfc7668_set_peer_addr_mac48(struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr); 00062 err_t rfc7668_set_context(u8_t index, const ip6_addr_t * context); 00063 err_t rfc7668_if_init(struct netif *netif); 00064 00065 #if !NO_SYS 00066 err_t tcpip_rfc7668_input(struct pbuf *p, struct netif *inp); 00067 #endif 00068 00069 void ble_addr_to_eui64(uint8_t *dst, const uint8_t *src, int public_addr); 00070 void eui64_to_ble_addr(uint8_t *dst, const uint8_t *src); 00071 00072 #ifdef __cplusplus 00073 } 00074 #endif 00075 00076 #endif /* LWIP_IPV6 */ 00077 00078 #endif /* LWIP_HDR_LOWPAN6_BLE_H */
Generated on Tue Jul 12 2022 13:54:27 by
