5 // Copyright (c) 2020 Apple Inc. All rights reserved.
8 #ifndef DNSSEC_V2_CLIENT_H
9 #define DNSSEC_V2_CLIENT_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"
18 //======================================================================================================================
19 // function prototypes
20 //======================================================================================================================
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
);
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
);
40 * Delivers RMV events to the callback function for all the returned answers.
43 * A pointer to the DNSSEC context of the current request.
45 * @param returned_answers
46 * A pointer to the structure that stores all the answers returned to the callback.
49 * A pointer to the mDNS structure.
51 * @param primary_question
52 * A pointer to the question created by the primary request, which is started by the client.
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.
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.
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
);
70 #endif // MDNSRESPONDER_SUPPORTS(APPLE, DNSSECv2)
71 #endif // DNSSEC_V2_CLIENT_H