mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
Use netif_input_fn typedef instead of creating a new one in tcpip.h
This commit is contained in:
parent
fe8d2ba72f
commit
9a4d7b9956
@ -169,7 +169,7 @@ tcpip_thread(void *arg)
|
|||||||
* @param input_fn input function to call
|
* @param input_fn input function to call
|
||||||
*/
|
*/
|
||||||
err_t
|
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
|
#if LWIP_TCPIP_CORE_LOCKING_INPUT
|
||||||
err_t ret;
|
err_t ret;
|
||||||
|
@ -185,7 +185,7 @@ struct tcpip_msg {
|
|||||||
struct {
|
struct {
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct netif *netif;
|
struct netif *netif;
|
||||||
tcpip_inpkt_fn input_fn;
|
netif_input_fn input_fn;
|
||||||
} inp;
|
} inp;
|
||||||
struct {
|
struct {
|
||||||
tcpip_callback_fn function;
|
tcpip_callback_fn function;
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
#include "lwip/timers.h"
|
#include "lwip/timers.h"
|
||||||
|
#include "lwip/netif.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -50,19 +51,13 @@ struct netif;
|
|||||||
typedef void (*tcpip_init_done_fn)(void *arg);
|
typedef void (*tcpip_init_done_fn)(void *arg);
|
||||||
/** Function prototype for functions passed to tcpip_callback() */
|
/** Function prototype for functions passed to tcpip_callback() */
|
||||||
typedef void (*tcpip_callback_fn)(void *ctx);
|
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 */
|
/* Forward declarations */
|
||||||
struct tcpip_callback_msg;
|
struct tcpip_callback_msg;
|
||||||
|
|
||||||
void tcpip_init(tcpip_init_done_fn tcpip_init_done, void *arg);
|
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_input(struct pbuf *p, struct netif *inp);
|
||||||
|
|
||||||
err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block);
|
err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block);
|
||||||
|
Loading…
Reference in New Issue
Block a user