31 #include "netif/ppp/ppp_opts.h" 38 #include "netif/ppp/ppp.h" 47 struct pppapi_msg_msg {
52 ppp_notify_phase_cb_fn notify_phase_cb;
58 pppos_output_cb_fn output_cb;
59 ppp_link_status_cb_fn link_status_cb;
67 const char *service_name;
68 const char *concentrator_name;
69 ppp_link_status_cb_fn link_status_cb;
77 API_MSG_M_DEF_C(ip_addr_t, ipaddr);
79 #if PPPOL2TP_AUTH_SUPPORT 83 ppp_link_status_cb_fn link_status_cb;
102 struct pppapi_msg_msg msg;
106 err_t pppapi_set_default(ppp_pcb *pcb);
108 err_t pppapi_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb);
111 ppp_pcb *pppapi_pppos_create(
struct netif *pppif, pppos_output_cb_fn output_cb, ppp_link_status_cb_fn link_status_cb,
void *ctx_cb);
114 ppp_pcb *pppapi_pppoe_create(
struct netif *pppif,
struct netif *ethif,
const char *service_name,
115 const char *concentrator_name, ppp_link_status_cb_fn link_status_cb,
119 ppp_pcb *pppapi_pppol2tp_create(
struct netif *pppif,
struct netif *
netif, ip_addr_t *ipaddr, u16_t port,
120 const u8_t *secret, u8_t secret_len,
121 ppp_link_status_cb_fn link_status_cb,
void *ctx_cb);
123 err_t pppapi_connect(ppp_pcb *pcb, u16_t holdoff);
125 err_t pppapi_listen(ppp_pcb *pcb);
127 err_t pppapi_close(ppp_pcb *pcb, u8_t nocarrier);
128 err_t pppapi_free(ppp_pcb *pcb);
129 err_t pppapi_ioctl(ppp_pcb *pcb, u8_t
cmd,
void *arg);