Fix bug #47507: PPP API does not support LWIP_MPU_COMPATIBLE

I'd be glad if someone would test it :-)
Sylvain, if you don't like this patch feel free to revert it
This commit is contained in:
Dirk Ziegelmeier
2016-04-25 21:23:14 +02:00
parent 8ce49499ae
commit 2b5250dd9d
9 changed files with 151 additions and 74 deletions

View File

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

View File

@@ -106,6 +106,13 @@
#define MEMP_NUM_PPPOL2TP_INTERFACES 1
#endif
/**
* MEMP_NUM_PPP_API_MSG: Number of concurrent PPP API messages (in pppapi.c)
*/
#ifndef MEMP_NUM_PPP_API_MSG
#define MEMP_NUM_PPP_API_MSG 5
#endif
/**
* PPP_DEBUG: Enable debugging for PPP.
*/

View File

@@ -79,7 +79,7 @@ struct pppapi_msg_msg {
struct {
struct netif *pppif;
struct netif *netif;
ip_addr_t *ipaddr;
API_MSG_M_DEF_C(ip_addr_t, ipaddr);
u16_t port;
#if PPPOL2TP_AUTH_SUPPORT
const u8_t *secret;
@@ -94,7 +94,7 @@ struct pppapi_msg_msg {
} connect;
#if PPP_SERVER
struct {
struct ppp_addrs *addrs;
API_MSG_M_DEF_C(struct ppp_addrs, addrs);
} listen;
#endif /* PPP_SERVER */
struct {

View File

@@ -193,7 +193,7 @@ struct pppol2tp_pcb_s {
/* Create a new L2TP session. */
ppp_pcb *pppol2tp_create(struct netif *pppif,
struct netif *netif, ip_addr_t *ipaddr, u16_t port,
struct netif *netif, const ip_addr_t *ipaddr, u16_t port,
const u8_t *secret, u8_t secret_len,
ppp_link_status_cb_fn link_status_cb, void *ctx_cb);