mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-19 14:46:58 +08:00
PPP: moved netif out of PPP control block
Users might want to share a netif control block between an Ethernet interface and a PPPoS interface (I want actually) in case PPP is just used as redundancy if Ethernet is down (eg. PPPoS GPRS fail over). Moved netif out of PPP control block in a similar way it is currently done for Ethernet interfaces. Furthermore, this is a first step on removing the "new/create/free/delete" API which is awful but currently necessary to handle fail over from PPPoX to another PPPoX (eg. from PPoE on xDSL to PPPoS on GPRS fail over) without free()ing the netif which might be used on udp_sendto() or L2TP VPN links.
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
static void
|
||||
pppapi_do_ppp_new(struct pppapi_msg_msg *msg)
|
||||
{
|
||||
msg->ppp = ppp_new();
|
||||
msg->ppp = ppp_new(msg->msg.pppnew.pppif);
|
||||
TCPIP_PPPAPI_ACK(msg);
|
||||
}
|
||||
|
||||
@@ -53,10 +53,11 @@ pppapi_do_ppp_new(struct pppapi_msg_msg *msg)
|
||||
* tcpip_thread context.
|
||||
*/
|
||||
ppp_pcb*
|
||||
pppapi_new(void)
|
||||
pppapi_new(struct netif *pppif)
|
||||
{
|
||||
struct pppapi_msg msg;
|
||||
msg.function = pppapi_do_ppp_new;
|
||||
msg.msg.msg.pppnew.pppif = pppif;
|
||||
TCPIP_PPPAPI(&msg);
|
||||
return msg.msg.ppp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user