add tcpip_callback patch from Marc
This commit is contained in:
@@ -265,7 +265,7 @@ struct tcp_pcb {
|
||||
#endif /* TCP_QUEUE_OOSEQ */
|
||||
|
||||
#if LWIP_CALLBACK_API
|
||||
/* Function to be called when more send buffer space is avaliable. */
|
||||
/* Function to be called when more send buffer space is available. */
|
||||
err_t (* sent)(void *arg, struct tcp_pcb *pcb, u16_t space);
|
||||
|
||||
/* Function to be called when (in-sequence) data has arrived. */
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
void tcpip_init(void (* tcpip_init_done)(void *), void *arg);
|
||||
void tcpip_apimsg(struct api_msg *apimsg);
|
||||
err_t tcpip_input(struct pbuf *p, struct netif *inp);
|
||||
err_t tcpip_link_input(struct pbuf *p, struct netif *inp);
|
||||
err_t tcpip_callback(void (*f)(void *ctx), void *ctx);
|
||||
|
||||
void tcpip_tcp_timer_needed(void);
|
||||
|
||||
enum tcpip_msg_type {
|
||||
TCPIP_MSG_API,
|
||||
TCPIP_MSG_INPUT,
|
||||
TCPIP_MSG_LINK
|
||||
TCPIP_MSG_CALLBACK
|
||||
};
|
||||
|
||||
struct tcpip_msg {
|
||||
@@ -57,6 +57,10 @@ struct tcpip_msg {
|
||||
struct pbuf *p;
|
||||
struct netif *netif;
|
||||
} inp;
|
||||
struct {
|
||||
void (*f)(void *ctx);
|
||||
void *ctx;
|
||||
} cb;
|
||||
} msg;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user