• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/router/pppd/pppd/

Lines Matching refs:unit

198 static void ccp_init __P((int unit));
199 static void ccp_open __P((int unit));
200 static void ccp_close __P((int unit, char *));
201 static void ccp_lowerup __P((int unit));
203 static void ccp_input __P((int unit, u_char *pkt, int len));
204 static void ccp_protrej __P((int unit));
208 static void ccp_datainput __P((int unit, u_char *pkt, int len));
382 ccp_init(unit)
383 int unit;
385 fsm *f = &ccp_fsm[unit];
387 f->unit = unit;
392 memset(&ccp_wantoptions[unit], 0, sizeof(ccp_options));
393 memset(&ccp_gotoptions[unit], 0, sizeof(ccp_options));
394 memset(&ccp_allowoptions[unit], 0, sizeof(ccp_options));
395 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_wantoptions[unit].mppe) {
515 lcp_close(unit, "MPPE disabled by peer");
525 && !ANY_COMPRESS(ccp_gotoptions[unit]))
526 ccp_close(unit, "No compression negotiated");
558 if (ccp_localstate[f->unit] & RACK_PENDING && id == f->reqid) {
559 ccp_localstate[f->unit] &= ~(RACK_PENDING | RREQ_REPEAT);
575 ccp_protrej(unit)
576 int unit;
578 ccp_flags_set(unit, 0, 0);
579 fsm_lowerdown(&ccp_fsm[unit]);
582 if (ccp_wantoptions[unit].mppe) {
584 lcp_close(unit, "MPPE required but peer negotiation failed");
596 ccp_options *go = &ccp_gotoptions[f->unit];
599 *go = ccp_wantoptions[f->unit];
600 all_rejected[f->unit] = 0;
604 ccp_options *ao = &ccp_allowoptions[f->unit];
605 int auth_mschap_bits = auth_done[f->unit];
617 if (ccp_wantoptions[f->unit].mppe) {
630 lcp_close(f->unit, "MPPE required but not available");
635 lcp_close(f->unit, "MPPE required but not available");
643 lcp_close(f->unit, "MPPE required but not available");
660 if (ccp_test(f->unit, opt_buf, CILEN_MPPE, 0) <= 0)
670 if (ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0) <= 0)
680 if (ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0) <= 0)
690 if (ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0) <= 0)
694 if (ccp_wantoptions[f->unit].mppe) {
696 lcp_close(f->unit, "MPPE required but not available");
701 if (ccp_wantoptions[f->unit].mppe) {
717 if (ccp_test(f->unit, opt_buf, CILEN_LZS, 0) <= 0)
724 if (ccp_test(f->unit, opt_buf, CILEN_BSD_COMPRESS, 0) <= 0)
733 if (ccp_test(f->unit, opt_buf, CILEN_DEFLATE, 0) <= 0)
741 if (ccp_test(f->unit, opt_buf, CILEN_DEFLATE, 0) <= 0)
750 if (ccp_test(f->unit, opt_buf, CILEN_PREDICTOR_1, 0) <= 0)
756 if (ccp_test(f->unit, opt_buf, CILEN_PREDICTOR_2, 0) <= 0)
768 ccp_options *go = &ccp_gotoptions[f->unit];
788 ccp_options *go = &ccp_gotoptions[f->unit];
789 ccp_options *ao = &ccp_allowoptions[f->unit];
790 ccp_options *wo = &ccp_wantoptions[f->unit];
812 res = ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0);
819 if (ccp_wantoptions[f->unit].mppe)
820 lcp_close(f->unit, "MPPE required but not available in kernel");
830 res = ccp_test(f->unit, p, CILEN_LZS, 0);
849 res = ccp_test(f->unit, p, CILEN_DEFLATE, 0);
881 res = ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 0);
898 if (p == p0 && ccp_test(f->unit, p, CILEN_PREDICTOR_1, 0) <= 0) {
907 if (p == p0 && ccp_test(f->unit, p, CILEN_PREDICTOR_2, 0) <= 0) {
929 ccp_options *go = &ccp_gotoptions[f->unit];
930 ccp_options *ao = &ccp_allowoptions[f->unit];
931 ccp_options *wo = &ccp_wantoptions[f->unit];
1038 ccp_options *go = &ccp_gotoptions[f->unit];
1039 ccp_options *ao = &ccp_allowoptions[f->unit];
1040 ccp_options *wo = &ccp_wantoptions[f->unit];
1101 lcp_close(f->unit, "MPPE required but cannot negotiate MPPE "
1110 lcp_close(f->unit, "Cannot negotiate MPPE key length");
1201 ccp_options *go = &ccp_gotoptions[f->unit];
1210 if (len == 0 && all_rejected[f->unit])
1216 ccp_options *wo = &ccp_wantoptions[f->unit];
1242 lcp_close(f->unit, "MPPE required but cannot negotiate MPPE "
1323 ccp_options *ho = &ccp_hisoptions[f->unit];
1324 ccp_options *ao = &ccp_allowoptions[f->unit];
1325 ccp_options *wo = &ccp_wantoptions[f->unit];
1381 if (ccp_test(f->unit, opt_buf, CILEN_MPPE, 1) <= 0) {
1428 if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
1448 if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
1468 if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
1486 if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
1507 if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
1527 if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
1546 if (ccp_test(f->unit, opt_buf, CILEN_MPPE +
1612 mtu = netif_get_mtu(f->unit);
1614 netif_set_mtu(f->unit, mtu - MPPE_PAD);
1617 if (ccp_wantoptions[f->unit].mppe) {
1619 lcp_close(f->unit, "Cannot adjust MTU needed by MPPE.");
1646 if (p == p0 && ccp_test(f->unit, p, CILEN_LZS, 1) <= 0) {
1682 res = ccp_test(f->unit, p, CILEN_DEFLATE, 1);
1723 res = ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 1);
1747 && ccp_test(f->unit, p, CILEN_PREDICTOR_1, 1) <= 0) {
1760 && ccp_test(f->unit, p, CILEN_PREDICTOR_2, 1) <= 0) {
1788 all_rejected[f->unit] = 1;
1878 ccp_options *go = &ccp_gotoptions[f->unit];
1879 ccp_options *ho = &ccp_hisoptions[f->unit];
1882 ccp_flags_set(f->unit, 1, 1);
1900 continue_networks(f->unit); /* Bring up IP et al */
1912 if (ccp_localstate[f->unit] & RACK_PENDING)
1914 ccp_localstate[f->unit] = 0;
1915 ccp_flags_set(f->unit, 1, 0);
1917 if (ccp_gotoptions[f->unit].mppe) {
1918 ccp_gotoptions[f->unit].mppe = 0;
1919 if (lcp_fsm[f->unit].state == OPENED) {
1922 lcp_close(f->unit, "MPPE disabled");
2076 ccp_datainput(unit, pkt, len)
2077 int unit;
2083 f = &ccp_fsm[unit];
2085 if (ccp_fatal_error(unit)) {
2090 ccp_close(unit, "Lost compression sync");
2096 if (ccp_gotoptions[unit].mppe) {
2098 lcp_close(unit, "Too many MPPE errors");
2106 if ((ccp_gotoptions[f->unit].method == CI_LZS) ||
2107 (ccp_gotoptions[f->unit].method == CI_MPPE)) {
2116 if (!(ccp_localstate[f->unit] & RACK_PENDING)) {
2119 ccp_localstate[f->unit] |= RACK_PENDING;
2121 ccp_localstate[f->unit] |= RREQ_REPEAT;
2135 if (f->state == OPENED && ccp_localstate[f->unit] & RREQ_REPEAT) {
2138 ccp_localstate[f->unit] &= ~RREQ_REPEAT;
2140 ccp_localstate[f->unit] &= ~RACK_PENDING;