2 * Copyright (c) 2012, 2013 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 #ifndef _LIBSYSTEMCONFIGURATION_CLIENT_H
25 #define _LIBSYSTEMCONFIGURATION_CLIENT_H
27 #include <Availability.h>
28 #include <TargetConditionals.h>
29 #include <sys/cdefs.h>
30 #include <dispatch/dispatch.h>
33 // ------------------------------------------------------------
36 #pragma mark [XPC] DNS configuration server
38 #define DNSINFO_SERVER_VERSION 20130408
40 #if !TARGET_IPHONE_SIMULATOR
41 #define DNSINFO_SERVICE_NAME "com.apple.SystemConfiguration.DNSConfiguration"
42 #else // !TARGET_IPHONE_SIMULATOR
43 #define DNSINFO_SERVICE_NAME "com.apple.SystemConfiguration.DNSConfiguration_sim"
44 #endif // !TARGET_IPHONE_SIMULATOR
46 #define DNSINFO_PROC_NAME "proc_name" // string
48 #define DNSINFO_REQUEST "request_op" // int64
51 DNSINFO_REQUEST_COPY
= 0x10001,
52 DNSINFO_REQUEST_ACKNOWLEDGE
,
55 #define DNSINFO_CONFIGURATION "configuration" // data
56 #define DNSINFO_GENERATION "generation" // uint64
58 // ------------------------------------------------------------
61 #pragma mark [XPC] Network information (nwi) server
63 #define NWI_SERVER_VERSION 20130408
65 #if !TARGET_IPHONE_SIMULATOR
66 #define NWI_SERVICE_NAME "com.apple.SystemConfiguration.NetworkInformation"
67 #else // !TARGET_IPHONE_SIMULATOR
68 #define NWI_SERVICE_NAME "com.apple.SystemConfiguration.NetworkInformation_sim"
69 #endif // !TARGET_IPHONE_SIMULATOR
71 #define NWI_PROC_NAME "proc_name" // string
73 #define NWI_REQUEST "request_op" // int64
76 NWI_REQUEST_COPY
= 0x20001,
77 NWI_REQUEST_ACKNOWLEDGE
,
80 #define NWI_CONFIGURATION "configuration" // data
81 #define NWI_GENERATION "generation" // uint64
83 // ------------------------------------------------------------
87 xpc_connection_t connection
;
88 char *service_description
;
90 } libSC_info_client_t
;
92 // ------------------------------------------------------------
97 libSC_info_client_create (
99 const char *service_name
,
100 const char *service_description
104 libSC_info_client_release (
105 libSC_info_client_t
*client
109 libSC_send_message_with_reply_sync (
110 libSC_info_client_t
*client
,
116 #endif // _LIBSYSTEMCONFIGURATION_CLIENT_H