Lines Matching refs:unit
140 chap_state chap[NUM_PPP]; /* CHAP state; one for each unit */
155 * ChapInit - Initialize a CHAP unit.
158 ChapInit(int unit)
160 chap_state *cstate = &chap[unit];
163 cstate->unit = unit;
177 ChapAuthWithPeer(int unit, char *our_name, u_char digest)
179 chap_state *cstate = &chap[unit];
204 ChapAuthPeer(int unit, char *our_name, u_char digest)
206 chap_state *cstate = &chap[unit];
243 auth_peer_fail(cstate->unit, PPP_CHAP);
293 ChapLowerUp(int unit)
295 chap_state *cstate = &chap[unit];
319 ChapLowerDown(int unit)
321 chap_state *cstate = &chap[unit];
343 ChapProtocolReject(int unit)
345 chap_state *cstate = &chap[unit];
349 auth_peer_fail(unit, PPP_CHAP);
353 auth_withpeer_fail(unit, PPP_CHAP); /* lwip: just sets the PPP error code on this unit to PPPERR_AUTHFAIL */
355 ChapLowerDown(unit); /* shutdown chap */
363 ChapInput(int unit, u_char *inpacket, int packet_len)
365 chap_state *cstate = &chap[unit];
473 if (!get_secret(cstate->unit, cstate->resp_name, rhostname,
588 if (!get_secret(cstate->unit, rhostname, cstate->chal_name,
624 auth_peer_success(cstate->unit, PPP_CHAP, rhostname, len);
632 auth_peer_fail(cstate->unit, PPP_CHAP);
670 auth_withpeer_success(cstate->unit, PPP_CHAP);
702 auth_withpeer_fail(cstate->unit, PPP_CHAP); /* lwip: just sets the PPP error code on this unit to PPPERR_AUTHFAIL */
719 outp = outpacket_buf[cstate->unit];
733 pppWrite(cstate->unit, outpacket_buf[cstate->unit], outlen + PPP_HDRLEN);
760 outp = outpacket_buf[cstate->unit];
768 pppWrite(cstate->unit, outpacket_buf[cstate->unit], outlen + PPP_HDRLEN);
819 outp = outpacket_buf[cstate->unit];
834 pppWrite(cstate->unit, outpacket_buf[cstate->unit], outlen + PPP_HDRLEN);