]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSShared/uds_daemon.h
mDNSResponder-66.3.tar.gz
[apple/mdnsresponder.git] / mDNSShared / uds_daemon.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 File: uds_daemon.h
26
27 Contains: Interfaces necessary to talk to uds_daemon.c.
28
29 Version: 1.0
30
31 Change History (most recent first):
32
33 $Log: uds_daemon.h,v $
34 Revision 1.3 2004/01/25 00:03:21 cheshire
35 Change to use mDNSVal16() instead of private PORT_AS_NUM() macro
36
37 Revision 1.2 2004/01/24 08:46:26 bradley
38 Added InterfaceID<->Index platform interfaces since they are now used by all platforms for the DNS-SD APIs.
39
40 Revision 1.1 2003/12/08 21:11:42 rpantos;
41 Changes necessary to support mDNSResponder on Linux.
42
43 */
44
45 #include "mDNSClientAPI.h"
46
47
48 /* Client interface: */
49
50 #define SRS_PORT(S) mDNSVal16((S)->RR_SRV.resrec.rdata->u.srv.port)
51
52 extern int udsserver_init( mDNS *globalInstance);
53
54 // takes the next scheduled event time, does idle work, and returns the updated nextevent time
55 extern mDNSs32 udsserver_idle(mDNSs32 nextevent);
56
57 extern void udsserver_info(void); // print out info about current state
58
59 extern void udsserver_handle_configchange(void);
60
61 extern int udsserver_exit(void); // should be called prior to app exit
62
63
64 /* Routines that uds_daemon expects to link against: */
65
66 typedef void (*udsEventCallback)(void *context);
67
68 extern mStatus udsSupportAddFDToEventLoop( int fd, udsEventCallback callback, void *context);
69 extern mStatus udsSupportRemoveFDFromEventLoop( int fd);