• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/ppp-786.1.1/Helpers/pppd/

Lines Matching refs:unit

216 static void ccp_init __P((int unit));
217 static void ccp_open __P((int unit));
218 static void ccp_close __P((int unit, char *));
219 static void ccp_lowerup __P((int unit));
221 static void ccp_input __P((int unit, u_char *pkt, int len));
222 static void ccp_protrej __P((int unit));
226 static void ccp_datainput __P((int unit, u_char *pkt, int len));
406 ccp_init(unit)
407 int unit;
409 fsm *f = &ccp_fsm[unit];
411 f->unit = unit;
416 memset(&ccp_wantoptions[unit], 0, sizeof(ccp_options));
417 memset(&ccp_gotoptions[unit], 0, sizeof(ccp_options));
418 memset(&ccp_allowoptions[unit], 0, sizeof(ccp_options));
419 memset(&ccp_hisoptions[unit], 0, sizeof(ccp_options));
442 ccp_open(unit)
443 int unit;
445 fsm *f = &ccp_fsm[unit];
448 ccp_flags_set(unit, 1, 0);
455 if (!ANY_COMPRESS(ccp_gotoptions[unit]))
465 ccp_close(unit, reason)
466 int unit;
469 ccp_flags_set(unit, 0, 0);
470 fsm_close(&ccp_fsm[unit], reason);
477 ccp_lowerup(unit)
478 int unit;
480 fsm_lowerup(&ccp_fsm[unit]);
487 ccp_lowerdown(unit)
488 int unit;
490 fsm_lowerdown(&ccp_fsm[unit]);
497 ccp_input(unit, p, len)
498 int unit;
502 fsm *f = &ccp_fsm[unit];
513 if (ccp_gotoptions[unit].mppe) {
515 lcp_close(unit, "MPPE disabled by peer");
525 && !ANY_COMPRESS(ccp_gotoptions[unit]))
526 ccp_close(unit, "No compression negotiated");
550 if (ccp_localstate[f->unit] & RACK_PENDING && id == f->reqid) {
551 ccp_localstate[f->unit] &= ~(RACK_PENDING | RREQ_REPEAT);
568 ccp_protrej(unit)
569 int unit;
571 ccp_flags_set(unit, 0, 0);
572 fsm_protreject(&ccp_fsm[unit]);
575 if (ccp_gotoptions[unit].mppe) {
577 lcp_close(unit, "MPPE required but peer negotiation failed");
590 ccp_options *go = &ccp_gotoptions[f->unit];
593 *go = ccp_wantoptions[f->unit];
594 all_rejected[f->unit] = 0;
598 ccp_options *ao = &ccp_allowoptions[f->unit];
599 int auth_mschap_bits = auth_done[f->unit];
613 if (auth_done[f->unit] & (EAP_WITHPEER | EAP_PEER)) {
631 lcp_close(f->unit, "MPPE required but not available");
636 lcp_close(f->unit, "MPPE required but not available");
644 lcp_close(f->unit, "MPPE required but not available");
649 if (auth_done[f->unit] & (CHAP_MS_WITHPEER | CHAP_MS_PEER)) {
654 ccp_wantoptions[f->unit].mppe &= ~MPPE_OPT_40;
665 lcp_close(f->unit, "MPPE required but not available");
689 if (ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0) <= 0) {
691 lcp_close(f->unit, "MPPE required but not available");
699 if (ccp_test(f->unit, opt_buf, CILEN_BSD_COMPRESS, 0) <= 0)
708 if (ccp_test(f->unit, opt_buf, CILEN_DEFLATE, 0) <= 0)
716 if (ccp_test(f->unit, opt_buf, CILEN_DEFLATE, 0) <= 0)
725 if (ccp_test(f->unit, opt_buf, CILEN_PREDICTOR_1, 0) <= 0)
731 if (ccp_test(f->unit, opt_buf, CILEN_PREDICTOR_2, 0) <= 0)
743 ccp_options *go = &ccp_gotoptions[f->unit];
762 ccp_options *go = &ccp_gotoptions[f->unit];
779 res = ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0);
784 lcp_close(f->unit, "MPPE required but not available in kernel");
800 res = ccp_test(f->unit, p, CILEN_DEFLATE, 0);
832 res = ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 0);
849 if (p == p0 && ccp_test(f->unit, p, CILEN_PREDICTOR_1, 0) <= 0) {
858 if (p == p0 && ccp_test(f->unit, p, CILEN_PREDICTOR_2, 0) <= 0) {
880 ccp_options *go = &ccp_gotoptions[f->unit];
969 ccp_options *go = &ccp_gotoptions[f->unit];
971 ccp_options *ao = &ccp_allowoptions[f->unit];
1002 lcp_close(f->unit, "MPPE required but peer negotiation failed");
1015 lcp_close(f->unit, "MPPE required but peer negotiation failed");
1079 ccp_options *go = &ccp_gotoptions[f->unit];
1088 if (len == 0 && all_rejected[f->unit])
1095 lcp_close(f->unit, "MPPE required but peer refused");
1165 ccp_options *ho = &ccp_hisoptions[f->unit];
1166 ccp_options *ao = &ccp_allowoptions[f->unit];
1271 if (ccp_test(f->unit, opt_buf,
1275 lcp_close(f->unit, "MPPE required but not available");
1284 mtu = netif_get_mtu(f->unit);
1286 netif_set_mtu(f->unit, mtu - MPPE_PAD);
1330 res = ccp_test(f->unit, p, CILEN_DEFLATE, 1);
1371 res = ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 1);
1395 && ccp_test(f->unit, p, CILEN_PREDICTOR_1, 1) <= 0) {
1408 && ccp_test(f->unit, p, CILEN_PREDICTOR_2, 1) <= 0) {
1436 all_rejected[f->unit] = 1;
1443 lcp_close(f->unit, "MPPE required but peer negotiation failed");
1521 ccp_options *go = &ccp_gotoptions[f->unit];
1522 ccp_options *ho = &ccp_hisoptions[f->unit];
1525 ccp_flags_set(f->unit, 1, 1);
1543 continue_networks(f->unit); /* Bring up IP et al */
1555 if (ccp_localstate[f->unit] & RACK_PENDING)
1557 ccp_localstate[f->unit] = 0;
1558 ccp_flags_set(f->unit, 1, 0);
1560 if (ccp_gotoptions[f->unit].mppe) {
1561 ccp_gotoptions[f->unit].mppe = 0;
1562 if (lcp_fsm[f->unit].state == OPENED) {
1565 lcp_close(f->unit, "MPPE disabled");
1715 ccp_datainput(unit, pkt, len)
1716 int unit;
1722 f = &ccp_fsm[unit];
1724 if (ccp_fatal_error(unit)) {
1729 ccp_close(unit, "Lost compression sync");
1734 if (ccp_gotoptions[unit].mppe) {
1736 lcp_close(unit, "Too many MPPE errors");
1745 if (!(ccp_localstate[f->unit] & RACK_PENDING)) {
1748 ccp_localstate[f->unit] |= RACK_PENDING;
1750 ccp_localstate[f->unit] |= RREQ_REPEAT;
1764 if (f->state == OPENED && ccp_localstate[f->unit] & RREQ_REPEAT) {
1767 ccp_localstate[f->unit] &= ~RREQ_REPEAT;
1769 ccp_localstate[f->unit] &= ~RACK_PENDING;