Lines Matching refs:unit

240 lcp_init(int unit)
242 fsm *f = &lcp_fsm[unit];
243 lcp_options *wo = &lcp_wantoptions[unit];
244 lcp_options *ao = &lcp_allowoptions[unit];
246 f->unit = unit;
285 memset(xmit_accm[unit], 0, sizeof(xmit_accm[0]));
286 xmit_accm[unit][15] = 0x60;
287 xmit_accm[unit][0] = (u_char)((ao->asyncmap & 0xFF));
288 xmit_accm[unit][1] = (u_char)((ao->asyncmap >> 8) & 0xFF);
289 xmit_accm[unit][2] = (u_char)((ao->asyncmap >> 16) & 0xFF);
290 xmit_accm[unit][3] = (u_char)((ao->asyncmap >> 24) & 0xFF);
292 xmit_accm[unit][0],
293 xmit_accm[unit][1],
294 xmit_accm[unit][2],
295 xmit_accm[unit][3]));
297 lcp_phase[unit] = PHASE_INITIALIZE;
305 lcp_open(int unit)
307 fsm *f = &lcp_fsm[unit];
308 lcp_options *wo = &lcp_wantoptions[unit];
319 lcp_phase[unit] = PHASE_ESTABLISH;
327 lcp_close(int unit, char *reason)
329 fsm *f = &lcp_fsm[unit];
331 if (lcp_phase[unit] != PHASE_DEAD) {
332 lcp_phase[unit] = PHASE_TERMINATE;
353 lcp_lowerup(int unit)
355 lcp_options *wo = &lcp_wantoptions[unit];
362 ppp_set_xaccm(unit, &xmit_accm[unit]);
363 ppp_send_config(unit, PPP_MRU, 0xffffffffl, 0, 0);
364 ppp_recv_config(unit, PPP_MRU, 0x00000000l,
366 peer_mru[unit] = PPP_MRU;
367 lcp_allowoptions[unit].asyncmap = (u_long)xmit_accm[unit][0]
368 | ((u_long)xmit_accm[unit][1] << 8)
369 | ((u_long)xmit_accm[unit][2] << 16)
370 | ((u_long)xmit_accm[unit][3] << 24);
372 xmit_accm[unit][3],
373 xmit_accm[unit][2],
374 xmit_accm[unit][1],
375 xmit_accm[unit][0]));
377 fsm_lowerup(&lcp_fsm[unit]);
385 lcp_lowerdown(int unit)
387 fsm_lowerdown(&lcp_fsm[unit]);
395 lcp_input(int unit, u_char *p, int len)
397 fsm *f = &lcp_fsm[unit];
422 PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp);
475 (*protp->protrej)(f->unit);
488 lcp_protrej(int unit)
490 LWIP_UNUSED_ARG(unit);
495 fsm_protreject(&lcp_fsm[unit]);
503 lcp_sprotrej(int unit, u_char *p, int len)
510 fsm_sdata(&lcp_fsm[unit], PROTREJ, ++lcp_fsm[unit].id, p, len);
520 lcp_wantoptions[f->unit].magicnumber = magic();
521 lcp_wantoptions[f->unit].numloops = 0;
522 lcp_gotoptions[f->unit] = lcp_wantoptions[f->unit];
523 peer_mru[f->unit] = PPP_MRU;
524 auth_reset(f->unit);
534 lcp_options *go = &lcp_gotoptions[f->unit];
564 lcp_options *go = &lcp_gotoptions[f->unit];
639 lcp_options *go = &lcp_gotoptions[f->unit];
761 lcp_options *go = &lcp_gotoptions[f->unit];
762 lcp_options *wo = &lcp_wantoptions[f->unit];
1053 lcp_close(f->unit, "Loopback detected");
1081 lcp_options *go = &lcp_gotoptions[f->unit];
1228 lcp_options *go = &lcp_gotoptions[f->unit];
1229 lcp_options *ho = &lcp_hisoptions[f->unit];
1230 lcp_options *ao = &lcp_allowoptions[f->unit];
1324 * which are set in lcp_allowoptions[unit].asyncmap.
1642 lcp_options *wo = &lcp_wantoptions[f->unit];
1643 lcp_options *ho = &lcp_hisoptions[f->unit];
1644 lcp_options *go = &lcp_gotoptions[f->unit];
1645 lcp_options *ao = &lcp_allowoptions[f->unit];
1660 ppp_send_config(f->unit, LWIP_MIN(ao->mru, (ho->neg_mru? ho->mru: PPP_MRU)),
1668 ppp_recv_config(f->unit, (go->neg_mru? LWIP_MAX(wo->mru, go->mru): PPP_MRU),
1673 peer_mru[f->unit] = ho->mru;
1676 lcp_echo_lowerup(f->unit); /* Enable echo messages */
1678 link_established(f->unit); /* The link is up; authenticate now */
1690 lcp_options *go = &lcp_gotoptions[f->unit];
1692 lcp_echo_lowerdown(f->unit);
1694 link_down(f->unit);
1696 ppp_send_config(f->unit, PPP_MRU, 0xffffffffl, 0, 0);
1697 ppp_recv_config(f->unit, PPP_MRU,
1700 peer_mru[f->unit] = PPP_MRU;
1710 link_required(f->unit); /* lwip: currently does nothing */
1720 link_terminated(f->unit); /* we are finished with the link */
1942 lcp_close(f->unit, "Peer not responding");
1991 if (lcp_gotoptions[f->unit].neg_magicnumber && magic == lcp_gotoptions[f->unit].magicnumber) {
2023 lcp_magic = lcp_gotoptions[f->unit].magicnumber;
2036 lcp_echo_lowerup (int unit)
2038 fsm *f = &lcp_fsm[unit];
2056 lcp_echo_lowerdown (int unit)
2058 fsm *f = &lcp_fsm[unit];