/** * @file * Functions to sync with TCPIP thread *//* ... *//* * Copyright (c) 2001-2004 Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels <adam@sics.se> * *//* ... */#ifndefLWIP_HDR_TCPIP_H#defineLWIP_HDR_TCPIP_H#include"lwip/opt.h"#if!NO_SYS/* don't build if not configured for use in lwipopts.h */#include"lwip/err.h"#include"lwip/timeouts.h"#include"lwip/netif.h"#ifdef__cplusplusextern"C"{#endif#ifLWIP_TCPIP_CORE_LOCKING/** The global semaphore to lock the stack. */externsys_mutex_tlock_tcpip_core;#if!definedLOCK_TCPIP_CORE||defined__DOXYGEN__/** Lock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */#defineLOCK_TCPIP_CORE()sys_mutex_lock(&lock_tcpip_core)/** Unlock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */#defineUNLOCK_TCPIP_CORE()sys_mutex_unlock(&lock_tcpip_core)/* ... */#endif/* LOCK_TCPIP_CORE *//* ... */#else/* LWIP_TCPIP_CORE_LOCKING */#defineLOCK_TCPIP_CORE()#defineUNLOCK_TCPIP_CORE()/* ... */#endif/* LWIP_TCPIP_CORE_LOCKING */structpbuf;structnetif;/** Function prototype for the init_done function passed to tcpip_init */typedefvoid(*tcpip_init_done_fn)(void*arg);/** Function prototype for functions passed to tcpip_callback() */typedefvoid(*tcpip_callback_fn)(void*ctx);/* Forward declarations */structtcpip_callback_msg;voidtcpip_init(tcpip_init_done_fntcpip_init_done,void*arg);err_ttcpip_inpkt(structpbuf*p,structnetif*inp,netif_input_fninput_fn);err_ttcpip_input(structpbuf*p,structnetif*inp);err_ttcpip_try_callback(tcpip_callback_fnfunction,void*ctx);err_ttcpip_callback(tcpip_callback_fnfunction,void*ctx);/** @ingroup lwip_os * @deprecated use tcpip_try_callback() or tcpip_callback() instead *//* ... */#definetcpip_callback_with_block(function,ctx,block)((block!=0)?tcpip_callback(function,ctx):tcpip_try_callback(function,ctx))structtcpip_callback_msg*tcpip_callbackmsg_new(tcpip_callback_fnfunction,void*ctx);voidtcpip_callbackmsg_delete(structtcpip_callback_msg*msg);err_ttcpip_callbackmsg_trycallback(structtcpip_callback_msg*msg);err_ttcpip_callbackmsg_trycallback_fromisr(structtcpip_callback_msg*msg);/* free pbufs or heap memory from another context without blocking */err_tpbuf_free_callback(structpbuf*p);err_tmem_free_callback(void*m);#ifLWIP_TCPIP_TIMEOUT&&LWIP_TIMERSerr_ttcpip_timeout(u32_tmsecs,sys_timeout_handlerh,void*arg);err_ttcpip_untimeout(sys_timeout_handlerh,void*arg);/* ... */#endif/* LWIP_TCPIP_TIMEOUT && LWIP_TIMERS */#ifdefTCPIP_THREAD_TESTinttcpip_thread_poll_one(void);#endif#ifdef__cplusplus}extern "C" { ... }#endif/* ... */#endif/* !NO_SYS *//* ... */#endif/* LWIP_HDR_TCPIP_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.