• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/usr.sbin/ppp/

Lines Matching defs:authp

85 pap_Req(struct authinfo *authp)
87 struct bundle *bundle = authp->physical->dl->bundle;
101 lh.id = authp->id;
111 link_PushPacket(&authp->physical->link, bp, bundle,
112 LINK_QUEUES(&authp->physical->link) - 1, PROTO_PAP);
116 SendPapCode(struct authinfo *authp, int code, const char *message)
124 lh.id = authp->id;
140 link_PushPacket(&authp->physical->link, bp, authp->physical->dl->bundle,
141 LINK_QUEUES(&authp->physical->link) - 1, PROTO_PAP);
145 pap_Success(struct authinfo *authp)
147 struct bundle *bundle = authp->physical->dl->bundle;
149 datalink_GotAuthname(authp->physical->dl, authp->in.name);
152 SendPapCode(authp, PAP_ACK, bundle->radius.repstr);
155 SendPapCode(authp, PAP_ACK, "Greetings!!");
156 authp->physical->link.lcp.auth_ineed = 0;
158 physical_Login(authp->physical, authp->in.name);
160 if (authp->physical->link.lcp.auth_iwait == 0)
165 datalink_AuthOk(authp->physical->dl);
169 pap_Failure(struct authinfo *authp)
171 SendPapCode(authp, PAP_NAK, "Login incorrect");
172 datalink_AuthNotOk(authp->physical->dl);
185 struct authinfo *authp = &p->dl->pap;
203 if ((bp = auth_ReadHeader(authp, bp)) == NULL &&
204 ntohs(authp->in.hdr.length) == 0) {
209 if (authp->in.hdr.code == 0 || authp->in.hdr.code > MAXPAPCODE) {
210 log_Printf(LogPHASE, "Pap Input: %d: Bad PAP code !\n", authp->in.hdr.code);
215 if (authp->in.hdr.code != PAP_REQUEST && authp->id != authp->in.hdr.id &&
219 papcodes[authp->in.hdr.code], authp->in.hdr.id, authp->id);
224 authp->id = authp->in.hdr.id; /* We respond with this id */
228 if (authp->in.hdr.code == PAP_ACK) {
238 bp = auth_ReadName(authp, bp, nlen);
239 txt = authp->in.name;
240 txtlen = strlen(authp->in.name);
248 papcodes[authp->in.hdr.code], txtlen, txt);
250 switch (authp->in.hdr.code) {
270 if (!radius_Authenticate(&bundle->radius, authp, authp->in.name,
272 pap_Failure(authp);
275 if (auth_Validate(bundle, authp->in.name, key))
276 pap_Success(authp);
278 pap_Failure(authp);
284 auth_StopTimer(authp);
298 auth_StopTimer(authp);