Lines Matching refs:unit

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