mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-24 17:17:03 +08:00
PPP, SERVER: added PPPoS server support
New function: ppp_listen(), listen for an incoming PPP connection.
This commit is contained in:
@@ -463,6 +463,21 @@ void ppp_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_p
|
||||
*/
|
||||
err_t ppp_open(ppp_pcb *pcb, u16_t holdoff);
|
||||
|
||||
#if PPP_SERVER
|
||||
/*
|
||||
* Listen for an incoming PPP connection.
|
||||
*
|
||||
* This can only be called if PPP is in the dead phase.
|
||||
*
|
||||
* Local and remote interface IP addresses, as well as DNS are
|
||||
* provided through a previously filled struct ppp_addrs.
|
||||
*
|
||||
* If this port connects to a modem, the modem connection must be
|
||||
* established before calling this.
|
||||
*/
|
||||
err_t ppp_listen(ppp_pcb *pcb, struct ppp_addrs *addrs);
|
||||
#endif /* PPP_SERVER */
|
||||
|
||||
/*
|
||||
* Initiate the end of a PPP connection.
|
||||
* Any outstanding packets in the queues are dropped.
|
||||
|
||||
@@ -143,6 +143,10 @@
|
||||
struct link_callbacks {
|
||||
/* Start a connection (e.g. Initiate discovery phase) */
|
||||
err_t (*connect) (ppp_pcb *pcb, void *ctx);
|
||||
#if PPP_SERVER
|
||||
/* Listen for an incoming connection (Passive mode) */
|
||||
err_t (*listen) (ppp_pcb *pcb, void *ctx, struct ppp_addrs *addrs);
|
||||
#endif /* PPP_SERVER */
|
||||
/* End a connection (i.e. initiate disconnect phase) */
|
||||
void (*disconnect) (ppp_pcb *pcb, void *ctx);
|
||||
/* Free lower protocol control block */
|
||||
|
||||
Reference in New Issue
Block a user