PPP, generalized callbacks calls from PPP core, removed all PPPoE and PPPoL2TP references

Almost there, removed all PPPoE and PPPoL2TP references from PPP core,
using the generic callbacks interface everywhere.
This commit is contained in:
Sylvain Rochet
2015-02-15 11:44:01 +01:00
parent 19282d6d6c
commit 09b4485870
5 changed files with 17 additions and 100 deletions

View File

@@ -182,13 +182,6 @@ typedef unsigned char u_char;
/* Link status callback function prototype */
typedef void (*ppp_link_status_cb_fn)(ppp_pcb *pcb, int err_code, void *ctx);
#if PPPOE_SUPPORT
#include "netif/ppp/pppoe.h"
#endif /* PPPOE_SUPPORT */
#if PPPOL2TP_SUPPORT
#include "netif/ppp/pppol2tp.h"
#endif /* PPPOL2TP_SUPPORT */
/*
* PPP configuration.
*/
@@ -365,12 +358,7 @@ struct ppp_pcb_s {
link_command_cb_fn link_command_cb;
link_write_cb_fn link_write_cb;
link_netif_output_cb_fn link_netif_output_cb;
#if PPPOE_SUPPORT
struct pppoe_softc *pppoe_sc;
#endif /* PPPOE_SUPPORT */
#if PPPOL2TP_SUPPORT
pppol2tp_pcb *l2tp_pcb;
#endif /* PPPOL2TP_SUPPORT */
void *link_ctx_cb;
void (*link_status_cb)(ppp_pcb *pcb, int err_code, void *ctx); /* Status change callback */
#if PPP_NOTIFY_PHASE
void (*notify_phase_cb)(ppp_pcb *pcb, u8_t phase, void *ctx); /* Notify phase callback */

View File

@@ -384,7 +384,7 @@ ppp_pcb *ppp_new(struct netif *pppif, ppp_link_status_cb_fn link_status_cb, void
void ppp_clear(ppp_pcb *pcb);
/* Set link callback function */
void ppp_link_set_callbacks(ppp_pcb *pcb, link_command_cb_fn command, link_write_cb_fn write, link_netif_output_cb_fn netif_output);
void ppp_link_set_callbacks(ppp_pcb *pcb, link_command_cb_fn command, link_write_cb_fn write, link_netif_output_cb_fn netif_output, void *ctx);
/* Initiate LCP open request */
void ppp_start(ppp_pcb *pcb);