Home | History | Annotate | Download | only in mDNSCore

Lines Matching refs:interfaceID

200 NetworkInterfaceInfo *FirstInterfaceForID(mDNS *const m, const mDNSInterfaceID InterfaceID)
203 while (intf && intf->InterfaceID != InterfaceID) intf = intf->next;
207 NetworkInterfaceInfo *FirstIPv4LLInterfaceForID(mDNS *const m, const mDNSInterfaceID InterfaceID)
211 if (!InterfaceID)
218 if (intf->InterfaceID == InterfaceID &&
228 mDNSexport char *InterfaceNameForID(mDNS *const m, const mDNSInterfaceID InterfaceID)
230 NetworkInterfaceInfo *intf = FirstInterfaceForID(m, InterfaceID);
234 mDNSexport const char *InterfaceNameForIDOrEmptyString(const mDNSInterfaceID InterfaceID)
236 const char *const ifName = InterfaceNameForID(&mDNSStorage, InterfaceID);
249 if (next) return(next->InterfaceID);else return(mDNSNULL);
259 if (rr->resrec.InterfaceID == id)
1724 mDNSexport void mDNS_SetupResourceRecord(AuthRecord *rr, RData *RDataStorage, mDNSInterfaceID InterfaceID,
1728 // LocalOnly auth record can be created with LocalOnly InterfaceID or a valid InterfaceID.
1729 // Most of the applications normally create with LocalOnly InterfaceID and we store them as
1730 // such, so that we can deliver the response to questions that specify LocalOnly InterfaceID.
1731 // LocalOnly resource records can also be created with valid InterfaceID which happens today
1734 if (InterfaceID == mDNSInterface_LocalOnly && artype != AuthRecordLocalOnly)
1736 LogRedact(MDNS_LOG_CATEGORY_DEFAULT, MDNS_LOG_DEFAULT, "mDNS_SetupResourceRecord: ERROR!! Mismatch LocalOnly record InterfaceID %p called with artype %d",
1737 InterfaceID, artype);
1739 else if (InterfaceID == mDNSInterface_P2P && artype != AuthRecordP2P)
1741 LogRedact(MDNS_LOG_CATEGORY_DEFAULT, MDNS_LOG_DEFAULT, "mDNS_SetupResourceRecord: ERROR!! Mismatch P2P record InterfaceID %p called with artype %d",
1742 InterfaceID, artype);
1744 else if (!InterfaceID && (artype == AuthRecordP2P || artype == AuthRecordLocalOnly))
1746 LogRedact(MDNS_LOG_CATEGORY_DEFAULT, MDNS_LOG_DEFAULT, "mDNS_SetupResourceRecord: ERROR!! Mismatch InterfaceAny record InterfaceID %p called with artype %d",
1747 InterfaceID, artype);
1758 rr->resrec.InterfaceID = InterfaceID;
1826 mDNSexport void mDNS_SetupQuestion(DNSQuestion *const q, const mDNSInterfaceID InterfaceID, const domainname *const name,
1829 q->InterfaceID = InterfaceID;
2147 return (rr->InterfaceID != 0);
2161 if (LocalOnlyOrP2PInterface(rr->InterfaceID))
2163 LogMsg("SameNameRecordAnswersQuestion: ERROR!! called with LocalOnly ResourceRecord %p, Question %p", rr->InterfaceID, q->InterfaceID);
2169 if (rr->InterfaceID &&
2170 q->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly &&
2171 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
2272 // a valid InterfaceID (e.g., scoped /etc/hosts) and can be used to answer unicast questions unlike
2273 // multicast resource records (which has a valid InterfaceID) which can't be used to answer
2292 // Questions with mDNSInterface_LocalOnly InterfaceID should be answered with all resource records that are
2293 // *local* to the machine. These include resource records that have InterfaceID set to mDNSInterface_LocalOnly,
2294 // mDNSInterface_Any and any other real InterfaceID. Hence, LocalOnly questions should not be checked against
2295 // the InterfaceID in the resource record.
2297 if (rr->InterfaceID &&
2298 q->InterfaceID != mDNSInterface_LocalOnly &&
2299 ((q->InterfaceID && rr->InterfaceID != q->InterfaceID) ||
2300 (!q->InterfaceID && !LocalOnlyOrP2PInterface(rr->InterfaceID)))) return(mDNSfalse);
2303 // may have a scope e.g., fe80::1%en0. The question may be scoped or not: the InterfaceID may be set
2304 // to mDNSInterface_Any, mDNSInterface_LocalOnly or a real InterfaceID (scoped).
2312 // 3) Question: Scoped (LocalOnly or InterfaceID), LocalOnly Record: no scope. This is the inverse of (2).
2317 // 4) Question: Scoped (LocalOnly or InterfaceID), LocalOnly Record: scoped. LocalOnly questions should be
2318 // answered with any resource record where as if it has a valid InterfaceID, the scope should match.
2320 // (1) and (2) is bypassed because we check for a non-NULL InterfaceID above. For (3), the InterfaceID is NULL
2337 if (ar->ARType != AuthRecordLocalOnly && rr->InterfaceID && !mDNSOpaque16IsZero(q->TargetQID)) return(mDNSfalse);
2365 if (LocalOnlyOrP2PInterface(rr->InterfaceID))
2367 LogMsg("AnyTypeRecordAnswersQuestion: ERROR!! called with LocalOnly ResourceRecord %p, Question %p", rr->InterfaceID, q->InterfaceID);
2370 if (rr->InterfaceID &&
2371 q->InterfaceID && q->InterfaceID != mDNSInterface_LocalOnly &&
2372 rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
2387 // Note that Auth Records are normally setup with NULL InterfaceID and
2399 if (!mDNSPlatformValidRecordForInterface(ar, q->InterfaceID)) return(mDNSfalse);
2427 if (rr->InterfaceID &&
2428 q->InterfaceID && rr->InterfaceID != q->InterfaceID) return(mDNSfalse);
3977 const mDNSu8 *end, const mDNSInterfaceID InterfaceID, mDNSu8 RecordType, LargeCacheRecord *const largecr)
3981 mDNSu32 maxttl = (!InterfaceID) ? mDNSMaximumUnicastTTLSeconds : mDNSMaximumMulticastTTLSeconds;
4001 rr->resrec.InterfaceID = InterfaceID;
4025 if (ptr[2] & (kDNSClass_UniqueRRSet >> 8) || !InterfaceID)
4082 mDNSexport const mDNSu8 *getQuestion(const DNSMessage *msg, const mDNSu8 *ptr, const mDNSu8 *end, const mDNSInterfaceID InterfaceID,
4086 question->InterfaceID = InterfaceID;
4087 if (!InterfaceID) question->TargetQID = onesID; // In DNSQuestions we use TargetQID as the indicator of whether it's unicast or multicast
5105 const mDNSu8 *const end, mDNSInterfaceID interfaceID)
5114 const mDNSu32 interfaceIndex = IIDPrintable(interfaceID);
5115 const char *const interfaceName = InterfaceNameForID(&mDNSStorage, interfaceID);
5117 const mDNSu32 interfaceIndex = mDNSPlatformInterfaceIndexfromInterfaceID(&mDNSStorage, interfaceID, mDNStrue);
5126 dstaddr ? dstaddr : &zeroIPv4Addr, mDNSVal16(dstport), interfaceName, interfaceID);
5159 mDNSInterfaceID InterfaceID, TCPSocket *tcpSrc, UDPSocket *udpSrc, const mDNSAddr *dst,
5196 status = mDNSPlatformSendUDP(m, msg, end, InterfaceID, udpSrc, dst, dstport, useBackgroundTrafficClass);
5253 DumpPacket(status, mDNStrue, transport, mDNSNULL, portNumber, dst, dstport, msg, end, InterfaceID);
5282 if (q->InterfaceID == mDNSInterface_Any)
5288 return mDNSPlatformInterfaceIsAWDL(q->InterfaceID);