Lines Matching defs:our
623 // 1. It runs though all our LocalOnlyQuestions delivering answers as appropriate,
626 // our main question list, delivering answers to mDNSInterface_Any questions as appropriate,
715 // Suppose real record has TTL of 3600, and our local caching server has held it for 3500 seconds, so it returns an aged TTL of 100.
716 // If we do our normal refresh at 80% of the TTL, our local caching server will return 20 seconds, so we'll do another
719 // We adjust the 100 second TTL to 127. This means that when we do our 80% query at 102 seconds,
720 // the cached copy at our local caching server will already have expired, so the server will be forced
752 // PacketRRMatchesSignature behaves as SameResourceRecordSignature, except that types may differ if our
755 // In addition, when probing we send our questions with the wildcard type kDNSQType_ANY,
784 // If RR signature is different, or data is different, then don't suppress our answer
788 // we need to give our answer before the requester's copy expires.
790 // then we can suppress our answer this time.
888 // wait one second to give the client a chance to go to sleep, and then start our ARP/NDP probing.
890 // and we can begin broadcasting our announcements to take over ownership of that IP address.
891 // If we don't wait for the client to go to sleep, then when the client sees our ARP Announcements there's a risk
909 // For autotunnel services pointing at our IPv6 ULA we don't need or want a NAT mapping, but for all other
910 // advertised services referencing our uDNS hostname, we want NAT mappings automatically created as appropriate,
911 // with the port number in our advertised SRV record automatically tracking the external mapped port.
1369 // We should be recording the actual internal port for this service record here. Once we initiate our NAT mapping
1441 // records to the list, so we now need to update p to advance to the new end to the list before appending our new record.
1454 // Now that we've finished building our new record, make sure it's not identical to one we already have
1561 SetNewRData(&rr->resrec, rr->NewRData, rr->newrdlength); // Update our rdata
1574 AuthRecord **p = &m->ResourceRecords; // Find this record in our list of active records
1597 // We found our record on the main list. See if there are any duplicates that need special handling.
1650 // We didn't find our record on the main list; try the DuplicateRecords list instead.
1653 // If we found our record on the duplicate list, then make sure we don't send a goodbye for it
1786 if (rr->NewRData) CompleteRDataUpdate(m, rr); // Update our rdata, clear the NewRData pointer, and return memory to the client
1808 // Now that we've finished deregistering rr, check our DuplicateRecords list for any that we marked previously.
1910 // Make a list of all our records that need to be unicast to this destination
2157 // 0x16 Sender hardware address (our MAC address)
2405 // Run through our list of records, and decide which ones we're going to announce on all interfaces
2729 // when we see our own multicast with the cache flush bit set, if we haven't set LastMCTime, then we'll get
2730 // all concerned and re-announce our record again to make sure it doesn't get flushed from peer caches.
2768 if (!r2) // If we successfully built our NSEC record, add it to the packet now
2878 if (rr->NewRData) CompleteRDataUpdate(m, rr); // Update our rdata, clear the NewRData pointer, and return memory to the client
2999 for (rr = cg ? cg->members : mDNSNULL; rr; rr=rr->next) // If we have a resource record in our cache,
3004 SameNameRecordAnswersQuestion(&rr->resrec, q) && // which answers our question
3011 // which we have a unique record already in our cache, then including that unique record as a
3014 *ka = rr; // Link this record into our known answer chain
3031 // Success! Update our state pointers, increment UnansweredQueries as appropriate, and return
3037 for (rr = cg ? cg->members : mDNSNULL; rr; rr=rr->next) // For every resource record in our cache,
3040 SameNameRecordAnswersQuestion(&rr->resrec, q)) // which answers our question
3053 // for any records in our cache that reference the given name (e.g. PTR and SRV records).
3104 if (SameNameRecordAnswersQuestion(&cr->resrec, q)) // and answers our browse query,
3105 if (!IdenticalSameNameRecord(&cr->resrec, &m->SPSRecords.RR_PTR.resrec)) // and is not our own advertised service...
3145 // Finds the three best Sleep Proxies we currently have in our cache
3189 // See if we have this one in our list somewhere already
3273 for (rr = cg ? cg->members : mDNSNULL; rr; rr=rr->next) // If we have a resource record in our cache,
3275 SameNameRecordAnswersQuestion(&rr->resrec, q) && // which answers our question
3297 // of our records with that name (analogous to the Update section of DNS Update packets)
3358 // Scan our list of questions to see which:
3409 // Scan our list of questions
3492 // 2. Scan our authoritative RR list to see what probes we might need to send
3518 // (using our sender IP address) instead of an ARP *probe* (using all-zero sender IP address).
3544 // on our duplicate list which should similarly have their ProbeCount cleared to zero...
3582 // go through our interface list sending the appropriate queries on each interface
3671 // Put our known answer list (either new one from this question or questions, or remainder of old one from last time)
3795 // 4a. Debugging check: Make sure we announced all our records
3823 // 4c. Debugging check: Make sure we sent all our planned questions
3930 // Normally we don't send out the unicast query if we have answered using our local only auth records e.g., /etc/hosts.
3996 // uDNS LongLived questions, because that would mess up our LLQ lease renewal timing.
4142 // rr is a new CacheRecord just received into our cache
4471 else // else trigger our question to go out now
4619 // whether our current m->NewQuestions question got deleted by one of these callbacks is to store the
4629 // deleting a question, so luckily we have an easy alternative way of detecting if our question got deleted.
4736 // In cases where m->NewQuestions->DelayAnswering is set, we may have delayed generating our
4747 // When a NewLocalOnlyQuestion is created, AnswerNewLocalOnlyQuestion runs though our ResourceRecords delivering any
4821 // number of bogus records so that we keep growing our cache until the machine runs out of memory.
4822 // To guard against this, if our cache grows above 512kB (approx 3168 records at 164 bytes each),
5108 // 3. Purge our cache of stale old records
5129 // factor its nextcheck time into our overall NextCacheCheck value
5169 // 4. See if we can answer any of our new local questions from the cache
5221 AuthRecord **p = &m->ResourceRecords; // Find this record in our list of active records
5248 // to our local questions
5278 // then send our responses, probes, and questions.
5327 // performing mDNS API operations that change our next scheduled event time.
5384 // In case 1 we don't want to mess with our established ThisQInterval and LastQTime (ScheduleImmediately is false)
5544 // Retrigger all our uDNS questions
5557 // Retrigger all our mDNS questions
5558 for (q = m->Questions; q; q=q->next) // Scan our list of questions
5834 SetNewRData(&rr->resrec, newrd, newrdlength); // Update our rdata
5858 // Mark our mDNS records (not unicast records) for transfer to SPS
5899 // If we decide to compress SRV records in SPS registrations in the future, we can achieve that by creating our
5955 SetupOwnerOpt(m, intf, &opt.resrec.rdata->u.opt[1]); // use our own interface information
6124 // First make sure none of our interfaces' NextSPSAttemptTimes are inadvertently set to m->timenow + mDNSPlatformOneSecond * 10
6275 SleepRecordRegistrations(m); // If we have no SPS, need to deregister our uDNS records
6472 // If we are registering with a Sleep Proxy for a new subnet, add it to our list
6617 // 2. Re-validate our cache records
6680 // 3. Retrigger probing and announcing for all our authoritative records
6695 // track of passage of time while asleep, so on wake we refresh our NAT mappings.
6696 // We typically wake up with no interfaces active, so there's no need to rush to try to find our external address.
6716 // If we've not hit the sleep limit time, and it's not time for our next retry, we can skip these checks
6807 // If we allow just one more second to send our goodbyes, that puts us at 27 seconds.
6893 for (rr=ResponseRecords; rr; rr=rr->NextResponse) // and search our list of proposed answers
6934 // AuthRecord *our is our Resource Record
6939 mDNSlocal int CompareRData(const AuthRecord *const our, const CacheRecord *const pkt)
6943 if (!our) { LogMsg("CompareRData ERROR: our is NULL"); return(+1); }
6946 ourend = putRData(mDNSNULL, ourdata, ourdata + sizeof(ourdata), &our->resrec);
6965 // If we find any identical ResourceRecords in our authoritative list, then follow their DependentOn
6994 // If we find any identical AuthRecord in our authoritative list, then follow its RRSet
7012 // as one of our records (our) but different rdata.
7013 // 1. If our record is not a type that's supposed to be unique, we don't care.
7014 // 2a. If our record is marked as dependent on some other record for conflict detection, ignore this one.
7015 // 2b. If the packet rr exactly matches one of our other RRs, and *that* record's DependentOn pointer
7016 // points to our record, ignore this conflict (e.g. the packet record matches one of our
7017 // TXT records, and that record is marked as dependent on 'our', its SRV record).
7018 // 3. If we have some *other* RR that exactly matches the one from the packet, and that record and our record
7020 mDNSlocal mDNSBool PacketRRConflict(const mDNS *const m, const AuthRecord *const our, const CacheRecord *const pktrr)
7023 if (!(our->resrec.RecordType & kDNSRecordTypeUniqueMask)) return(mDNSfalse);
7026 if (our->DependentOn || MatchDependentOn(m, pktrr, our)) return(mDNSfalse);
7030 const AuthRecord *ourset = our->RRSet ? our->RRSet : our;
7036 // in our AuthRecords list is sufficient evidence of non-conflict
7037 if (our->WakeUp.HMAC.l[0] && pktset) return(mDNSfalse);
7048 DNSQuestion *q, AuthRecord *our)
7061 if (PacketRRConflict(m, our, &m->rec.r))
7063 int result = (int)our->resrec.rrclass - (int)m->rec.r.resrec.rrclass;
7064 if (!result) result = (int)our->resrec.rrtype - (int)m->rec.r.resrec.rrtype;
7065 if (!result) result = CompareRData(our, &m->rec.r);
7070 LogMsg("ResolveSimultaneousProbe: %p Our Record %d %s %08lX %s", our->resrec.InterfaceID, our->ProbeCount, msg, our->resrec.rdatahash, ARDisplayString(m, our));
7074 // If there really is another live host out there with the same name, it will answer our probes and we'll then rename.
7078 our->ProbeCount = DefaultProbeCountForTypeUnique;
7079 our->AnnounceCount = InitialAnnounceCount;
7080 InitializeLastAPTime(m, our);
7088 LogMsg("ResolveSimultaneousProbe: %p Our Record %d ign: %08lX %s", our->resrec.InterfaceID, our->ProbeCount, our->resrec.rdatahash, ARDisplayString(m, our));
7095 LogInfo("ResolveSimultaneousProbe: %##s (%s): No Update Record found", our->resrec.name->c, DNSTypeName(our->resrec.rrtype));
7156 // to check our lists and discard any stale duplicates of this record we already have
7228 CacheRecord *ExpectedAnswers = mDNSNULL; // Records in our cache we expect to see updated
7254 // delete all our own AuthRecords (which are identified by having zero MAC tags on them).
7295 // to keep our neighbours caches warm, and for ongoing conflict detection.
7395 // Make a list indicating which of our own cache records we expect to see updated as a result of this query
7451 for (rr = m->ResourceRecords; rr; rr=rr->next) // Now build our list of potential answers
7471 // See if this Known-Answer suppresses any of our currently planned answers
7511 // See if this Known-Answer suppresses any answers we were expecting for our cache records. We do this always,
7521 // Having built our ExpectedAnswers list from the questions in this packet, we then remove
7533 // See if this Known-Answer is a surprise to us. If so, we shouldn't suppress our own query.
7647 // *** 8. If we think other machines are likely to answer these questions, set our packet suppression timer
7687 // *** 10. Finally, clear our link chains ready for use next time
7744 // (b) we allow some time for us to witness enough other failed queries that we don't have to do our own
7946 rr->resrec.name = cg->name; // And set rr->resrec.name to point into our CacheGroup header
8054 // This means that we'll do our 80, 85, 90, 95% queries at 12.00, 12.75, 13.50, 14.25 seconds
8056 // This gives the server up to three seconds to respond between when we send our 80% query at 12 seconds
8096 // we receive NSECs for our query which does not match the qname and we need to cache in that case
8250 // Otherwise we just fill up our cache with negative entries for just about every single multicast name we ever look up
8253 // suppress sending our mDNS query packet because we think we already have a valid (negative) answer to that query in our cache.
8294 // Special case for our special Microsoft Active Directory "local SOA" check.
8297 // Because we don't want to keep hitting the root name servers with our query to find
8342 // If we already had a negative entry in the cache, then we double our existing negative TTL. This is to avoid
8343 // the case where the record doesn't exist (e.g. particularly for things like our lb._dns-sd._udp.<domain> query),
8347 // so that we back off our polling rate and don't keep hitting the server continually.
8524 // If this packet record has the kDNSClass_UniqueRRSet flag set, then add it to our cache flushing list
8533 // If this packet record is marked unique, and our previous cached copy was not, then fix it
8548 // If the rdata of the packet record differs in name capitalization from the record in our cache
8643 // we don't want to let the goodbye packet *extend* the record's lifetime in our cache.
8730 // We use this non-zero marker so that records in our CacheFlushRecords list will always have NextInCFList
8767 // failures in our Microsoft Active Directory client, which expects to get the entire set of answers at once.
8770 // abort our TCP connection, and not complete the operation, and end up with an incomplete RRSet in our cache.
8771 // Next time there's a query for this RRSet we'll see answers in our cache, and assume we have the whole RRSet already,
8786 // Otherwise, for one-shot queries, any answers in our cache that are not also contained
8894 // All responses received over our outbound TCP connections are acceptable for caching
8903 if (!ptr) goto exit; // Break out of the loop and clean up our CacheFlushRecords list before exiting
8929 // delete all our own AuthRecords (which are identified by having zero MAC tags on them).
9065 // (apparently) local source address that pertain to a record of our own that's in probing state
9113 // This is because our single probe for "example-name.local" could yield a response with (say) two A records and
9136 // to fix it -- e.g. it's not our job to be trying to change the machine's IP address. We just discard our
9137 // record to avoid continued conflicts (as we do for a conflict on our Unique records) and get on with life.
9166 // 2. See if we want to add this packet resource record to our cache
9179 // 2a. Check if this packet resource record is already in our cache.
9189 // If packet resource record not in our cache, add it now
9332 // so our received TTLs are expected to vary in that case
9361 // happened, and re-announce its Ethernet IP address to rescue it from deletion from all our caches.
10302 // Track the number of multicast packets received from a source outside our subnet.
10348 // 4. Response packets that answer questions may cause our client to issue new questions
10393 for (q = m->Questions; q && q != question; q=q->next) // Scan our list for another question
10429 for (q = m->Questions; q; q=q->next) // Scan our list of questions
10489 question->state = 0; // Must zero question->state, or mDNS_StopQuery_internal will clean up and cancel our LLQ from the server
11444 // Note: In the case where we already have the answer to this question in our cache, that may be all the client
11446 // be a waste. For that reason, we schedule our first query to go out in half a second (InitialQuestionInterval).
11447 // If AnswerNewQuestion() finds that we have *no* relevant answers currently in our cache, then it will accelerate
11579 // We'll create our question->LocalSocket on demand, if needed.
11594 // If we don't have our NAT mapping active, start it now
11758 // NS, etc.) and if we haven't finished setting up our own question and setting
11861 for (q = m->Questions; q; q=q->next) // Scan our list of questions
11911 // so if we delete it earlier in this routine, we could find that our "question->next" pointer above is already
11913 // *first*, then they're all ready to be updated a second time if necessary when we cancel our GetZoneData query.
11918 // Scan our list to see if any more wide-area LLQs remain. If not, stop our NAT Traversal.
11943 // crash trying to access our cancelled question, but we don't cancel the TCP operation itself --
12128 // If this is our first answer, then set the GotSRV flag and start the address query
12140 // If this is not our first answer, only re-issue the address query if the target host name has changed
12149 // 1. This is not our first SRV answer
12152 // make our address queries at least as broad as the original SRV query so that we catch all the answers.
12554 if (!primary) primary = set; // If no existing advertised interface, this new NetworkInterfaceInfo becomes our new primary
12574 // 2. Set up reverse-lookup PTR record to map from our address back to our host name
12580 // Note: This is reverse order compared to a normal dotted-decimal IP address, so we can't use our customary "%.4a" format code
12601 set->RR_PTR.AutoTarget = Target_AutoHost; // Tell mDNS that the target of this PTR is to be kept in sync with our host name
12602 set->RR_PTR.ForceMCast = mDNStrue; // This PTR points to our dot-local name, so don't ever try to write it into a uDNS server
12642 // Also, in the event of a name conflict, one or more of our records will have been forcibly deregistered.
12740 // and make sure all SRV records, etc., are updated to reference our new hostname
12829 // Stop our browse and resolve operations
12841 // Reset our variables back to initial state, so we're ready for when NetWake is turned back on
12906 // Therefore, when registering an interface, we want to re-trigger our questions and re-probe our Resource Records,
12916 // and think it's a conflicting answer to our probe.
12952 for (q = m->Questions; q; q=q->next) // Scan our list of questions
12984 // For all our non-specific authoritative resource records (and any dormant records specific to this interface)
13021 // Find this record in our list
13027 // Unlink this record from our list
13213 mDNS_DeregisterService(m, sr); // Unlink the records from our list
13348 // 1. Set up the ADV record rdata to advertise our service type
13351 // 2. Set up the PTR record rdata to point to our service name
13358 // 2a. Set up any subtype PTRs to point to our service name
13381 // Setting AutoTarget tells DNS that the target of this SRV is to be automatically kept in sync with our host name
13415 // make sure we've deregistered all our records and done any other necessary cleanup before that happens.
13512 // through the old list of extra records, and re-add them to our freshly created service registration
13541 // an mStatus_NameConflict message when we get the mStatus_MemFree for our PTR record.
13668 // To handle the second case, we reset ProbeCount, so we'll suppress our own answers for a while, to avoid
13670 // If the machine has just woken then we'll discard our records when we see the first new mDNS probe from that machine.
13673 // re-assert our (temporary) ownership of that IP address in order to receive subsequent packets addressed to that IPv4 address.
13684 // didn't answer our three probes within three seconds then we'd announce and cause it an unnecessary address conflict.
13707 // We also process ARPs from our own kernel (and 'answer' them by injecting a local ARP table entry)
13750 // We ignore ARPs we sent ourselves (Sender MAC address is our MAC address) because our own proxy ARPs do not constitute a conflict that we need to handle.
13752 // If the sender hardware address is the original owner this is benign, so we just suppress our own proxy answering for a while longer.
13945 // If the other side is acking one more than our sequence number (keepalive is one
14161 // If turning off SPS, close our socket
14171 // Record our new SPS parameters
14692 // Update our qDNSServer pointers before we go and free the DNSServer object memory
14860 // Scan our cache, looking for uDNS records that we would have queried this server for.
14941 // Did our FQDN change?
15042 // For each member of our SearchList, deregister any records it may have created, and cut them from the list.
15057 // Shut down all our active NAT Traversals
15064 // This has particularly important implications for our AutoTunnel records --
15065 // when we deregister our AutoTunnel records below, we don't want their mStatus_MemFree