Lines Matching refs:authp

388   struct authinfo *authp = (struct authinfo *)vauthp;
390 timer_Stop(&authp->authtimer);
391 if (--authp->retry > 0) {
392 authp->id++;
393 (*authp->fn.req)(authp);
394 timer_Start(&authp->authtimer);
397 datalink_AuthNotOk(authp->physical->dl);
402 auth_Init(struct authinfo *authp, struct physical *p, auth_func req,
405 memset(authp, '\0', sizeof(struct authinfo));
406 authp->cfg.fsm.timeout = DEF_FSMRETRY;
407 authp->cfg.fsm.maxreq = DEF_FSMAUTHTRIES;
408 authp->cfg.fsm.maxtrm = 0; /* not used */
409 authp->fn.req = req;
410 authp->fn.success = success;
411 authp->fn.failure = failure;
412 authp->physical = p;
416 auth_StartReq(struct authinfo *authp)
418 timer_Stop(&authp->authtimer);
419 authp->authtimer.func = AuthTimeout;
420 authp->authtimer.name = "auth";
421 authp->authtimer.load = authp->cfg.fsm.timeout * SECTICKS;
422 authp->authtimer.arg = (void *)authp;
423 authp->retry = authp->cfg.fsm.maxreq;
424 authp->id = 1;
425 (*authp->fn.req)(authp);
426 timer_Start(&authp->authtimer);
430 auth_StopTimer(struct authinfo *authp)
432 timer_Stop(&authp->authtimer);
436 auth_ReadHeader(struct authinfo *authp, struct mbuf *bp)
441 if (len >= sizeof authp->in.hdr) {
442 bp = mbuf_Read(bp, (u_char *)&authp->in.hdr, sizeof authp->in.hdr);
443 if (len >= ntohs(authp->in.hdr.length))
445 authp->in.hdr.length = htons(0);
447 ntohs(authp->in.hdr.length), len);
449 authp->in.hdr.length = htons(0);
451 (int)(sizeof authp->in.hdr), len);
459 auth_ReadName(struct authinfo *authp, struct mbuf *bp, size_t len)
461 if (len > sizeof authp->in.name - 1)
470 bp = mbuf_Read(bp, (u_char *)authp->in.name, len);
471 authp->in.name[len] = '\0';
476 *authp->in.name = '\0';