mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-12 22:14:25 +00:00
PPP, CORE, prepared for lower protocols callbacks returning state
Until now, callbacks used void return, preparing callbacks to return PPPERR_ status.
This commit is contained in:
parent
ee2936ffbf
commit
1ae3808e13
@ -303,7 +303,7 @@ struct ppp_addrs {
|
||||
/*
|
||||
* PPP interface control block.
|
||||
*/
|
||||
typedef void (*link_command_cb_fn)(void *pcb, u8_t command);
|
||||
typedef int (*link_command_cb_fn)(void *pcb, u8_t command);
|
||||
typedef int (*link_write_cb_fn)(void *pcb, struct pbuf *p);
|
||||
typedef err_t (*link_netif_output_cb_fn)(void *pcb, struct pbuf *p, u_short protocol);
|
||||
|
||||
|
@ -117,7 +117,7 @@ static char pppoe_error_tmp[PPPOE_ERRORSTRING_LEN];
|
||||
|
||||
|
||||
/* callbacks called from PPP core */
|
||||
static void pppoe_link_command_callback(void *pcb, u8_t command);
|
||||
static int pppoe_link_command_callback(void *pcb, u8_t command);
|
||||
static int pppoe_link_write_callback(void *pcb, struct pbuf *p);
|
||||
static err_t pppoe_link_netif_output_callback(void *pcb, struct pbuf *p, u_short protocol);
|
||||
|
||||
@ -190,7 +190,7 @@ ppp_pcb *pppoe_create(struct netif *pppif,
|
||||
}
|
||||
|
||||
/* Called by PPP core */
|
||||
static void pppoe_link_command_callback(void *pcb, u8_t command) {
|
||||
static int pppoe_link_command_callback(void *pcb, u8_t command) {
|
||||
struct pppoe_softc *sc = (struct pppoe_softc *)pcb;
|
||||
|
||||
switch(command) {
|
||||
@ -208,6 +208,8 @@ static void pppoe_link_command_callback(void *pcb, u8_t command) {
|
||||
|
||||
default: ;
|
||||
}
|
||||
|
||||
return PPPERR_NONE;
|
||||
}
|
||||
|
||||
/* Called by PPP core */
|
||||
|
@ -75,7 +75,7 @@
|
||||
#endif /* PPPOL2TP_AUTH_SUPPORT */
|
||||
|
||||
/* callbacks called from PPP core */
|
||||
static void pppol2tp_link_command_callback(void *pcb, u8_t command);
|
||||
static int pppol2tp_link_command_callback(void *pcb, u8_t command);
|
||||
static int pppol2tp_link_write_callback(void *pcb, struct pbuf *p);
|
||||
static err_t pppol2tp_link_netif_output_callback(void *pcb, struct pbuf *p, u_short protocol);
|
||||
|
||||
@ -143,7 +143,7 @@ ppp_pcb *pppol2tp_create(struct netif *pppif,
|
||||
}
|
||||
|
||||
/* Called by PPP core */
|
||||
static void pppol2tp_link_command_callback(void *pcb, u8_t command) {
|
||||
static int pppol2tp_link_command_callback(void *pcb, u8_t command) {
|
||||
pppol2tp_pcb *l2tp = (pppol2tp_pcb *)pcb;
|
||||
|
||||
switch(command) {
|
||||
@ -161,6 +161,8 @@ static void pppol2tp_link_command_callback(void *pcb, u8_t command) {
|
||||
|
||||
default: ;
|
||||
}
|
||||
|
||||
return PPPERR_NONE;
|
||||
}
|
||||
|
||||
/* Called by PPP core */
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include "netif/ppp/vj.h"
|
||||
|
||||
/* callbacks called from PPP core */
|
||||
static void pppos_link_command_callback(void *pcb, u8_t command);
|
||||
static int pppos_link_command_callback(void *pcb, u8_t command);
|
||||
static int pppos_link_write_callback(void *pcb, struct pbuf *p);
|
||||
static err_t pppos_link_netif_output_callback(void *pcb, struct pbuf *pb, u_short protocol);
|
||||
|
||||
@ -176,7 +176,7 @@ ppp_pcb *pppos_create(struct netif *pppif, sio_fd_t fd,
|
||||
}
|
||||
|
||||
/* Called by PPP core */
|
||||
static void
|
||||
static int
|
||||
pppos_link_command_callback(void *pcb, u8_t command)
|
||||
{
|
||||
pppos_pcb *pppos = (pppos_pcb *)pcb;
|
||||
@ -196,6 +196,8 @@ pppos_link_command_callback(void *pcb, u8_t command)
|
||||
|
||||
default: ;
|
||||
}
|
||||
|
||||
return PPPERR_NONE;
|
||||
}
|
||||
|
||||
/* Called by PPP core */
|
||||
|
Loading…
x
Reference in New Issue
Block a user