Lines Matching refs:InterfaceID

132 	if (next) return(next->InterfaceID); else return(mDNSNULL);
141 if (rr->resrec.InterfaceID == id) used++;
991 mDNSexport void mDNS_SetupResourceRecord(AuthRecord *rr, RData *RDataStorage, mDNSInterfaceID InterfaceID,
995 // LocalOnly auth record can be created with LocalOnly InterfaceID or a valid InterfaceID.
996 // Most of the applications normally create with LocalOnly InterfaceID and we store them as
997 // such, so that we can deliver the response to questions that specify LocalOnly InterfaceID.
998 // LocalOnly resource records can also be created with valid InterfaceID which happens today
1001 if (InterfaceID == mDNSInterface_LocalOnly && artype != AuthRecordLocalOnly)
1003 LogMsg("mDNS_SetupResourceRecord: ERROR!! Mismatch LocalOnly record InterfaceID %p called with artype %d", InterfaceID, artype);
1006 else if (InterfaceID == mDNSInterface_P2P && artype != AuthRecordP2P)
1008 LogMsg("mDNS_SetupResourceRecord: ERROR!! Mismatch P2P record InterfaceID %p called with artype %d", InterfaceID, artype);
1011 else if (!InterfaceID && (artype == AuthRecordP2P || artype == AuthRecordLocalOnly))
1013 LogMsg("mDNS_SetupResourceRecord: ERROR!! Mismatch InterfaceAny record InterfaceID %p called with artype %d", InterfaceID, artype);
1025 rr->resrec.InterfaceID = InterfaceID;
1088 mDNSexport void mDNS_SetupQuestion(DNSQuestion *const q, const mDNSInterfaceID InterfaceID, const domainname *const name,
1091 q->InterfaceID = InterfaceID;
1221 if ((rr->InterfaceID == mDNSInterface_LocalOnly) || (rr->InterfaceID == mDNSInterface_P2P))
1223 LogMsg("SameNameRecordAnswersQuestion: ERROR!! called with LocalOnly ResourceRecord %p, Question %p", rr->InterfaceID, q->InterfaceID);
1226 if (rr->InterfaceID &&
1227 q ->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly &&
1228 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1231 if (!rr->InterfaceID && rr->rDNSServer != q->qDNSServer) return(mDNSfalse);
1234 if (rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
1247 if ((rr->InterfaceID == mDNSInterface_LocalOnly) || (rr->InterfaceID == mDNSInterface_P2P))
1249 LogMsg("ResourceRecordAnswersQuestion: ERROR!! called with LocalOnly/P2P ResourceRecord %p, Question %p", rr->InterfaceID, q->InterfaceID);
1253 if (rr->InterfaceID &&
1254 q ->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly &&
1255 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1258 if (!rr->InterfaceID && rr->rDNSServer != q->qDNSServer) return(mDNSfalse);
1261 if (rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
1271 // a valid InterfaceID (e.g., scoped /etc/hosts) and can be used to answer unicast questions unlike
1272 // multicast resource records (which has a valid InterfaceID) which can't be used to answer
1291 // Questions with mDNSInterface_LocalOnly InterfaceID should be answered with all resource records that are
1292 // *local* to the machine. These include resource records that have InterfaceID set to mDNSInterface_LocalOnly,
1293 // mDNSInterface_Any and any other real InterfaceID. Hence, LocalOnly questions should not be checked against
1294 // the InterfaceID in the resource record.
1298 if (rr->InterfaceID &&
1299 q->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly && q->InterfaceID != mDNSInterface_Unicast &&
1300 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1303 // may have a scope e.g., fe80::1%en0. The question may be scoped or not: the InterfaceID may be set
1304 // to mDNSInterface_Any, mDNSInterface_LocalOnly or a real InterfaceID (scoped).
1312 // 3) Question: Scoped (LocalOnly or InterfaceID), LocalOnly Record: no scope. This is the inverse of (2).
1317 // 4) Question: Scoped (LocalOnly or InterfaceID), LocalOnly Record: scoped. LocalOnly questions should be
1318 // answered with any resource record where as if it has a valid InterfaceID, the scope should match.
1320 // (1) and (2) is bypassed because we check for a non-NULL InterfaceID above. For (3), the InterfaceID is NULL
1337 if (ar->ARType != AuthRecordLocalOnly && rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
1350 if ((rr->InterfaceID == mDNSInterface_LocalOnly) || (rr->InterfaceID == mDNSInterface_P2P))
1352 LogMsg("AnyTypeRecordAnswersQuestion: ERROR!! called with LocalOnly ResourceRecord %p, Question %p", rr->InterfaceID, q->InterfaceID);
1355 if (rr->InterfaceID &&
1356 q ->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly &&
1357 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1360 // Note that Auth Records are normally setup with NULL InterfaceID and
1362 if (!rr->InterfaceID && rr->rDNSServer != q->qDNSServer) return(mDNSfalse);
1365 if (rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
1380 if (rr->InterfaceID &&
1381 q->InterfaceID && rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1384 if (rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
2132 const mDNSu8 *end, const mDNSInterfaceID InterfaceID, mDNSu8 RecordType, LargeCacheRecord *const largecr)
2165 rr->resrec.InterfaceID = InterfaceID;
2186 if (ptr[2] & (kDNSClass_UniqueRRSet >> 8) || (!InterfaceID && !(msg->h.flags.b[0] & kDNSFlag0_TC)))
2409 mDNSexport const mDNSu8 *getQuestion(const DNSMessage *msg, const mDNSu8 *ptr, const mDNSu8 *end, const mDNSInterfaceID InterfaceID,
2413 question->InterfaceID = InterfaceID;
2414 if (!InterfaceID) question->TargetQID = onesID; // In DNSQuestions we use TargetQID as the indicator of whether it's unicast or multicast
2603 mDNSInterfaceID InterfaceID, UDPSocket *src, const mDNSAddr *dst, mDNSIPPort dstport, TCPSocket *sock, DomainAuthInfo *authInfo)
2630 status = mDNSPlatformSendUDP(m, msg, end, InterfaceID, src, dst, dstport);