STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
tcpip.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without modification,
6  * are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright notice,
11  * this list of conditions and the following disclaimer in the documentation
12  * and/or other materials provided with the distribution.
13  * 3. The name of the author may not be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25  * OF SUCH DAMAGE.
26  *
27  * This file is part of the lwIP TCP/IP stack.
28  *
29  * Author: Adam Dunkels <adam@sics.se>
30  *
31  */
32 #ifndef LWIP_HDR_TCPIP_H
33 #define LWIP_HDR_TCPIP_H
34 
35 #include "lwip/opt.h"
36 
37 #if !NO_SYS /* don't build if not configured for use in lwipopts.h */
38 
39 #include "lwip/err.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 struct pbuf;
46 struct netif;
47 
49 typedef void (*tcpip_init_done_fn)(void *arg);
51 typedef void (*tcpip_callback_fn)(void *ctx);
52 
53 /* Forward declarations */
54 struct tcpip_callback_msg;
55 
57 err_t tcpip_input(struct pbuf *p, struct netif *inp);
58 
59 err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block);
60 #define tcpip_callback(f, ctx) tcpip_callback_with_block(f, ctx, 1)
61 
62 struct tcpip_callback_msg* tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx);
63 void tcpip_callbackmsg_delete(struct tcpip_callback_msg* msg);
64 err_t tcpip_trycallback(struct tcpip_callback_msg* msg);
65 
66 /* free pbufs or heap memory from another context without blocking */
67 err_t pbuf_free_callback(struct pbuf *p);
68 err_t mem_free_callback(void *m);
69 
70 #if LWIP_TCPIP_TIMEOUT
71 err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg);
72 err_t tcpip_untimeout(sys_timeout_handler h, void *arg);
73 #endif /* LWIP_TCPIP_TIMEOUT */
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* !NO_SYS */
80 
81 #endif /* LWIP_HDR_TCPIP_H */
82 
void(* tcpip_init_done_fn)(void *arg)
Definition: tcpip.h:49
void(* tcpip_callback_fn)(void *ctx)
Definition: tcpip.h:51
err_t mem_free_callback(void *m)
Definition: tcpip.c:610
void tcpip_init_done(void *)
unsigned long u32_t
Definition: cc.h:42
err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block)
Definition: tcpip.c:276
Definition: pbuf.h:108
s8_t err_t
Definition: err.h:47
Definition: netif.h:182
void tcpip_callbackmsg_delete(struct tcpip_callback_msg *msg)
Definition: tcpip.c:529
void(* sys_timeout_handler)(void *arg)
Definition: lwip_timers.h:65
err_t tcpip_input(struct pbuf *p, struct netif *inp)
Definition: tcpip.c:186
unsigned char u8_t
Definition: cc.h:38
void tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg)
Definition: tcpip.c:559
struct tcpip_callback_msg * tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx)
Definition: tcpip.c:511
err_t tcpip_trycallback(struct tcpip_callback_msg *msg)
Definition: tcpip.c:542
err_t pbuf_free_callback(struct pbuf *p)
Definition: tcpip.c:597