2 * Copyright (c) 2019-2020 Apple Inc. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * https://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __QUERIER_SUPPORT_H__
18 #define __QUERIER_SUPPORT_H__
20 #include "mDNSEmbeddedAPI.h"
21 #include "mdns_private.h"
23 // Threshold value for problematic QTYPE workaround.
24 extern int PQWorkaroundThreshold
;
26 extern mdns_dns_service_manager_t
Querier_GetDNSServiceManager(void);
27 extern void Querier_SetDNSServiceForQuestion(DNSQuestion
*q
);
28 extern void Querier_ApplyDNSConfig(const dns_config_t
*config
);
29 extern void Querier_HandleUnicastQuestion(DNSQuestion
*q
);
30 extern void Querier_ProcessDNSServiceChanges(void);
31 extern void Querier_RegisterPathResolver(const uuid_t resolverUUID
);
32 extern mdns_dns_service_id_t
Querier_RegisterCustomDNSService(xpc_object_t resolverConfigDict
);
33 extern mdns_dns_service_id_t
Querier_RegisterCustomDNSServiceWithPListData(const uint8_t *dataPtr
, size_t dataLen
);
34 extern void Querier_DeregisterCustomDNSService(mdns_dns_service_id_t ident
);
35 extern DNSQuestion
*Querier_GetDNSQuestion(mdns_querier_t querier
);
36 extern mDNSBool
Querier_ResourceRecordIsAnswer(const ResourceRecord
*rr
, mdns_querier_t querier
);
37 extern mDNSBool
Querier_SameNameCacheRecordIsAnswer(const CacheRecord
*cr
, mdns_querier_t querier
);
38 extern void Querier_HandleStoppedDNSQuestion(DNSQuestion
*q
);
39 extern void Querier_RegisterDoHURI(const char *doh_uri
, const char *domain
);
40 extern void Querier_PrepareQuestionForCNAMERestart(DNSQuestion
*q
);
41 extern void Querier_PrepareQuestionForUnwindRestart(DNSQuestion
*q
);
42 extern void Querier_HandleSleep(void);
43 extern void Querier_HandleWake(void);
45 #endif // __QUERIER_SUPPORT_H__