Lines Matching refs:unit
407 link_required(unit) in link_required() argument
408 int unit; in link_required()
418 link_terminated(unit) in link_terminated() argument
419 int unit; in link_terminated()
478 link_down(unit) in link_down() argument
479 int unit; in link_down()
486 update_link_stats(unit);
494 (*protp->lowerdown)(unit);
496 (*protp->close)(unit, "LCP down");
509 link_established(unit) in link_established() argument
510 int unit; in link_established()
513 lcp_options *wo = &lcp_wantoptions[unit];
514 lcp_options *go = &lcp_gotoptions[unit];
515 lcp_options *ho = &lcp_hisoptions[unit];
525 (*protp->lowerup)(unit);
537 set_allowed_addrs(unit, noauth_addrs, NULL);
538 } else if (!wo->neg_upap || !null_login(unit)) {
540 lcp_close(unit, "peer refused to authenticate");
562 ChapAuthPeer(unit, our_name, go->chap_mdtype);
567 upap_authpeer(unit);
589 ChapAuthWithPeer(unit, user, ho->chap_mdtype);
599 upap_authwithpeer(unit, user, passwd);
602 auth_pending[unit] = auth;
605 network_phase(unit);
612 network_phase(unit) in network_phase() argument
613 int unit; in network_phase()
615 lcp_options *go = &lcp_gotoptions[unit];
645 (*cbcp_protent.open)(unit);
693 auth_peer_fail(unit, protocol) in auth_peer_fail() argument
694 int unit, protocol; in auth_peer_fail()
699 lcp_close(unit, "Authentication failed");
707 auth_peer_success(unit, protocol, name, namelen) in auth_peer_success() argument
708 int unit, protocol; in auth_peer_success()
739 if ((auth_pending[unit] &= ~bit) == 0)
740 network_phase(unit);
748 auth_withpeer_fail(unit, protocol) in auth_withpeer_fail() argument
749 int unit, protocol; in auth_withpeer_fail()
759 lcp_close(unit, "Failed to authenticate ourselves to peer");
767 auth_withpeer_success(unit, protocol) in auth_withpeer_success() argument
768 int unit, protocol; in auth_withpeer_success()
790 if ((auth_pending[unit] &= ~bit) == 0)
791 network_phase(unit);
800 np_up(unit, proto) in np_up() argument
801 int unit, proto; in np_up()
832 TIMEOUT(connect_time_expired, &lcp_fsm[unit], maxconnect);
839 lcp_settimeremaining(unit, maxconnect, maxconnect);
841 lcp_settimeremaining(unit, maxconnect, 300);
843 lcp_settimeremaining(unit, maxconnect, 120);
845 lcp_settimeremaining(unit, maxconnect, 30);
862 np_down(unit, proto) in np_down() argument
863 int unit, proto; in np_down()
876 np_finished(unit, proto) in np_finished() argument
877 int unit, proto; in np_finished()
928 lcp_close(f->unit, "Connect time expired"); /* Close connection */
1018 auth_reset(unit) in auth_reset() argument
1019 int unit; in auth_reset()
1021 lcp_options *go = &lcp_gotoptions[unit];
1022 lcp_options *ao = &lcp_allowoptions[unit];
1067 check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) in check_passwd() argument
1068 int unit; in check_passwd()
1102 set_allowed_addrs(unit, addrs, opts);
1157 lcp_close(unit, "login failed");
1168 set_allowed_addrs(unit, addrs, opts);
1435 null_login(unit) in null_login() argument
1436 int unit; in null_login()
1459 set_allowed_addrs(unit, addrs, opts);
1605 get_secret(unit, client, server, secret, secret_len, am_server) in get_secret() argument
1606 int unit; in get_secret()
1650 set_allowed_addrs(unit, addrs, opts);
1676 set_allowed_addrs(unit, addrs, opts) in set_allowed_addrs() argument
1677 int unit; in set_allowed_addrs()
1688 struct ipcp_options *wo = &ipcp_wantoptions[unit];
1692 if (addresses[unit] != NULL)
1693 free(addresses[unit]);
1694 addresses[unit] = NULL;
1812 addresses[unit] = ip;
1820 && (wo->hisaddr == 0 || !auth_ip_addr(unit, wo->hisaddr)))
1829 auth_ip_addr(unit, addr) in auth_ip_addr() argument
1830 int unit; in auth_ip_addr()
1839 if (addresses[unit] != NULL) {
1840 ok = ip_addr_check(addr, addresses[unit]);