mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-19 14:46:58 +08:00
PPP, PPPoL2TP, switched to dual stack IPv4/IPv6
Replaced ip4_addr_t to ip_addr_t in pppapi_pppol2tp_create() prototype, now binding to UDPv6 or UDPv4 depending on the passed ip_addr_t type. Removed pppol2tp_create_ip6() and pppapi_pppol2tp_create_ip6().
This commit is contained in:
@@ -79,7 +79,7 @@ struct pppapi_msg_msg {
|
||||
struct {
|
||||
struct netif *pppif;
|
||||
struct netif *netif;
|
||||
ip4_addr_t *ipaddr;
|
||||
ip_addr_t *ipaddr;
|
||||
u16_t port;
|
||||
#if PPPOL2TP_AUTH_SUPPORT
|
||||
u8_t *secret;
|
||||
@@ -88,20 +88,6 @@ struct pppapi_msg_msg {
|
||||
ppp_link_status_cb_fn link_status_cb;
|
||||
void *ctx_cb;
|
||||
} l2tpcreate;
|
||||
#if LWIP_IPV6
|
||||
struct {
|
||||
struct netif *pppif;
|
||||
struct netif *netif;
|
||||
ip6_addr_t *ip6addr;
|
||||
u16_t port;
|
||||
#if PPPOL2TP_AUTH_SUPPORT
|
||||
u8_t *secret;
|
||||
u8_t secret_len;
|
||||
#endif /* PPPOL2TP_AUTH_SUPPORT */
|
||||
ppp_link_status_cb_fn link_status_cb;
|
||||
void *ctx_cb;
|
||||
} l2tpcreateip6;
|
||||
#endif /* LWIP_IPV6 */
|
||||
#endif /* PPPOL2TP_SUPPORT */
|
||||
struct {
|
||||
u16_t holdoff;
|
||||
@@ -141,14 +127,9 @@ ppp_pcb *pppapi_pppoe_create(struct netif *pppif, struct netif *ethif, const cha
|
||||
void *ctx_cb);
|
||||
#endif /* PPPOE_SUPPORT */
|
||||
#if PPPOL2TP_SUPPORT
|
||||
ppp_pcb *pppapi_pppol2tp_create(struct netif *pppif, struct netif *netif, ip4_addr_t *ipaddr, u16_t port,
|
||||
ppp_pcb *pppapi_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
|
||||
ppp_pcb *pppapi_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_SUPPORT */
|
||||
err_t pppapi_connect(ppp_pcb *pcb, u16_t holdoff);
|
||||
#if PPP_SERVER
|
||||
|
||||
@@ -191,19 +191,11 @@ struct pppol2tp_pcb_s {
|
||||
};
|
||||
|
||||
|
||||
/* Create a new L2TP session over IPv4. */
|
||||
/* Create a new L2TP session. */
|
||||
ppp_pcb *pppol2tp_create(struct netif *pppif,
|
||||
struct netif *netif, ip4_addr_t *ipaddr, u16_t port,
|
||||
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 */
|
||||
|
||||
Reference in New Issue
Block a user