Lines Matching full:go
378 memset(go, 0, sizeof(*go)); in ccp_init()
411 ccp_options *go = &pcb->ccp_gotoptions; in ccp_open() local
421 if (!ccp_anycompress(go)) in ccp_open()
457 ccp_options *go = &pcb->ccp_gotoptions; in ccp_input() local
468 if (go->mppe) { in ccp_input()
480 && !ccp_anycompress(go)) in ccp_input()
523 ccp_options *go = &pcb->ccp_gotoptions; in ccp_protrej() local
530 if (go->mppe) { in ccp_protrej()
543 ccp_options *go = &pcb->ccp_gotoptions; in ccp_resetci() local
563 *go = *wo; in ccp_resetci()
567 if (go->mppe) { in ccp_resetci()
613 if (go->mppe & MPPE_OPT_40) { in ccp_resetci()
615 go->mppe &= ~MPPE_OPT_40; in ccp_resetci()
621 if (!(go->mppe & (MPPE_OPT_40 | MPPE_OPT_128))) { in ccp_resetci()
629 ao->mppe = go->mppe; in ccp_resetci()
632 ao->bsd_compress = go->bsd_compress = 0; in ccp_resetci()
635 ao->predictor_1 = go->predictor_1 = 0; in ccp_resetci()
636 ao->predictor_2 = go->predictor_2 = 0; in ccp_resetci()
639 ao->deflate = go->deflate = 0; in ccp_resetci()
652 if (go->bsd_compress) { in ccp_resetci()
656 if (go->bsd_bits < BSD_MIN_BITS) { in ccp_resetci()
657 go->bsd_compress = 0; in ccp_resetci()
660 opt_buf[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); in ccp_resetci()
665 go->bsd_compress = 0; in ccp_resetci()
668 go->bsd_bits--; in ccp_resetci()
676 if (go->deflate) { in ccp_resetci()
677 if (go->deflate_correct) { in ccp_resetci()
682 if (go->deflate_size < DEFLATE_MIN_WORKS) { in ccp_resetci()
683 go->deflate_correct = 0; in ccp_resetci()
686 opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); in ccp_resetci()
691 go->deflate_correct = 0; in ccp_resetci()
694 go->deflate_size--; in ccp_resetci()
697 if (go->deflate_draft) { in ccp_resetci()
702 if (go->deflate_size < DEFLATE_MIN_WORKS) { in ccp_resetci()
703 go->deflate_draft = 0; in ccp_resetci()
706 opt_buf[2] = DEFLATE_MAKE_OPT(go->deflate_size); in ccp_resetci()
711 go->deflate_draft = 0; in ccp_resetci()
714 go->deflate_size--; in ccp_resetci()
717 if (!go->deflate_correct && !go->deflate_draft) in ccp_resetci()
718 go->deflate = 0; in ccp_resetci()
725 if (go->predictor_1) { in ccp_resetci()
729 go->predictor_1 = 0; in ccp_resetci()
731 if (go->predictor_2) { in ccp_resetci()
735 go->predictor_2 = 0; in ccp_resetci()
745 ccp_options *go = &pcb->ccp_gotoptions; in ccp_cilen() local
749 + (go->bsd_compress? CILEN_BSD_COMPRESS: 0) in ccp_cilen()
752 + (go->deflate && go->deflate_correct? CILEN_DEFLATE: 0) in ccp_cilen()
753 + (go->deflate && go->deflate_draft? CILEN_DEFLATE: 0) in ccp_cilen()
756 + (go->predictor_1? CILEN_PREDICTOR_1: 0) in ccp_cilen()
757 + (go->predictor_2? CILEN_PREDICTOR_2: 0) in ccp_cilen()
760 + (go->mppe? CILEN_MPPE: 0) in ccp_cilen()
770 ccp_options *go = &pcb->ccp_gotoptions; in ccp_addci() local
778 if (go->mppe) { in ccp_addci()
781 MPPE_OPTS_TO_CI(go->mppe, &p[2]); in ccp_addci()
782 mppe_init(pcb, &pcb->mppe_decomp, go->mppe); in ccp_addci()
787 if (go->deflate) { in ccp_addci()
788 if (go->deflate_correct) { in ccp_addci()
791 p[2] = DEFLATE_MAKE_OPT(go->deflate_size); in ccp_addci()
795 if (go->deflate_draft) { in ccp_addci()
805 if (go->bsd_compress) { in ccp_addci()
808 p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits); in ccp_addci()
814 if (go->predictor_1) { in ccp_addci()
819 if (go->predictor_2) { in ccp_addci()
826 go->method = (p > p0)? p0[0]: 0; in ccp_addci()
837 ccp_options *go = &pcb->ccp_gotoptions; in ccp_ackci() local
843 if (go->mppe) { in ccp_ackci()
848 MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]); in ccp_ackci()
859 if (go->deflate) { in ccp_ackci()
861 || p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) in ccp_ackci()
863 || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) in ccp_ackci()
871 if (go->deflate_correct && go->deflate_draft) { in ccp_ackci()
875 || p[2] != DEFLATE_MAKE_OPT(go->deflate_size) in ccp_ackci()
884 if (go->bsd_compress) { in ccp_ackci()
887 || p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) in ccp_ackci()
897 if (go->predictor_1) { in ccp_ackci()
907 if (go->predictor_2) { in ccp_ackci()
930 ccp_options *go = &pcb->ccp_gotoptions; in ccp_nakci() local
940 try_ = *go; in ccp_nakci()
943 if (go->mppe && len >= CILEN_MPPE in ccp_nakci()
954 } else if (((go->mppe | MPPE_OPT_STATEFUL) & try_.mppe) != try_.mppe) { in ccp_nakci()
966 if (go->deflate && len >= CILEN_DEFLATE in ccp_nakci()
967 && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT) in ccp_nakci()
978 else if (DEFLATE_SIZE(p[2]) < go->deflate_size) in ccp_nakci()
982 if (go->deflate_correct && go->deflate_draft in ccp_nakci()
991 if (go->bsd_compress && len >= CILEN_BSD_COMPRESS in ccp_nakci()
1000 else if (BSD_NBITS(p[2]) < go->bsd_bits) in ccp_nakci()
1014 *go = try_; in ccp_nakci()
1023 ccp_options *go = &pcb->ccp_gotoptions; in ccp_rejci() local
1026 try_ = *go; in ccp_rejci()
1036 if (go->mppe && len >= CILEN_MPPE in ccp_rejci()
1045 if (go->deflate_correct && len >= CILEN_DEFLATE in ccp_rejci()
1047 if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) in ccp_rejci()
1054 if (go->deflate_draft && len >= CILEN_DEFLATE in ccp_rejci()
1056 if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size) in ccp_rejci()
1067 if (go->bsd_compress && len >= CILEN_BSD_COMPRESS in ccp_rejci()
1069 if (p[2] != BSD_MAKE_OPT(BSD_CURRENT_VERSION, go->bsd_bits)) in ccp_rejci()
1077 if (go->predictor_1 && len >= CILEN_PREDICTOR_1 in ccp_rejci()
1083 if (go->predictor_2 && len >= CILEN_PREDICTOR_2 in ccp_rejci()
1095 *go = try_; in ccp_rejci()
1461 ccp_options *go = &pcb->ccp_gotoptions; in ccp_up() local
1465 ccp_set(pcb, 1, 1, go->method, ho->method); in ccp_up()
1466 if (ccp_anycompress(go)) { in ccp_up()
1468 if (go->method == ho->method) { in ccp_up()
1469 ppp_notice("%s compression enabled", method_name(go, ho)); in ccp_up()
1471 ppp_strlcpy(method1, method_name(go, NULL), sizeof(method1)); in ccp_up()
1476 ppp_notice("%s receive compression enabled", method_name(go, NULL)); in ccp_up()
1480 if (go->mppe) { in ccp_up()
1492 ccp_options *go = &pcb->ccp_gotoptions; in ccp_down() local
1500 if (go->mppe) { in ccp_down()
1501 go->mppe = 0; in ccp_down()
1663 ccp_options *go = &pcb->ccp_gotoptions; in ccp_datainput() local
1680 if (go->mppe) { in ccp_datainput()