diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 5394cf06..95a97064 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -169,7 +169,7 @@ tcpip_thread(void *arg) * @param input_fn input function to call */ err_t -tcpip_inpkt(struct pbuf *p, struct netif *inp, tcpip_inpkt_fn input_fn) +tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn) { #if LWIP_TCPIP_CORE_LOCKING_INPUT err_t ret; diff --git a/src/include/lwip/priv/tcpip_priv.h b/src/include/lwip/priv/tcpip_priv.h index 2208b3a2..3d716f2c 100644 --- a/src/include/lwip/priv/tcpip_priv.h +++ b/src/include/lwip/priv/tcpip_priv.h @@ -185,7 +185,7 @@ struct tcpip_msg { struct { struct pbuf *p; struct netif *netif; - tcpip_inpkt_fn input_fn; + netif_input_fn input_fn; } inp; struct { tcpip_callback_fn function; diff --git a/src/include/lwip/tcpip.h b/src/include/lwip/tcpip.h index 3c854574..c1235865 100644 --- a/src/include/lwip/tcpip.h +++ b/src/include/lwip/tcpip.h @@ -38,6 +38,7 @@ #include "lwip/err.h" #include "lwip/timers.h" +#include "lwip/netif.h" #ifdef __cplusplus extern "C" { @@ -50,19 +51,13 @@ struct netif; typedef void (*tcpip_init_done_fn)(void *arg); /** Function prototype for functions passed to tcpip_callback() */ typedef void (*tcpip_callback_fn)(void *ctx); -/** Function prototype for input functions functions. - * - * @param p The received packet, copied into a pbuf - * @param inp The netif which received the packet - */ -typedef err_t (*tcpip_inpkt_fn)(struct pbuf *p, struct netif *inp); /* Forward declarations */ struct tcpip_callback_msg; void tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg); -err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, tcpip_inpkt_fn input_fn); +err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn); err_t tcpip_input(struct pbuf *p, struct netif *inp); err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block);