• Home
  • Raw
  • Download

Lines Matching refs:pcb

168 static void ccp_init(ppp_pcb *pcb);
169 static void ccp_open(ppp_pcb *pcb);
170 static void ccp_close(ppp_pcb *pcb, const char *reason);
171 static void ccp_lowerup(ppp_pcb *pcb);
172 static void ccp_lowerdown(ppp_pcb *pcb);
173 static void ccp_input(ppp_pcb *pcb, u_char *pkt, int len);
174 static void ccp_protrej(ppp_pcb *pcb);
179 static void ccp_datainput(ppp_pcb *pcb, u_char *pkt, int len);
368 static void ccp_init(ppp_pcb *pcb) { in ccp_init() argument
369 fsm *f = &pcb->ccp_fsm; in ccp_init()
371 f->pcb = pcb; in ccp_init()
409 static void ccp_open(ppp_pcb *pcb) { in ccp_open() argument
410 fsm *f = &pcb->ccp_fsm; in ccp_open()
411 ccp_options *go = &pcb->ccp_gotoptions; in ccp_open()
414 ccp_set(pcb, 1, 0, 0, 0); in ccp_open()
430 static void ccp_close(ppp_pcb *pcb, const char *reason) { in ccp_close() argument
431 fsm *f = &pcb->ccp_fsm; in ccp_close()
432 ccp_set(pcb, 0, 0, 0, 0); in ccp_close()
439 static void ccp_lowerup(ppp_pcb *pcb) { in ccp_lowerup() argument
440 fsm *f = &pcb->ccp_fsm; in ccp_lowerup()
447 static void ccp_lowerdown(ppp_pcb *pcb) { in ccp_lowerdown() argument
448 fsm *f = &pcb->ccp_fsm; in ccp_lowerdown()
455 static void ccp_input(ppp_pcb *pcb, u_char *p, int len) { in ccp_input() argument
456 fsm *f = &pcb->ccp_fsm; in ccp_input()
457 ccp_options *go = &pcb->ccp_gotoptions; in ccp_input()
470 lcp_close(pcb, "MPPE disabled by peer"); in ccp_input()
481 ccp_close(pcb, "No compression negotiated"); in ccp_input()
488 ppp_pcb *pcb = f->pcb; in ccp_extcode() local
496 ccp_reset_comp(pcb); in ccp_extcode()
503 if ((pcb->ccp_localstate & RACK_PENDING) && id == f->reqid) { in ccp_extcode()
504 pcb->ccp_localstate &= ~(RACK_PENDING | RREQ_REPEAT); in ccp_extcode()
506 ccp_reset_decomp(pcb); in ccp_extcode()
520 static void ccp_protrej(ppp_pcb *pcb) { in ccp_protrej() argument
521 fsm *f = &pcb->ccp_fsm; in ccp_protrej()
523 ccp_options *go = &pcb->ccp_gotoptions; in ccp_protrej()
526 ccp_set(pcb, 0, 0, 0, 0); in ccp_protrej()
532 lcp_close(pcb, "MPPE required but peer negotiation failed"); in ccp_protrej()
542 ppp_pcb *pcb = f->pcb; in ccp_resetci() local
543 ccp_options *go = &pcb->ccp_gotoptions; in ccp_resetci()
544 ccp_options *wo = &pcb->ccp_wantoptions; in ccp_resetci()
546 ccp_options *ao = &pcb->ccp_allowoptions; in ccp_resetci()
556 if (pcb->settings.require_mppe) { in ccp_resetci()
558 (pcb->settings.refuse_mppe_40 ? 0 : MPPE_OPT_40) in ccp_resetci()
559 | (pcb->settings.refuse_mppe_128 ? 0 : MPPE_OPT_128); in ccp_resetci()
564 pcb->ccp_all_rejected = 0; in ccp_resetci()
568 int auth_mschap_bits = pcb->auth_done; in ccp_resetci()
593 lcp_close(pcb, "MPPE required but not available"); in ccp_resetci()
598 lcp_close(pcb, "MPPE required but not available"); in ccp_resetci()
603 if (!pcb->mppe_keys_set) { in ccp_resetci()
606 lcp_close(pcb, "MPPE required but not available"); in ccp_resetci()
611 if (pcb->auth_done & (CHAP_MS_WITHPEER | CHAP_MS_PEER)) { in ccp_resetci()
624 lcp_close(pcb, "MPPE required but not available"); in ccp_resetci()
661 res = ccp_test(pcb, opt_buf, CILEN_BSD_COMPRESS, 0); in ccp_resetci()
687 res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); in ccp_resetci()
707 res = ccp_test(pcb, opt_buf, CILEN_DEFLATE, 0); in ccp_resetci()
728 if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_1, 0) <= 0) in ccp_resetci()
734 if (ccp_test(pcb, opt_buf, CILEN_PREDICTOR_2, 0) <= 0) in ccp_resetci()
744 ppp_pcb *pcb = f->pcb; in ccp_cilen() local
745 ccp_options *go = &pcb->ccp_gotoptions; in ccp_cilen()
769 ppp_pcb *pcb = f->pcb; in ccp_addci() local
770 ccp_options *go = &pcb->ccp_gotoptions; in ccp_addci()
782 mppe_init(pcb, &pcb->mppe_decomp, go->mppe); in ccp_addci()
836 ppp_pcb *pcb = f->pcb; in ccp_ackci() local
837 ccp_options *go = &pcb->ccp_gotoptions; in ccp_ackci()
929 ppp_pcb *pcb = f->pcb; in ccp_nakci() local
930 ccp_options *go = &pcb->ccp_gotoptions; in ccp_nakci()
951 if ((try_.mppe & MPPE_OPT_STATEFUL) && pcb->settings.refuse_mppe_stateful) { in ccp_nakci()
961 lcp_close(pcb, "MPPE required but peer negotiation failed"); in ccp_nakci()
1022 ppp_pcb *pcb = f->pcb; in ccp_rejci() local
1023 ccp_options *go = &pcb->ccp_gotoptions; in ccp_rejci()
1032 if (len == 0 && pcb->ccp_all_rejected) in ccp_rejci()
1039 lcp_close(pcb, "MPPE required but peer refused"); in ccp_rejci()
1106 ppp_pcb *pcb = f->pcb; in ccp_reqci() local
1107 ccp_options *ho = &pcb->ccp_hisoptions; in ccp_reqci()
1108 ccp_options *ao = &pcb->ccp_allowoptions; in ccp_reqci()
1166 if (pcb->settings.refuse_mppe_stateful) { in ccp_reqci()
1210 mppe_init(pcb, &pcb->mppe_comp, ho->mppe); in ccp_reqci()
1216 mtu = netif_get_mtu(pcb); in ccp_reqci()
1218 netif_set_mtu(pcb, mtu - MPPE_PAD); in ccp_reqci()
1263 res = ccp_test(pcb, p, CILEN_DEFLATE, 1); in ccp_reqci()
1305 res = ccp_test(pcb, p, CILEN_BSD_COMPRESS, 1); in ccp_reqci()
1330 && ccp_test(pcb, p, CILEN_PREDICTOR_1, 1) <= 0) { in ccp_reqci()
1343 && ccp_test(pcb, p, CILEN_PREDICTOR_2, 1) <= 0) { in ccp_reqci()
1372 pcb->ccp_all_rejected = 1; in ccp_reqci()
1379 lcp_close(pcb, "MPPE required but peer negotiation failed"); in ccp_reqci()
1460 ppp_pcb *pcb = f->pcb; in ccp_up() local
1461 ccp_options *go = &pcb->ccp_gotoptions; in ccp_up()
1462 ccp_options *ho = &pcb->ccp_hisoptions; in ccp_up()
1465 ccp_set(pcb, 1, 1, go->method, ho->method); in ccp_up()
1481 continue_networks(pcb); /* Bring up IP et al */ in ccp_up()
1490 ppp_pcb *pcb = f->pcb; in ccp_down() local
1492 ccp_options *go = &pcb->ccp_gotoptions; in ccp_down()
1495 if (pcb->ccp_localstate & RACK_PENDING) in ccp_down()
1497 pcb->ccp_localstate = 0; in ccp_down()
1498 ccp_set(pcb, 1, 0, 0, 0); in ccp_down()
1502 if (pcb->lcp_fsm.state == PPP_FSM_OPENED) { in ccp_down()
1505 lcp_close(pcb, "MPPE disabled"); in ccp_down()
1660 static void ccp_datainput(ppp_pcb *pcb, u_char *pkt, int len) { in ccp_datainput() argument
1663 ccp_options *go = &pcb->ccp_gotoptions; in ccp_datainput()
1668 f = &pcb->ccp_fsm; in ccp_datainput()
1670 if (ccp_fatal_error(pcb)) { in ccp_datainput()
1675 ccp_close(pcb, "Lost compression sync"); in ccp_datainput()
1682 lcp_close(pcb, "Too many MPPE errors"); in ccp_datainput()
1691 if (!(pcb->ccp_localstate & RACK_PENDING)) { in ccp_datainput()
1694 pcb->ccp_localstate |= RACK_PENDING; in ccp_datainput()
1696 pcb->ccp_localstate |= RREQ_REPEAT; in ccp_datainput()
1706 void ccp_resetrequest(ppp_pcb *pcb) { in ccp_resetrequest() argument
1707 fsm *f = &pcb->ccp_fsm; in ccp_resetrequest()
1717 if (!(pcb->ccp_localstate & RACK_PENDING)) { in ccp_resetrequest()
1720 pcb->ccp_localstate |= RACK_PENDING; in ccp_resetrequest()
1722 pcb->ccp_localstate |= RREQ_REPEAT; in ccp_resetrequest()
1730 ppp_pcb *pcb = f->pcb; in ccp_rack_timeout() local
1732 if (f->state == PPP_FSM_OPENED && (pcb->ccp_localstate & RREQ_REPEAT)) { in ccp_rack_timeout()
1735 pcb->ccp_localstate &= ~RREQ_REPEAT; in ccp_rack_timeout()
1737 pcb->ccp_localstate &= ~RACK_PENDING; in ccp_rack_timeout()