Lines Matching refs:protocol
216 static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protocol);
508 static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protocol) { in ppp_netif_output() argument
516 || (protocol == PPP_IP && !pcb->if4_up) in ppp_netif_output()
519 || (protocol == PPP_IPV6 && !pcb->if6_up) in ppp_netif_output()
539 if (protocol == PPP_IP && pcb->vj_enabled) { in ppp_netif_output()
549 protocol = PPP_VJC_COMP; in ppp_netif_output()
555 protocol = PPP_VJC_UNCOMP; in ppp_netif_output()
573 if ((err = mppe_compress(pcb, &pcb->mppe_comp, &pb, protocol)) != ERR_OK) { in ppp_netif_output()
586 protocol = PPP_COMP; in ppp_netif_output()
595 err = pcb->link_cb->netif_output(pcb, pcb->link_ctx_cb, pb, protocol); in ppp_netif_output()
778 u16_t protocol; in ppp_input() local
789 protocol = (((u8_t *)pb->payload)[0] << 8) | ((u8_t*)pb->payload)[1]; in ppp_input()
795 pbuf_remove_header(pb, sizeof(protocol)); in ppp_input()
804 if (protocol != PPP_LCP && pcb->lcp_fsm.state != PPP_FSM_OPENED) { in ppp_input()
814 && !(protocol == PPP_LCP in ppp_input()
816 || protocol == PPP_LQR in ppp_input()
819 || protocol == PPP_PAP in ppp_input()
822 || protocol == PPP_CHAP in ppp_input()
825 || protocol == PPP_EAP in ppp_input()
828 ppp_dbglog("discarding proto 0x%x in phase %d", protocol, pcb->phase); in ppp_input()
840 if (pcb->settings.require_mppe && protocol != PPP_COMP && protocol < 0x8000) { in ppp_input()
846 if (protocol == PPP_COMP) { in ppp_input()
870 protocol = pl[0]; in ppp_input()
873 protocol = (pl[0] << 8) | pl[1]; in ppp_input()
879 switch(protocol) { in ppp_input()
933 if (protp->protocol == protocol) { in ppp_input()
951 if (protocol == (protp->protocol & ~0x8000) in ppp_input()
961 pname = protocol_name(protocol); in ppp_input()
963 ppp_warn("Unsupported protocol '%s' (0x%x) received", pname, protocol); in ppp_input()
966 ppp_warn("Unsupported protocol 0x%x received", protocol); in ppp_input()
968 if (pbuf_add_header(pb, sizeof(protocol))) { in ppp_input()