Lines Matching refs:authp

83 pap_Req(struct authinfo *authp)
85 struct bundle *bundle = authp->physical->dl->bundle;
99 lh.id = authp->id;
109 link_PushPacket(&authp->physical->link, bp, bundle,
110 LINK_QUEUES(&authp->physical->link) - 1, PROTO_PAP);
114 SendPapCode(struct authinfo *authp, int code, const char *message)
122 lh.id = authp->id;
138 link_PushPacket(&authp->physical->link, bp, authp->physical->dl->bundle,
139 LINK_QUEUES(&authp->physical->link) - 1, PROTO_PAP);
143 pap_Success(struct authinfo *authp)
145 struct bundle *bundle = authp->physical->dl->bundle;
147 datalink_GotAuthname(authp->physical->dl, authp->in.name);
150 SendPapCode(authp, PAP_ACK, bundle->radius.repstr);
153 SendPapCode(authp, PAP_ACK, "Greetings!!");
154 authp->physical->link.lcp.auth_ineed = 0;
156 physical_Login(authp->physical, authp->in.name);
158 if (authp->physical->link.lcp.auth_iwait == 0)
163 datalink_AuthOk(authp->physical->dl);
167 pap_Failure(struct authinfo *authp)
169 SendPapCode(authp, PAP_NAK, "Login incorrect");
170 datalink_AuthNotOk(authp->physical->dl);
183 struct authinfo *authp = &p->dl->pap;
201 if ((bp = auth_ReadHeader(authp, bp)) == NULL &&
202 ntohs(authp->in.hdr.length) == 0) {
207 if (authp->in.hdr.code == 0 || authp->in.hdr.code > MAXPAPCODE) {
208 log_Printf(LogPHASE, "Pap Input: %d: Bad PAP code !\n", authp->in.hdr.code);
213 if (authp->in.hdr.code != PAP_REQUEST && authp->id != authp->in.hdr.id &&
217 papcodes[authp->in.hdr.code], authp->in.hdr.id, authp->id);
222 authp->id = authp->in.hdr.id; /* We respond with this id */
226 if (authp->in.hdr.code == PAP_ACK) {
236 bp = auth_ReadName(authp, bp, nlen);
237 txt = authp->in.name;
238 txtlen = strlen(authp->in.name);
246 papcodes[authp->in.hdr.code], txtlen, txt);
248 switch (authp->in.hdr.code) {
268 if (!radius_Authenticate(&bundle->radius, authp, authp->in.name,
270 pap_Failure(authp);
273 if (auth_Validate(bundle, authp->in.name, key))
274 pap_Success(authp);
276 pap_Failure(authp);
282 auth_StopTimer(authp);
296 auth_StopTimer(authp);