Home | History | Annotate | Download | only in mDNSShared

Lines Matching defs:llq

79 // LLQ Lease bounds (seconds)
84 // LLQ SOA poll interval (microseconds)
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
1233 // set up Unix domain socket pair for LLQ polling thread to signal main thread that a change to the zone occurred
1641 // LLQ Support Routines
1644 // Set fields of an LLQ OPT Resource Record
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;
1660 // Calculate effective remaining lease of an LLQ
1678 VLog("Deleting LLQ table entry for %##s client %s", e->qname.c, addr);
1702 // remove LLQ from table, free memory
1704 if (!*ptr) { Log("Error: DeleteLLQ - LLQ not in table"); return; }
1929 Log("Printing LLQ Answer Table contents");
1952 Log("Printing LLQ table contents");
1970 Log("LLQ from %s in state %s; %##s; type %d; orig lease %d; remaining lease %d; AnswerList %p)",
1985 VLog("Generating LLQ Events");
2015 // for each established LLQ, send events
2082 // Allocate LLQ entry, insert into table
2094 VLog("Allocating LLQ entry for client %s question %##s type %d", addr, qname->c, qtype);
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
2169 llq->err != LLQErr_NoError ||
2170 llq->llqlease > e->lease + LLQ_LEASE_FUDGE ||
2171 llq->llqlease < e->lease - LLQ_LEASE_FUDGE)
2177 if (e->state == Established) VLog("Retransmitting LLQ ack + answers for %##s", e->qname.c);
2178 else VLog("Delivering LLQ ack + answers for %##s", e->qname.c);
2205 mDNSlocal void LLQSetupChallenge(DaemonInfo *d, LLQEntry *e, LLQOptData *llq, mDNSOpaque16 msgID)
2212 if (e->state == ChallengeSent) VLog("Retransmitting LLQ setup challenge for %##s", e->qname.c);
2213 else VLog("Sending LLQ setup challenge for %##s", e->qname.c);
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
2226 // format response (query + LLQ opt rr)
2239 // Take action on an LLQ message from client. Entry must be initialized and in table
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 );
2254 // Set the state to established because we've just set the LLQ up using TCP
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; }
2280 else { Log("Unhandled message for established LLQ"); return; }
2330 LLQOptData *llq = NULL;
2337 VLog("Received LLQ msg from %s", addr);
2341 Log("Malformatted LLQ from %s with %d questions, %d additionals", addr, pkt->msg.h.numQuestions, pkt->msg.h.numAdditionals);
2352 if (!aptr) { Log("Malformatted LLQ from %s: could not get Additional record %d", addr, i); goto end; }
2357 if (opt.r.resrec.rrtype != kDNSType_OPT) { Log("Malformatted LLQ from %s: last Additional not an OPT RR", addr); goto end; }
2358 if (opt.r.resrec.rdlength < pkt->msg.h.numQuestions * DNSOpt_LLQData_Space) { Log("Malformatted LLQ from %s: OPT RR to small (%d bytes for %d questions)", addr, opt.r.resrec.rdlength, pkt->msg.h.numQuestions); }
2364 if (!qptr) { Log("Malformatted LLQ from %s: cannot read question %d", addr, i); goto end; }
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);
2606 // LLQ messages handled by main thread
2731 // Always do this, regardless of what kind of packet it is. If we wanted LLQ events to be sent over TCP,
2732 // we would change this line of code. As it is now, we will reply to an LLQ via TCP, but then events
2748 // LLQ messages handled by main thread
3040 SetPublicSRV(d, "_dns-llq._udp.");
3043 SetPublicSRV(d, "_dns-llq-tls._tcp.");