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

Lines Matching refs:unit

102 static void ccp_init __P((int unit));
103 static void ccp_open __P((int unit));
104 static void ccp_close __P((int unit, char *));
105 static void ccp_lowerup __P((int unit));
107 static void ccp_input __P((int unit, u_char *pkt, int len));
108 static void ccp_protrej __P((int unit));
112 static void ccp_datainput __P((int unit, u_char *pkt, int len));
285 ccp_init(unit)
286 int unit;
288 fsm *f = &ccp_fsm[unit];
290 f->unit = unit;
295 memset(&ccp_wantoptions[unit], 0, sizeof(ccp_options));
296 memset(&ccp_gotoptions[unit], 0, sizeof(ccp_options));
297 memset(&ccp_allowoptions[unit], 0, sizeof(ccp_options));
298 memset(&ccp_hisoptions[unit], 0, sizeof(ccp_options));
321 ccp_open(unit)
322 int unit;
324 fsm *f = &ccp_fsm[unit];
327 ccp_flags_set(unit, 1, 0);
334 if (!ANY_COMPRESS(ccp_gotoptions[unit]))
344 ccp_close(unit, reason)
345 int unit;
348 ccp_flags_set(unit, 0, 0);
349 fsm_close(&ccp_fsm[unit], reason);
356 ccp_lowerup(unit)
357 int unit;
359 fsm_lowerup(&ccp_fsm[unit]);
366 ccp_lowerdown(unit)
367 int unit;
369 fsm_lowerdown(&ccp_fsm[unit]);
376 ccp_input(unit, p, len)
377 int unit;
381 fsm *f = &ccp_fsm[unit];
397 && !ANY_COMPRESS(ccp_gotoptions[unit]))
398 ccp_close(unit, "No compression negotiated");
421 if (ccp_localstate[f->unit] & RACK_PENDING && id == f->reqid) {
422 ccp_localstate[f->unit] &= ~(RACK_PENDING | RREQ_REPEAT);
438 ccp_protrej(unit)
439 int unit;
441 ccp_flags_set(unit, 0, 0);
442 fsm_lowerdown(&ccp_fsm[unit]);
452 ccp_options *go = &ccp_gotoptions[f->unit];
455 *go = ccp_wantoptions[f->unit];
456 all_rejected[f->unit] = 0;
466 if (ccp_test(f->unit, opt_buf, CILEN_BSD_COMPRESS, 0) <= 0)
475 if (ccp_test(f->unit, opt_buf, CILEN_DEFLATE, 0) <= 0)
483 if (ccp_test(f->unit, opt_buf, CILEN_DEFLATE, 0) <= 0)
492 if (ccp_test(f->unit, opt_buf, CILEN_PREDICTOR_1, 0) <= 0)
498 if (ccp_test(f->unit, opt_buf, CILEN_PREDICTOR_2, 0) <= 0)
510 ccp_options *go = &ccp_gotoptions[f->unit];
528 ccp_options *go = &ccp_gotoptions[f->unit];
542 res = ccp_test(f->unit, p, CILEN_DEFLATE, 0);
570 res = ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 0);
587 if (p == p0 && ccp_test(f->unit, p, CILEN_PREDICTOR_1, 0) <= 0) {
596 if (p == p0 && ccp_test(f->unit, p, CILEN_PREDICTOR_2, 0) <= 0) {
618 ccp_options *go = &ccp_gotoptions[f->unit];
687 ccp_options *go = &ccp_gotoptions[f->unit];
753 ccp_options *go = &ccp_gotoptions[f->unit];
762 if (len == 0 && all_rejected[f->unit])
835 ccp_options *ho = &ccp_hisoptions[f->unit];
836 ccp_options *ao = &ccp_allowoptions[f->unit];
888 res = ccp_test(f->unit, p, CILEN_DEFLATE, 1);
929 res = ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 1);
953 && ccp_test(f->unit, p, CILEN_PREDICTOR_1, 1) <= 0) {
966 && ccp_test(f->unit, p, CILEN_PREDICTOR_2, 1) <= 0) {
994 all_rejected[f->unit] = 1;
1049 ccp_options *go = &ccp_gotoptions[f->unit];
1050 ccp_options *ho = &ccp_hisoptions[f->unit];
1053 ccp_flags_set(f->unit, 1, 1);
1076 if (ccp_localstate[f->unit] & RACK_PENDING)
1078 ccp_localstate[f->unit] = 0;
1079 ccp_flags_set(f->unit, 1, 0);
1205 ccp_datainput(unit, pkt, len)
1206 int unit;
1212 f = &ccp_fsm[unit];
1214 if (ccp_fatal_error(unit)) {
1219 ccp_close(unit, "Lost compression sync");
1226 if (!(ccp_localstate[f->unit] & RACK_PENDING)) {
1229 ccp_localstate[f->unit] |= RACK_PENDING;
1231 ccp_localstate[f->unit] |= RREQ_REPEAT;
1245 if (f->state == OPENED && ccp_localstate[f->unit] & RREQ_REPEAT) {
1248 ccp_localstate[f->unit] &= ~RREQ_REPEAT;
1250 ccp_localstate[f->unit] &= ~RACK_PENDING;