PPP, L2TP, added link-level IPv6 support

This commit is contained in:
Sylvain Rochet
2015-03-01 22:04:24 +01:00
parent 684bef066f
commit 3ce6dd166c
4 changed files with 184 additions and 22 deletions

View File

@@ -166,7 +166,7 @@ struct pppol2tp_pcb_s {
u8_t phase; /* L2TP phase */
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 */
ipX_addr_t remote_ip; /* LNS IP Address */
u16_t remote_port; /* LNS port */
#if PPPOL2TP_AUTH_SUPPORT
u8_t *secret; /* Secret string */
@@ -191,11 +191,19 @@ struct pppol2tp_pcb_s {
};
/* Create a new L2TP session. */
/* Create a new L2TP session over IPv4. */
ppp_pcb *pppol2tp_create(struct netif *pppif,
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 *ctx_cb);
#if LWIP_IPV6
/* Create a new L2TP session over IPv6. */
ppp_pcb *pppol2tp_create_ip6(struct netif *pppif,
struct netif *netif, ip6_addr_t *ip6addr, u16_t port,
u8_t *secret, u8_t secret_len,
ppp_link_status_cb_fn link_status_cb, void *ctx_cb);
#endif /* LWIP_IPV6 */
#endif /* PPPOL2TP_H_ */
#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */