]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSPosix/mDNSPosix.h
mDNSResponder-58.1.tar.gz
[apple/mdnsresponder.git] / mDNSPosix / mDNSPosix.h
1 /*
2 * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24
25 Change History (most recent first):
26
27 $Log: mDNSPosix.h,v $
28 Revision 1.9 2003/10/30 19:25:19 cheshire
29 Fix warning on certain compilers
30
31 Revision 1.8 2003/08/12 19:56:26 cheshire
32 Update to APSL 2.0
33
34 Revision 1.7 2003/07/02 21:19:59 cheshire
35 <rdar://problem/3313413> Update copyright notices, etc., in source code comments
36
37 Revision 1.6 2003/03/13 03:46:21 cheshire
38 Fixes to make the code build on Linux
39
40 Revision 1.5 2003/03/08 00:35:56 cheshire
41 Switched to using new "mDNS_Execute" model (see "mDNSCore/Implementer Notes.txt")
42
43 Revision 1.4 2002/12/23 22:13:31 jgraessl
44
45 Reviewed by: Stuart Cheshire
46 Initial IPv6 support for mDNSResponder.
47
48 Revision 1.3 2002/09/21 20:44:53 zarzycki
49 Added APSL info
50
51 Revision 1.2 2002/09/19 04:20:44 cheshire
52 Remove high-ascii characters that confuse some systems
53
54 Revision 1.1 2002/09/17 06:24:34 cheshire
55 First checkin
56
57 */
58
59 #ifndef __mDNSPlatformPosix_h
60 #define __mDNSPlatformPosix_h
61
62 #include <sys/time.h>
63
64 #if HAVE_IPV6
65 #define mDNSIPv6Support 1
66 #endif
67
68 #ifdef __cplusplus
69 extern "C" {
70 #endif
71
72 // This is a global because debugf_() needs to be able to check its value
73 extern int gMDNSPlatformPosixVerboseLevel;
74
75 struct mDNS_PlatformSupport_struct
76 {
77 // No additional data required for Posix at this time
78 long dummy[1]; // Some compilers don't like empty structures
79 };
80
81 extern mStatus mDNSPlatformPosixRefreshInterfaceList(mDNS *const m);
82 // See comment in implementation.
83
84 // Call mDNSPosixGetFDSet before calling select(), to update the parameters
85 // as may be necessary to meet the needs of the mDNSCore code.
86 // The timeout pointer MUST NOT be NULL.
87 // Set timeout->tv_sec to 0x3FFFFFFF if you want to have effectively no timeout
88 // After calling mDNSPosixGetFDSet(), call select(nfds, &readfds, NULL, NULL, &timeout); as usual
89 // After select() returns, call mDNSPosixProcessFDSet() to let mDNSCore do its work
90 extern void mDNSPosixGetFDSet(mDNS *const m, int *nfds, fd_set *readfds, struct timeval *timeout);
91 extern void mDNSPosixProcessFDSet(mDNS *const m, fd_set *readfds);
92
93 #ifdef __cplusplus
94 }
95 #endif
96
97 #endif