Lines Matching refs:unit
545 link_required(unit) in link_required() argument
546 int unit; in link_required()
553 void start_link(unit) in start_link() argument
554 int unit; in start_link()
613 link_terminated(unit) in link_terminated() argument
614 int unit; in link_terminated()
683 link_down(unit) in link_down() argument
684 int unit; in link_down()
690 update_link_stats(unit);
696 upper_layers_down(unit);
704 void upper_layers_down(int unit) in upper_layers_down() argument
713 (*protp->lowerdown)(unit); in upper_layers_down()
715 (*protp->close)(unit, "LCP down"); in upper_layers_down()
726 link_established(unit) in link_established() argument
727 int unit; in link_established()
730 lcp_options *wo = &lcp_wantoptions[unit];
731 lcp_options *go = &lcp_gotoptions[unit];
732 lcp_options *ho = &lcp_hisoptions[unit];
743 (*protp->lowerup)(unit);
747 set_allowed_addrs(unit, NULL, NULL);
758 set_allowed_addrs(unit, NULL, NULL);
759 } else if (!wo->neg_upap || uselogin || !null_login(unit)) {
762 lcp_close(unit, "peer refused to authenticate");
770 eap_authpeer(unit, our_name);
773 chap_auth_peer(unit, our_name, CHAP_DIGEST(go->chap_mdtype));
776 upap_authpeer(unit);
780 eap_authwithpeer(unit, user);
783 chap_auth_with_peer(unit, user, CHAP_DIGEST(ho->chap_mdtype));
793 upap_authwithpeer(unit, user, passwd);
796 auth_pending[unit] = auth;
797 auth_done[unit] = 0;
800 network_phase(unit);
807 network_phase(unit) in network_phase() argument
808 int unit; in network_phase()
810 lcp_options *go = &lcp_gotoptions[unit];
834 (*cbcp_protent.open)(unit);
847 start_networks(unit);
851 start_networks(unit) in start_networks() argument
852 int unit; in start_networks()
885 ecp_required = ecp_gotoptions[unit].required;
886 mppe_required = ccp_gotoptions[unit].mppe;
888 continue_networks(unit);
892 continue_networks(unit) in continue_networks() argument
893 int unit; in continue_networks()
918 auth_peer_fail(unit, protocol) in auth_peer_fail() argument
919 int unit, protocol; in auth_peer_fail()
925 lcp_close(unit, "Authentication failed");
932 auth_peer_success(unit, protocol, prot_flavor, name, namelen) in auth_peer_success() argument
933 int unit, protocol, prot_flavor; in auth_peer_success()
977 auth_done[unit] |= bit;
983 if ((auth_pending[unit] &= ~bit) == 0)
984 network_phase(unit);
991 auth_withpeer_fail(unit, protocol) in auth_withpeer_fail() argument
992 int unit, protocol; in auth_withpeer_fail()
1003 lcp_close(unit, "Failed to authenticate ourselves to peer");
1010 auth_withpeer_success(unit, protocol, prot_flavor) in auth_withpeer_success() argument
1011 int unit, protocol, prot_flavor; in auth_withpeer_success()
1052 auth_done[unit] |= bit;
1058 if ((auth_pending[unit] &= ~bit) == 0)
1059 network_phase(unit);
1067 np_up(unit, proto) in np_up() argument
1068 int unit, proto; in np_up()
1112 np_down(unit, proto) in np_down() argument
1113 int unit, proto; in np_down()
1129 np_finished(unit, proto) in np_finished() argument
1130 int unit, proto; in np_finished()
1317 auth_reset(unit) in auth_reset() argument
1318 int unit; in auth_reset()
1320 lcp_options *go = &lcp_gotoptions[unit];
1321 lcp_options *ao = &lcp_allowoptions[unit];
1365 check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) in check_passwd() argument
1366 int unit; in check_passwd()
1402 set_allowed_addrs(unit, addrs, opts);
1468 lcp_close(unit, "login failed");
1479 set_allowed_addrs(unit, addrs, opts);
1497 null_login(unit) in null_login() argument
1498 int unit; in null_login()
1531 set_allowed_addrs(unit, addrs, opts);
1720 get_secret(unit, client, server, secret, secret_len, am_server) in get_secret() argument
1721 int unit; in get_secret()
1760 set_allowed_addrs(unit, addrs, opts);
1786 get_srp_secret(unit, client, server, secret, am_server) in get_srp_secret() argument
1787 int unit; in get_srp_secret()
1819 set_allowed_addrs(unit, addrs, opts);
1835 set_allowed_addrs(unit, addrs, opts) in set_allowed_addrs() argument
1836 int unit; in set_allowed_addrs()
1847 struct ipcp_options *wo = &ipcp_wantoptions[unit];
1850 if (addresses[unit] != NULL)
1851 free(addresses[unit]);
1852 addresses[unit] = NULL;
1967 addresses[unit] = ip;
1975 && (wo->hisaddr == 0 || !auth_ip_addr(unit, wo->hisaddr))) {
1991 auth_ip_addr(unit, addr) in auth_ip_addr() argument
1992 int unit; in auth_ip_addr()
2006 if (addresses[unit] != NULL) {
2007 ok = ip_addr_check(addr, addresses[unit]);