]>
git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSMacOSX/ApplePlatformFeatures.h
2 * Copyright (c) 2018-2019 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 * http://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 __ApplePlatformFeatures_h
18 #define __ApplePlatformFeatures_h
20 #include <TargetConditionals.h>
22 // Feature: Bonjour-On-Demand
23 // Radar: <rdar://problem/23523784>
26 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_BONJOUR_ON_DEMAND)
27 #define MDNSRESPONDER_SUPPORTS_APPLE_BONJOUR_ON_DEMAND 1
30 // Feature: Cache memory limit
31 // Radar: <rdar://problem/15629764>
32 // Enabled: Yes, but only for device OSes, such as iOS, tvOS, and watchOS, i.e., when TARGET_OS_IPHONE is 1.
34 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_CACHE_MEM_LIMIT)
35 #if !defined(TARGET_OS_IPHONE)
36 #error "Expected TARGET_OS_IPHONE to be defined."
39 #define MDNSRESPONDER_SUPPORTS_APPLE_CACHE_MEM_LIMIT 1
41 #define MDNSRESPONDER_SUPPORTS_APPLE_CACHE_MEM_LIMIT 0
46 // Radar: <rdar://problem/28062515>
49 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_D2D)
50 #define MDNSRESPONDER_SUPPORTS_APPLE_D2D 1
53 // Feature: DNS64 IPv6 synthesis.
54 // Radar: <rdar://problem/32297396>
55 // Enabled: Yes, but only for iOS and macOS, which support the DNS proxy network extension.
57 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_DNS64)
58 #if (!defined(TARGET_OS_IOS) || !defined(TARGET_OS_OSX))
59 #error "Expected TARGET_OS_IOS and TARGET_OS_OSX to be defined."
61 #if (TARGET_OS_IOS || TARGET_OS_OSX)
62 #define MDNSRESPONDER_SUPPORTS_APPLE_DNS64 1
64 #define MDNSRESPONDER_SUPPORTS_APPLE_DNS64 0
68 // Feature: DNS-SD XPC service
69 // Radar: <rdar://problem/43866363>
72 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_DNSSD_XPC_SERVICE)
73 #define MDNSRESPONDER_SUPPORTS_APPLE_DNSSD_XPC_SERVICE 1
76 // Feature: Ignore /etc/hosts file on customer builds.
77 // Radar: <rdar://problem/34745220>
78 // Enabled: Yes, except for macOS.
80 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_IGNORE_HOSTS_FILE)
81 #if !defined(TARGET_OS_OSX)
82 #error "Expected TARGET_OS_OSX to be defined."
85 #define MDNSRESPONDER_SUPPORTS_APPLE_IGNORE_HOSTS_FILE 1
87 #define MDNSRESPONDER_SUPPORTS_APPLE_IGNORE_HOSTS_FILE 0
91 // Feature: AWD metrics collection
92 // Radar: <rdar://problem/24146300>
93 // Enabled: Yes, but for iOS only.
95 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_METRICS)
96 #if !defined(TARGET_OS_IOS)
97 #error "Expected TARGET_OS_IOS to be defined."
100 #define MDNSRESPONDER_SUPPORTS_APPLE_METRICS 1
102 #define MDNSRESPONDER_SUPPORTS_APPLE_METRICS 0
106 // Feature: Support for having finer granularity of log redaction, by using os_log based-log routine.
107 // Radar: <rdar://problem/42814956>
110 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_OS_LOG)
111 #define MDNSRESPONDER_SUPPORTS_APPLE_OS_LOG 1
114 // Feature: Preallocate mDNSResponder's cache memory. For testing purposes only.
115 // Radar: <rdar://problem/29545890>
118 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_PREALLOCATED_CACHE)
119 #define MDNSRESPONDER_SUPPORTS_APPLE_PREALLOCATED_CACHE 0
122 // Feature: Randomized AWDL Hostname
123 // Radar: <rdar://problem/47525004>
126 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_RANDOM_AWDL_HOSTNAME)
127 #define MDNSRESPONDER_SUPPORTS_APPLE_RANDOM_AWDL_HOSTNAME 1
130 // Feature: Reachability trigger
131 // Radar: <rdar://problem/11374446>
134 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_REACHABILITY_TRIGGER)
135 #define MDNSRESPONDER_SUPPORTS_APPLE_REACHABILITY_TRIGGER 1
138 // Feature: "SlowActivation" processing for flapping interfaces.
139 // Disabled to address stale Bonjour record issues during flapping network interface transitions.
140 // Radar: <rdar://problem/44694746>
143 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_SLOW_ACTIVATION)
144 #define MDNSRESPONDER_SUPPORTS_APPLE_SLOW_ACTIVATION 0
147 // Feature: Suspicious Reply Defense
148 // Radar: <rdar://problem/50050767>
151 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_SUSPICIOUS_REPLY_DEFENSE)
152 #define MDNSRESPONDER_SUPPORTS_APPLE_SUSPICIOUS_REPLY_DEFENSE 1
155 // Feature: Symptoms Reporting
156 // Radar: <rdar://problem/20194922>
159 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_SYMPTOMS)
160 #define MDNSRESPONDER_SUPPORTS_APPLE_SYMPTOMS 1
163 // Feature: Support for performing dot-local queries via mDNS and DNS in parallel.
164 // Radar: <rdar://problem/4786302>
167 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_UNICAST_DOTLOCAL)
168 #define MDNSRESPONDER_SUPPORTS_APPLE_UNICAST_DOTLOCAL 1
171 // Feature: Allow browses and registrations over interfaces that aren't ready yet.
172 // Radar: <rdar://problem/20181903>
175 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_UNREADY_INTERFACES)
176 #define MDNSRESPONDER_SUPPORTS_APPLE_UNREADY_INTERFACES 1
179 // Feature: Support for Web Content Filter
180 // Radar: <rdar://problem/7409981>
181 // Enabled: Yes, if SDK has <WebFilterDNS/WebFilterDNS.h>.
183 #if !defined(MDNSRESPONDER_SUPPORTS_APPLE_WEB_CONTENT_FILTER)
184 #if __has_include(<WebFilterDNS/WebFilterDNS.h>)
185 #define MDNSRESPONDER_SUPPORTS_APPLE_WEB_CONTENT_FILTER 1
187 #define MDNSRESPONDER_SUPPORTS_APPLE_WEB_CONTENT_FILTER 0
191 #endif // __ApplePlatformFeatures_h