PPP, PPPoS, SERVER: remove useless struct ppp_addrs* argument from pppos_listen

Now that we have helpers to set those members externaly, pppos_listen
struct ppp_addrs* argument does not add any value. In addition it
was not a well chosen design choice because the user needed to keep a
copy of struct ppp_addrs when listening again for a new connection.
This commit is contained in:
Sylvain Rochet
2016-06-26 20:26:35 +02:00
parent 71ca26b212
commit 3d684cda23
6 changed files with 11 additions and 40 deletions

View File

@@ -505,13 +505,10 @@ err_t ppp_connect(ppp_pcb *pcb, u16_t holdoff);
*
* 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, const struct ppp_addrs *addrs);
err_t ppp_listen(ppp_pcb *pcb);
#endif /* PPP_SERVER */
/*

View File

@@ -141,7 +141,7 @@ struct link_callbacks {
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, const struct ppp_addrs *addrs);
err_t (*listen) (ppp_pcb *pcb, void *ctx);
#endif /* PPP_SERVER */
/* End a connection (i.e. initiate disconnect phase) */
void (*disconnect) (ppp_pcb *pcb, void *ctx);

View File

@@ -92,11 +92,6 @@ struct pppapi_msg_msg {
struct {
u16_t holdoff;
} connect;
#if PPP_SERVER
struct {
API_MSG_M_DEF_C(struct ppp_addrs, addrs);
} listen;
#endif /* PPP_SERVER */
struct {
u8_t nocarrier;
} close;
@@ -133,7 +128,7 @@ ppp_pcb *pppapi_pppol2tp_create(struct netif *pppif, struct netif *netif, ip_add
#endif /* PPPOL2TP_SUPPORT */
err_t pppapi_connect(ppp_pcb *pcb, u16_t holdoff);
#if PPP_SERVER
err_t pppapi_listen(ppp_pcb *pcb, struct ppp_addrs *addrs);
err_t pppapi_listen(ppp_pcb *pcb);
#endif /* PPP_SERVER */
err_t pppapi_close(ppp_pcb *pcb, u8_t nocarrier);
err_t pppapi_free(ppp_pcb *pcb);