]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSMacOSX/dnssec_v2/dnssec_v2_client.h
mDNSResponder-1310.40.42.tar.gz
[apple/mdnsresponder.git] / mDNSMacOSX / dnssec_v2 / dnssec_v2_client.h
1 //
2 // dnssec_v2_client.h
3 // mDNSResponder
4 //
5 // Copyright (c) 2020 Apple Inc. All rights reserved.
6 //
7
8 #ifndef DNSSEC_V2_CLIENT_H
9 #define DNSSEC_V2_CLIENT_H
10
11 #include <stdio.h>
12 #include "mDNSEmbeddedAPI.h"
13 #if MDNSRESPONDER_SUPPORTS(APPLE, DNSSECv2)
14 #include "dnssec_v2_structs.h"
15 #include "dnssec_v2_retrieval.h"
16 #include "dnssec_v2_validation.h"
17
18 //======================================================================================================================
19 // function prototypes
20 //======================================================================================================================
21
22 mDNSexport mDNSBool
23 handle_retrieval_result(
24 DNSQuestion * const _Nonnull question,
25 dnssec_context_t * _Nonnull original_dnssec_context,
26 dnssec_retrieval_result_t retrieval_result,
27 const DNSServiceErrorType dnssec_error,
28 mDNS * const _Nonnull mdnsresponder_context);
29
30 mDNSexport mDNSBool
31 handle_validation_result(
32 DNSQuestion * const _Nonnull question,
33 dnssec_context_t * const _Nonnull dnssec_context,
34 dnssec_validation_result_t validation_result,
35 const DNSServiceErrorType dnssec_error,
36 mDNS * const _Nonnull mdnsresponder_context);
37
38 /*!
39 * @brief
40 * Delivers RMV events to the callback function for all the returned answers.
41 *
42 * @param context
43 * A pointer to the DNSSEC context of the current request.
44 *
45 * @param returned_answers
46 * A pointer to the structure that stores all the answers returned to the callback.
47 *
48 * @param m
49 * A pointer to the mDNS structure.
50 *
51 * @param primary_question
52 * A pointer to the question created by the primary request, which is started by the client.
53 *
54 * @param current_question
55 * A pointer to the question that we are currently working on, it is used to determine if the question has been deleted by the callback.
56 *
57 * @return
58 * A boolean value to indicate if the caller should stop all the work immediately. If it returns true, it means that the callback called by this function has canceled
59 * the current request and its corresponding question, and the caller should assume that all the allocated memory it owns has already been freed, and it
60 * should stop immediately to avoid invalid memory access.
61 */
62 mDNSexport mDNSBool
63 deliver_remove_to_callback_with_all_returned_answers(
64 const dnssec_context_t * const _Nonnull context,
65 const returned_answers_t * const _Nonnull returned_answers,
66 mDNS * const _Nonnull m,
67 DNSQuestion * const _Nonnull primary_question,
68 const DNSQuestion * const _Nonnull current_question);
69
70 #endif // MDNSRESPONDER_SUPPORTS(APPLE, DNSSECv2)
71 #endif // DNSSEC_V2_CLIENT_H