Lines Matching refs:ppp
73 static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p);
74 static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol);
75 static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx); /* Destroy a L2TP control block */
76 static void pppol2tp_connect(ppp_pcb *ppp, void *ctx); /* Be a LAC, connect to a LNS. */
77 static void pppol2tp_disconnect(ppp_pcb *ppp, void *ctx); /* Disconnect */
113 ppp_pcb *ppp; in pppol2tp_create() local
136 ppp = ppp_new(pppif, &pppol2tp_callbacks, l2tp, link_status_cb, ctx_cb); in pppol2tp_create()
137 if (ppp == NULL) { in pppol2tp_create()
143 l2tp->ppp = ppp; in pppol2tp_create()
153 return ppp; in pppol2tp_create()
165 static err_t pppol2tp_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) { in pppol2tp_write() argument
172 LWIP_UNUSED_ARG(ppp); in pppol2tp_write()
179 MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); in pppol2tp_write()
193 MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); in pppol2tp_write()
197 MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, (u16_t)tot_len); in pppol2tp_write()
198 MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); in pppol2tp_write()
204 static err_t pppol2tp_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *p, u_short protocol) { in pppol2tp_netif_output() argument
212 LWIP_UNUSED_ARG(ppp); in pppol2tp_netif_output()
220 MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); in pppol2tp_netif_output()
236 MIB2_STATS_NETIF_INC(ppp->netif, ifoutdiscards); in pppol2tp_netif_output()
240 MIB2_STATS_NETIF_ADD(ppp->netif, ifoutoctets, tot_len); in pppol2tp_netif_output()
241 MIB2_STATS_NETIF_INC(ppp->netif, ifoutucastpkts); in pppol2tp_netif_output()
247 static err_t pppol2tp_destroy(ppp_pcb *ppp, void *ctx) { in pppol2tp_destroy() argument
249 LWIP_UNUSED_ARG(ppp); in pppol2tp_destroy()
258 static void pppol2tp_connect(ppp_pcb *ppp, void *ctx) { in pppol2tp_connect() argument
278 lcp_wo = &ppp->lcp_wantoptions; in pppol2tp_connect()
286 lcp_ao = &ppp->lcp_allowoptions; in pppol2tp_connect()
293 ipcp_wo = &ppp->ipcp_wantoptions; in pppol2tp_connect()
297 ipcp_ao = &ppp->ipcp_allowoptions; in pppol2tp_connect()
332 static void pppol2tp_disconnect(ppp_pcb *ppp, void *ctx) { in pppol2tp_disconnect() argument
341 ppp_link_end(ppp); /* notify upper layers */ in pppol2tp_disconnect()
476 ppp_input(l2tp->ppp, p); in pppol2tp_input()
522 ppp_start(l2tp->ppp); /* notify upper layers */ in pppol2tp_dispatch_control_packet()
745 if (!l2tp->ppp->settings.persist && l2tp->sccrq_retried >= PPPOL2TP_MAXSCCRQ) { in pppol2tp_timeout()
807 ppp_link_failed(l2tp->ppp); /* notify upper layers */ in pppol2tp_abort_connect()