added a persist option (enabled by default for now until we add a way for users to pass a ppp_settings structure)

improved PPPoE state machine and added persist mode support
This commit is contained in:
Sylvain Rochet
2012-06-07 00:46:19 +02:00
parent e44aada634
commit 7ef99ee6f3
4 changed files with 52 additions and 33 deletions

View File

@@ -145,7 +145,7 @@ struct pppoe_softc {
struct pppoe_softc *next;
struct netif *sc_ethif; /* ethernet interface we are using */
int sc_pd; /* ppp unit number */
void (*sc_linkStatusCB)(int pd, int up);
void (*sc_link_status_cb)(int pd, int up);
int sc_state; /* discovery phase or session connected */
struct eth_addr sc_dest; /* hardware address of concentrator */
@@ -168,7 +168,7 @@ struct pppoe_softc {
#define pppoe_init() /* compatibility define, no initialization needed */
err_t pppoe_create(struct netif *ethif, int pd, void (*linkStatusCB)(int pd, int up), struct pppoe_softc **scptr);
err_t pppoe_create(struct netif *ethif, int pd, void (*link_status_cb)(int pd, int up), struct pppoe_softc **scptr);
err_t pppoe_destroy(struct netif *ifp);
int pppoe_connect(struct pppoe_softc *sc);