Lines Matching full:unit
222 static void set_allowed_addrs (int unit, struct wordlist *addrs);
377 link_required(int unit) in link_required() argument
379 LWIP_UNUSED_ARG(unit); in link_required()
381 AUTHDEBUG(LOG_INFO, ("link_required: %d\n", unit)); in link_required()
389 link_terminated(int unit) in link_terminated() argument
391 AUTHDEBUG(LOG_INFO, ("link_terminated: %d\n", unit)); in link_terminated()
392 if (lcp_phase[unit] == PHASE_DEAD) { in link_terminated()
398 lcp_phase[unit] = PHASE_DEAD; in link_terminated()
400 pppLinkTerminated(unit); in link_terminated()
407 link_down(int unit) in link_down() argument
412 AUTHDEBUG(LOG_INFO, ("link_down: %d\n", unit)); in link_down()
423 (*protp->lowerdown)(unit); in link_down()
426 (*protp->close)(unit, "LCP down"); in link_down()
432 if (lcp_phase[unit] != PHASE_DEAD) { in link_down()
433 lcp_phase[unit] = PHASE_TERMINATE; in link_down()
435 pppLinkDown(unit); in link_down()
443 link_established(int unit) in link_established() argument
448 lcp_options *wo = &lcp_wantoptions[unit]; in link_established()
449 lcp_options *go = &lcp_gotoptions[unit]; in link_established()
451 lcp_options *ho = &lcp_hisoptions[unit]; in link_established()
454 AUTHDEBUG(LOG_INFO, ("link_established: unit %d; Lowering up all protocols...\n", unit)); in link_established()
460 (*protp->lowerup)(unit); in link_established()
469 if (!wo->neg_upap || !null_login(unit)) { in link_established()
471 lcp_close(unit, "peer refused to authenticate"); in link_established()
476 lcp_phase[unit] = PHASE_AUTHENTICATE; in link_established()
480 ChapAuthPeer(unit, ppp_settings.our_name, go->chap_mdtype); in link_established()
489 upap_authpeer(unit); in link_established()
495 ChapAuthWithPeer(unit, ppp_settings.user, ho->chap_mdtype); in link_established()
506 if (!get_pap_passwd(unit, ppp_settings.user, ppp_settings.passwd)) { in link_established()
510 upap_authwithpeer(unit, ppp_settings.user, ppp_settings.passwd); in link_established()
514 auth_pending[unit] = auth; in link_established()
517 network_phase(unit); in link_established()
525 network_phase(int unit) in network_phase() argument
529 lcp_options *go = &lcp_gotoptions[unit]; in network_phase()
544 lcp_phase[unit] = PHASE_CALLBACK; in network_phase()
545 (*cbcp_protent.open)(unit); in network_phase()
550 lcp_phase[unit] = PHASE_NETWORK; in network_phase()
553 (*protp->open)(unit); in network_phase()
571 auth_peer_fail(int unit, u16_t protocol) in auth_peer_fail() argument
575 AUTHDEBUG(LOG_INFO, ("auth_peer_fail: %d proto=%X\n", unit, protocol)); in auth_peer_fail()
579 lcp_close(unit, "Authentication failed"); in auth_peer_fail()
588 auth_peer_success(int unit, u16_t protocol, char *name, int namelen) in auth_peer_success() argument
592 AUTHDEBUG(LOG_INFO, ("auth_peer_success: %d proto=%X\n", unit, protocol)); in auth_peer_success()
618 if ((auth_pending[unit] &= ~pbit) == 0) { in auth_peer_success()
619 network_phase(unit); in auth_peer_success()
627 auth_withpeer_fail(int unit, u16_t protocol) in auth_withpeer_fail() argument
633 AUTHDEBUG(LOG_INFO, ("auth_withpeer_fail: %d proto=%X\n", unit, protocol)); in auth_withpeer_fail()
643 pppIOCtl(unit, PPPCTLS_ERRCODE, &errCode); in auth_withpeer_fail()
644 lcp_close(unit, "Failed to authenticate ourselves to peer"); in auth_withpeer_fail()
651 auth_withpeer_success(int unit, u16_t protocol) in auth_withpeer_success() argument
655 AUTHDEBUG(LOG_INFO, ("auth_withpeer_success: %d proto=%X\n", unit, protocol)); in auth_withpeer_success()
675 if ((auth_pending[unit] &= ~pbit) == 0) { in auth_withpeer_success()
676 network_phase(unit); in auth_withpeer_success()
686 np_up(int unit, u16_t proto) in np_up() argument
688 LWIP_UNUSED_ARG(unit); in np_up()
691 AUTHDEBUG(LOG_INFO, ("np_up: %d proto=%X\n", unit, proto)); in np_up()
716 np_down(int unit, u16_t proto) in np_down() argument
718 LWIP_UNUSED_ARG(unit); in np_down()
721 AUTHDEBUG(LOG_INFO, ("np_down: %d proto=%X\n", unit, proto)); in np_down()
731 np_finished(int unit, u16_t proto) in np_finished() argument
733 LWIP_UNUSED_ARG(unit); in np_finished()
736 AUTHDEBUG(LOG_INFO, ("np_finished: %d proto=%X\n", unit, proto)); in np_finished()
828 auth_reset(int unit) in auth_reset() argument
830 lcp_options *go = &lcp_gotoptions[unit]; in auth_reset()
835 AUTHDEBUG(LOG_INFO, ("auth_reset: %d\n", unit)); in auth_reset()
836 …ao->neg_upap = !ppp_settings.refuse_pap && (ppp_settings.passwd[0] != 0 || get_pap_passwd(unit, NU… in auth_reset()
862 check_passwd( int unit, char *auser, int userlen, char *apasswd, int passwdlen, char **msg, int *ms… in check_passwd() argument
865 LWIP_UNUSED_ARG(unit); in check_passwd()
921 set_allowed_addrs(unit, addrs); in check_passwd()
1006 null_login(int unit) in null_login() argument
1008 LWIP_UNUSED_ARG(unit); in null_login()
1020 get_pap_passwd(int unit, char *user, char *passwd) in get_pap_passwd() argument
1022 LWIP_UNUSED_ARG(unit); in get_pap_passwd()
1074 get_secret(int unit, char *client, char *server, char *secret, int *secret_len, int save_addrs) in get_secret() argument
1080 LWIP_UNUSED_ARG(unit); in get_secret()
1114 set_allowed_addrs(unit, addrs); in get_secret()
1138 set_allowed_addrs(int unit, struct wordlist *addrs)
1140 if (addresses[unit] != NULL) {
1141 free_wordlist(addresses[unit]);
1143 addresses[unit] = addrs;
1152 struct ipcp_options *wo = &ipcp_wantoptions[unit];
1177 auth_ip_addr(int unit, u32_t addr) in auth_ip_addr() argument
1179 return ip_addr_check(addr, addresses[unit]); in auth_ip_addr()