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
zepif.h
00001 /** 00002 * @file 00003 * 00004 * A netif implementing the ZigBee Eencapsulation Protocol (ZEP). 00005 * This is used to tunnel 6LowPAN over UDP. 00006 */ 00007 00008 /* 00009 * Copyright (c) 2018 Simon Goldschmidt 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 * This file is part of the lwIP TCP/IP stack. 00035 * 00036 * Author: Simon Goldschmidt <goldsimon@gmx.de> 00037 * 00038 */ 00039 00040 #ifndef LWIP_HDR_ZEPIF_H 00041 #define LWIP_HDR_ZEPIF_H 00042 00043 #include "lwip/opt.h" 00044 #include "netif/lowpan6.h" 00045 00046 #if LWIP_IPV6 && LWIP_UDP /* don't build if not configured for use in lwipopts.h */ 00047 00048 #include "lwip/netif.h" 00049 00050 #ifdef __cplusplus 00051 extern "C" { 00052 #endif 00053 00054 #define ZEPIF_DEFAULT_UDP_PORT 17754 00055 00056 /** Pass this struct as 'state' to netif_add to control the behaviour 00057 * of this netif. If NULL is passed, default behaviour is chosen */ 00058 struct zepif_init { 00059 /** The UDP port used to ZEP frames from (0 = default) */ 00060 u16_t zep_src_udp_port; 00061 /** The UDP port used to ZEP frames to (0 = default) */ 00062 u16_t zep_dst_udp_port; 00063 /** The IP address to sed ZEP frames from (NULL = ANY) */ 00064 const ip_addr_t *zep_src_ip_addr; 00065 /** The IP address to sed ZEP frames to (NULL = BROADCAST) */ 00066 const ip_addr_t *zep_dst_ip_addr; 00067 /** If != NULL, the udp pcb is bound to this netif */ 00068 const struct netif *zep_netif; 00069 /** MAC address of the 6LowPAN device */ 00070 u8_t addr[6]; 00071 }; 00072 00073 err_t zepif_init(struct netif *netif); 00074 00075 #ifdef __cplusplus 00076 } 00077 #endif 00078 00079 #endif /* LWIP_IPV6 && LWIP_UDP */ 00080 00081 #endif /* LWIP_HDR_ZEPIF_H */
Generated on Tue Jul 12 2022 13:55:05 by
