Lines Matching defs:unit
175 lcp_init(int unit)
177 fsm *f = &lcp_fsm[unit];
178 lcp_options *wo = &lcp_wantoptions[unit];
179 lcp_options *ao = &lcp_allowoptions[unit];
181 f->unit = unit;
221 memset(xmit_accm[unit], 0, sizeof(xmit_accm[0]));
222 xmit_accm[unit][3] = 0x60000000;
230 lcp_open(int unit)
232 fsm *f = &lcp_fsm[unit];
233 lcp_options *wo = &lcp_wantoptions[unit];
248 lcp_close(int unit, char *reason)
250 fsm *f = &lcp_fsm[unit];
265 fsm_close(&lcp_fsm[unit], reason);
273 lcp_lowerup(int unit)
275 lcp_options *wo = &lcp_wantoptions[unit];
282 ppp_set_xaccm(unit, xmit_accm[unit]);
283 ppp_send_config(unit, PPP_MRU, 0xffffffff, 0, 0);
284 ppp_recv_config(unit, PPP_MRU, 0xffffffff,
286 peer_mru[unit] = PPP_MRU;
287 lcp_allowoptions[unit].asyncmap = xmit_accm[unit][0];
289 fsm_lowerup(&lcp_fsm[unit]);
297 lcp_lowerdown(int unit)
299 fsm_lowerdown(&lcp_fsm[unit]);
307 lcp_input(int unit, u_char *p, int len)
309 fsm *f = &lcp_fsm[unit];
333 PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp);
392 (*protp->protrej)(f->unit);
405 lcp_protrej(int unit)
412 fsm_protreject(&lcp_fsm[unit]);
420 lcp_sprotrej(int unit, u_char *p, int len)
429 fsm_sdata(&lcp_fsm[unit], PROTREJ, ++lcp_fsm[unit].id,
440 lcp_wantoptions[f->unit].magicnumber = magic();
441 lcp_wantoptions[f->unit].numloops = 0;
442 lcp_gotoptions[f->unit] = lcp_wantoptions[f->unit];
443 peer_mru[f->unit] = PPP_MRU;
444 auth_reset(f->unit);
454 lcp_options *go = &lcp_gotoptions[f->unit];
484 lcp_options *go = &lcp_gotoptions[f->unit];
554 lcp_options *go = &lcp_gotoptions[f->unit];
681 lcp_options *go = &lcp_gotoptions[f->unit];
682 lcp_options *wo = &lcp_wantoptions[f->unit];
958 lcp_close(f->unit, "Loopback detected");
985 lcp_options *go = &lcp_gotoptions[f->unit];
1122 lcp_options *go = &lcp_gotoptions[f->unit];
1123 lcp_options *ho = &lcp_hisoptions[f->unit];
1124 lcp_options *ao = &lcp_allowoptions[f->unit];
1204 * which are set in lcp_allowoptions[unit].asyncmap.
1444 lcp_options *wo = &lcp_wantoptions[f->unit];
1445 lcp_options *ho = &lcp_hisoptions[f->unit];
1446 lcp_options *go = &lcp_gotoptions[f->unit];
1447 lcp_options *ao = &lcp_allowoptions[f->unit];
1460 ppp_send_config(f->unit, MIN(ao->mru, (ho->neg_mru? ho->mru: PPP_MRU)),
1463 ppp_recv_config(f->unit, (go->neg_mru? MAX(wo->mru, go->mru): PPP_MRU),
1468 peer_mru[f->unit] = ho->mru;
1470 lcp_echo_lowerup(f->unit); /* Enable echo messages */
1472 link_established(f->unit);
1484 lcp_options *go = &lcp_gotoptions[f->unit];
1486 lcp_echo_lowerdown(f->unit);
1488 link_down(f->unit);
1490 ppp_send_config(f->unit, PPP_MRU, 0xffffffff, 0, 0);
1491 ppp_recv_config(f->unit, PPP_MRU,
1494 peer_mru[f->unit] = PPP_MRU;
1504 link_required(f->unit);
1514 link_terminated(f->unit);
1695 lcp_close(f->unit, "Peer not responding");
1744 if (lcp_gotoptions[f->unit].neg_magicnumber
1745 && magic == lcp_gotoptions[f->unit].magicnumber) {
1778 lcp_magic = lcp_gotoptions[f->unit].magicnumber;
1791 lcp_echo_lowerup(int unit)
1793 fsm *f = &lcp_fsm[unit];
1810 lcp_echo_lowerdown(int unit)
1812 fsm *f = &lcp_fsm[unit];