mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-20 15:17:05 +08:00
improved PPP API, added ppp_reopen()
This is now the user choice to re-establish the session in the link status callback by either calling the ppp_reopen() to re-establish or ppp_delete() to free the PPP control block. Without user intervention, the PPP control block now stay in the dead phase, allowing the user to re-establish or delete the control block later.
This commit is contained in:
@@ -106,11 +106,10 @@ PACK_STRUCT_END
|
||||
|
||||
|
||||
#define PPPOE_STATE_INITIAL 0
|
||||
#define PPPOE_STATE_HOLDOFF 1
|
||||
#define PPPOE_STATE_PADI_SENT 2
|
||||
#define PPPOE_STATE_PADR_SENT 3
|
||||
#define PPPOE_STATE_SESSION 4
|
||||
#define PPPOE_STATE_CLOSING 5
|
||||
#define PPPOE_STATE_PADI_SENT 1
|
||||
#define PPPOE_STATE_PADR_SENT 2
|
||||
#define PPPOE_STATE_SESSION 3
|
||||
#define PPPOE_STATE_CLOSING 4
|
||||
/* passive */
|
||||
#define PPPOE_STATE_PADO_SENT 1
|
||||
|
||||
@@ -173,7 +172,6 @@ err_t pppoe_create(struct netif *ethif, ppp_pcb *pcb, void (*link_status_cb)(ppp
|
||||
err_t pppoe_destroy(struct netif *ifp);
|
||||
|
||||
int pppoe_connect(struct pppoe_softc *sc);
|
||||
void pppoe_reconnect(struct pppoe_softc *sc);
|
||||
void pppoe_disconnect(struct pppoe_softc *sc);
|
||||
|
||||
void pppoe_disc_input(struct netif *netif, struct pbuf *p);
|
||||
|
||||
@@ -150,12 +150,11 @@
|
||||
|
||||
/* L2TP Session state */
|
||||
#define PPPOL2TP_STATE_INITIAL 0
|
||||
#define PPPOL2TP_STATE_HOLDOFF 1
|
||||
#define PPPOL2TP_STATE_SCCRQ_SENT 2
|
||||
#define PPPOL2TP_STATE_ICRQ_SENT 3
|
||||
#define PPPOL2TP_STATE_ICCN_SENT 4
|
||||
#define PPPOL2TP_STATE_DATA 5
|
||||
#define PPPOL2TP_STATE_CLOSING 6
|
||||
#define PPPOL2TP_STATE_SCCRQ_SENT 1
|
||||
#define PPPOL2TP_STATE_ICRQ_SENT 2
|
||||
#define PPPOL2TP_STATE_ICCN_SENT 3
|
||||
#define PPPOL2TP_STATE_DATA 4
|
||||
#define PPPOL2TP_STATE_CLOSING 5
|
||||
|
||||
#define PPPOL2TP_CB_STATE_UP 0 /* PPPoL2TP link is UP */
|
||||
#define PPPOL2TP_CB_STATE_DOWN 1 /* PPPo2TP link is DOWN - normal condition */
|
||||
|
||||
Reference in New Issue
Block a user