xref: /illumos-gate/usr/src/contrib/mDNSResponder/mDNSShared/PlatformCommon.h (revision 472cd20d26008f77084ade4c2048159b98c2b705)
1 /* -*- Mode: C; tab-width: 4; c-file-style: "bsd"; c-basic-offset: 4; fill-column: 108; indent-tabs-mode: nil; -*-
2  *
3  * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __PLATFORM_COMMON_H
19 #define __PLATFORM_COMMON_H
20 extern void ReadDDNSSettingsFromConfFile(mDNS *const m, const char *const filename,
21 										 domainname *const hostname, domainname *const domain,
22 										 mDNSBool *DomainDiscoveryDisabled);
23 extern mDNSBool mDNSPosixTCPSocketSetup(int *fd, mDNSAddr_Type addrType, mDNSIPPort *port, mDNSIPPort *outTcpPort);
24 extern TCPSocket *mDNSPosixDoTCPListenCallback(int fd, mDNSAddr_Type addressType, TCPSocketFlags socketFlags,
25                      TCPAcceptedCallback callback, void *context);
26 extern mDNSBool mDNSPosixTCPListen(int *fd, mDNSAddr_Type addrtype, mDNSIPPort *port, mDNSAddr *addr,
27                    mDNSBool reuseAddr, int queueLength);
28 extern long mDNSPosixReadTCP(int fd, void *buf, unsigned long buflen, mDNSBool *closed);
29 extern long mDNSPosixWriteTCP(int fd, const char *msg, unsigned long len);
30 #endif
31