]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSMacOSX/mdns_objects/mdns_dns_service.h
mDNSResponder-1310.40.42.tar.gz
[apple/mdnsresponder.git] / mDNSMacOSX / mdns_objects / mdns_dns_service.h
1 /*
2 * Copyright (c) 2019-2020 Apple Inc. All rights reserved.
3 *
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
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17 #ifndef __MDNS_DNS_SERVICE_H__
18 #define __MDNS_DNS_SERVICE_H__
19
20 #include "mdns_base.h"
21 #include "mdns_object.h"
22 #include "mdns_resolver.h"
23
24 #include <dnsinfo.h>
25 #include <MacTypes.h>
26 #include <stdint.h>
27 #include <uuid/uuid.h>
28 #include <xpc/xpc.h>
29
30 MDNS_DECL(dns_service);
31 MDNS_DECL(dns_service_manager);
32
33 MDNS_ASSUME_NONNULL_BEGIN
34
35 __BEGIN_DECLS
36
37 /*!
38 * @brief
39 * Creates a DNS service manager, which manages DNS services from a DNS configuration.
40 *
41 * @param queue
42 * Dispatch queue for event handler.
43 *
44 * @param out_error
45 * Pointer to an OSStatus variable, which will be set to the error that was encountered during creation.
46 *
47 * @result
48 * A new DNS service manager object or NULL if there was a lack of resources.
49 */
50 MDNS_RETURNS_RETAINED MDNS_WARN_RESULT
51 mdns_dns_service_manager_t _Nullable
52 mdns_dns_service_manager_create(dispatch_queue_t queue, OSStatus * _Nullable out_error);
53
54 /*!
55 * @brief
56 * Sets whether a DNS service manager is to report DNS server responsiveness symptoms.
57 *
58 * @param manager
59 * The DNS service manager.
60 *
61 * @param report_symptoms
62 * Whether or not a DNS service manager is to report DNS server responsiveness symptoms.
63 *
64 * @discussion
65 * This function has no effect on a manager after a call to
66 * <code>mdns_dns_service_manager_activate()</code>.
67 */
68 void
69 mdns_dns_service_manager_set_report_symptoms(mdns_dns_service_manager_t manager, bool report_symptoms);
70
71 #if MDNS_RESOLVER_PROBLEMATIC_QTYPE_WORKAROUND
72 /*!
73 * @brief
74 * For each Do53 DNS service managed by a DNS service manager, enables or disables a workaround where the
75 * DNS service's queriers will refrain from sending queries of type SVCB and HTTPS to a server if the
76 * server has been determined to not respond to queries of those types.
77 *
78 * @param manager
79 * The DNS service manager.
80 *
81 * @param threshold
82 * If greater than zero, the workaround is enabled. Otherwise, the workaround is disabled.
83 *
84 * @discussion
85 * This is a workaround for DNS servers that don't respond to SVCB and HTTPS queries and then become less
86 * responsive to queries of other types as more SVCB and HTTPS retry queries are sent.
87 *
88 * The workaround is disabled by default.
89 *
90 * This function has no effect on a DNS service manager afer a call to mdns_dns_service_manager_activate().
91 */
92 void
93 mdns_dns_service_manager_enable_problematic_qtype_workaround(mdns_dns_service_manager_t manager, int threshold);
94 #endif
95
96 /*!
97 * @brief
98 * Sets a DNS service manager's event handler.
99 *
100 * @param manager
101 * The DNS service manager.
102 *
103 * @param handler
104 * The event handler.
105 *
106 * @discussion
107 * The event handler will never be invoked prior to a call to either
108 * <code>mdns_dns_service_manager_activate()()</code> or
109 * <code>mdns_dns_service_manager_invalidate()</code>.
110 *
111 * The event handler will be invoked on the dispatch queue specified by
112 * <code>mdns_dns_service_manager_create()</code> with event <code>mdns_event_error</code> when a fatal error
113 * occurs, with event <code>mdns_event_invalidated</code> when the interface monitor has been invalidated, and
114 * with <code>mdns_event_update</code> when there are pending DNS service updates.
115 *
116 * After an <code>mdns_event_invalidated</code> event, the event handler will never be invoked again.
117 */
118 void
119 mdns_dns_service_manager_set_event_handler(mdns_dns_service_manager_t manager, mdns_event_handler_t handler);
120
121 /*!
122 * @brief
123 * Activates a DNS service manager.
124 *
125 * @param manager
126 * The DNS service manager.
127 *
128 * @discussion
129 * This function should be called on a new DNS service manager after after setting its properties and event
130 * handler.
131 */
132 void
133 mdns_dns_service_manager_activate(mdns_dns_service_manager_t manager);
134
135 /*!
136 * @brief
137 * Synchronously processes a DNS configuration.
138 *
139 * @param manager
140 * The DNS service manager.
141 *
142 * @param config
143 * A dnsinfo DNS configuration. See <dnsinfo.h>.
144 *
145 * @discussion
146 * This function ensures that a DNS service object is instantiated for each DNS service contained in this DNS
147 * configuration. DNS service objects that were created for previous DNS configurations, but that are not
148 * present in this configuration, are marked as defunct.
149 */
150 void
151 mdns_dns_service_manager_apply_dns_config(mdns_dns_service_manager_t manager, const dns_config_t *config);
152
153 /*!
154 * @brief
155 * Add a dynamic resolver configuration to the service manager based on a resolver UUID.
156 *
157 * @param manager
158 * The DNS service manager.
159 *
160 * @param resolver_config_uuid
161 * A UUID of a resolver configuration registered with the system.
162 *
163 * @discussion
164 * This function registers a UUID with the service manager if it does not exist already. The UUID will be used
165 * to look up the details of the resolver configuration.
166 */
167 void
168 mdns_dns_service_manager_register_path_resolver(mdns_dns_service_manager_t manager,
169 const uuid_t _Nonnull resolver_config_uuid);
170
171 /*!
172 * @typedef mdns_dns_service_id_t
173 *
174 * @abstract
175 * A unique per-process identifier for DNS service objects.
176 *
177 * @discussion
178 * Useful as an alternative to a pointer to a DNS service when the DNS service itself isn't actually
179 * needed. This identifier can be used to safely distinguish one DNS service object from another even after
180 * one or both have been released.
181 *
182 * The zero value is reserved as an invalid ID.
183 */
184 typedef uint64_t mdns_dns_service_id_t;
185
186 #define MDNS_DNS_SERVICE_MAX_ID ((mdns_dns_service_id_t)-1)
187
188 /*!
189 * @brief
190 * Registers a custom DNS service based on an nw_resolver_config dictionary with a DNS service manager.
191 *
192 * @param manager
193 * The DNS service manager.
194 *
195 * @param resolver_config_dict
196 * The nw_resolver_config dictionary.
197 *
198 * @result
199 * If the registration is successful, this function returns a non-zero identifier for the custom DNS
200 * service.
201 *
202 * @discussion
203 * When the custom DNS service is no longer needed by the entity that registered it, it should be
204 * deregistered with <code>mdns_dns_service_manager_deregister_custom_service()</code>.
205 */
206 MDNS_WARN_RESULT
207 mdns_dns_service_id_t
208 mdns_dns_service_manager_register_custom_service(mdns_dns_service_manager_t manager, xpc_object_t resolver_config_dict);
209
210 /*!
211 * @brief
212 * Deregisters a custom DNS service from a DNS service manager.
213 *
214 * @param manager
215 * The DNS service manager.
216 *
217 * @param ident
218 * The identifier returned by <code>mdns_dns_service_manager_register_custom_service()</code> when the
219 * custom DNS service was registered.
220 */
221 void
222 mdns_dns_service_manager_deregister_custom_service(mdns_dns_service_manager_t manager, mdns_dns_service_id_t ident);
223
224 /*!
225 * @brief
226 * Add a custom resolver configuration to the service manager associated with a particular handle.
227 *
228 * @param manager
229 * The DNS service manager.
230 *
231 * @param doh_uri
232 * A URI of a DoH server, as a string.
233 *
234 * @param domain
235 * A domain to link to a DoH server.
236 *
237 * @discussion
238 * This function registers a DoH URI with the service manager if it does not exist already.
239 */
240 void
241 mdns_dns_service_manager_register_doh_uri(const mdns_dns_service_manager_t manager,
242 const char *doh_uri, const char * _Nullable domain);
243
244 /*!
245 * @brief
246 * Asynchronously invalidates a DNS service manager.
247 *
248 * @param manager
249 * The DNS service manager.
250 *
251 * @discussion
252 * This function should be called when a DNS service manager is no longer needed.
253 *
254 * As a result of calling this function, the DNS service manager's event handler will be invoked with a
255 * <code>mdns_event_invalidated</code> event, after which the DNS service manager's event handler will never
256 * be invoked again.
257 *
258 * This function has no effect on a DNS service manager that has already been invalidated.
259 */
260 void
261 mdns_dns_service_manager_invalidate(mdns_dns_service_manager_t manager);
262
263 /*!
264 * @brief
265 * Gets the most suitable unscoped DNS service that can be used to query for a record with the given domain
266 * name.
267 *
268 * @param manager
269 * The DNS service manager.
270 *
271 * @param name
272 * The domain name in label format.
273 *
274 * @discussion
275 * This function returns the most suitable unscoped DNS service from the latest DNS configuration that can be
276 * used to query for a record with the given domain name if such a service even exists.
277 *
278 * If a service is returned, there's no guarantee that the reference will be valid after the next call to
279 * either <code>mdns_dns_service_manager_apply_dns_config()</code> or
280 * <code>mdns_dns_service_manager_apply_pending_updates()</code> unless the service is retained by the caller.
281 *
282 * @result
283 * A non-retained service if a suitable service exists. Otherwise, NULL.
284 */
285 mdns_dns_service_t _Nullable
286 mdns_dns_service_manager_get_unscoped_service(mdns_dns_service_manager_t manager, const uint8_t *name);
287
288 /*!
289 * @brief
290 * Gets the most suitable interface-scoped DNS service that can be used to query for a record with the given
291 * domain name.
292 *
293 * @param manager
294 * The DNS service manager.
295 *
296 * @param name
297 * The domain name in label format.
298 *
299 * @param if_index
300 * The index of the interface to which the interface-scoped service must be scoped.
301 *
302 * @discussion
303 * This function returns the most suitable interface-scoped DNS service from the latest DNS configuration that
304 * can be used to query for a record with the given domain name if such a service even exists.
305 *
306 * If a service is returned, there's no guarantee that the reference will be valid after the next call to
307 * either <code>mdns_dns_service_manager_apply_dns_config()</code> or
308 * <code>mdns_dns_service_manager_apply_pending_updates()</code> unless the service is retained by the caller.
309 *
310 * @result
311 * A non-retained service if a suitable service exists. Otherwise, NULL.
312 */
313 mdns_dns_service_t _Nullable
314 mdns_dns_service_manager_get_interface_scoped_service(mdns_dns_service_manager_t manager, const uint8_t *name,
315 uint32_t if_index);
316
317 /*!
318 * @brief
319 * Gets the most suitable service-scoped DNS service that can be used to query for a record with the given
320 * domain name.
321 *
322 * @param manager
323 * The DNS service manager.
324 *
325 * @param name
326 * The domain name in label format.
327 *
328 * @param service_id
329 * The ID of the service for which the service-scoped service must be scoped.
330 *
331 * @discussion
332 * This function returns the most suitable service-scoped DNS service from the latest DNS configuration that
333 * can be used to query for a record with the given domain name if such a service even exists.
334 *
335 * Note: service-scoped DNS services are for specialized VPN applications, such as Per-App VPN.
336 *
337 * If a service is returned, there's no guarantee that the reference will be valid after the next call to
338 * either <code>mdns_dns_service_manager_apply_dns_config()</code> or
339 * <code>mdns_dns_service_manager_apply_pending_updates()</code> unless the service is retained by the caller.
340 *
341 * @result
342 * A non-retained service if a suitable service exists. Otherwise, NULL.
343 */
344 mdns_dns_service_t _Nullable
345 mdns_dns_service_manager_get_service_scoped_service(mdns_dns_service_manager_t manager, const uint8_t *name,
346 uint32_t service_id);
347
348 /*!
349 * @brief
350 * Gets a custom DNS service with a given identifier from a DNS service manager.
351 *
352 * @param manager
353 * The DNS service manager.
354 *
355 * @param ident
356 * The custom DNS service's identifier, i.e., the identifier returned by
357 * <code>mdns_dns_service_manager_register_custom_service()</code> when the custom DNS service was
358 * registered.
359 *
360 * @result
361 * A non-retained reference to the custom DNS service if the custom DNS service is still registered.
362 * Otherwise, NULL.
363 */
364 mdns_dns_service_t _Nullable
365 mdns_dns_service_manager_get_custom_service(mdns_dns_service_manager_t manager, mdns_dns_service_id_t ident);
366
367 /*!
368 * @brief
369 * Gets the config-specified DNS service that can be used to query for a record with the given
370 * domain name.
371 *
372 * @param manager
373 * The DNS service manager.
374 *
375 * @param uuid
376 * The UUID of the resolver config to select.
377 *
378 * @discussion
379 * If a service is returned, there's no guarantee that the reference will be valid after the next call to
380 * either <code>mdns_dns_service_manager_apply_dns_config()</code> or
381 * <code>mdns_dns_service_manager_apply_pending_updates()</code> unless the service is retained by the caller.
382 *
383 * @result
384 * A non-retained service if a suitable service exists. Otherwise, NULL.
385 */
386 mdns_dns_service_t _Nullable
387 mdns_dns_service_manager_get_uuid_scoped_service(mdns_dns_service_manager_t manager, const uuid_t _Nonnull uuid);
388
389 /*!
390 * @brief
391 * Fills out the UUID of a DNS service that should be used to query for a record with the given
392 * domain name.
393 *
394 * @param manager
395 * The DNS service manager.
396 *
397 * @param name
398 * The domain name in label format.
399 *
400 * @param out_uuid
401 * The UUID of the resolver config to select.
402 *
403 * @result
404 * Returns true if the UUID was filled out.
405 */
406 bool
407 mdns_dns_service_manager_fillout_discovered_service_for_name(mdns_dns_service_manager_t manager, const uint8_t * const name,
408 uuid_t _Nonnull out_uuid);
409
410 /*!
411 * @brief
412 * Applies pending updates to the DNS service manager's DNS services.
413 *
414 * @param manager
415 * The DNS service manager.
416 *
417 * @discussion
418 * This function applies pending updates having to do with each managed DNS service's interface properties,
419 * e.g., expensive, constrained, and clat46.
420 *
421 * This function should be called when handling an <code>mdns_event_update</code> event.
422 */
423 void
424 mdns_dns_service_manager_apply_pending_updates(mdns_dns_service_manager_t manager);
425
426 /*!
427 * @brief
428 * The type for a block that handles a DNS service when iterating over a DNS service manager's services.
429 *
430 * @param service
431 * The DNS service.
432 *
433 * @result
434 * If true, then iteration will stop prematurely. If false, then iteration will continue.
435 */
436 typedef bool
437 (^mdns_dns_service_applier_t)(mdns_dns_service_t service);
438
439 /*!
440 * @brief
441 * Iterates over each DNS service managed by a DNS service manager.
442 *
443 * @param manager
444 * The DNS service manager.
445 *
446 * @param applier
447 * Block to invoke for each DNS service.
448 */
449 void
450 mdns_dns_service_manager_iterate(mdns_dns_service_manager_t manager, mdns_dns_service_applier_t applier);
451
452 /*!
453 * @brief
454 * Returns the number of DNS services being managed by a DNS service manager.
455 *
456 * @param manager
457 * The DNS service manager.
458 */
459 size_t
460 mdns_dns_service_manager_get_count(mdns_dns_service_manager_t manager);
461
462 /*!
463 * @brief
464 * Performs tasks necessary for a DNS service manager to prepare for system sleep.
465 *
466 * @param manager
467 * The DNS service manager.
468 */
469 void
470 mdns_dns_service_manager_handle_sleep(mdns_dns_service_manager_t manager);
471
472 /*!
473 * @brief
474 * Performs tasks necessary for a DNS service manager to prepare for system wake.
475 *
476 * @param manager
477 * The DNS service manager.
478 */
479 void
480 mdns_dns_service_manager_handle_wake(mdns_dns_service_manager_t manager);
481
482 /*!
483 * @brief
484 * Sets a DNS service's user-defined context.
485 *
486 * @param service
487 * The DNS service.
488 *
489 * @param context
490 * The user-defined context.
491 *
492 * @discussion
493 * The last context set with this function can be retrieved with mdns_dns_service_get_context().
494 *
495 * A DNS service's context is NULL by default.
496 */
497 void
498 mdns_dns_service_set_context(mdns_dns_service_t service, void *context);
499
500 /*!
501 * @brief
502 * Gets a DNS service's user-defined context.
503 *
504 * @param service
505 * The DNS service.
506 *
507 * @result
508 * Returns the last context set with mdns_dns_service_set_context().
509 */
510 void * _Nonnull
511 mdns_dns_service_get_context(mdns_dns_service_t service);
512
513 /*!
514 * @brief
515 * The type for a function that finalizes a user-defined context.
516 *
517 * @param context
518 * The user-defined context.
519 */
520 typedef void
521 (*mdns_context_finalizer_t)(void *context);
522
523 /*!
524 * @brief
525 * Sets a DNS service's context finalizer function.
526 *
527 * @param service
528 * The DNS service.
529 *
530 * @param finalizer
531 * The finalizer.
532 *
533 * @discussion
534 * If a DNS service's context finalizer is not NULL and the service's context, which can be set with
535 * mdns_dns_service_set_context(), is not NULL when the service's last reference is released, then the
536 * finalizer will be invoked exactly once using the DNS service's context as an argument. The finalizer
537 * will be invoked under no other conditions.
538 */
539 void
540 mdns_dns_service_set_context_finalizer(mdns_dns_service_t service, mdns_context_finalizer_t _Nullable finalizer);
541
542 /*!
543 * @brief
544 * Creates a querier to query a DNS service represented by a DNS service object.
545 *
546 * @param service
547 * The DNS service.
548 *
549 * @param out_error
550 * Pointer to an OSStatus variable, which will be set to the error that was encountered during creation.
551 *
552 * @discussion
553 * If the DNS service is defunct, then no querier will be created.
554 *
555 * @result
556 * A new querier object if the DNS service is not defunct and resources are available. Otherwise, NULL.
557 */
558 MDNS_RETURNS_RETAINED MDNS_WARN_RESULT
559 mdns_querier_t _Nullable
560 mdns_dns_service_create_querier(mdns_dns_service_t service, OSStatus * _Nullable out_error);
561
562 /*!
563 * @brief
564 * Indicates a DNS service's scoping.
565 *
566 * @const mdns_dns_service_scope_null
567 * An invalid scope to be used only as a placeholder.
568 *
569 * @const mdns_dns_service_scope_none
570 * For unscoped DNS services.
571 *
572 * @const mdns_dns_service_scope_interface
573 * For interface-scoped DNS services.
574 *
575 * @const mdns_dns_service_scope_service
576 * For services-scoped DNS services.
577 *
578 * @const mdns_dns_service_scope_uuid
579 * For UUID-scoped DNS services.
580 *
581 * @const mdns_dns_service_scope_custom
582 * For custom DNS services.
583 */
584 OS_CLOSED_ENUM(mdns_dns_service_scope, int,
585 mdns_dns_service_scope_null = 0,
586 mdns_dns_service_scope_none = 1,
587 mdns_dns_service_scope_interface = 2,
588 mdns_dns_service_scope_service = 3,
589 mdns_dns_service_scope_uuid = 4,
590 mdns_dns_service_scope_custom = 5
591 );
592
593 /*!
594 * @brief
595 * Gets a DNS service's scope.
596 *
597 * @param service
598 * The DNS service.
599 */
600 mdns_dns_service_scope_t
601 mdns_dns_service_get_scope(mdns_dns_service_t service);
602
603 /*!
604 * @brief
605 * Gets the index of the network interface used to access a DNS service.
606 *
607 * @param service
608 * The DNS service.
609 */
610 uint32_t
611 mdns_dns_service_get_interface_index(mdns_dns_service_t service);
612
613 /*!
614 * @brief
615 * Gets a DNS service's unique per-process ID.
616 *
617 * @param service
618 * The DNS service.
619 *
620 * @result
621 * If service is non-NULL, then the service's ID is returned. Otherwise, 0, which is an invalid ID, is
622 * returned.
623 */
624 mdns_dns_service_id_t
625 mdns_dns_service_get_id(mdns_dns_service_t _Nullable service);
626
627 /*!
628 * @brief
629 * Determines whether or not a DNS service is defunct.
630 *
631 * @param service
632 * The DNS service.
633 *
634 * @discussion
635 * A DNS service becomes defunct when the DNS service manager that created it later applies a DNS
636 * configuration (with <code>mdns_dns_service_manager_apply_dns_config()</code>) that doesn't contain the DNS
637 * service.
638 *
639 * When a DNS service is defunct, it is no longer usable, i.e., it is no longer capable of creating queriers.
640 */
641 bool
642 mdns_dns_service_is_defunct(mdns_dns_service_t service);
643
644 /*!
645 * @brief
646 * Check if a DNS service uses an encrypted protocol.
647 *
648 * @param service
649 * The DNS service.
650 */
651 bool
652 mdns_dns_service_is_encrypted(mdns_dns_service_t service);
653
654 /*!
655 * @brief
656 * Determines whether or not A record queries are advised for a DNS service.
657 *
658 * @param service
659 * The DNS service.
660 *
661 * @discussion
662 * Mirrors the meaning of the DNS_RESOLVER_FLAGS_REQUEST_A_RECORDS flag in a DNS configuration.
663 */
664 bool
665 mdns_dns_service_a_queries_advised(mdns_dns_service_t service);
666
667 /*!
668 * @brief
669 * Determines whether or not AAAA record queries are advised for a DNS service.
670 *
671 * @param service
672 * The DNS service.
673 *
674 * @discussion
675 * Mirrors the meaning of the DNS_RESOLVER_FLAGS_REQUEST_AAAA_RECORDS flag in a DNS configuration.
676 */
677 bool
678 mdns_dns_service_aaaa_queries_advised(mdns_dns_service_t service);
679
680 /*!
681 * @brief
682 * Determines whether or not a DNS service is currently experiencing connection problems.
683 *
684 * @param service
685 * The DNS service.
686 *
687 * @discussion
688 * This function currently only applies to DNS services that use DNS over HTTPS.
689 *
690 * Since connection problems may be transient, a service with connection problems may still be used to
691 * create queriers.
692 */
693 bool
694 mdns_dns_service_has_connection_problems(mdns_dns_service_t service);
695
696 /*!
697 * @brief
698 * Determines whether or not a DNS service's interface has IPv4 connectivity.
699 *
700 * @param service
701 * The DNS service.
702 */
703 bool
704 mdns_dns_service_interface_has_ipv4_connectivity(mdns_dns_service_t service);
705
706 /*!
707 * @brief
708 * Determines whether or not a DNS service's interface has IPv6 connectivity.
709 *
710 * @param service
711 * The DNS service.
712 */
713 bool
714 mdns_dns_service_interface_has_ipv6_connectivity(mdns_dns_service_t service);
715
716 /*!
717 * @brief
718 * Determines whether or not a DNS service's interface is a cellular interface.
719 *
720 * @param service
721 * The DNS service.
722 */
723 bool
724 mdns_dns_service_interface_is_cellular(mdns_dns_service_t service);
725
726 /*!
727 * @brief
728 * Determines whether or not a DNS service's interface is expensive.
729 *
730 * @param service
731 * The DNS service.
732 */
733 bool
734 mdns_dns_service_interface_is_expensive(mdns_dns_service_t service);
735
736 /*!
737 * @brief
738 * Determines whether or not a DNS service's interface is constrained.
739 *
740 * @param service
741 * The DNS service.
742 */
743 bool
744 mdns_dns_service_interface_is_constrained(mdns_dns_service_t service);
745
746 /*!
747 * @brief
748 * Determines whether or not a DNS service's interface is clat46.
749 *
750 * @param service
751 * The DNS service.
752 */
753 bool
754 mdns_dns_service_interface_is_clat46(mdns_dns_service_t service);
755
756 /*!
757 * @brief
758 * Determines whether or not a DNS service's interface is a VPN interface.
759 *
760 * @param service
761 * The DNS service.
762 */
763 bool
764 mdns_dns_service_interface_is_vpn(mdns_dns_service_t service);
765
766 /*!
767 * @brief
768 * Access the provider name, if applicable, used by this service.
769 *
770 * @param service
771 * The DNS service.
772 */
773 const char * _Nullable
774 mdns_dns_service_get_provider_name(mdns_dns_service_t service);
775
776 /*!
777 * @brief
778 * Gets the resolver type used by a DNS service.
779 *
780 * @param service
781 * The DNS service.
782 */
783 mdns_resolver_type_t
784 mdns_dns_service_get_resolver_type(mdns_dns_service_t service);
785
786 __END_DECLS
787
788 MDNS_ASSUME_NONNULL_END
789
790 #endif // __MDNS_DNS_SERVICE_H__