Lines Matching refs:unit
500 lcp_init(unit) in lcp_init() argument
501 int unit; in lcp_init()
503 fsm *f = &lcp_fsm[unit];
504 lcp_options *wo = &lcp_wantoptions[unit];
505 lcp_options *ao = &lcp_allowoptions[unit];
507 f->unit = unit;
561 BZERO(xmit_accm[unit], sizeof(xmit_accm[0]));
562 xmit_accm[unit][3] = 0x60000000;
570 lcp_open(unit) in lcp_open() argument
571 int unit; in lcp_open()
573 fsm *f = &lcp_fsm[unit];
574 lcp_options *wo = &lcp_wantoptions[unit];
589 lcp_close(unit, reason) in lcp_close() argument
590 int unit; in lcp_close()
593 fsm *f = &lcp_fsm[unit];
608 fsm_close(&lcp_fsm[unit], reason);
616 lcp_lowerup(unit) in lcp_lowerup() argument
617 int unit; in lcp_lowerup()
619 lcp_options *wo = &lcp_wantoptions[unit];
630 ppp_set_xaccm(unit, xmit_accm[unit]);
631 ppp_send_config(unit, mtu, 0xffffffff, 0, 0);
632 ppp_recv_config(unit, mru, (lax_recv? 0: 0xffffffff),
635 ppp_send_fcs(unit, FCSALT_16);
636 ppp_recv_fcs(unit, FCSALT_16);
639 fsm_setpeermru(unit, mtu);
640 lcp_allowoptions[unit].asyncmap = xmit_accm[unit][0];
642 fsm_lowerup(&lcp_fsm[unit]);
650 lcp_lowerdown(unit) in lcp_lowerdown() argument
651 int unit; in lcp_lowerdown()
653 fsm_lowerdown(&lcp_fsm[unit]);
661 lcp_input(unit, p, len) in lcp_input() argument
662 int unit; in lcp_input()
666 fsm *f = &lcp_fsm[unit];
693 PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp);
765 (*protp->protrej)(f->unit);
778 lcp_protrej(unit) in lcp_protrej() argument
779 int unit; in lcp_protrej()
821 lcp_sprotrej(unit, p, len) in lcp_sprotrej() argument
822 int unit; in lcp_sprotrej()
833 fsm_sdata(&lcp_fsm[unit], CODE_PROTREJ, ++lcp_fsm[unit].id,
845 lcp_options *wo = &lcp_wantoptions[f->unit];
846 lcp_options *go = &lcp_gotoptions[f->unit];
847 lcp_options *ao = &lcp_allowoptions[f->unit];
864 fsm_setpeermru(f->unit, PPP_MTU > absmax_mtu ? absmax_mtu : PPP_MTU);
865 auth_reset(f->unit);
876 lcp_options *go = &lcp_gotoptions[f->unit];
918 lcp_options *go = &lcp_gotoptions[f->unit];
919 lcp_options *ho = &lcp_hisoptions[f->unit];
1016 lcp_options *go = &lcp_gotoptions[f->unit];
1018 lcp_options *ao = &lcp_allowoptions[f->unit];
1198 lcp_options *go = &lcp_gotoptions[f->unit];
1199 lcp_options *wo = &lcp_wantoptions[f->unit];
1589 lcp_close(f->unit, "Loopback detected");
1619 lcp_options *go = &lcp_gotoptions[f->unit];
1837 lcp_options *wo = &lcp_wantoptions[f->unit];
1838 lcp_options *go = &lcp_gotoptions[f->unit];
1839 lcp_options *ho = &lcp_hisoptions[f->unit];
1840 lcp_options *ao = &lcp_allowoptions[f->unit];
2391 lcp_options *wo = &lcp_wantoptions[f->unit];
2392 lcp_options *ho = &lcp_hisoptions[f->unit];
2393 lcp_options *go = &lcp_gotoptions[f->unit];
2394 lcp_options *ao = &lcp_allowoptions[f->unit];
2413 ppp_send_config(f->unit, mtu,
2416 fsm_setpeermru(f->unit, mtu);
2420 ppp_recv_config(f->unit, mru,
2424 ppp_send_fcs(f->unit, ho->neg_fcs ? ho->fcs_type : FCSALT_16);
2425 ppp_recv_fcs(f->unit, go->neg_fcs ? go->fcs_type : FCSALT_16);
2428 ppp_send_muxoption(f->unit, ho->pppmux);
2429 ppp_recv_muxoption(f->unit, go->pppmux);
2432 lcp_echo_lowerup(f->unit); /* Enable echo messages */
2440 link_established(f->unit);
2454 lcp_options *go = &lcp_gotoptions[f->unit];
2456 lcp_echo_lowerdown(f->unit);
2458 link_down(f->unit);
2461 ppp_send_config(f->unit, mtu, 0xffffffff, 0, 0);
2462 ppp_recv_config(f->unit, (PPP_MRU > absmax_mru ? absmax_mru : PPP_MRU),
2466 ppp_send_fcs(f->unit, FCSALT_16);
2467 ppp_recv_fcs(f->unit, FCSALT_16);
2469 fsm_setpeermru(f->unit, mtu);
2480 link_required(f->unit);
2491 link_terminated(f->unit);
2870 lcp_close(f->unit, close_message);
2930 if (lcp_gotoptions[f->unit].neg_magicnumber &&
2931 magic == lcp_gotoptions[f->unit].magicnumber) {
2981 lcp_magic = lcp_gotoptions[f->unit].magicnumber;
3009 lcp_echo_lowerup (unit) in lcp_echo_lowerup() argument
3010 int unit; in lcp_echo_lowerup()
3012 fsm *f = &lcp_fsm[unit];
3029 lcp_echo_lowerdown (unit) in lcp_echo_lowerdown() argument
3030 int unit; in lcp_echo_lowerdown()
3032 fsm *f = &lcp_fsm[unit];
3056 lcp_magic = lcp_gotoptions[f->unit].magicnumber;
3085 if (lcp_gotoptions[f->unit].neg_magicnumber && f->state == OPENED &&
3086 magic == lcp_gotoptions[f->unit].magicnumber) {
3109 lcp_magic = lcp_gotoptions[f->unit].magicnumber;
3133 if (lcp_gotoptions[f->unit].neg_magicnumber && f->state == OPENED &&
3134 magic == lcp_gotoptions[f->unit].magicnumber) {
3157 int unit; local
3159 unit = lt->unit;
3161 LcpSendTimeRemaining(&lcp_fsm[unit], time_remaining);
3172 lcp_settimeremaining(unit, connecttime, time_remaining) in lcp_settimeremaining() argument
3173 int unit; in lcp_settimeremaining()
3180 LcpSendTimeRemaining(&lcp_fsm[unit], time_remaining);
3183 lt->unit = unit;