]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSMacOSX/DNS64.h
mDNSResponder-1096.0.2.tar.gz
[apple/mdnsresponder.git] / mDNSMacOSX / DNS64.h
1 /*
2 * Copyright (c) 2017-2019 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 * http://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 __DNS64_h
18 #define __DNS64_h
19
20 #include "mDNSEmbeddedAPI.h"
21
22 #define DNS64IsQueryingARecord(STATE) (((STATE) == kDNS64State_QueryA) || ((STATE) == kDNS64State_QueryA2))
23 #define DNS64ShouldAnswerQuestion(Q, RR) (DNS64IsQueryingARecord((Q)->dns64.state) && ((RR)->rrtype == kDNSType_A))
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 mDNSexport mDNSBool DNS64StateMachine(mDNS *m, DNSQuestion *inQ, const ResourceRecord *inRR, QC_result inResult);
30 mDNSexport mStatus DNS64AnswerCurrentQuestion(mDNS *m, const ResourceRecord *inRR, QC_result inResult);
31 mDNSexport void DNS64HandleNewQuestion(mDNS *m, DNSQuestion *inQ);
32 mDNSexport void DNS64ResetState(DNSQuestion *inQ);
33 mDNSexport void DNS64RestartQuestions(mDNS *m);
34
35 #ifdef __cplusplus
36 }
37 #endif
38
39 #endif // __DNS64_h