mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-27 10:41:12 +08:00
L2TP output netif is now selectable, making it useful to select a default route for the L2TP tunnel, in case the default interface is set to the L2TP PPP interface
This commit is contained in:
@@ -69,6 +69,7 @@ struct pppapi_msg_msg {
|
||||
#endif /* PPPOE_SUPPORT */
|
||||
#if PPPOL2TP_SUPPORT
|
||||
struct {
|
||||
struct netif *netif;
|
||||
ip_addr_t *ipaddr;
|
||||
u16_t port;
|
||||
#if PPPOL2TP_AUTH_SUPPORT
|
||||
@@ -119,7 +120,8 @@ int pppapi_over_ethernet_open(ppp_pcb *pcb, struct netif *ethif, const char *ser
|
||||
void *link_status_ctx);
|
||||
#endif /* PPPOE_SUPPORT */
|
||||
#if PPPOL2TP_SUPPORT
|
||||
int pppapi_over_l2tp_open(ppp_pcb *pcb, ip_addr_t *ipaddr, u16_t port, u8_t *secret, u8_t secret_len,
|
||||
int pppapi_over_l2tp_open(ppp_pcb *pcb, struct netif *netif, ip_addr_t *ipaddr, u16_t port,
|
||||
u8_t *secret, u8_t secret_len,
|
||||
ppp_link_status_cb_fn link_status_cb, void *link_status_ctx);
|
||||
#endif /* PPPOL2TP_SUPPORT */
|
||||
int pppapi_close(ppp_pcb *pcb);
|
||||
|
||||
@@ -172,6 +172,7 @@ struct pppol2tp_pcb_s {
|
||||
u8_t phase; /* L2TP phase */
|
||||
void (*link_status_cb)(ppp_pcb *pcb, int status);
|
||||
struct udp_pcb *udp; /* UDP L2TP Socket */
|
||||
struct netif *netif; /* Output interface, used as a default route */
|
||||
ip_addr_t remote_ip; /* LNS IP Address */
|
||||
u16_t remote_port; /* LNS port */
|
||||
#if PPPOL2TP_AUTH_SUPPORT
|
||||
@@ -205,7 +206,7 @@ err_t pppol2tp_create(ppp_pcb *ppp, void (*link_status_cb)(ppp_pcb *pcb, int sta
|
||||
err_t pppol2tp_destroy(pppol2tp_pcb *l2tp);
|
||||
|
||||
/* Be a LAC, connect to a LNS. */
|
||||
err_t pppol2tp_connect(pppol2tp_pcb *l2tp, ip_addr_t *ipaddr, u16_t port);
|
||||
err_t pppol2tp_connect(pppol2tp_pcb *l2tp, struct netif *netif, ip_addr_t *ipaddr, u16_t port);
|
||||
|
||||
/* Disconnect */
|
||||
void pppol2tp_disconnect(pppol2tp_pcb *l2tp);
|
||||
|
||||
Reference in New Issue
Block a user