mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-30 14:42:34 +08:00
PPP, rename ppp_clear function to ppp_link_start
This function does not clear anything anymore. What it is now is an optional way to notify PPP that link layer is started, changing the PPP state from "dead" to "initialize". Rename it accordingly to what the function really is.
This commit is contained in:
@@ -700,8 +700,8 @@ ppp_pcb *ppp_new(struct netif *pppif, const struct link_callbacks *callbacks, vo
|
||||
return pcb;
|
||||
}
|
||||
|
||||
/* Set a PPP PCB to its initial state */
|
||||
void ppp_clear(ppp_pcb *pcb) {
|
||||
/** Called when link is starting */
|
||||
void ppp_link_start(ppp_pcb *pcb) {
|
||||
LWIP_ASSERT("pcb->phase == PPP_PHASE_DEAD || pcb->phase == PPP_PHASE_HOLDOFF", pcb->phase == PPP_PHASE_DEAD || pcb->phase == PPP_PHASE_HOLDOFF);
|
||||
new_phase(pcb, PPP_PHASE_INITIALIZE);
|
||||
}
|
||||
|
||||
@@ -921,7 +921,7 @@ pppoe_connect(ppp_pcb *ppp, void *ctx)
|
||||
}
|
||||
#endif
|
||||
|
||||
ppp_clear(ppp);
|
||||
ppp_link_start(ppp);
|
||||
|
||||
lcp_wo = &ppp->lcp_wantoptions;
|
||||
lcp_wo->mru = sc->sc_ethif->mtu-PPPOE_HEADERLEN-2; /* two byte PPP protocol discriminator, then IP data */
|
||||
|
||||
@@ -270,7 +270,7 @@ static err_t pppol2tp_connect(ppp_pcb *ppp, void *ctx) {
|
||||
|
||||
pppol2tp_clear(l2tp);
|
||||
|
||||
ppp_clear(ppp);
|
||||
ppp_link_start(ppp);
|
||||
|
||||
lcp_wo = &ppp->lcp_wantoptions;
|
||||
lcp_wo->mru = PPPOL2TP_DEFMRU;
|
||||
|
||||
@@ -308,7 +308,7 @@ pppos_connect(ppp_pcb *ppp, void *ctx)
|
||||
pppos_input_free_current_packet(pppos);
|
||||
#endif /* PPP_INPROC_IRQ_SAFE */
|
||||
|
||||
ppp_clear(ppp);
|
||||
ppp_link_start(ppp);
|
||||
/* reset PPPoS control block to its initial state */
|
||||
memset(&pppos->last_xmit, 0, sizeof(pppos_pcb) - ( (char*)&((pppos_pcb*)0)->last_xmit - (char*)0 ) );
|
||||
|
||||
@@ -346,7 +346,7 @@ pppos_listen(ppp_pcb *ppp, void *ctx, const struct ppp_addrs *addrs)
|
||||
pppos_input_free_current_packet(pppos);
|
||||
#endif /* PPP_INPROC_IRQ_SAFE */
|
||||
|
||||
ppp_clear(ppp);
|
||||
ppp_link_start(ppp);
|
||||
/* reset PPPoS control block to its initial state */
|
||||
memset(&pppos->last_xmit, 0, sizeof(pppos_pcb) - ( (char*)&((pppos_pcb*)0)->last_xmit - (char*)0 ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user