Lines Matching refs:llq
1653 opt->resrec.rdata->u.opt[0].u.llq.vers = kLLQ_Vers; in FormatLLQOpt()
1654 opt->resrec.rdata->u.opt[0].u.llq.llqOp = opcode; in FormatLLQOpt()
1655 opt->resrec.rdata->u.opt[0].u.llq.err = LLQErr_NoError; in FormatLLQOpt()
1656 opt->resrec.rdata->u.opt[0].u.llq.id = *id; in FormatLLQOpt()
1657 opt->resrec.rdata->u.opt[0].u.llq.llqlease = lease; in FormatLLQOpt()
2119 mDNSlocal void LLQRefresh(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID, TCPSocke… in LLQRefresh() argument
2127 VLog("%s LLQ for %##s from %s", llq->llqlease ? "Refreshing" : "Deleting", e->qname.c, addr); in LLQRefresh()
2129 if (llq->llqlease) in LLQRefresh()
2132 if (llq->llqlease < LLQ_MIN_LEASE) llq->llqlease = LLQ_MIN_LEASE; in LLQRefresh()
2133 else if (llq->llqlease > LLQ_MAX_LEASE) llq->llqlease = LLQ_MIN_LEASE; in LLQRefresh()
2135 e->expire = t.tv_sec + llq->llqlease; in LLQRefresh()
2143 FormatLLQOpt(&opt, kLLQOp_Refresh, &e->id, llq->llqlease ? LLQLease(e) : 0); in LLQRefresh()
2150 if (llq->llqlease) e->state = Established; in LLQRefresh()
2155 mDNSlocal void LLQCompleteHandshake(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID… in LLQCompleteHandshake() argument
2166 if (!mDNSSameOpaque64(&llq->id, &e->id) || in LLQCompleteHandshake()
2167 llq->vers != kLLQ_Vers || in LLQCompleteHandshake()
2168 llq->llqOp != kLLQOp_Setup || in LLQCompleteHandshake()
2169 llq->err != LLQErr_NoError || in LLQCompleteHandshake()
2170 llq->llqlease > e->lease + LLQ_LEASE_FUDGE || in LLQCompleteHandshake()
2171 llq->llqlease < e->lease - LLQ_LEASE_FUDGE) in LLQCompleteHandshake()
2205 mDNSlocal void LLQSetupChallenge(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID) in LLQSetupChallenge() argument
2215 …if (!mDNSOpaque64IsZero(&llq->id)) { Log("Error: LLQSetupChallenge - nonzero ID"); return; } // se… in LLQSetupChallenge()
2216 …if (llq->llqOp != kLLQOp_Setup) { Log("LLQSetupChallenge - incorrrect operation from client"); ret… in LLQSetupChallenge()
2240 mDNSlocal void UpdateLLQ(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID, TCPSocket… in UpdateLLQ() argument
2251 llq->id = e->id; in UpdateLLQ()
2252 LLQCompleteHandshake( d, e, llq, msgID, sock ); in UpdateLLQ()
2259 LLQSetupChallenge(d, e, llq, msgID); in UpdateLLQ()
2263 if (mDNSOpaque64IsZero(&llq->id)) LLQSetupChallenge(d, e, llq, msgID); // challenge sent and lost in UpdateLLQ()
2264 else LLQCompleteHandshake(d, e, llq, msgID, sock ); in UpdateLLQ()
2267 if (mDNSOpaque64IsZero(&llq->id)) in UpdateLLQ()
2270 LLQEntry *newe = NewLLQ(d, e->cli, &e->qname, e->qtype, llq->llqlease ); in UpdateLLQ()
2273 LLQSetupChallenge(d, newe, llq, msgID); in UpdateLLQ()
2276 else if (llq->llqOp == kLLQOp_Setup) in UpdateLLQ()
2277 { LLQCompleteHandshake(d, e, llq, msgID, sock); return; } // Ack lost in UpdateLLQ()
2278 else if (llq->llqOp == kLLQOp_Refresh) in UpdateLLQ()
2279 { LLQRefresh(d, e, llq, msgID, sock); return; } in UpdateLLQ()
2330 LLQOptData *llq = NULL; in RecvLLQ() local
2365 llq = (LLQOptData *)&opt.r.resrec.rdata->u.opt[0].u.llq + i; // point into OptData at index i in RecvLLQ()
2366 …if (llq->vers != kLLQ_Vers) { Log("LLQ from %s contains bad version %d (expected %d)", addr, llq->… in RecvLLQ()
2368 e = LookupLLQ(d, pkt->src, &q.qname, q.qtype, &llq->id); in RecvLLQ()
2372 e = NewLLQ(d, pkt->src, &q.qname, q.qtype, llq->llqlease ); in RecvLLQ()
2375 UpdateLLQ(d, e, llq, pkt->msg.h.id, sock); in RecvLLQ()