Lines Matching defs:llq

941             ptr = PutUpdateSRV(d, zone, &pkt, ptr, "_dns-llq-tls._tcp.", d->private_port, registration);
948 ptr = PutUpdateSRV(d, zone, &pkt, ptr, "_dns-llq._udp.", d->llq_port, registration);
960 ptr = PutUpdateSRV(d, zone, &pkt, ptr, "_dns-llq-tls.", d->private_port, registration);
966 ptr = PutUpdateSRV(d, zone, &pkt, ptr, "_dns-llq._udp.", d->llq_port, registration);
1193 // set up sockets on which we receive llq requests
1653 opt->resrec.rdata->u.opt[0].u.llq.vers = kLLQ_Vers;
1654 opt->resrec.rdata->u.opt[0].u.llq.llqOp = opcode;
1655 opt->resrec.rdata->u.opt[0].u.llq.err = LLQErr_NoError;
1656 opt->resrec.rdata->u.opt[0].u.llq.id = *id;
1657 opt->resrec.rdata->u.opt[0].u.llq.llqlease = lease;
2119 mDNSlocal void LLQRefresh(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID, TCPSocket *sock )
2127 VLog("%s LLQ for %##s from %s", llq->llqlease ? "Refreshing" : "Deleting", e->qname.c, addr);
2129 if (llq->llqlease)
2132 if (llq->llqlease < LLQ_MIN_LEASE) llq->llqlease = LLQ_MIN_LEASE;
2133 else if (llq->llqlease > LLQ_MAX_LEASE) llq->llqlease = LLQ_MIN_LEASE;
2135 e->expire = t.tv_sec + llq->llqlease;
2143 FormatLLQOpt(&opt, kLLQOp_Refresh, &e->id, llq->llqlease ? LLQLease(e) : 0);
2150 if (llq->llqlease) e->state = Established;
2155 mDNSlocal void LLQCompleteHandshake(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID, TCPSocket *sock)
2166 if (!mDNSSameOpaque64(&llq->id, &e->id) ||
2167 llq->vers != kLLQ_Vers ||
2168 llq->llqOp != kLLQOp_Setup ||
2169 llq->err != LLQErr_NoError ||
2170 llq->llqlease > e->lease + LLQ_LEASE_FUDGE ||
2171 llq->llqlease < e->lease - LLQ_LEASE_FUDGE)
2205 mDNSlocal void LLQSetupChallenge(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID)
2215 if (!mDNSOpaque64IsZero(&llq->id)) { Log("Error: LLQSetupChallenge - nonzero ID"); return; } // server bug
2216 if (llq->llqOp != kLLQOp_Setup) { Log("LLQSetupChallenge - incorrrect operation from client"); return; } // client error
2240 mDNSlocal void UpdateLLQ(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID, TCPSocket *sock )
2251 llq->id = e->id;
2252 LLQCompleteHandshake( d, e, llq, msgID, sock );
2259 LLQSetupChallenge(d, e, llq, msgID);
2263 if (mDNSOpaque64IsZero(&llq->id)) LLQSetupChallenge(d, e, llq, msgID); // challenge sent and lost
2264 else LLQCompleteHandshake(d, e, llq, msgID, sock );
2267 if (mDNSOpaque64IsZero(&llq->id))
2270 LLQEntry *newe = NewLLQ(d, e->cli, &e->qname, e->qtype, llq->llqlease );
2273 LLQSetupChallenge(d, newe, llq, msgID);
2276 else if (llq->llqOp == kLLQOp_Setup)
2277 { LLQCompleteHandshake(d, e, llq, msgID, sock); return; } // Ack lost
2278 else if (llq->llqOp == kLLQOp_Refresh)
2279 { LLQRefresh(d, e, llq, msgID, sock); return; }
2330 LLQOptData *llq = NULL;
2365 llq = (LLQOptData *)&opt.r.resrec.rdata->u.opt[0].u.llq + i; // point into OptData at index i
2366 if (llq->vers != kLLQ_Vers) { Log("LLQ from %s contains bad version %d (expected %d)", addr, llq->vers, kLLQ_Vers); goto end; }
2368 e = LookupLLQ(d, pkt->src, &q.qname, q.qtype, &llq->id);
2372 e = NewLLQ(d, pkt->src, &q.qname, q.qtype, llq->llqlease );
2375 UpdateLLQ(d, e, llq, pkt->msg.h.id, sock);
3040 SetPublicSRV(d, "_dns-llq._udp.");
3043 SetPublicSRV(d, "_dns-llq-tls._tcp.");