1c65ebfc7SToomas Soome /* -*- Mode: C; tab-width: 4 -*-
2c65ebfc7SToomas Soome  *
3*472cd20dSToomas Soome  * Copyright (c) 2011-2020 Apple Inc. All rights reserved.
4c65ebfc7SToomas Soome  *
5c65ebfc7SToomas Soome  * Licensed under the Apache License, Version 2.0 (the "License");
6c65ebfc7SToomas Soome  * you may not use this file except in compliance with the License.
7c65ebfc7SToomas Soome  * You may obtain a copy of the License at
8c65ebfc7SToomas Soome  *
9c65ebfc7SToomas Soome  *     http://www.apache.org/licenses/LICENSE-2.0
10c65ebfc7SToomas Soome  *
11c65ebfc7SToomas Soome  * Unless required by applicable law or agreed to in writing, software
12c65ebfc7SToomas Soome  * distributed under the License is distributed on an "AS IS" BASIS,
13c65ebfc7SToomas Soome  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14c65ebfc7SToomas Soome  * See the License for the specific language governing permissions and
15c65ebfc7SToomas Soome  * limitations under the License.
16c65ebfc7SToomas Soome  */
17c65ebfc7SToomas Soome 
18c65ebfc7SToomas Soome #ifndef __DNS_PROXY_H
19c65ebfc7SToomas Soome #define __DNS_PROXY_H
20c65ebfc7SToomas Soome 
21c65ebfc7SToomas Soome #include "mDNSEmbeddedAPI.h"
22c65ebfc7SToomas Soome #include "DNSCommon.h"
23c65ebfc7SToomas Soome 
24c65ebfc7SToomas Soome extern void ProxyUDPCallback(void *socket, DNSMessage *const msg, const mDNSu8 *const end, const mDNSAddr *const srcaddr,
25c65ebfc7SToomas Soome                              const mDNSIPPort srcport, const mDNSAddr *dstaddr, const mDNSIPPort dstport, const mDNSInterfaceID InterfaceID, void *context);
26c65ebfc7SToomas Soome extern void ProxyTCPCallback(void *socket, DNSMessage *const msg, const mDNSu8 *const end, const mDNSAddr *const srcaddr,
27*472cd20dSToomas Soome                              const mDNSIPPort srcport, const mDNSAddr *dstaddr, const mDNSIPPort dstport, const mDNSInterfaceID InterfaceID, void *context);
28*472cd20dSToomas Soome #if MDNSRESPONDER_SUPPORTS(APPLE, DNS_PROXY_DNS64)
29*472cd20dSToomas Soome extern void DNSProxyInit(mDNSu32 IpIfArr[MaxIp], mDNSu32 OpIf, const mDNSu8 IPv6Prefix[16], int IPv6PrefixLen,
30*472cd20dSToomas Soome                          mDNSBool alwaysSynthesize);
31*472cd20dSToomas Soome #else
32c65ebfc7SToomas Soome extern void DNSProxyInit(mDNSu32 IpIfArr[MaxIp], mDNSu32 OpIf);
33*472cd20dSToomas Soome #endif
34c65ebfc7SToomas Soome extern void DNSProxyTerminate(void);
35c65ebfc7SToomas Soome 
36c65ebfc7SToomas Soome #endif // __DNS_PROXY_H
37