Lines Matching defs:authp

396   struct authinfo *authp = (struct authinfo *)vauthp;
398 timer_Stop(&authp->authtimer);
399 if (--authp->retry > 0) {
400 authp->id++;
401 (*authp->fn.req)(authp);
402 timer_Start(&authp->authtimer);
405 datalink_AuthNotOk(authp->physical->dl);
410 auth_Init(struct authinfo *authp, struct physical *p, auth_func req,
413 memset(authp, '\0', sizeof(struct authinfo));
414 authp->cfg.fsm.timeout = DEF_FSMRETRY;
415 authp->cfg.fsm.maxreq = DEF_FSMAUTHTRIES;
416 authp->cfg.fsm.maxtrm = 0; /* not used */
417 authp->fn.req = req;
418 authp->fn.success = success;
419 authp->fn.failure = failure;
420 authp->physical = p;
424 auth_StartReq(struct authinfo *authp)
426 timer_Stop(&authp->authtimer);
427 authp->authtimer.func = AuthTimeout;
428 authp->authtimer.name = "auth";
429 authp->authtimer.load = authp->cfg.fsm.timeout * SECTICKS;
430 authp->authtimer.arg = (void *)authp;
431 authp->retry = authp->cfg.fsm.maxreq;
432 authp->id = 1;
433 (*authp->fn.req)(authp);
434 timer_Start(&authp->authtimer);
438 auth_StopTimer(struct authinfo *authp)
440 timer_Stop(&authp->authtimer);
444 auth_ReadHeader(struct authinfo *authp, struct mbuf *bp)
449 if (len >= sizeof authp->in.hdr) {
450 bp = mbuf_Read(bp, (u_char *)&authp->in.hdr, sizeof authp->in.hdr);
451 if (len >= ntohs(authp->in.hdr.length))
453 authp->in.hdr.length = htons(0);
455 ntohs(authp->in.hdr.length), len);
457 authp->in.hdr.length = htons(0);
459 (int)(sizeof authp->in.hdr), len);
467 auth_ReadName(struct authinfo *authp, struct mbuf *bp, size_t len)
469 if (len > sizeof authp->in.name - 1)
478 bp = mbuf_Read(bp, (u_char *)authp->in.name, len);
479 authp->in.name[len] = '\0';
484 *authp->in.name = '\0';