Lines Matching refs:end

84 mDNSlocal void mDNSParseNSEC3Records(mDNS *const m, const DNSMessage *const response, const mDNSu8 *end,
476 // from A to B, and then A is re-appended to the end of the list as a duplicate of B (because
478 // copies the B's value of CNAMEReferrals back to A, and we end up not incrementing CNAMEReferrals
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.
1600 // Scan for duplicates of rr, and mark them for deregistration at the end of this routine, after we've finished
2486 // then all that means is that it won't get sent -- which would not be the end of the world.
3414 // next thing we do is scan the list and call SetNextQueryTime() for every question we find, so we know we end up with the right value.
3921 // a real negative response, we would reset the state here and validate the results at the end of this function.
4114 // would end up delivering RMV for the active question and hence we avoid that.
4141 // the end of the question list, and m->NewQuestions will be set to indicate the first new question.
4152 // counters here we'll end up double-incrementing them when we do it again in AnswerNewQuestion().
4219 // the end of the question list, and m->NewQuestions will be set to indicate the first new question.
4249 // the end of the question list, and m->NewQuestions will be set to indicate the first new question.
4999 // new records could have been added to the end of the list as a result of that call.
5223 // if this is the first record we are skipping, move to the end of the list.
5224 // if we have already skipped records before, append it at the end.
5396 // as this would trigger looking up _autotunnel6._autotunnel6 and end up failing the original query.
5464 // question followed by the original query that refers to this GetZoneData question, we will end up
5465 // freeing the GetZoneData question and then start the "freed" question at the end.
5806 // Did we insert a null byte at the end ?
5813 // Include the length for the null byte at the end
5815 // Account for the first length byte and the null byte at the end
5881 // At the end, all the updates sent across all the interfaces with the same ID.
6868 mDNSlocal mDNSu8 *GenerateUnicastResponse(const DNSMessage *const query, const mDNSu8 *const end,
6890 ptr = getQuestion(query, ptr, end, InterfaceID, &q); // get the question...
7047 mDNSlocal void ResolveSimultaneousProbe(mDNS *const m, const DNSMessage *const query, const mDNSu8 *const end,
7051 const mDNSu8 *ptr = LocateAuthorities(query, end);
7056 ptr = GetLargeResourceRecord(m, query, ptr, end, q->InterfaceID, kDNSRecordTypePacketAuth, &m->rec);
7149 // new records could have been added to the end of the list as a result of that call.
7173 // new records could have been added to the end of the list as a result of that call.
7212 // new records could have been added to the end of the list as a result of that call.
7219 mDNSlocal mDNSu8 *ProcessQuery(mDNS *const m, const DNSMessage *const query, const mDNSu8 *const end,
7245 ptr = LocateOptRR(query, end, DNSOpt_OwnerData_ID_Space);
7248 ptr = GetLargeResourceRecord(m, query, ptr, end, InterfaceID, kDNSRecordTypePacketAdd, &m->rec);
7269 mDNSParseNSEC3Records(m, query, end, InterfaceID, &McastNSEC3Records);
7281 ptr = getQuestion(query, ptr, end, InterfaceID, &pktq); // get the question...
7324 ResolveSimultaneousProbe(m, query, end, &pktq, rr);
7467 ptr = GetLargeResourceRecord(m, query, ptr, end, InterfaceID, kDNSRecordTypePacketAns, &m->rec);
7576 // multicast response instead (don't want to end up ALSO setting SendUnicastResponse in the check below).
7681 responseptr = GenerateUnicastResponse(query, end, InterfaceID, LegacyQuery, response, ResponseRecords);
7787 mDNSlocal void mDNSCoreReceiveQuery(mDNS *const m, const DNSMessage *const msg, const mDNSu8 *const end,
7803 msg->h.numAdditionals, msg->h.numAdditionals == 1 ? " " : "s", end - msg->data);
7813 msg->h.numAdditionals, msg->h.numAdditionals == 1 ? " " : "s", end - msg->data);
7815 responseend = ProcessQuery(m, msg, end, srcaddr, InterfaceID,
8061 // then things really break (e.g. we end up making a negative cache entry).
8180 mDNSlocal void mDNSCoreReceiveNoDNSSECAnswers(mDNS *const m, const DNSMessage *const response, const mDNSu8 *end, const mDNSAddr *dstaddr,
8186 for (i = 0; i < response->h.numQuestions && ptr && ptr < end; i++)
8190 ptr = getQuestion(response, ptr, end, InterfaceID, &pktq);
8223 mDNSlocal void mDNSCoreReceiveNoUnicastAnswers(mDNS *const m, const DNSMessage *const response, const mDNSu8 *end, const mDNSAddr *dstaddr,
8230 for (i = 0; i < response->h.numQuestions && ptr && ptr < end; i++)
8234 ptr = getQuestion(response, ptr, end, InterfaceID, &q);
8303 if (response->h.numAuthorities && (ptr = LocateAuthorities(response, end)) != mDNSNULL)
8305 ptr = GetLargeResourceRecord(m, response, ptr, end, InterfaceID, kDNSRecordTypePacketAuth, &m->rec);
8345 // of 60 seconds, and we end up polling the server every minute for a record that doesn't exist.
8659 mDNSlocal void mDNSParseNSEC3Records(mDNS *const m, const DNSMessage *const response, const mDNSu8 *end,
8668 ptr = LocateAuthorities(response, end);
8674 for (i = 0; i < response->h.numAuthorities && ptr && ptr < end; i++)
8679 ptr = GetLargeResourceRecord(m, response, ptr, end, InterfaceID, kDNSRecordTypePacketAuth, &m->rec);
8718 const DNSMessage *const response, const mDNSu8 *end,
8727 uDNS_LLQType LLQType = uDNS_recvLLQResponse(m, response, end, srcaddr, srcport, &llqMatch);
8729 // "(CacheRecord*)1" is a special (non-zero) end-of-list marker
8759 response->h.numAdditionals, response->h.numAdditionals == 1 ? " " : "s", end - response->data, LLQType);
8770 // abort our TCP connection, and not complete the operation, and end up with an incomplete RRSet in our cache.
8785 ptr = LocateAnswers(response, end);
8794 // We could possibly combine this with the similar loop at the end of this function --
8797 // which it was received (or refreshed), and then at the end if we find any cache records which
8800 for (i = 0; i < response->h.numQuestions && ptr && ptr < end; i++)
8803 ptr = getQuestion(response, ptr, end, InterfaceID, &q);
8881 BumpDNSSECStats(m, kStatsActionSet, kStatsTypeMsgSize, (end - response->data));
8889 mDNSParseNSEC3Records(m, response, end, InterfaceID, &McastNSEC3Records);
8891 for (i = 0; i < totalrecords && ptr && ptr < end; i++)
8902 ptr = GetLargeResourceRecord(m, response, ptr, end, InterfaceID, RecordType, &m->rec);
9151 // (see note about "multi-homing and bridged networks" at the end of this function).
9448 mDNSCoreReceiveNoDNSSECAnswers(m, response, end, dstaddr, dstport, InterfaceID);
9451 mDNSCoreReceiveNoUnicastAnswers(m, response, end, dstaddr, dstport, InterfaceID, LLQType, rcode, NSECRecords);
9593 // if we never filled any bytes and the next character is space (we have reached the end)
9618 // loop below as there is no ":" at the end. Hence, the last two bytes that can possibly
9686 // We have a zero at the end and if we reached that, then we are done.
9709 // We have a zero at the end and if we reached that, then we are done.
9972 const DNSMessage *const msg, const mDNSu8 *end,
9989 msg->h.numAdditionals, msg->h.numAdditionals == 1 ? " " : "s", end - msg->data);
9994 DumpPacket(m, mStatus_NoError, mDNSfalse, "UDP", srcaddr, srcport, dstaddr, dstport, msg, end);
9996 ptr = LocateOptRR(msg, end, DNSOpt_LeaseData_Space + DNSOpt_OwnerData_ID_Space);
9999 ptr = GetLargeResourceRecord(m, msg, ptr, end, 0, kDNSRecordTypePacketAdd, &m->rec);
10047 ptr = LocateAuthorities(msg, end);
10053 for (i = 0; i < msg->h.mDNS_numUpdates && ptr && ptr < end; i++)
10055 ptr = GetLargeResourceRecord(m, msg, ptr, end, InterfaceID, kDNSRecordTypePacketAuth, &m->rec);
10127 mDNSlocal void mDNSCoreReceiveUpdateR(mDNS *const m, const DNSMessage *const msg, const mDNSu8 *end, const mDNSAddr *srcaddr, const mDNSInterfaceID InterfaceID)
10132 const mDNSu8 *ptr = LocateOptRR(msg, end, DNSOpt_LeaseData_Space);
10137 ptr = GetLargeResourceRecord(m, msg, ptr, end, 0, kDNSRecordTypePacketAdd, &m->rec);
10178 // new records could have been added to the end of the list as a result of that call.
10237 mDNSexport void mDNSCoreReceive(mDNS *const m, void *const pkt, const mDNSu8 *const end,
10259 LNT_ConfigureRouterInfo(m, InterfaceID, pkt, (mDNSu16)(end - (mDNSu8 *)pkt));
10267 uDNS_ReceiveNATPacket(m, InterfaceID, pkt, (mDNSu16)(end - (mDNSu8 *)pkt));
10277 if ((unsigned)(end - (mDNSu8 *)pkt) < sizeof(DNSMessageHeader))
10279 LogMsg("DNS Message from %#a:%d to %#a:%d length %d too short", srcaddr, mDNSVal16(srcport), dstaddr, mDNSVal16(dstport), end - (mDNSu8 *)pkt);
10319 DumpPacket(m, mStatus_NoError, mDNSfalse, TLS ? "TLS" : !dstaddr ? "TCP" : "UDP", srcaddr, srcport, dstaddr, dstport, msg, end);
10320 uDNS_ReceiveMsg(m, msg, end, srcaddr, srcport);
10324 if (QR_OP == StdQ) mDNSCoreReceiveQuery (m, msg, end, srcaddr, srcport, dstaddr, dstport, ifid);
10325 else if (QR_OP == StdR) mDNSCoreReceiveResponse(m, msg, end, srcaddr, srcport, dstaddr, dstport, ifid);
10326 else if (QR_OP == UpdQ) mDNSCoreReceiveUpdate (m, msg, end, srcaddr, srcport, dstaddr, dstport, InterfaceID);
10327 else if (QR_OP == UpdR) mDNSCoreReceiveUpdateR (m, msg, end, srcaddr, InterfaceID);
10331 msg->h.flags.b[0], msg->h.flags.b[1], srcaddr, mDNSVal16(srcport), dstaddr, mDNSVal16(dstport), end - (mDNSu8 *)pkt, InterfaceID);
10335 while (i<end - (mDNSu8 *)pkt)
10339 do if (i<end - (mDNSu8 *)pkt) p += mDNS_snprintf(p, sizeof(buffer), " %02X", ((mDNSu8 *)pkt)[i]);while (++i & 15);
10522 if (tmp) *p = tmp; // move to end of list, to ensure ordering from platform layer
10592 // can be queries that can forced to multicast (ForceMCast) even though they don't end in these
11252 // will restart at the end. The main reason for the two step process is to handle duplicate questions.
11255 // suppressed before. At the end when we have restarted all questions, none of them is active as each
11258 // It is much cleaner and less error prone to build a list of questions and restart at the end.
11712 // Note: It important that new questions are appended at the *end* of the list, not prepended at the start
11756 // MUST NOT do this Wide Area setup until near the end of
11759 // m->NewQuestions if necessary then we could end up recursively re-entering
13548 // we end up incrementing m->nicelabel multiple times instead of just once.
13793 mDNSlocal const mDNSEthAddr *GetLinkLayerAddressOption(const IPv6NDP *const ndp, const mDNSu8 *const end, mDNSu8 op)
13796 while (options < end)
13798 debugf("NDP Option %02X len %2d %d", options[0], options[1], end - options);
13807 const IPv6NDP *const ndp, const mDNSu8 *const end, const mDNSInterfaceID InterfaceID)
13818 //const mDNSEthAddr *const sha = GetLinkLayerAddressOption(ndp, end, NDP_SrcLL);
13819 (void)end;
13893 const mDNSu8 *const p, const TransportLayerPacket *const t, const mDNSu8 *const end, const mDNSInterfaceID InterfaceID, const mDNSu16 len)
13901 #define XX wake ? "Received" : "Ignoring", end-p
13902 case 0x01: LogSPS("Ignoring %d-byte ICMP from %#a to %#a", end-p, src, dst);
13948 //if (end - p - 34 - ((t->tcp.offset >> 4) * 4) > 0) data = mDNStrue;
13950 if (end - ((mDNSu8 *)t + tcphlen) > 0) data = mDNStrue;
13961 end, tcphlen, end - ((mDNSu8 *)t + tcphlen), pack, seq, pseq, ack, wake);
13999 if (datalen == 1 && end >= &t->bytes[9] && t->bytes[8] == 0xFF) wake = mDNSfalse;
14003 const mDNSBool NonESP = (end >= &t->bytes[12] && t->bytes[8] == 0 && t->bytes[9] == 0 && t->bytes[10] == 0 && t->bytes[11] == 0);
14006 if (ikelen >= sizeof(IKEHeader) && end >= ((mDNSu8 *)ike) + sizeof(IKEHeader))
14022 if (mDNSSameIPPort(port, ARD)) wake = (datalen >= 110 && end >= &t->bytes[10] && t->bytes[8] == 0x13 && t->bytes[9] == 0x88);
14029 case 0x3A: if (&t->bytes[len] <= end)
14037 default: LogSPS("Ignoring %d-byte IP packet unknown protocol %d from %#a to %#a", end-p, protocol, src, dst);
14074 mDNSexport void mDNSCoreReceiveRawPacket(mDNS *const m, const mDNSu8 *const p, const mDNSu8 *const end, const mDNSInterfaceID InterfaceID)
14092 if (end >= p+42 && mDNSSameOpaque16(eth->ethertype, Ethertype_ARP) && mDNSSameOpaque16(pkt->arp.hrd, ARP_hrd_eth) && mDNSSameOpaque16(pkt->arp.pro, ARP_pro_ip))
14095 else if (end >= p+34 && mDNSSameOpaque16(eth->ethertype, Ethertype_IPv4) && (pkt->v4.flagsfrags.b[0] & 0x1F) == 0 && pkt->v4.flagsfrags.b[1] == 0)
14099 if (transEnd > end) transEnd = end;
14107 else if (end >= p+54 && mDNSSameOpaque16(eth->ethertype, Ethertype_IPv6))
14113 if (end >= trans + RequiredCapLen(pkt->v6.pro))
14114 mDNSCoreReceiveRawTransportPacket(m, &eth->src, &src, &dst, pkt->v6.pro, p, (TransportLayerPacket*)trans, end, InterfaceID,
14715 // - Two questions scoped and non-scoped for the same name will pick two different DNSServer and will end up creating separate
15008 // new records could have been added to the end of the list as a result of that call.