2 * Copyright (c) 2008-2010 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 #include <si_module.h>
27 * SPI to disable / enable modules during Libinfo search.
28 * Currently known module names are "cache", "ds", "file", and "mdns".
29 * Use flag = 0 to disable a module, flag = 1 to enable.
31 void si_search_module_set_flags(const char *name
, uint32_t flag
);
34 * Most of these async callbacks get data that's held in thread-specific
35 * memory (specific to the callback thread) that will be re-used by that
36 * thread automatically on the next call - synchronous or asynchronous -
37 * of the same routine. For example, an async getpwnam call will use a
38 * slot in the caller's thread-specifc data to save the returned struct passwd.
39 * A subsequent call to getpwnam will release the previous entry
41 * Callers of getaddrinfo must free the returned addrinfo list using freeaddrinfo.
42 * Callbacks for async getaddrinfo lookups must also free the returned addrinfo list.
44 * Callers of getnameinfo supply their own memory for the node and serv names.
45 * Callbacks for async getnameinfo lookups get node and serv names that reside in
46 * thread-specific memory that is reclaimed by the libraray. The results must not be freed.
48 typedef void (*si_user_async_callback
)(struct passwd
*, void *context
);
49 typedef void (*si_group_async_callback
)(struct group
*, void *context
);
50 typedef void (*si_grouplist_async_callback
)(struct grouplist_s
*, void *context
);
51 typedef void (*si_alias_async_callback
)(struct aliasent
*, void *context
);
52 typedef void (*si_host_async_callback
)(struct hostent
*, void *context
);
53 typedef void (*si_ipnode_async_callback
)(struct hostent
*, int32_t status
, void *context
);
54 typedef void (*si_network_async_callback
)(struct netent
*, void *context
);
55 typedef void (*si_service_async_callback
)(struct servent
*, void *context
);
56 typedef void (*si_protocol_async_callback
)(struct protoent
*, void *context
);
57 typedef void (*si_rpc_async_callback
)(struct rpcent
*, void *context
);
58 typedef void (*si_fs_async_callback
)(struct fstab
*, void *context
);
59 typedef void (*si_addrinfo_async_callback
)(int32_t status
, struct addrinfo
*res
, void *context
);
60 typedef void (*si_nameinfo_async_callback
)(int32_t status
, char *node
, char *serv
, void *context
);
61 typedef void (*si_setent_async_callback
)(void *context
);