Lines Matching defs:InterfaceID
157 if (next) return(next->InterfaceID);else return(mDNSNULL);
167 if (rr->resrec.InterfaceID == id)
1357 mDNSexport void mDNS_SetupResourceRecord(AuthRecord *rr, RData *RDataStorage, mDNSInterfaceID InterfaceID,
1361 // LocalOnly auth record can be created with LocalOnly InterfaceID or a valid InterfaceID.
1362 // Most of the applications normally create with LocalOnly InterfaceID and we store them as
1363 // such, so that we can deliver the response to questions that specify LocalOnly InterfaceID.
1364 // LocalOnly resource records can also be created with valid InterfaceID which happens today
1367 if (InterfaceID == mDNSInterface_LocalOnly && artype != AuthRecordLocalOnly)
1369 LogMsg("mDNS_SetupResourceRecord: ERROR!! Mismatch LocalOnly record InterfaceID %p called with artype %d", InterfaceID, artype);
1372 else if (InterfaceID == mDNSInterface_P2P && artype != AuthRecordP2P)
1374 LogMsg("mDNS_SetupResourceRecord: ERROR!! Mismatch P2P record InterfaceID %p called with artype %d", InterfaceID, artype);
1377 else if (!InterfaceID && (artype == AuthRecordP2P || artype == AuthRecordLocalOnly))
1379 LogMsg("mDNS_SetupResourceRecord: ERROR!! Mismatch InterfaceAny record InterfaceID %p called with artype %d", InterfaceID, artype);
1391 rr->resrec.InterfaceID = InterfaceID;
1456 mDNSexport void mDNS_SetupQuestion(DNSQuestion *const q, const mDNSInterfaceID InterfaceID, const domainname *const name,
1459 q->InterfaceID = InterfaceID;
1781 if ((rr->InterfaceID == mDNSInterface_LocalOnly) || (rr->InterfaceID == mDNSInterface_P2P))
1783 LogMsg("SameNameRecordAnswersQuestion: ERROR!! called with LocalOnly ResourceRecord %p, Question %p", rr->InterfaceID, q->InterfaceID);
1789 if (rr->InterfaceID &&
1790 q->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly &&
1791 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1794 if (!rr->InterfaceID)
1803 if (rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
1834 // a valid InterfaceID (e.g., scoped /etc/hosts) and can be used to answer unicast questions unlike
1835 // multicast resource records (which has a valid InterfaceID) which can't be used to answer
1854 // Questions with mDNSInterface_LocalOnly InterfaceID should be answered with all resource records that are
1855 // *local* to the machine. These include resource records that have InterfaceID set to mDNSInterface_LocalOnly,
1856 // mDNSInterface_Any and any other real InterfaceID. Hence, LocalOnly questions should not be checked against
1857 // the InterfaceID in the resource record.
1861 if (rr->InterfaceID &&
1862 q->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly && q->InterfaceID != mDNSInterface_Unicast &&
1863 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1866 // may have a scope e.g., fe80::1%en0. The question may be scoped or not: the InterfaceID may be set
1867 // to mDNSInterface_Any, mDNSInterface_LocalOnly or a real InterfaceID (scoped).
1875 // 3) Question: Scoped (LocalOnly or InterfaceID), LocalOnly Record: no scope. This is the inverse of (2).
1880 // 4) Question: Scoped (LocalOnly or InterfaceID), LocalOnly Record: scoped. LocalOnly questions should be
1881 // answered with any resource record where as if it has a valid InterfaceID, the scope should match.
1883 // (1) and (2) is bypassed because we check for a non-NULL InterfaceID above. For (3), the InterfaceID is NULL
1900 if (ar->ARType != AuthRecordLocalOnly && rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
1916 if ((rr->InterfaceID == mDNSInterface_LocalOnly) || (rr->InterfaceID == mDNSInterface_P2P))
1918 LogMsg("AnyTypeRecordAnswersQuestion: ERROR!! called with LocalOnly ResourceRecord %p, Question %p", rr->InterfaceID, q->InterfaceID);
1921 if (rr->InterfaceID &&
1922 q->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly &&
1923 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1926 // Note that Auth Records are normally setup with NULL InterfaceID and
1928 if (!rr->InterfaceID)
1936 if (rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
1959 if (rr->InterfaceID &&
1960 q->InterfaceID && rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
1963 if (rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
3438 const mDNSu8 *end, const mDNSInterfaceID InterfaceID, mDNSu8 RecordType, LargeCacheRecord *const largecr)
3470 rr->resrec.InterfaceID = InterfaceID;
3491 if (ptr[2] & (kDNSClass_UniqueRRSet >> 8) || (!InterfaceID && !(msg->h.flags.b[0] & kDNSFlag0_TC)))
3543 mDNSexport const mDNSu8 *getQuestion(const DNSMessage *msg, const mDNSu8 *ptr, const mDNSu8 *end, const mDNSInterfaceID InterfaceID,
3547 question->InterfaceID = InterfaceID;
3548 if (!InterfaceID) question->TargetQID = onesID; // In DNSQuestions we use TargetQID as the indicator of whether it's unicast or multicast
3737 mDNSInterfaceID InterfaceID, UDPSocket *src, const mDNSAddr *dst,
3774 status = mDNSPlatformSendUDP(m, msg, end, InterfaceID, src, dst, dstport, useBackgroundTrafficClass);