]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/genSCPreferences.c
configd-395.6.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / genSCPreferences.c
1 /*
2 * Copyright (c) 2000-2011 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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
11 * file.
12 *
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.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 /*
25 * genSCPreferences.c
26 * - generates System Configuration header/cfile
27 * - invoke with "header" to generate the header
28 * - invoke with "cfile" to generate the cfile
29 */
30
31 /*
32 * Modification History
33 *
34 * 4 March 2004 Allan Nathanson (ajn@apple.com)
35 * - an alternate scheme to help facilitate access to the schema
36 * definitions for cross-compilation to earlier releases AND
37 * access to CFM applications.
38 *
39 * 16 July 2003 Allan Nathanson (ajn@apple.com)
40 * - changes to facilitate cross-compilation to earlier releases
41 *
42 * 5 May 2003 Allan Nathanson (ajn@apple.com)
43 * - switch back to "extern const CFStringRef ..."
44 *
45 * 1 June 2001 Allan Nathanson <ajn@apple.com>
46 * - public API conversion
47 *
48 * 27 Apr 2001 Allan Nathanson (ajn@apple.com)
49 * - switch from "extern const CFStringRef ..." to "#define ..."
50 *
51 * 3 Nov 2000 Dieter Siegmund (dieter@apple)
52 * - created
53 */
54 #include <stdio.h>
55 #include <stdlib.h>
56 #include <string.h>
57 #include <unistd.h>
58 #include <mach/boolean.h>
59
60 char copyright_string[] =
61 "/*\n"
62 " * Copyright (c) 2000-2011 Apple Inc. All rights reserved.\n"
63 " *\n"
64 " * @APPLE_LICENSE_HEADER_START@\n"
65 " * \n"
66 " * This file contains Original Code and/or Modifications of Original Code\n"
67 " * as defined in and that are subject to the Apple Public Source License\n"
68 " * Version 2.0 (the 'License'). You may not use this file except in\n"
69 " * compliance with the License. Please obtain a copy of the License at\n"
70 " * http://www.opensource.apple.com/apsl/ and read it before using this\n"
71 " * file.\n"
72 " * \n"
73 " * The Original Code and all software distributed under the License are\n"
74 " * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n"
75 " * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n"
76 " * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n"
77 " * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n"
78 " * Please see the License for the specific language governing rights and\n"
79 " * limitations under the License.\n"
80 " * \n"
81 " * @APPLE_LICENSE_HEADER_END@\n"
82 " */\n";
83
84
85 typedef enum {
86 DEFINE,
87 DEFINE_PRIVATE,
88 COMMENT,
89 GROUP,
90 SC_10_1,
91 SC_10_2,
92 SC_10_3,
93 SC_10_1_10_4, // deprecated in 10.4
94 SC_10_4,
95 SC_10_1_10_5, // deprecated in 10.5
96 SC_10_5,
97 SC_10_5_10_7, // deprecated in 10.7
98 SC_10_1_10_6, // deprecated in 10.6
99 SC_10_2_10_6, // deprecated in 10.6
100 SC_10_6_IPHONE_2_0,
101 SC_10_6_IPHONE_3_0,
102 SC_10_7_IPHONE_4_0,
103 COMMENT_PRIVATE,
104 GROUP_PRIVATE,
105 SC_10_5_PRIVATE,
106 SC_10_6_IPHONE_2_0_PRIVATE,
107 SC_10_6_IPHONE_3_0_PRIVATE,
108 SC_10_7_IPHONE_4_0_PRIVATE,
109 SC_10_7_IPHONE_5_0_PRIVATE,
110 SC_IPHONE_2_0_PRIVATE,
111 COMMENT_DEPRECATED,
112 GROUP_DEPRECATED,
113 END
114 } controlType;
115
116 #define SC_SCHEMA_DECLARATION "SC_SCHEMA_DECLARATION"
117 #define SC_SCHEMA_KV "SC_SCHEMA_KV"
118
119 #define KEY_PREFIX "kSC"
120
121 #define COMP "Comp"
122 #define DYNAMICSTORE "DynamicStore"
123 #define PREF "Pref"
124 #define PROP "Prop"
125 #define PATH "Path"
126 #define NETENT "EntNet"
127 #define NETPROP "PropNet"
128 #define NETVAL "ValNet"
129 #define SETUPENT "EntSetup"
130 #define SETUPPROP "PropSetup"
131 #define SYSTEMENT "EntSystem"
132 #define SYSTEMPROP "PropSystem"
133 #define RESV "Resv"
134 #define USERSENT "EntUsers"
135 #define USERSPROP "PropUsers"
136 #define VERSION "Version"
137 #define VIRTUALPROP "PropVirtualNetworkInterfaces"
138
139 #define CFARRAY_CFDICTIONARY "CFArray[CFDictionary]"
140 #define CFARRAY_CFNUMBER "CFArray[CFNumber]"
141 #define CFARRAY_CFSTRING "CFArray[CFString]"
142 #define CFBOOLEAN "CFBoolean"
143 #define CFDATA "CFData"
144 #define CFDICTIONARY "CFDictionary"
145 #define CFNUMBER "CFNumber"
146 #define CFNUMBER_BOOL "CFNumber (0 or 1)"
147 #define CFSTRING "CFString"
148
149 #define ACCESSPOINTNAME "AccessPointName"
150 #define ACSP "ACSP" // Apple Client Server Protocol
151 #define ACTIVE "Active"
152 #define ADDRESS "Address"
153 #define ADDRESSES "Addresses"
154 #define AFTER "After"
155 #define AGGRESSIVE "Aggressive"
156 #define AIRPORT "AirPort"
157 #define ALERT "Alert"
158 #define ALLOWNETCREATION "AllowNetCreation"
159 #define ALTERNATE "Alternate"
160 #define ALWAYS "Always"
161 #define ANYREGEX "AnyRegex"
162 #define APPLETALK "AppleTalk"
163 #define AUTH "Auth"
164 #define AUTHENTICATIONMETHOD "AuthenticationMethod"
165 #define AUTOCONFIG "AutoConfig"
166 #define AUTODISCOVERY "AutoDiscovery"
167 #define AUTOMATIC "Automatic"
168 #define AV "AV"
169 #define BEFORE "Before"
170 #define BINDINGMETHODS "BindingMethods"
171 #define BOND "Bond"
172 #define BOOTP "BOOTP"
173 #define BRIDGE "Bridge"
174 #define BROADCAST "Broadcast"
175 #define CALLWAITINGAUDIBLEALERT "CallWaitingAudibleAlert"
176 #define CAPABILITY "Capability"
177 #define CAPABILITIES "Capabilities"
178 #define CAUSE "Cause"
179 #define CCP "CCP"
180 #define CHAP "CHAP"
181 #define CERTIFICATE "Certificate"
182 #define COMM "Comm"
183 #define COMPATIBLE "Compatible"
184 #define COMPRESSIONACFIELD "CompressionACField"
185 #define COMPRESSIONPFIELD "CompressionPField"
186 #define COMPRESSIONVJ "CompressionVJ"
187 #define COMPUTERNAME "ComputerName"
188 #define CONFIGMETHOD "ConfigMethod"
189 #define CONNECTDELAY "ConnectDelay"
190 #define CONNECTION "Connection"
191 #define CONNECTSPEED "ConnectSpeed"
192 #define CONNECTTIME "ConnectTime"
193 #define CONSERVATIVE "Conservative"
194 #define CONSOLEUSER "ConsoleUser"
195 #define CONTEXTID "ContextID"
196 #define CURRENTSET "CurrentSet"
197 #define DATACOMPRESSION "DataCompression"
198 #define DEFAULT "Default"
199 #define DEFAULTZONE "DefaultZone"
200 #define DEST "Dest"
201 #define DESTINATION "Destination"
202 #define DETACHING "Detaching"
203 #define DEVICE "Device"
204 #define DEVICENAME "DeviceName"
205 #define DHCP "DHCP"
206 #define DHCPCLIENTID "DHCPClientID"
207 #define DIALMODE "DialMode"
208 #define DIALONDEMAND "DialOnDemand"
209 #define DISCONNECTONANSWER "DisconnectOnAnswer"
210 #define DISCONNECTONFASTUSERSWITCH "DisconnectOnFastUserSwitch"
211 #define DISCONNECTONIDLE "DisconnectOnIdle"
212 #define DISCONNECTONIDLETIMER "DisconnectOnIdleTimer"
213 #define DISCONNECTONLOGOUT "DisconnectOnLogout"
214 #define DISCONNECTONSLEEP "DisconnectOnSleep"
215 #define DISCONNECTTIME "DisconnectTime"
216 #define DISPLAYTERMINALWINDOW "DisplayTerminalWindow"
217 #define DNS "DNS"
218 #define DOMAIN "Domain"
219 #define DOMAINS "Domains"
220 #define EAP "EAP"
221 #define EAPOL "EAPOL"
222 #define ECHO "Echo"
223 #define ECHOFAILURE "EchoFailure"
224 #define ECHOINTERVAL "EchoInterval"
225 #define ENABLE "Enable"
226 #define ENABLED "Enabled"
227 #define ENCODING "Encoding"
228 #define ENCRYPTION "Encryption"
229 #define ERRORCORRECTION "ErrorCorrection"
230 #define ETHERNET "Ethernet"
231 #define EXCEPTIONSLIST "ExceptionsList"
232 #define EXCLUDED "Excluded"
233 #define EXCLUDESIMPLEHOSTNAMES "ExcludeSimpleHostnames"
234 #define FAILOVER "Failover"
235 #define FILE "File"
236 #define FIREWIRE "FireWire"
237 #define FIRST "First"
238 #define FLAGS "Flags"
239 #define FTP "FTP"
240 #define GATEWAY "Gateway"
241 #define GID "GID"
242 #define GLOBAL "Global"
243 #define GOPHER "Gopher"
244 #define HARDWARE "Hardware"
245 #define HIGH "High"
246 #define HOLD "Hold"
247 #define HOSTNAME "HostName"
248 #define HOSTNAMES "HostNames"
249 #define HTTP "HTTP"
250 #define HTTPS "HTTPS"
251 #define HYBRID "Hybrid"
252 #define IDLEREMINDER "IdleReminder"
253 #define IDLEREMINDERTIMER "IdleReminderTimer"
254 #define IGNOREDIALTONE "IgnoreDialTone"
255 #define IGNORELINKSTATUS "IgnoreLinkStatus"
256 #define INACTIVE "Inactive"
257 #define INCLUDED "Included"
258 #define INFORM "INFORM"
259 #define INTERFACE "Interface"
260 #define INTERFACENAME "InterfaceName"
261 #define INTERFACES "Interfaces"
262 #define IP "IP"
263 #define IPCP "IPCP"
264 #define IPV4 "IPv4"
265 #define IPV6 "IPv6"
266 #define IPSEC "IPSec"
267 #define JAVASCRIPT "JavaScript"
268 #define JOIN "Join"
269 #define JUMBO_MTU "JUMBO_MTU"
270 #define KEYCHAIN "Keychain"
271 #define KEYID "KeyID"
272 #define L2TP "L2TP"
273 #define LAST "Last"
274 #define LCP "LCP"
275 #define LINK "Link"
276 #define LINKLOCAL "LinkLocal"
277 #define LOCALCERTIFICATE "LocalCertificate"
278 #define LOCALHOSTNAME "LocalHostName"
279 #define LOCALIDENTIFIER "LocalIdentifier"
280 #define LOGFILE "Logfile"
281 #define LOOPBACK "Loopback"
282 #define LOW "Low"
283 #define LRO "LRO"
284 #define MACADDRESS "MACAddress"
285 #define MANUAL "Manual"
286 #define MATCH "Match"
287 #define MEDIA "Media"
288 #define MIXED "Mixed"
289 #define MODEL "Model"
290 #define MODE "Mode"
291 #define MODEM "Modem"
292 #define MPPE40 "MPPE40"
293 #define MPPE128 "MPPE128"
294 #define MRU "MRU"
295 #define MSCHAP1 "MSCHAP1"
296 #define MSCHAP2 "MSCHAP2"
297 #define MTU "MTU"
298 #define NAME "Name"
299 #define NETBIOS "NetBIOS"
300 #define NETINFO "NetInfo"
301 #define NETWORK "Network"
302 #define NETWORKID "NetworkID"
303 #define NETWORKRANGE "NetworkRange"
304 #define NETWORKSERVICES "NetworkServices"
305 #define NEVER "Never"
306 #define NODE "Node"
307 #define NODEID "NodeID"
308 #define NOTE "Note"
309 #define ONDEMAND "OnDemand"
310 #define ONRETRY "OnRetry"
311 #define OPTIONS "Options"
312 #define ORDER "Order"
313 #define ORDERS "Orders"
314 #define OVERRIDEPRIMARY "OverridePrimary"
315 #define PAP "PAP"
316 #define PASSIVE "Passive"
317 #define PASSWORD "Password"
318 #define PEER "Peer"
319 #define PERSONALITY "Personality"
320 #define PLUGIN "Plugin"
321 #define PLUGINS "Plugins"
322 #define POWER "Power"
323 #define PORT "Port"
324 #define PPP "PPP"
325 #define PPPOE "PPPoE"
326 #define PPPSERIAL "PPPSerial"
327 #define PPTP "PPTP"
328 #define PREFERRED "Preferred"
329 #define PREFIXLENGTH "PrefixLength"
330 #define PREFS "Prefs"
331 #define PRIMARYINTERFACE "PrimaryInterface"
332 #define PRIMARYRANK "PrimaryRank"
333 #define PRIMARYSERVICE "PrimaryService"
334 #define PRIORITY "Priority"
335 #define PROMPT "Prompt"
336 #define PROTOCOL "Protocol"
337 #define PROXIES "Proxies"
338 #define PROXY "Proxy"
339 #define PULSEDIAL "PulseDial"
340 #define RANKED "Ranked"
341 #define RECEIVEACCM "ReceiveACCM"
342 #define RECENT "Recent"
343 #define REDIALCOUNT "RedialCount"
344 #define REDIAL "Redial"
345 #define REDIALINTERVAL "RedialInterval"
346 #define REGION "Region"
347 #define RELAY "Relay"
348 #define REMINDER "Reminder"
349 #define REMINDERTIME "ReminderTime"
350 #define REMOTEADDRESS "RemoteAddress"
351 #define RETRYCONNECTTIME "RetryConnectTime"
352 #define ROOTSEPARATOR "RootSeparator"
353 #define ROUTE "Route"
354 #define ROUTER "Router"
355 #define ROUTES "Routes"
356 #define ROUTERADVERTISEMENT "RouterAdvertisement"
357 #define RTSP "RTSP"
358 #define RXCSUM "RXCSUM"
359 #define SAVEPASSWORDS "SavePasswords"
360 #define SCOPE "Scope"
361 #define SCOPED "Scoped"
362 #define SCRIPT "Script"
363 #define SEARCH "Search"
364 #define SEEDNETWORKRANGE "SeedNetworkRange"
365 #define SEEDROUTER "SeedRouter"
366 #define SEEDZONES "SeedZones"
367 #define SERVER "Server"
368 #define SERVICE "Service"
369 #define SERVICEIDS "ServiceIDs"
370 #define SESSIONTIMER "SessionTimer"
371 #define SETS "Sets"
372 #define SETUP "Setup"
373 #define SHAREDSECRET "SharedSecret"
374 #define SMB "SMB"
375 #define SOCKS "SOCKS"
376 #define SORTLIST "SortList"
377 #define SPEAKER "Speaker"
378 #define SPEED "Speed"
379 #define STATE "State"
380 #define STATUS "Status"
381 #define STF "6to4"
382 #define STRONGEST "Strongest"
383 #define SUBNETMASK "SubnetMask"
384 #define SUBNETMASKS "SubnetMasks"
385 #define SUBTYPE "SubType"
386 #define SUPPLEMENTAL "Supplemental"
387 #define SUPPORTSMODEMONHOLD "SupportsModemOnHold"
388 #define SYSTEM "System"
389 #define TAG "Tag"
390 #define TAGS "Tags"
391 #define TERMINALSCRIPT "TerminalScript"
392 #define TIMEOUT "Timeout"
393 #define TOKEN "Token"
394 #define TRANSMITACCM "TransmitACCM"
395 #define TRANSPORT "Transport"
396 #define TSO "TSO"
397 #define TSO4 "TSO4"
398 #define TSO6 "TSO6"
399 #define TXCSUM "TXCSUM"
400 #define TYPE "Type"
401 #define UID "UID"
402 #define UPDATED "Updated"
403 #define URLSTRING "URLString"
404 #define USERDEFINEDNAME "UserDefinedName"
405 #define USE "Use"
406 #define USERS "Users"
407 #define VENDOR "Vendor"
408 #define VERBOSELOGGING "VerboseLogging"
409 #define VIRTUALNETWORKINTERFACES "VirtualNetworkInterfaces"
410 #define VLAN "VLAN"
411 #define VLAN_HWTAGGING "VLAN_HWTAGGING"
412 #define VLAN_MTU "VLAN_MTU"
413 #define VPN "VPN"
414 #define WAITFORDIALTONE "WaitForDialTone"
415 #define WINS "WINS"
416 #define WORKGROUP "Workgroup"
417 #define XAUTH "XAuth"
418
419
420 typedef struct {
421 int control;
422 const char * prefix;
423 const char * key;
424 const char * value;
425 const char * type;
426 } schemaDefinition;
427
428 static schemaDefinition names[] = {
429
430 { GROUP, NULL, "Reserved Keys", NULL, NULL },
431
432 { SC_10_1, RESV, LINK, "__LINK__", CFSTRING },
433 { SC_10_1, RESV, INACTIVE, "__INACTIVE__", NULL },
434 { COMMENT, "", NULL, NULL, NULL },
435
436 { GROUP, NULL, "Generic Keys", NULL, NULL },
437
438 { SC_10_1, PROP, INTERFACENAME, NULL, CFSTRING },
439 { SC_10_1, PROP, MACADDRESS, NULL, CFSTRING },
440 { SC_10_1, PROP, USERDEFINEDNAME, NULL, CFSTRING },
441 { SC_10_1, PROP, VERSION, NULL, CFSTRING },
442 { COMMENT, "", NULL, NULL, NULL },
443
444 { GROUP, PREF, "Preference Keys", NULL, NULL },
445
446 { SC_10_1, PREF, CURRENTSET, NULL, CFSTRING },
447 { SC_10_1, PREF, NETWORKSERVICES, NULL, CFDICTIONARY },
448 { SC_10_1, PREF, SETS, NULL, CFDICTIONARY },
449 { SC_10_1, PREF, SYSTEM, NULL, CFDICTIONARY },
450 { COMMENT, "", NULL, NULL, NULL },
451
452 { GROUP_PRIVATE, PREF, "Preference Keys", NULL, NULL },
453
454 { SC_10_5_PRIVATE, PREF, VIRTUALNETWORKINTERFACES, NULL, CFDICTIONARY },
455 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
456
457 { GROUP, COMP, "Component Keys", NULL, NULL },
458
459 { SC_10_1, COMP, NETWORK, NULL, NULL },
460 { SC_10_1, COMP, SERVICE, NULL, NULL },
461 { SC_10_1, COMP, GLOBAL, NULL, NULL },
462 { SC_10_2, COMP, HOSTNAMES, NULL, NULL },
463 { SC_10_1, COMP, INTERFACE, NULL, NULL },
464 { SC_10_1, COMP, SYSTEM, NULL, NULL },
465 { SC_10_1, COMP, USERS, NULL, NULL },
466 { COMMENT, "", NULL, NULL, NULL },
467
468 { COMMENT, "--- Regex pattern which matches any component ---", NULL },
469 { SC_10_1, COMP, ANYREGEX, "[^/]+", NULL },
470 { COMMENT, "", NULL, NULL, NULL },
471
472 { GROUP, NETENT, "Network Entity Keys", NULL, NULL },
473
474 { SC_10_1, NETENT, AIRPORT, NULL, CFDICTIONARY },
475 { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
476 { SC_10_1_10_6, NETENT, APPLETALK, NULL, CFDICTIONARY },
477 { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
478 { SC_10_1, NETENT, DHCP, NULL, CFDICTIONARY },
479 { SC_10_1, NETENT, DNS, NULL, CFDICTIONARY },
480 { SC_10_1, NETENT, ETHERNET, NULL, CFDICTIONARY },
481 { SC_10_3, NETENT, FIREWIRE, NULL, CFDICTIONARY },
482 { SC_10_1, NETENT, INTERFACE, NULL, CFDICTIONARY },
483 { SC_10_5, NETENT, IPSEC, NULL, CFDICTIONARY },
484 { SC_10_1, NETENT, IPV4, NULL, CFDICTIONARY },
485 { SC_10_1, NETENT, IPV6, NULL, CFDICTIONARY },
486 { SC_10_3, NETENT, L2TP, NULL, CFDICTIONARY },
487 { SC_10_1, NETENT, LINK, NULL, CFDICTIONARY },
488 { SC_10_1, NETENT, MODEM, NULL, CFDICTIONARY },
489 { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
490 { SC_10_1_10_5, NETENT, NETINFO, NULL, CFDICTIONARY },
491 { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
492 { SC_10_1, NETENT, PPP, NULL, CFDICTIONARY },
493 { SC_10_1, NETENT, PPPOE, NULL, CFDICTIONARY },
494 { SC_10_3, NETENT, PPPSERIAL, NULL, CFDICTIONARY },
495 { SC_10_3, NETENT, PPTP, NULL, CFDICTIONARY },
496 { SC_10_1, NETENT, PROXIES, NULL, CFDICTIONARY },
497 { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
498 { SC_10_5, NETENT, SMB, NULL, CFDICTIONARY },
499 { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
500 { SC_10_3, NETENT, STF, NULL, CFDICTIONARY },
501 { COMMENT, "", NULL, NULL, NULL },
502
503 { GROUP_PRIVATE, NETENT, "Network Entity Keys", NULL, NULL },
504
505 { SC_10_5_PRIVATE, NETENT, EAPOL, NULL, CFDICTIONARY },
506 { SC_10_7_IPHONE_4_0_PRIVATE, NETENT, LOOPBACK, NULL, CFDICTIONARY },
507 { SC_10_6_IPHONE_3_0_PRIVATE, NETENT, ONDEMAND, NULL, CFDICTIONARY },
508 { SC_10_6_IPHONE_2_0_PRIVATE, NETENT, SERVICE, "__SERVICE__", CFDICTIONARY },
509 { SC_10_7_IPHONE_4_0_PRIVATE, NETENT, VPN, NULL, CFDICTIONARY },
510 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
511
512 { GROUP, NETPROP, KEY_PREFIX COMP NETWORK " Properties", NULL, NULL },
513
514 { SC_10_2, NETPROP, OVERRIDEPRIMARY, NULL, CFNUMBER_BOOL },
515 { SC_10_1, NETPROP, SERVICE ORDER, NULL, CFARRAY_CFSTRING },
516 { SC_10_1, NETPROP, PPP OVERRIDEPRIMARY, NULL, CFNUMBER_BOOL },
517 { COMMENT, "", NULL, NULL, NULL },
518
519 { GROUP_PRIVATE, NETPROP, KEY_PREFIX COMP NETWORK " Properties", NULL, NULL },
520
521 { SC_10_5_PRIVATE, NETPROP, IGNORELINKSTATUS, NULL, CFBOOLEAN },
522 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
523
524 { GROUP, NETPROP AIRPORT, KEY_PREFIX COMP NETWORK INTERFACE " Properties", NULL, NULL },
525
526 { SC_10_2, NETPROP, INTERFACES, NULL, CFARRAY_CFSTRING },
527 { COMMENT, "", NULL, NULL, NULL },
528
529 { GROUP, NETPROP AIRPORT, KEY_PREFIX COMP NETWORK HOSTNAMES " Properties", NULL, NULL },
530
531 { SC_10_2, NETPROP, LOCALHOSTNAME, NULL, CFSTRING },
532 { COMMENT, "", NULL, NULL, NULL },
533
534 { GROUP, NETPROP AIRPORT, KEY_PREFIX NETENT AIRPORT " (Hardware) Entity Keys", NULL, NULL },
535
536 { SC_10_2, NETPROP AIRPORT, ALLOWNETCREATION, NULL, CFNUMBER_BOOL },
537 { SC_10_1, NETPROP AIRPORT, AUTH PASSWORD, NULL, CFDATA },
538 { SC_10_1, NETPROP AIRPORT, AUTH PASSWORD ENCRYPTION, NULL, CFSTRING },
539 { SC_10_2, NETPROP AIRPORT, JOIN MODE, NULL, CFSTRING },
540 { SC_10_1, NETPROP AIRPORT, POWER ENABLED, NULL, CFNUMBER_BOOL },
541 { SC_10_1, NETPROP AIRPORT, PREFERRED NETWORK, NULL, CFSTRING },
542 { SC_10_2, NETPROP AIRPORT, SAVEPASSWORDS, NULL, CFNUMBER_BOOL },
543 { COMMENT, "", NULL, NULL, NULL },
544 { COMMENT, "--- " KEY_PREFIX NETPROP AIRPORT JOIN MODE " values ---", NULL, NULL, NULL },
545 { SC_10_3, NETVAL AIRPORT JOIN MODE, AUTOMATIC, NULL, NULL },
546 { SC_10_2, NETVAL AIRPORT JOIN MODE, PREFERRED, NULL, NULL },
547 { SC_10_4, NETVAL AIRPORT JOIN MODE, RANKED, NULL, NULL },
548 { SC_10_2, NETVAL AIRPORT JOIN MODE, RECENT, NULL, NULL },
549 { SC_10_2, NETVAL AIRPORT JOIN MODE, STRONGEST, NULL, NULL },
550 { COMMENT, "", NULL, NULL, NULL },
551 { COMMENT, "--- " KEY_PREFIX NETPROP AIRPORT PASSWORD ENCRYPTION " values ---", NULL, NULL, NULL },
552 { SC_10_3, NETVAL AIRPORT AUTH PASSWORD ENCRYPTION, KEYCHAIN, NULL, NULL },
553 { COMMENT, "", NULL, NULL, NULL },
554
555 { GROUP_DEPRECATED, NETPROP APPLETALK, KEY_PREFIX NETENT APPLETALK " Entity Keys", NULL, NULL },
556
557 { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
558 { SC_10_1_10_6, NETPROP APPLETALK, COMPUTERNAME, NULL, CFSTRING },
559 { SC_10_1_10_6, NETPROP APPLETALK, COMPUTERNAME ENCODING, NULL, CFNUMBER },
560 { SC_10_1_10_6, NETPROP APPLETALK, CONFIGMETHOD, NULL, CFSTRING },
561 { SC_10_1_10_6, NETPROP APPLETALK, DEFAULTZONE, NULL, CFSTRING },
562 { SC_10_1_10_6, NETPROP APPLETALK, NETWORKID, NULL, CFNUMBER },
563 { SC_10_2_10_6, NETPROP APPLETALK, NETWORKRANGE, NULL, CFARRAY_CFNUMBER },
564 { SC_10_1_10_6, NETPROP APPLETALK, NODEID, NULL, CFNUMBER },
565 { SC_10_1_10_6, NETPROP APPLETALK, SEEDNETWORKRANGE, NULL, CFARRAY_CFNUMBER },
566 { SC_10_1_10_6, NETPROP APPLETALK, SEEDZONES, NULL, CFARRAY_CFSTRING },
567 { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
568 { COMMENT_DEPRECATED, "--- " KEY_PREFIX NETPROP APPLETALK CONFIGMETHOD " values ---", NULL, NULL, NULL },
569 { SC_10_1_10_6, NETVAL APPLETALK CONFIGMETHOD, NODE, NULL, NULL },
570 { SC_10_1_10_6, NETVAL APPLETALK CONFIGMETHOD, ROUTER, NULL, NULL },
571 { SC_10_1_10_6, NETVAL APPLETALK CONFIGMETHOD, SEEDROUTER, NULL, NULL },
572 { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
573 { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
574
575
576 { GROUP, NETPROP DNS, KEY_PREFIX NETENT DNS " Entity Keys", NULL, NULL },
577
578 { SC_10_1, NETPROP DNS, DOMAIN NAME, NULL, CFSTRING },
579 { SC_10_4, NETPROP DNS, OPTIONS, NULL, CFSTRING },
580 { SC_10_1, NETPROP DNS, SEARCH DOMAINS, NULL, CFARRAY_CFSTRING},
581 { SC_10_4, NETPROP DNS, SEARCH ORDER, NULL, CFNUMBER},
582 { SC_10_1, NETPROP DNS, SERVER ADDRESSES, NULL, CFARRAY_CFSTRING },
583 { SC_10_4, NETPROP DNS, SERVER PORT, NULL, CFNUMBER },
584 { SC_10_4, NETPROP DNS, SERVER TIMEOUT, NULL, CFNUMBER },
585 { SC_10_1, NETPROP DNS, SORTLIST, NULL, CFARRAY_CFSTRING },
586 { SC_10_4, NETPROP DNS, SUPPLEMENTAL MATCH DOMAINS, NULL, CFARRAY_CFSTRING},
587 { SC_10_4, NETPROP DNS, SUPPLEMENTAL MATCH ORDERS, NULL, CFARRAY_CFNUMBER},
588 { COMMENT, "", NULL, NULL, NULL },
589
590 { GROUP, NETPROP ETHERNET, KEY_PREFIX NETENT ETHERNET " (Hardware) Entity Keys", NULL, NULL },
591
592 { SC_10_2, NETPROP ETHERNET, MEDIA SUBTYPE, NULL, CFSTRING },
593 { SC_10_2, NETPROP ETHERNET, MEDIA OPTIONS, NULL, CFARRAY_CFSTRING },
594 { SC_10_2, NETPROP ETHERNET, MTU, NULL, CFNUMBER },
595 { COMMENT, "", NULL, NULL, NULL },
596
597 { GROUP_PRIVATE, NETPROP ETHERNET, KEY_PREFIX NETENT ETHERNET " (Hardware) Entity Keys", NULL, NULL },
598
599 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY AV, AV, CFNUMBER_BOOL },
600 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY JUMBO_MTU, JUMBO_MTU, CFNUMBER_BOOL },
601 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY LRO, LRO, CFNUMBER_BOOL },
602 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY RXCSUM, RXCSUM, CFNUMBER_BOOL },
603 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY TSO, TSO, CFNUMBER_BOOL },
604 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY TSO4, TSO4, CFNUMBER_BOOL },
605 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY TSO6, TSO6, CFNUMBER_BOOL },
606 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY TXCSUM, TXCSUM, CFNUMBER_BOOL },
607 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY VLAN_HWTAGGING, VLAN_HWTAGGING, CFNUMBER_BOOL },
608 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP ETHERNET, CAPABILITY VLAN_MTU, VLAN_MTU, CFNUMBER_BOOL },
609 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
610
611 { GROUP, NETPROP FIREWIRE, KEY_PREFIX NETENT FIREWIRE " (Hardware) Entity Keys", NULL, NULL },
612
613 { COMMENT, "* RESERVED FOR FUTURE USE *", NULL, NULL, NULL },
614 { COMMENT, "", NULL, NULL, NULL },
615
616 { GROUP, NETPROP INTERFACE, KEY_PREFIX NETENT INTERFACE " Entity Keys", NULL, NULL },
617
618 { SC_10_1, NETPROP INTERFACE, DEVICENAME, NULL, CFSTRING },
619 { SC_10_1, NETPROP INTERFACE, HARDWARE, NULL, CFSTRING },
620 { SC_10_1, NETPROP INTERFACE, TYPE, NULL, CFSTRING },
621 { SC_10_1, NETPROP INTERFACE, SUBTYPE, NULL, CFSTRING },
622 { SC_10_2, NETPROP INTERFACE, SUPPORTSMODEMONHOLD, NULL, CFNUMBER_BOOL },
623 { COMMENT, "", NULL, NULL, NULL },
624 { COMMENT, "--- " KEY_PREFIX NETPROP INTERFACE TYPE " values ---", NULL, NULL, NULL },
625 { SC_10_1, NETVAL INTERFACE TYPE, ETHERNET, NULL, NULL },
626 { SC_10_3, NETVAL INTERFACE TYPE, FIREWIRE, NULL, NULL },
627 { SC_10_1, NETVAL INTERFACE TYPE, PPP, NULL, NULL },
628 { SC_10_3, NETVAL INTERFACE TYPE, STF, NULL, NULL },
629 { SC_10_6_IPHONE_2_0, NETVAL INTERFACE TYPE, IPSEC, NULL, NULL },
630 { COMMENT, "", NULL, NULL, NULL },
631 { COMMENT, "--- " KEY_PREFIX NETPROP SERVICE SUBTYPE " values (for " PPP ") ---", NULL, NULL, NULL },
632 { SC_10_1, NETVAL INTERFACE SUBTYPE, PPPOE, NULL, NULL },
633 { SC_10_1, NETVAL INTERFACE SUBTYPE, PPPSERIAL, NULL, NULL },
634 { SC_10_2, NETVAL INTERFACE SUBTYPE, PPTP, NULL, NULL },
635 { SC_10_3, NETVAL INTERFACE SUBTYPE, L2TP, NULL, NULL },
636 { COMMENT, "", NULL, NULL, NULL },
637
638 { GROUP_PRIVATE, NETPROP INTERFACE, KEY_PREFIX NETENT INTERFACE " Entity Keys", NULL, NULL },
639
640 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP INTERFACE TYPE " values ---", NULL, NULL, NULL },
641 { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL INTERFACE TYPE, LOOPBACK, NULL, NULL },
642 { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL INTERFACE TYPE, VPN, NULL, NULL },
643 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
644
645 { GROUP, NETPROP IPSEC, KEY_PREFIX NETENT IPSEC " Entity Keys", NULL, NULL },
646
647 { SC_10_5, NETPROP IPSEC, AUTHENTICATIONMETHOD, NULL, CFSTRING },
648 { SC_10_5, NETPROP IPSEC, LOCALCERTIFICATE, NULL, CFDATA },
649 { SC_10_5, NETPROP IPSEC, LOCALIDENTIFIER, NULL, CFSTRING },
650 { SC_10_5, NETPROP IPSEC, LOCALIDENTIFIER TYPE, NULL, CFSTRING },
651 { SC_10_5, NETPROP IPSEC, SHAREDSECRET, NULL, CFSTRING },
652 { SC_10_5, NETPROP IPSEC, SHAREDSECRET ENCRYPTION, NULL, CFSTRING },
653 { SC_10_6_IPHONE_2_0, NETPROP IPSEC, CONNECTTIME, NULL, CFNUMBER },
654 { SC_10_6_IPHONE_2_0, NETPROP IPSEC, REMOTEADDRESS, NULL, CFSTRING },
655 { SC_10_6_IPHONE_2_0, NETPROP IPSEC, STATUS, STATUS, CFNUMBER },
656 { SC_10_6_IPHONE_2_0, NETPROP IPSEC, XAUTH ENABLED, NULL, CFNUMBER_BOOL },
657 { SC_10_6_IPHONE_2_0, NETPROP IPSEC, XAUTH NAME, NULL, CFSTRING },
658 { SC_10_6_IPHONE_2_0, NETPROP IPSEC, XAUTH PASSWORD, NULL, CFSTRING },
659 { SC_10_6_IPHONE_2_0, NETPROP IPSEC, XAUTH PASSWORD ENCRYPTION, NULL, CFSTRING },
660 { COMMENT, "", NULL, NULL, NULL },
661 { COMMENT, "--- " KEY_PREFIX NETPROP IPSEC AUTHENTICATIONMETHOD " values ---", NULL, NULL, NULL },
662 { SC_10_5, NETVAL IPSEC AUTHENTICATIONMETHOD, SHAREDSECRET, NULL, NULL },
663 { SC_10_5, NETVAL IPSEC AUTHENTICATIONMETHOD, CERTIFICATE, NULL, NULL },
664 { SC_10_5, NETVAL IPSEC AUTHENTICATIONMETHOD, HYBRID, NULL, NULL },
665 { COMMENT, "", NULL, NULL, NULL },
666 { COMMENT, "--- " KEY_PREFIX NETPROP IPSEC LOCALIDENTIFIER TYPE " values ---", NULL, NULL, NULL },
667 { SC_10_5, NETVAL IPSEC LOCALIDENTIFIER TYPE, KEYID, NULL, NULL },
668 { COMMENT, "", NULL, NULL, NULL },
669 { COMMENT, "--- " KEY_PREFIX NETPROP IPSEC SHAREDSECRET ENCRYPTION " values ---", NULL, NULL, NULL },
670 { SC_10_5, NETVAL IPSEC SHAREDSECRET ENCRYPTION, KEYCHAIN, NULL, NULL },
671 { COMMENT, "", NULL, NULL, NULL },
672 { COMMENT, "--- " KEY_PREFIX NETPROP IPSEC XAUTH PASSWORD ENCRYPTION " values ---", NULL, NULL, NULL },
673 { SC_10_6_IPHONE_2_0, NETVAL IPSEC XAUTH PASSWORD ENCRYPTION, KEYCHAIN, NULL, NULL },
674 { SC_10_6_IPHONE_3_0, NETVAL IPSEC XAUTH PASSWORD ENCRYPTION, PROMPT, NULL, NULL },
675 { COMMENT, "", NULL, NULL, NULL },
676
677 { GROUP_PRIVATE, NETPROP IPSEC, KEY_PREFIX NETENT IPSEC " Entity Keys", NULL, NULL },
678
679 { SC_10_6_IPHONE_3_0_PRIVATE, NETPROP IPSEC, LAST CAUSE, NULL, CFNUMBER },
680 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
681 { COMMENT_PRIVATE, "--- " ONDEMAND ": ---", NULL, NULL, NULL },
682 { SC_10_6_IPHONE_3_0_PRIVATE, NETPROP IPSEC, ONDEMAND ENABLED, NULL, CFNUMBER_BOOL },
683 { SC_10_6_IPHONE_3_0_PRIVATE, NETPROP IPSEC, ONDEMAND MATCH DOMAINS ALWAYS, NULL, CFARRAY_CFSTRING },
684 { SC_10_6_IPHONE_3_0_PRIVATE, NETPROP IPSEC, ONDEMAND MATCH DOMAINS ONRETRY, NULL, CFARRAY_CFSTRING },
685 { SC_10_6_IPHONE_3_0_PRIVATE, NETPROP IPSEC, ONDEMAND MATCH DOMAINS NEVER, NULL, CFARRAY_CFSTRING },
686 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
687
688 { GROUP, NETPROP IPV4, KEY_PREFIX NETENT IPV4 " Entity Keys", NULL, NULL },
689
690 { SC_10_1, NETPROP IPV4, ADDRESSES, NULL, CFARRAY_CFSTRING },
691 { SC_10_1, NETPROP IPV4, CONFIGMETHOD, NULL, CFSTRING },
692 { SC_10_1, NETPROP IPV4, DHCPCLIENTID, NULL, CFSTRING },
693 { SC_10_1, NETPROP IPV4, ROUTER, NULL, CFSTRING },
694 { SC_10_1, NETPROP IPV4, SUBNETMASKS, NULL, CFARRAY_CFSTRING },
695 { SC_10_1, NETPROP IPV4, DEST ADDRESSES, NULL, CFARRAY_CFSTRING },
696 { SC_10_1, NETPROP IPV4, BROADCAST ADDRESSES, NULL, CFARRAY_CFSTRING },
697 { COMMENT, "", NULL, NULL, NULL },
698 { COMMENT, "--- " KEY_PREFIX NETPROP IPV4 CONFIGMETHOD " values ---", NULL, NULL, NULL },
699 { SC_10_6_IPHONE_2_0, NETVAL IPV4 CONFIGMETHOD, AUTOMATIC, NULL, NULL },
700 { SC_10_1, NETVAL IPV4 CONFIGMETHOD, BOOTP, NULL, NULL },
701 { SC_10_1, NETVAL IPV4 CONFIGMETHOD, DHCP, NULL, NULL },
702 { SC_10_1, NETVAL IPV4 CONFIGMETHOD, INFORM, NULL, NULL },
703 { SC_10_2, NETVAL IPV4 CONFIGMETHOD, LINKLOCAL, NULL, NULL },
704 { SC_10_1, NETVAL IPV4 CONFIGMETHOD, MANUAL, NULL, NULL },
705 { SC_10_1, NETVAL IPV4 CONFIGMETHOD, PPP, NULL, NULL },
706 { COMMENT, "", NULL, NULL, NULL },
707
708 { GROUP_PRIVATE, NETPROP IPV4, KEY_PREFIX NETENT IPV4 " Entity Keys", NULL, NULL },
709 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4, EXCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY },
710 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4, INCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY },
711 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
712 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP IPV4 CONFIGMETHOD " values ---", NULL, NULL, NULL },
713 { SC_10_5_PRIVATE, NETVAL IPV4 CONFIGMETHOD, FAILOVER, NULL, NULL },
714 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
715 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP IPV4 INCLUDED ROUTES ", "
716 KEY_PREFIX NETPROP IPV4 EXCLUDED ROUTES " [CFDictionary] keys ---", NULL, NULL, NULL },
717 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4 ROUTE, DESTINATION ADDRESS, NULL, CFSTRING },
718 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4 ROUTE, SUBNETMASK, NULL, CFSTRING },
719 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4 ROUTE, GATEWAY ADDRESS, NULL, CFSTRING },
720 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
721
722 { GROUP, NETPROP IPV6, KEY_PREFIX NETENT IPV6 " Entity Keys", NULL, NULL },
723
724 { SC_10_1, NETPROP IPV6, ADDRESSES, NULL, CFARRAY_CFSTRING },
725 { SC_10_1, NETPROP IPV6, CONFIGMETHOD, NULL, CFSTRING },
726 { SC_10_3, NETPROP IPV6, DEST ADDRESSES, NULL, CFARRAY_CFSTRING },
727 { SC_10_3, NETPROP IPV6, FLAGS, NULL, CFNUMBER },
728 { SC_10_3, NETPROP IPV6, PREFIXLENGTH, NULL, CFARRAY_CFNUMBER },
729 { SC_10_3, NETPROP IPV6, ROUTER, NULL, CFSTRING },
730 { COMMENT, "", NULL, NULL, NULL },
731 { COMMENT, "--- " KEY_PREFIX NETPROP IPV6 CONFIGMETHOD " values ---", NULL, NULL, NULL },
732 { SC_10_3, NETVAL IPV6 CONFIGMETHOD, AUTOMATIC, NULL, NULL },
733 { SC_10_7_IPHONE_4_0, NETVAL IPV6 CONFIGMETHOD, LINKLOCAL, NULL, NULL },
734 { SC_10_3, NETVAL IPV6 CONFIGMETHOD, MANUAL, NULL, NULL },
735 { SC_10_3, NETVAL IPV6 CONFIGMETHOD, ROUTERADVERTISEMENT, NULL, NULL },
736 { SC_10_3, NETVAL IPV6 CONFIGMETHOD, STF, NULL, NULL },
737 { COMMENT, "", NULL, NULL, NULL },
738
739 { GROUP_PRIVATE, NETPROP IPV6, KEY_PREFIX NETENT IPV6 " Entity Keys", NULL, NULL },
740 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6, EXCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY },
741 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6, INCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY },
742 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
743 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP IPV6 INCLUDED ROUTES ", "
744 KEY_PREFIX NETPROP IPV6 EXCLUDED ROUTES " [CFDictionary] keys ---", NULL, NULL, NULL },
745 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6 ROUTE, DESTINATION ADDRESS, NULL, CFSTRING },
746 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6 ROUTE, PREFIXLENGTH, NULL, CFNUMBER },
747 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6 ROUTE, GATEWAY ADDRESS, NULL, CFSTRING },
748 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
749
750 { GROUP, NETPROP STF, KEY_PREFIX NETENT STF " Entity Keys", NULL, NULL },
751
752 { SC_10_3, NETPROP STF, RELAY, NULL, CFSTRING },
753 { COMMENT, "", NULL, NULL, NULL },
754
755 { GROUP, NETPROP LINK, KEY_PREFIX NETENT LINK " Entity Keys", NULL, NULL },
756
757 { SC_10_1, NETPROP LINK, ACTIVE, NULL, CFBOOLEAN },
758 { SC_10_2, NETPROP LINK, DETACHING, NULL, CFBOOLEAN },
759 { COMMENT, "", NULL, NULL, NULL },
760
761 { GROUP, NETPROP MODEM, KEY_PREFIX NETENT MODEM " (Hardware) Entity Keys", NULL, NULL },
762
763 { SC_10_5, NETPROP MODEM, ACCESSPOINTNAME, NULL, CFSTRING },
764 { SC_10_5, NETPROP MODEM, CONNECTION PERSONALITY, NULL, CFSTRING },
765 { SC_10_1, NETPROP MODEM, CONNECTION SCRIPT, NULL, CFSTRING },
766 { SC_10_2, NETPROP MODEM, CONNECTSPEED, NULL, CFNUMBER },
767 { SC_10_1, NETPROP MODEM, DATACOMPRESSION, NULL, CFNUMBER_BOOL },
768 { SC_10_5, NETPROP MODEM, DEVICE CONTEXTID, NULL, CFSTRING },
769 { SC_10_5, NETPROP MODEM, DEVICE MODEL, NULL, CFSTRING },
770 { SC_10_5, NETPROP MODEM, DEVICE VENDOR, NULL, CFSTRING },
771 { SC_10_1, NETPROP MODEM, DIALMODE, NULL, CFSTRING },
772 { SC_10_1, NETPROP MODEM, ERRORCORRECTION, NULL, CFNUMBER_BOOL },
773 { SC_10_2, NETPROP MODEM, HOLD CALLWAITINGAUDIBLEALERT, NULL, CFNUMBER_BOOL },
774 { SC_10_2, NETPROP MODEM, HOLD DISCONNECTONANSWER, NULL, CFNUMBER_BOOL },
775 { SC_10_2, NETPROP MODEM, HOLD ENABLED, NULL, CFNUMBER_BOOL },
776 { SC_10_2, NETPROP MODEM, HOLD REMINDER, NULL, CFNUMBER_BOOL },
777 { SC_10_2, NETPROP MODEM, HOLD REMINDERTIME, NULL, CFNUMBER },
778 { SC_10_2, NETPROP MODEM, NOTE, NULL, CFSTRING },
779 { SC_10_1, NETPROP MODEM, PULSEDIAL, NULL, CFNUMBER_BOOL },
780 { SC_10_1, NETPROP MODEM, SPEAKER, NULL, CFNUMBER_BOOL },
781 { SC_10_1, NETPROP MODEM, SPEED, NULL, CFNUMBER },
782 { COMMENT, "", NULL, NULL, NULL },
783 { COMMENT, "--- " KEY_PREFIX NETPROP MODEM DIALMODE " values ---", NULL, NULL, NULL },
784 { SC_10_1, NETVAL MODEM DIALMODE, IGNOREDIALTONE, NULL, NULL },
785 { SC_10_1, NETVAL MODEM DIALMODE, MANUAL, NULL, NULL },
786 { SC_10_1, NETVAL MODEM DIALMODE, WAITFORDIALTONE, NULL, NULL },
787 { COMMENT, "", NULL, NULL, NULL },
788
789 { GROUP_DEPRECATED, NETPROP NETINFO, KEY_PREFIX NETENT NETINFO " Entity Keys", NULL, NULL },
790
791 { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
792 { SC_10_1_10_5, NETPROP NETINFO, BINDINGMETHODS, NULL, CFSTRING },
793 { SC_10_1_10_5, NETPROP NETINFO, SERVER ADDRESSES, NULL, CFARRAY_CFSTRING },
794 { SC_10_1_10_5, NETPROP NETINFO, SERVER TAGS, NULL, CFARRAY_CFSTRING },
795 { SC_10_1_10_5, NETPROP NETINFO, BROADCAST SERVER TAG, NULL, CFSTRING },
796 { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
797 { COMMENT_DEPRECATED, "--- " KEY_PREFIX NETPROP NETINFO BINDINGMETHODS " values ---", NULL, NULL, NULL },
798 { SC_10_1_10_5, NETVAL NETINFO BINDINGMETHODS, BROADCAST, NULL, NULL },
799 { SC_10_1_10_5, NETVAL NETINFO BINDINGMETHODS, DHCP, NULL, NULL },
800 { SC_10_1_10_5, NETVAL NETINFO BINDINGMETHODS, MANUAL, NULL, NULL },
801 { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
802 { COMMENT_DEPRECATED, "--- " KEY_PREFIX NETPROP NETINFO BROADCAST SERVER TAG " default value ---", NULL, NULL, NULL },
803 { SC_10_1_10_5, NETVAL NETINFO, DEFAULT SERVER TAG, "network", NULL },
804 { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
805 { COMMENT_DEPRECATED, "", NULL, NULL, NULL },
806
807 { GROUP, NETPROP PPP, KEY_PREFIX NETENT PPP " Entity Keys", NULL, NULL },
808
809 { SC_10_3, NETPROP PPP, ACSP ENABLED, NULL, CFNUMBER_BOOL },
810 { SC_10_2, NETPROP PPP, CONNECTTIME, NULL, CFNUMBER },
811 { SC_10_2, NETPROP PPP, DEVICE LAST CAUSE, NULL, CFNUMBER },
812 { SC_10_1, NETPROP PPP, DIALONDEMAND, NULL, CFNUMBER_BOOL },
813 { SC_10_4, NETPROP PPP, DISCONNECTONFASTUSERSWITCH, NULL, CFNUMBER_BOOL },
814 { SC_10_1, NETPROP PPP, DISCONNECTONIDLE, NULL, CFNUMBER_BOOL },
815 { SC_10_1, NETPROP PPP, DISCONNECTONIDLETIMER, NULL, CFNUMBER },
816 { SC_10_1, NETPROP PPP, DISCONNECTONLOGOUT, NULL, CFNUMBER_BOOL },
817 { SC_10_2, NETPROP PPP, DISCONNECTONSLEEP, NULL, CFNUMBER_BOOL },
818 { SC_10_3, NETPROP PPP, DISCONNECTTIME, NULL, CFNUMBER },
819 { SC_10_1, NETPROP PPP, IDLEREMINDERTIMER, NULL, CFNUMBER },
820 { SC_10_1, NETPROP PPP, IDLEREMINDER, NULL, CFNUMBER_BOOL },
821 { SC_10_2, NETPROP PPP, LAST CAUSE, NULL, CFNUMBER },
822 { SC_10_1, NETPROP PPP, LOGFILE, NULL, CFSTRING },
823 { SC_10_2, NETPROP PPP, PLUGINS, NULL, CFARRAY_CFSTRING },
824 { SC_10_3, NETPROP PPP, RETRYCONNECTTIME, NULL, CFNUMBER },
825 { SC_10_1, NETPROP PPP, SESSIONTIMER, NULL, CFNUMBER },
826 { SC_10_2, NETPROP PPP, STATUS, NULL, CFNUMBER },
827 { SC_10_2, NETPROP PPP, USE SESSIONTIMER, NULL, CFNUMBER_BOOL },
828 { SC_10_1, NETPROP PPP, VERBOSELOGGING, NULL, CFNUMBER_BOOL },
829 { COMMENT, "", NULL, NULL, NULL },
830
831 { COMMENT, "--- " AUTH ": ---", NULL, NULL, NULL },
832 { SC_10_3, NETPROP PPP, AUTH EAP PLUGINS, NULL, CFARRAY_CFSTRING },
833 { SC_10_1, NETPROP PPP, AUTH NAME, NULL, CFSTRING },
834 { SC_10_1, NETPROP PPP, AUTH PASSWORD, NULL, CFSTRING },
835 { SC_10_1, NETPROP PPP, AUTH PASSWORD ENCRYPTION, NULL, CFSTRING },
836 { SC_10_3, NETPROP PPP, AUTH PROMPT, NULL, CFSTRING },
837 { SC_10_1, NETPROP PPP, AUTH PROTOCOL, NULL, CFARRAY_CFSTRING },
838 { COMMENT, "", NULL, NULL, NULL },
839 { COMMENT, "--- " KEY_PREFIX NETPROP PPP AUTH PASSWORD ENCRYPTION " values ---", NULL, NULL, NULL },
840 { SC_10_3, NETVAL PPP AUTH PASSWORD ENCRYPTION, KEYCHAIN, NULL, NULL },
841 { SC_10_5, NETVAL PPP AUTH PASSWORD ENCRYPTION, TOKEN, NULL, NULL },
842 { COMMENT, "", NULL, NULL, NULL },
843 { COMMENT, "--- " KEY_PREFIX NETPROP PPP AUTH PROMPT " values ---", NULL, NULL, NULL },
844 { SC_10_3, NETVAL PPP AUTH PROMPT, BEFORE, NULL, CFSTRING },
845 { SC_10_3, NETVAL PPP AUTH PROMPT, AFTER, NULL, CFSTRING },
846 { COMMENT, "", NULL, NULL, NULL },
847 { COMMENT, "--- " KEY_PREFIX NETPROP PPP AUTH PROTOCOL " values ---", NULL, NULL, NULL },
848 { SC_10_1, NETVAL PPP AUTH PROTOCOL, CHAP, NULL, CFSTRING },
849 { SC_10_3, NETVAL PPP AUTH PROTOCOL, EAP, NULL, CFSTRING },
850 { SC_10_3, NETVAL PPP AUTH PROTOCOL, MSCHAP1, NULL, CFSTRING },
851 { SC_10_3, NETVAL PPP AUTH PROTOCOL, MSCHAP2, NULL, CFSTRING },
852 { SC_10_1, NETVAL PPP AUTH PROTOCOL, PAP, NULL, CFSTRING },
853 { COMMENT, "", NULL, NULL, NULL },
854
855 { COMMENT, "--- " COMM ": ---", NULL, NULL, NULL },
856 { SC_10_1, NETPROP PPP, COMM ALTERNATE REMOTEADDRESS, NULL, CFSTRING },
857 { SC_10_1, NETPROP PPP, COMM CONNECTDELAY, NULL, CFNUMBER },
858 { SC_10_1, NETPROP PPP, COMM DISPLAYTERMINALWINDOW, NULL, CFNUMBER_BOOL },
859 { SC_10_1, NETPROP PPP, COMM REDIALCOUNT, NULL, CFNUMBER },
860 { SC_10_1, NETPROP PPP, COMM REDIAL ENABLED, NULL, CFNUMBER_BOOL },
861 { SC_10_1, NETPROP PPP, COMM REDIALINTERVAL, NULL, CFNUMBER },
862 { SC_10_1, NETPROP PPP, COMM REMOTEADDRESS, NULL, CFSTRING },
863 { SC_10_1, NETPROP PPP, COMM TERMINALSCRIPT, NULL, CFSTRING },
864 { SC_10_2, NETPROP PPP, COMM USE TERMINALSCRIPT, NULL, CFNUMBER_BOOL },
865 { COMMENT, "", NULL, NULL, NULL },
866
867 { COMMENT, "--- " CCP ": ---", NULL, NULL, NULL },
868 { SC_10_2, NETPROP PPP, CCP ENABLED, NULL, CFNUMBER_BOOL },
869 { SC_10_4, NETPROP PPP, CCP MPPE40 ENABLED, NULL, CFNUMBER_BOOL },
870 { SC_10_4, NETPROP PPP, CCP MPPE128 ENABLED, NULL, CFNUMBER_BOOL },
871 { COMMENT, "", NULL, NULL, NULL },
872
873 { COMMENT, "--- " IPCP ": ---", NULL, NULL, NULL },
874 { SC_10_1, NETPROP PPP, IPCP COMPRESSIONVJ, NULL, CFNUMBER_BOOL },
875 { SC_10_4, NETPROP PPP, IPCP USE PEER DNS, NULL, CFNUMBER_BOOL },
876 { COMMENT, "", NULL, NULL, NULL },
877
878 { COMMENT, "--- " LCP ": ---", NULL, NULL, NULL },
879 { SC_10_1, NETPROP PPP, LCP ECHO ENABLED, NULL, CFNUMBER_BOOL },
880 { SC_10_1, NETPROP PPP, LCP ECHOFAILURE, NULL, CFNUMBER },
881 { SC_10_1, NETPROP PPP, LCP ECHOINTERVAL, NULL, CFNUMBER },
882 { SC_10_1, NETPROP PPP, LCP COMPRESSIONACFIELD, NULL, CFNUMBER_BOOL },
883 { SC_10_1, NETPROP PPP, LCP COMPRESSIONPFIELD, NULL, CFNUMBER_BOOL },
884 { SC_10_1, NETPROP PPP, LCP MRU, NULL, CFNUMBER },
885 { SC_10_1, NETPROP PPP, LCP MTU, NULL, CFNUMBER },
886 { SC_10_1, NETPROP PPP, LCP RECEIVEACCM, NULL, CFNUMBER },
887 { SC_10_1, NETPROP PPP, LCP TRANSMITACCM, NULL, CFNUMBER },
888 { COMMENT, "", NULL, NULL, NULL },
889
890 { GROUP_PRIVATE, NETPROP PPP, KEY_PREFIX NETENT PPP " Entity Keys", NULL, NULL },
891
892 { COMMENT_PRIVATE, "--- " ONDEMAND ": ---", NULL, NULL, NULL },
893 { SC_10_5_PRIVATE, NETPROP PPP, ONDEMAND DOMAINS, NULL, CFARRAY_CFSTRING },
894 { SC_10_5_PRIVATE, NETPROP PPP, ONDEMAND ENABLED, NULL, CFNUMBER_BOOL },
895 { SC_10_5_PRIVATE, NETPROP PPP, ONDEMAND HOSTNAME, NULL, CFSTRING }, // DEPRECATED, use kSCNetworkConnectionSelectionOptionOnDemandHostName
896 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PPP, ONDEMAND MATCH DOMAINS ALWAYS, NULL, CFARRAY_CFSTRING },
897 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PPP, ONDEMAND MATCH DOMAINS ONRETRY, NULL, CFARRAY_CFSTRING },
898 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PPP, ONDEMAND MATCH DOMAINS NEVER, NULL, CFARRAY_CFSTRING },
899 { SC_10_5_PRIVATE, NETPROP PPP, ONDEMAND MODE, NULL, CFSTRING },
900 { SC_10_5_PRIVATE, NETPROP PPP, ONDEMAND PRIORITY, NULL, CFSTRING },
901 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
902 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP PPP ONDEMAND MODE " values ---", NULL, NULL, NULL },
903 { SC_10_5_PRIVATE, NETVAL PPP ONDEMAND MODE, AGGRESSIVE, NULL, NULL },
904 { SC_10_5_PRIVATE, NETVAL PPP ONDEMAND MODE, CONSERVATIVE, NULL, NULL },
905 { SC_10_5_PRIVATE, NETVAL PPP ONDEMAND MODE, COMPATIBLE, NULL, NULL },
906 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
907 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP PPP ONDEMAND PRIORITY " values ---", NULL, NULL, NULL },
908 { SC_10_5_PRIVATE, NETVAL PPP ONDEMAND PRIORITY, DEFAULT, NULL, NULL },
909 { SC_10_5_PRIVATE, NETVAL PPP ONDEMAND PRIORITY, HIGH, NULL, NULL },
910 { SC_10_5_PRIVATE, NETVAL PPP ONDEMAND PRIORITY, LOW, NULL, NULL },
911 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
912
913 { GROUP, NETPROP PPPOE, KEY_PREFIX NETENT PPPOE " Entity Keys", NULL, NULL },
914
915 { COMMENT, "* RESERVED FOR FUTURE USE *", NULL, NULL, NULL },
916 { COMMENT, "", NULL, NULL, NULL },
917
918 { GROUP, NETPROP PPPSERIAL, KEY_PREFIX NETENT PPPSERIAL " Entity Keys", NULL, NULL },
919
920 { COMMENT, "* RESERVED FOR FUTURE USE *", NULL, NULL, NULL },
921 { COMMENT, "", NULL, NULL, NULL },
922
923 { GROUP, NETPROP PPTP, KEY_PREFIX NETENT PPTP " Entity Keys", NULL, NULL },
924
925 { COMMENT, "* RESERVED FOR FUTURE USE *", NULL, NULL, NULL },
926 { COMMENT, "", NULL, NULL, NULL },
927
928 { GROUP, NETPROP L2TP, KEY_PREFIX NETENT L2TP " Entity Keys", NULL, NULL },
929
930 { SC_10_3, NETPROP L2TP, IPSEC SHAREDSECRET, NULL, CFSTRING },
931 { SC_10_3, NETPROP L2TP, IPSEC SHAREDSECRET ENCRYPTION, NULL, CFSTRING },
932 { SC_10_3, NETPROP L2TP, TRANSPORT, NULL, CFSTRING },
933 { COMMENT, "", NULL, NULL, NULL },
934 { COMMENT, "--- " KEY_PREFIX NETPROP L2TP IPSEC SHAREDSECRET ENCRYPTION " values ---", NULL, NULL, NULL },
935 { SC_10_3, NETVAL L2TP IPSEC SHAREDSECRET ENCRYPTION, KEYCHAIN, NULL, NULL },
936 { COMMENT, "", NULL, NULL, NULL },
937 { COMMENT, "--- " KEY_PREFIX NETPROP L2TP TRANSPORT " values ---", NULL, NULL, NULL },
938 { SC_10_3, NETVAL L2TP TRANSPORT, IP, NULL, NULL },
939 { SC_10_3, NETVAL L2TP TRANSPORT, IPSEC, NULL, NULL },
940 { COMMENT, "", NULL, NULL, NULL },
941
942 { GROUP, NETPROP PROXIES, KEY_PREFIX NETENT PROXIES " Entity Keys", NULL, NULL },
943
944 { SC_10_1, NETPROP PROXIES, EXCEPTIONSLIST, NULL, CFARRAY_CFSTRING },
945 { SC_10_4, NETPROP PROXIES, EXCLUDESIMPLEHOSTNAMES, NULL, CFNUMBER_BOOL },
946 { SC_10_1, NETPROP PROXIES, FTP ENABLE, NULL, CFNUMBER_BOOL },
947 { SC_10_1, NETPROP PROXIES, FTP PASSIVE, NULL, CFNUMBER_BOOL },
948 { SC_10_1, NETPROP PROXIES, FTP PORT, NULL, CFNUMBER },
949 { SC_10_1, NETPROP PROXIES, FTP PROXY, NULL, CFSTRING },
950 { SC_10_1, NETPROP PROXIES, GOPHER ENABLE, NULL, CFNUMBER_BOOL },
951 { SC_10_1, NETPROP PROXIES, GOPHER PORT, NULL, CFNUMBER },
952 { SC_10_1, NETPROP PROXIES, GOPHER PROXY, NULL, CFSTRING },
953 { SC_10_1, NETPROP PROXIES, HTTP ENABLE, NULL, CFNUMBER_BOOL },
954 { SC_10_1, NETPROP PROXIES, HTTP PORT, NULL, CFNUMBER },
955 { SC_10_1, NETPROP PROXIES, HTTP PROXY, NULL, CFSTRING },
956 { SC_10_1, NETPROP PROXIES, HTTPS ENABLE, NULL, CFNUMBER_BOOL },
957 { SC_10_1, NETPROP PROXIES, HTTPS PORT, NULL, CFNUMBER },
958 { SC_10_1, NETPROP PROXIES, HTTPS PROXY, NULL, CFSTRING },
959 { SC_10_1, NETPROP PROXIES, RTSP ENABLE, NULL, CFNUMBER_BOOL },
960 { SC_10_1, NETPROP PROXIES, RTSP PORT, NULL, CFNUMBER },
961 { SC_10_1, NETPROP PROXIES, RTSP PROXY, NULL, CFSTRING },
962 { SC_10_1, NETPROP PROXIES, SOCKS ENABLE, NULL, CFNUMBER_BOOL },
963 { SC_10_1, NETPROP PROXIES, SOCKS PORT, NULL, CFNUMBER },
964 { SC_10_1, NETPROP PROXIES, SOCKS PROXY, NULL, CFSTRING },
965 { SC_10_4, NETPROP PROXIES, PROXY AUTOCONFIG ENABLE, NULL, CFNUMBER_BOOL },
966 { SC_10_7_IPHONE_4_0, NETPROP PROXIES, PROXY AUTOCONFIG JAVASCRIPT, NULL, CFSTRING },
967 { SC_10_4, NETPROP PROXIES, PROXY AUTOCONFIG URLSTRING, NULL, CFSTRING },
968 { SC_10_4, NETPROP PROXIES, PROXY AUTODISCOVERY ENABLE, NULL, CFNUMBER_BOOL },
969 { COMMENT, "", NULL, NULL, NULL },
970
971 { GROUP_PRIVATE, NETPROP PROXIES, KEY_PREFIX NETENT PROXIES " Entity Keys", NULL, NULL },
972
973 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL MATCH DOMAINS, NULL, CFARRAY_CFSTRING},
974 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL MATCH ORDERS, NULL, CFARRAY_CFNUMBER},
975 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
976 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SCOPED, "__SCOPED__", CFDICTIONARY},
977 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL, "__SUPPLEMENTAL__", CFARRAY_CFDICTIONARY},
978 { SC_10_7_IPHONE_5_0_PRIVATE, NETPROP PROXIES, SUPPLEMENTAL MATCH DOMAIN, "__MATCH_DOMAIN__", CFSTRING},
979 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
980
981 { GROUP_PRIVATE, NETPROP SERVICE, KEY_PREFIX NETENT SERVICE " Entity Keys", NULL, NULL },
982
983 { SC_10_6_IPHONE_2_0_PRIVATE, NETPROP SERVICE, PRIMARYRANK, NULL, CFSTRING },
984 { SC_10_6_IPHONE_2_0_PRIVATE, NETPROP SERVICE, USERDEFINEDNAME, NULL, CFSTRING },
985 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
986 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP SERVICE PRIMARYRANK " values ---", NULL, NULL, NULL },
987 { SC_10_6_IPHONE_2_0_PRIVATE, NETVAL SERVICE PRIMARYRANK, FIRST, NULL },
988 { SC_10_6_IPHONE_2_0_PRIVATE, NETVAL SERVICE PRIMARYRANK, LAST, NULL },
989 { SC_10_6_IPHONE_2_0_PRIVATE, NETVAL SERVICE PRIMARYRANK, NEVER, NULL },
990 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
991
992 { GROUP, NETPROP SMB, KEY_PREFIX NETENT SMB " Entity Keys", NULL, NULL },
993
994 { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
995 { SC_10_5, NETPROP SMB, NETBIOS NAME, NULL, CFSTRING },
996 { SC_10_5, NETPROP SMB, NETBIOS NODE TYPE, NULL, CFSTRING },
997 { SC_10_5_10_7, NETPROP SMB, NETBIOS SCOPE, NULL, CFSTRING },
998 { SC_10_5, NETPROP SMB, WINS ADDRESSES, NULL, CFARRAY_CFSTRING },
999 { SC_10_5, NETPROP SMB, WORKGROUP, NULL, CFSTRING },
1000 { COMMENT, "", NULL, NULL, NULL },
1001 { COMMENT, "--- " KEY_PREFIX NETPROP SMB NETBIOS NODE TYPE " values ---", NULL, NULL, NULL },
1002 { SC_10_5, NETVAL SMB NETBIOS NODE TYPE, BROADCAST, NULL },
1003 { SC_10_5, NETVAL SMB NETBIOS NODE TYPE, PEER, NULL },
1004 { SC_10_5, NETVAL SMB NETBIOS NODE TYPE, MIXED, NULL },
1005 { SC_10_5, NETVAL SMB NETBIOS NODE TYPE, HYBRID, NULL },
1006 { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
1007 { COMMENT, "", NULL, NULL, NULL },
1008
1009 { GROUP_PRIVATE, NETPROP VPN, KEY_PREFIX NETENT VPN " Entity Keys", NULL, NULL },
1010
1011 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, AUTH NAME, NULL, CFSTRING },
1012 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, AUTH PASSWORD, NULL, CFSTRING },
1013 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, AUTH PASSWORD ENCRYPTION, NULL, CFSTRING },
1014 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, AUTHENTICATIONMETHOD, NULL, CFSTRING },
1015 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, CONNECTTIME, NULL, CFSTRING },
1016 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, DISCONNECTONFASTUSERSWITCH, NULL, CFNUMBER_BOOL },
1017 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, DISCONNECTONIDLE, NULL, CFNUMBER_BOOL },
1018 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, DISCONNECTONIDLETIMER, NULL, CFNUMBER },
1019 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, DISCONNECTONLOGOUT, NULL, CFNUMBER_BOOL },
1020 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, DISCONNECTONSLEEP, NULL, CFNUMBER_BOOL },
1021 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, LOCALCERTIFICATE, NULL, CFDATA },
1022 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, LOGFILE, NULL, CFSTRING },
1023 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, MTU, NULL, CFNUMBER },
1024 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, ONDEMAND ENABLED, NULL, CFNUMBER_BOOL },
1025 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, ONDEMAND MATCH DOMAINS ALWAYS, NULL, CFARRAY_CFSTRING },
1026 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, ONDEMAND MATCH DOMAINS ONRETRY, NULL, CFARRAY_CFSTRING },
1027 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, ONDEMAND MATCH DOMAINS NEVER, NULL, CFARRAY_CFSTRING },
1028 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, REMOTEADDRESS, NULL, CFSTRING },
1029 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, STATUS, NULL, CFNUMBER },
1030 { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP VPN, VERBOSELOGGING, NULL, CFNUMBER_BOOL },
1031 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
1032 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP VPN AUTHENTICATIONMETHOD " values ---", NULL, NULL, NULL },
1033 { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL VPN AUTHENTICATIONMETHOD, PASSWORD, NULL, NULL },
1034 { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL VPN AUTHENTICATIONMETHOD, CERTIFICATE, NULL, NULL },
1035 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
1036 { COMMENT_PRIVATE, "--- " KEY_PREFIX NETPROP VPN AUTH PASSWORD ENCRYPTION " values ---", NULL, NULL, NULL },
1037 { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL VPN AUTH PASSWORD ENCRYPTION, KEYCHAIN, NULL, NULL },
1038 { SC_10_7_IPHONE_4_0_PRIVATE, NETVAL VPN AUTH PASSWORD ENCRYPTION, PROMPT, NULL, NULL },
1039 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
1040
1041 { GROUP, USERSENT CONSOLEUSER, KEY_PREFIX COMP USERS " Entity Keys", NULL, NULL },
1042
1043 { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
1044 { SC_10_1, USERSENT, CONSOLEUSER, NULL, NULL },
1045 { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
1046 { COMMENT, "", NULL, NULL, NULL },
1047
1048 { GROUP, SYSTEMPROP COMPUTERNAME, KEY_PREFIX COMP SYSTEM " Properties", NULL, NULL },
1049
1050 { SC_10_1, SYSTEMPROP, COMPUTERNAME, NULL, CFSTRING },
1051 { SC_10_1, SYSTEMPROP, COMPUTERNAME ENCODING, NULL, CFNUMBER },
1052 { COMMENT, "", NULL, NULL, NULL },
1053
1054 { GROUP_PRIVATE, SYSTEMPROP COMPUTERNAME, KEY_PREFIX COMP SYSTEM " Properties", NULL, NULL },
1055
1056 { SC_10_5_PRIVATE, SYSTEMPROP, COMPUTERNAME REGION, NULL, CFNUMBER },
1057 { SC_10_5_PRIVATE, SYSTEMPROP, HOSTNAME, NULL, CFSTRING },
1058 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
1059
1060 { GROUP, DYNAMICSTORE DOMAIN, "SCDynamicStore \"domain\" prefixes", NULL, NULL },
1061
1062 { SC_10_1, DYNAMICSTORE DOMAIN, FILE, "File:", NULL },
1063 { SC_10_1, DYNAMICSTORE DOMAIN, PLUGIN, "Plugin:", NULL },
1064 { SC_10_1, DYNAMICSTORE DOMAIN, SETUP, "Setup:", NULL },
1065 { SC_10_1, DYNAMICSTORE DOMAIN, STATE, "State:", NULL },
1066 { SC_10_1, DYNAMICSTORE DOMAIN, PREFS, "Prefs:", NULL },
1067 { COMMENT, "", NULL, NULL, NULL },
1068
1069 { GROUP, DYNAMICSTORE SETUPPROP, "Preference (\"location\") Keys", NULL, NULL },
1070
1071 { SC_10_1, DYNAMICSTORE SETUPPROP, CURRENTSET, NULL, CFSTRING },
1072 { SC_10_1, DYNAMICSTORE SETUPPROP, LAST UPDATED, NULL, NULL },
1073 { COMMENT, "", NULL, NULL, NULL },
1074
1075 { GROUP, DYNAMICSTORE NETPROP, "Common/shared Keys", NULL, NULL },
1076
1077 { SC_10_1, DYNAMICSTORE NETPROP, INTERFACES, NULL, CFARRAY_CFSTRING },
1078 { SC_10_1, DYNAMICSTORE NETPROP, PRIMARYINTERFACE, NULL, CFSTRING },
1079 { SC_10_1, DYNAMICSTORE NETPROP, PRIMARYSERVICE, NULL, CFSTRING },
1080 { SC_10_1, DYNAMICSTORE NETPROP, SERVICEIDS, NULL, CFARRAY_CFSTRING },
1081 // { COMMENT, "", NULL, NULL, NULL },
1082
1083 { GROUP_PRIVATE, VIRTUALNETWORKINTERFACES, "Virtual Network Interface Keys", NULL, NULL },
1084
1085 { SC_10_5_PRIVATE, VIRTUALPROP BOND, INTERFACES, NULL, CFARRAY_CFSTRING },
1086 { SC_10_5_PRIVATE, VIRTUALPROP BOND, MODE, NULL, CFNUMBER },
1087 { SC_10_5_PRIVATE, VIRTUALPROP BOND, OPTIONS, NULL, CFDICTIONARY },
1088 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
1089 { SC_10_7_IPHONE_4_0_PRIVATE, VIRTUALPROP BRIDGE, INTERFACES, NULL, CFARRAY_CFSTRING },
1090 { SC_10_7_IPHONE_4_0_PRIVATE, VIRTUALPROP BRIDGE, OPTIONS, NULL, CFDICTIONARY },
1091 { COMMENT_PRIVATE, "", NULL, NULL, NULL },
1092 { SC_10_5_PRIVATE, VIRTUALPROP VLAN, INTERFACE, NULL, CFSTRING },
1093 { SC_10_5_PRIVATE, VIRTUALPROP VLAN, TAG, NULL, CFNUMBER },
1094 { SC_10_5_PRIVATE, VIRTUALPROP VLAN, OPTIONS, NULL, CFDICTIONARY },
1095 // { COMMENT_PRIVATE, "", NULL, NULL, NULL },
1096
1097 //{ GROUP, "DEPRECATED", "Deprecated schema definition keys", NULL, NULL },
1098
1099 { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL },
1100 { SC_10_1_10_4, USERSPROP CONSOLEUSER, NAME, NULL, CFSTRING },
1101 { SC_10_1_10_4, USERSPROP CONSOLEUSER, UID, NULL, CFNUMBER },
1102 { SC_10_1_10_4, USERSPROP CONSOLEUSER, GID, NULL, CFNUMBER },
1103 { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL },
1104 // { COMMENT, "", NULL, NULL, NULL },
1105
1106 { END, NULL, NULL, NULL, NULL },
1107 };
1108
1109 static int maxkbuf = 0;
1110 static char *maxkstr = NULL;
1111 static int maxvbuf = 0;
1112 static char *maxvstr = NULL;
1113
1114 static __inline__ void
1115 setmax(int *max, char **maxstr, char *str)
1116 {
1117 int l;
1118
1119 l = strlen(str);
1120 if (l > *max) {
1121 if (*maxstr) free(*maxstr);
1122 *maxstr = strdup(str);
1123 *max = l;
1124 }
1125 return;
1126 }
1127
1128 enum {
1129 gen_header_e,
1130 gen_comments_e,
1131 gen_comments_private_e,
1132 gen_headerdoc_e,
1133 gen_headerdoc_private_e,
1134 gen_hfile_e,
1135 gen_hfile_private_e,
1136 gen_cfile_e,
1137 };
1138
1139 void
1140 print_comment(schemaDefinition *def)
1141 {
1142 char kbuf[256];
1143 char vbuf[256];
1144
1145 snprintf(kbuf, sizeof(kbuf), KEY_PREFIX "%s%s",
1146 def->prefix, def->key);
1147 snprintf(vbuf, sizeof(vbuf), "\"%s\"",
1148 def->value ? def->value : def->key);
1149
1150 if (def->type)
1151 printf(" * %-50s %-30s %s\n",
1152 kbuf, vbuf, def->type);
1153 else
1154 printf(" * %-50s %s\n",
1155 kbuf, vbuf);
1156
1157 return;
1158 }
1159
1160 void
1161 print_define(schemaDefinition *def)
1162 {
1163 printf("%s %s\n", def->prefix, def->key);
1164 return;
1165 }
1166
1167 void
1168 print_headerdoc(schemaDefinition *def)
1169 {
1170 char kbuf[256];
1171 char vbuf[256];
1172
1173 snprintf(kbuf, sizeof(kbuf), KEY_PREFIX "%s%s",
1174 def->prefix, def->key);
1175 setmax(&maxkbuf, &maxkstr, kbuf);
1176
1177 snprintf(vbuf, sizeof(vbuf), "\"%s\"",
1178 def->value ? def->value : def->key);
1179 setmax(&maxvbuf, &maxvstr, vbuf);
1180
1181 printf("\n");
1182
1183 printf("/*!\n");
1184 printf(" @const %s\n", kbuf);
1185 switch (def->control) {
1186 case SC_10_1:
1187 printf(" @availability Introduced in Mac OS X 10.1.\n");
1188 break;
1189 case SC_10_2:
1190 printf(" @availability Introduced in Mac OS X 10.2.\n");
1191 break;
1192 case SC_10_3:
1193 printf(" @availability Introduced in Mac OS X 10.3.\n");
1194 break;
1195 case SC_10_1_10_4:
1196 printf(" @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.4.\n");
1197 break;
1198 case SC_10_4:
1199 printf(" @availability Introduced in Mac OS X 10.4.\n");
1200 break;
1201 case SC_10_1_10_5:
1202 printf(" @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.5.\n");
1203 break;
1204 case SC_10_5:
1205 printf(" @availability Introduced in Mac OS X 10.5.\n");
1206 break;
1207 case SC_10_5_10_7:
1208 printf(" @availability Introduced in Mac OS X 10.5, but later deprecated in Mac OS X 10.7.\n");
1209 break;
1210 case SC_10_5_PRIVATE:
1211 printf(" @availability Introduced in Mac OS X 10.5.\n");
1212 break;
1213 case SC_10_1_10_6:
1214 printf(" @availability Introduced in Mac OS X 10.1, but later deprecated in Mac OS X 10.6.\n");
1215 break;
1216 case SC_10_2_10_6:
1217 printf(" @availability Introduced in Mac OS X 10.2, but later deprecated in Mac OS X 10.6.\n");
1218 break;
1219 case SC_10_6_IPHONE_2_0:
1220 case SC_10_6_IPHONE_2_0_PRIVATE:
1221 printf(" @availability Introduced in Mac OS X 10.6.\n");
1222 break;
1223 case SC_10_6_IPHONE_3_0:
1224 case SC_10_6_IPHONE_3_0_PRIVATE:
1225 printf(" @availability Introduced in Mac OS X 10.6.\n");
1226 break;
1227 case SC_10_7_IPHONE_4_0:
1228 case SC_10_7_IPHONE_4_0_PRIVATE:
1229 case SC_10_7_IPHONE_5_0_PRIVATE:
1230 printf(" @availability Introduced in Mac OS X 10.7.\n");
1231 break;
1232 case SC_IPHONE_2_0_PRIVATE:
1233 printf(" @availability Introduced in iPhone OS 2.0.\n");
1234 break;
1235 }
1236 printf(" */\n");
1237 printf("extern const CFStringRef %s;\n", kbuf);
1238
1239 return;
1240 }
1241
1242 void
1243 print_hfile(schemaDefinition *def)
1244 {
1245 char kbuf[256];
1246 char vbuf[256];
1247
1248 snprintf(kbuf, sizeof(kbuf), KEY_PREFIX "%s%s",
1249 def->prefix, def->key);
1250 setmax(&maxkbuf, &maxkstr, kbuf);
1251
1252 snprintf(vbuf, sizeof(vbuf), "\"%s\"",
1253 def->value ? def->value : def->key);
1254 setmax(&maxvbuf, &maxvstr, vbuf);
1255
1256 printf("\n");
1257
1258 switch (def->control) {
1259 case SC_10_1:
1260 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/))\n", kbuf);
1261 break;
1262 case SC_10_2:
1263 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/))\n", kbuf);
1264 break;
1265 case SC_10_3:
1266 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/))\n", kbuf);
1267 break;
1268 case SC_10_1_10_4:
1269 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
1270 break;
1271 case SC_10_4:
1272 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/))\n", kbuf);
1273 break;
1274 case SC_10_1_10_5:
1275 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
1276 break;
1277 case SC_10_5:
1278 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))\n", kbuf);
1279 break;
1280 case SC_10_5_10_7:
1281 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_7,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
1282 break;
1283 case SC_10_5_PRIVATE:
1284 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/))\n", kbuf);
1285 break;
1286 case SC_10_1_10_6:
1287 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
1288 break;
1289 case SC_10_2_10_6:
1290 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_6,__IPHONE_NA,__IPHONE_NA))\n", kbuf);
1291 break;
1292 case SC_10_6_IPHONE_2_0:
1293 case SC_10_6_IPHONE_2_0_PRIVATE:
1294 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/))\n", kbuf);
1295 break;
1296 case SC_10_6_IPHONE_3_0:
1297 case SC_10_6_IPHONE_3_0_PRIVATE:
1298 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/))\n", kbuf);
1299 break;
1300 case SC_10_7_IPHONE_4_0:
1301 case SC_10_7_IPHONE_4_0_PRIVATE:
1302 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/))\n", kbuf);
1303 break;
1304 case SC_10_7_IPHONE_5_0_PRIVATE:
1305 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/))\n", kbuf);
1306 break;
1307 case SC_IPHONE_2_0_PRIVATE:
1308 printf(" " SC_SCHEMA_DECLARATION "(%s, __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0/*SPI*/))\n", kbuf);
1309 break;
1310 default:
1311 printf(" " SC_SCHEMA_DECLARATION "(%s,)\n", kbuf);
1312 break;
1313 }
1314
1315 printf(" #define %-48s \\\n",
1316 kbuf);
1317 printf(" " SC_SCHEMA_KV "(%-48s \\\n",
1318 kbuf);
1319 printf(" ,%-48s \\\n",
1320 vbuf);
1321 printf(" ,%-48s )\n",
1322 def->type ? def->type : "");
1323
1324 return;
1325 }
1326
1327 void
1328 dump_names(int type)
1329 {
1330 int i;
1331
1332 for (i = 0; TRUE; i++) {
1333 switch (names[i].control) {
1334 case END: {
1335 goto done;
1336 }
1337
1338 case COMMENT: {
1339 switch (type) {
1340 case gen_comments_e:
1341 if (names[i].prefix)
1342 if (strlen(names[i].prefix) > 0)
1343 printf(" * %s\n", names[i].prefix);
1344 else
1345 printf(" *\n");
1346 break;
1347 default:
1348 break;
1349 }
1350 break;
1351 }
1352
1353 case COMMENT_PRIVATE: {
1354 switch (type) {
1355 case gen_comments_private_e:
1356 if (names[i].prefix)
1357 if (strlen(names[i].prefix) > 0)
1358 printf(" * %s\n", names[i].prefix);
1359 else
1360 printf(" *\n");
1361 break;
1362 default:
1363 break;
1364 }
1365 break;
1366 }
1367
1368 case COMMENT_DEPRECATED: {
1369 break;
1370 }
1371
1372 case DEFINE: {
1373 switch (type) {
1374 case gen_hfile_e:
1375 printf("\n");
1376 print_define(&names[i]);
1377 break;
1378 case gen_cfile_e:
1379 if ((strcmp(names[i].prefix, "#if") == 0) ||
1380 (strcmp(names[i].prefix, "#ifdef") == 0) ||
1381 (strcmp(names[i].prefix, "#ifndef") == 0))
1382 printf("\n");
1383 print_define(&names[i]);
1384 if (strcmp(names[i].prefix, "#endif") == 0)
1385 printf("\n");
1386 break;
1387 default:
1388 break;
1389 }
1390 break;
1391 }
1392
1393 case DEFINE_PRIVATE: {
1394 switch (type) {
1395 case gen_hfile_private_e:
1396 printf("\n");
1397 print_define(&names[i]);
1398 break;
1399 case gen_cfile_e:
1400 if ((strcmp(names[i].prefix, "#if") == 0) ||
1401 (strcmp(names[i].prefix, "#ifdef") == 0) ||
1402 (strcmp(names[i].prefix, "#ifndef") == 0))
1403 printf("\n");
1404 print_define(&names[i]);
1405 if (strcmp(names[i].prefix, "#endif") == 0)
1406 printf("\n");
1407 break;
1408 default:
1409 break;
1410 }
1411 break;
1412 }
1413
1414 case GROUP:
1415 case GROUP_DEPRECATED: {
1416 switch (type) {
1417 case gen_comments_e:
1418 if (names[i].control == GROUP) {
1419 if (names[i].key)
1420 printf(" * %s\n *\n", names[i].key);
1421 }
1422 break;
1423 case gen_headerdoc_e:
1424 if (names[i].prefix)
1425 printf("\n/*!\n @group %s\n */\n", names[i].key);
1426 break;
1427 default:
1428 break;
1429 }
1430 break;
1431 }
1432
1433 case GROUP_PRIVATE: {
1434 switch (type) {
1435 case gen_comments_private_e:
1436 if (names[i].key)
1437 printf(" * %s\n *\n", names[i].key);
1438 break;
1439 case gen_headerdoc_private_e:
1440 if (names[i].prefix)
1441 printf("\n/*!\n @group %s\n */\n", names[i].key);
1442 break;
1443 default:
1444 break;
1445 }
1446 break;
1447 }
1448
1449 default: {
1450 char kbuf[256];
1451 char vbuf[256];
1452
1453 switch (type) {
1454 case gen_header_e:
1455 snprintf(kbuf, sizeof(kbuf), KEY_PREFIX "%s%s",
1456 names[i].prefix, names[i].key);
1457
1458 if (names[i].value)
1459 snprintf(vbuf, sizeof(vbuf), "SCSTR(\"%s\")",
1460 names[i].value);
1461 else
1462 snprintf(vbuf, sizeof(vbuf), "SCSTR(\"%s\")",
1463 names[i].key);
1464
1465 printf("#define %-50s %s\n",
1466 kbuf, vbuf);
1467 break;
1468
1469 case gen_comments_e:
1470 switch (names[i].control) {
1471 case SC_10_1_10_4:
1472 case SC_10_1_10_5:
1473 case SC_10_1_10_6:
1474 case SC_10_2_10_6:
1475 // don't report deprecated keys
1476 break;
1477 case SC_10_5_PRIVATE:
1478 case SC_10_6_IPHONE_2_0_PRIVATE:
1479 case SC_10_6_IPHONE_3_0_PRIVATE:
1480 case SC_10_7_IPHONE_4_0_PRIVATE:
1481 case SC_10_7_IPHONE_5_0_PRIVATE:
1482 case SC_IPHONE_2_0_PRIVATE:
1483 // don't report private definitions
1484 break;
1485 default:
1486 print_comment(&names[i]);
1487 break;
1488 }
1489 break;
1490 case gen_comments_private_e:
1491 switch (names[i].control) {
1492 case SC_10_1_10_4:
1493 case SC_10_1_10_5:
1494 case SC_10_1_10_6:
1495 case SC_10_2_10_6:
1496 // don't report deprecated keys
1497 break;
1498 case SC_10_5_PRIVATE:
1499 case SC_10_6_IPHONE_2_0_PRIVATE:
1500 case SC_10_6_IPHONE_3_0_PRIVATE:
1501 case SC_10_7_IPHONE_4_0_PRIVATE:
1502 case SC_10_7_IPHONE_5_0_PRIVATE:
1503 case SC_IPHONE_2_0_PRIVATE:
1504 print_comment(&names[i]);
1505 break;
1506 default:
1507 // don't report public definitions
1508 break;
1509 }
1510 break;
1511
1512 case gen_headerdoc_e:
1513 switch (names[i].control) {
1514 case SC_10_5_PRIVATE:
1515 case SC_10_6_IPHONE_2_0_PRIVATE:
1516 case SC_10_6_IPHONE_3_0_PRIVATE:
1517 case SC_10_7_IPHONE_4_0_PRIVATE:
1518 case SC_10_7_IPHONE_5_0_PRIVATE:
1519 case SC_IPHONE_2_0_PRIVATE:
1520 // don't report private definitions
1521 break;
1522 default:
1523 print_headerdoc(&names[i]);
1524 break;
1525 }
1526 break;
1527 case gen_headerdoc_private_e:
1528 switch (names[i].control) {
1529 case SC_10_5_PRIVATE:
1530 case SC_10_6_IPHONE_2_0_PRIVATE:
1531 case SC_10_6_IPHONE_3_0_PRIVATE:
1532 case SC_10_7_IPHONE_4_0_PRIVATE:
1533 case SC_10_7_IPHONE_5_0_PRIVATE:
1534 case SC_IPHONE_2_0_PRIVATE:
1535 print_headerdoc(&names[i]);
1536 break;
1537 default:
1538 // don't report public definitions
1539 break;
1540 }
1541 break;
1542
1543 case gen_hfile_e:
1544 switch (names[i].control) {
1545 case SC_10_5_PRIVATE:
1546 case SC_10_6_IPHONE_2_0_PRIVATE:
1547 case SC_10_6_IPHONE_3_0_PRIVATE:
1548 case SC_10_7_IPHONE_4_0_PRIVATE:
1549 case SC_10_7_IPHONE_5_0_PRIVATE:
1550 case SC_IPHONE_2_0_PRIVATE:
1551 break;
1552 // don't report private definitions
1553 default:
1554 print_hfile(&names[i]);
1555 break;
1556 }
1557 break;
1558 case gen_hfile_private_e:
1559 switch (names[i].control) {
1560 case SC_10_5_PRIVATE:
1561 case SC_10_6_IPHONE_2_0_PRIVATE:
1562 case SC_10_6_IPHONE_3_0_PRIVATE:
1563 case SC_10_7_IPHONE_4_0_PRIVATE:
1564 case SC_10_7_IPHONE_5_0_PRIVATE:
1565 case SC_IPHONE_2_0_PRIVATE:
1566 print_hfile(&names[i]);
1567 break;
1568 default:
1569 // don't report public definitions
1570 break;
1571 }
1572 break;
1573
1574 case gen_cfile_e:
1575 snprintf(kbuf, sizeof(kbuf), KEY_PREFIX "%s%s",
1576 names[i].prefix, names[i].key);
1577
1578 if (names[i].value)
1579 printf("const CFStringRef %-48s = CFSTR(\"%s\");\n",
1580 kbuf, names[i].value);
1581 else
1582 printf("const CFStringRef %-48s = CFSTR(\"%s\");\n",
1583 kbuf, names[i].key);
1584 break;
1585 default:
1586 break;
1587 }
1588 break;
1589 }
1590 }
1591 }
1592 done:
1593 switch (type) {
1594 case gen_hfile_e:
1595 fprintf(stderr, "max key: length = %2d, string = %s\n", maxkbuf, maxkstr);
1596 fprintf(stderr, "max val: length = %2d, string = %s\n", maxvbuf, maxvstr);
1597 break;
1598 }
1599 return;
1600 }
1601
1602 int
1603 main(int argc, char * argv[])
1604 {
1605 char * type = "";
1606
1607 if (argc >= 2)
1608 type = argv[1];
1609
1610 if (strcmp(type, "header") == 0) {
1611 printf("%s\n", copyright_string);
1612 printf("/*\n * This file is automatically generated\n * DO NOT EDIT!\n */\n\n");
1613
1614 printf("/*\n");
1615 dump_names(gen_comments_e);
1616 printf(" */\n\n\n");
1617
1618 printf("/*\n");
1619 printf(" * Note: The MACOSX_DEPLOYMENT_TARGET environment variable should be used\n");
1620 printf(" * when building an application targeted for an earlier version of\n");
1621 printf(" * Mac OS X. Please reference Technical Note TN2064 for more details.\n");
1622 printf(" */\n\n");
1623
1624 printf("/*\n");
1625 printf(" * Note: For Cocoa/Obj-C/Foundation applications accessing these preference\n");
1626 printf(" * keys you may want to consider the following :\n");
1627 printf(" *\n");
1628 printf(" * #define " SC_SCHEMA_DECLARATION "(k,q)\textern NSString * k;\n");
1629 printf(" * #import <SystemConfiguration/SystemConfiguration.h>\n");
1630 printf(" */\n\n");
1631
1632 printf("/*\n");
1633 printf(" * Note: For CFM applications using these schema keys you may want to\n");
1634 printf(" * consider the following :\n");
1635 printf(" *\n");
1636 printf(" * #define " SC_SCHEMA_DECLARATION "(k,q)\n");
1637 printf(" * #define " SC_SCHEMA_KV "(k,v,t)\tlookup_SC_key( CFSTR( #k ) )\n");
1638 printf(" * #include <SystemConfiguration/SystemConfiguration.h>\n");
1639 printf(" *\n");
1640 printf(" * CFStringRef lookup_SC_key(CFStringRef key)\n");
1641 printf(" * {\n");
1642 printf(" * // this function should [dynamically, on-demand] load the\n");
1643 printf(" * // SystemConfiguration.framework, look up the provided key,\n");
1644 printf(" * // and return the associated value.\n");
1645 printf(" * }\n");
1646 printf(" */\n\n");
1647
1648 printf("/*\n");
1649 printf(" * Note: Earlier versions of this header file defined a \"SCSTR\" macro\n");
1650 printf(" * which helped to facilitate Obj-C development. Use of this macro\n");
1651 printf(" * has been deprecated (in Mac OS X 10.4) in favor of the newer\n");
1652 printf(" * \"" SC_SCHEMA_DECLARATION "\" and \"" SC_SCHEMA_KV "\" macros\n");
1653 printf(" */\n\n\n");
1654
1655 printf("#ifndef\t_SCSCHEMADEFINITIONS_H\n");
1656 printf("#ifdef\tUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS\n");
1657 printf("#include <SystemConfiguration/_SCSchemaDefinitions.h>\n");
1658 printf("#else\t/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */\n");
1659 printf("#define\t_SCSCHEMADEFINITIONS_H\n");
1660 printf("\n");
1661
1662 printf("/* -------------------- Macro declarations -------------------- */\n\n");
1663
1664 printf("#include <Availability.h>\n");
1665 printf("#include <TargetConditionals.h>\n");
1666 printf("\n");
1667
1668 printf("/*\n");
1669 printf(" * Define a schema key/value/type tuple\n");
1670 printf(" */\n");
1671 printf("#ifndef " SC_SCHEMA_KV "\n");
1672 printf(" #define " SC_SCHEMA_KV "(k,v,t)\tk\n");
1673 printf("#endif\n\n");
1674
1675 printf("/*\n");
1676 printf(" * Provide an \"extern\" for the key/value\n");
1677 printf(" */\n");
1678 printf("#ifndef " SC_SCHEMA_DECLARATION "\n");
1679 printf(" #ifndef SCSTR\n");
1680 printf(" #include <CoreFoundation/CFString.h>\n");
1681 printf(" #define " SC_SCHEMA_DECLARATION "(k,q)\textern const CFStringRef k q;\n");
1682 printf(" #else\n");
1683 printf(" #import <Foundation/NSString.h>\n");
1684 printf(" #define " SC_SCHEMA_DECLARATION "(k,q)\textern NSString * k q;\n");
1685 printf(" #endif\n");
1686 printf("#endif\n");
1687
1688 printf("/* -------------------- HeaderDoc comments -------------------- */\n\n\n");
1689 printf("#if\t0\n");
1690 printf("/*!\n");
1691 printf(" *\t@header SCSchemaDefinitions\n");
1692 printf(" */\n");
1693 dump_names(gen_headerdoc_e);
1694 printf("\n");
1695 printf("#endif\t/* 0 */\n\n\n");
1696
1697 printf("/* -------------------- Schema declarations -------------------- */\n\n");
1698 dump_names(gen_hfile_e);
1699 printf("\n");
1700
1701 printf("#endif\t/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */\n");
1702 printf("#endif\t/* _SCSCHEMADEFINITIONS_H */\n");
1703 }
1704 else if (strcmp(type, "private") == 0) {
1705 printf("%s\n", copyright_string);
1706 printf("/*\n * This file is automatically generated\n * DO NOT EDIT!\n */\n\n");
1707
1708 printf("/*\n");
1709 dump_names(gen_comments_private_e);
1710 printf(" */\n\n\n");
1711
1712 printf("#ifndef _SCSCHEMADEFINITIONSPRIVATE_H\n");
1713 printf("#define _SCSCHEMADEFINITIONSPRIVATE_H\n");
1714 printf("\n");
1715
1716 printf("/* -------------------- Macro declarations -------------------- */\n\n");
1717
1718 printf("#include <SystemConfiguration/SCSchemaDefinitions.h>\n\n");
1719
1720 printf("/* -------------------- HeaderDoc comments -------------------- */\n\n\n");
1721 printf("#if\t0\n");
1722 printf("/*!\n");
1723 printf(" *\t@header SCSchemaDefinitionsPrivate\n");
1724 printf(" */\n");
1725 dump_names(gen_headerdoc_private_e);
1726 printf("\n");
1727 printf("#endif\t/* 0 */\n\n\n");
1728
1729 printf("/* -------------------- Schema declarations -------------------- */\n\n");
1730 dump_names(gen_hfile_private_e);
1731 printf("\n");
1732
1733 printf("#endif /* _SCSCHEMADEFINITIONSPRIVATE_H */\n");
1734 }
1735 else if (strcmp(type, "cfile") == 0) {
1736 printf("/*\n");
1737 printf(" * This file is automatically generated\n");
1738 printf(" * DO NOT EDIT!\n");
1739 printf(" */\n");
1740 printf("\n");
1741 printf("#include <Availability.h>\n");
1742 printf("#include <TargetConditionals.h>\n");
1743 printf("#include <CoreFoundation/CFString.h>\n");
1744 printf("\n");
1745 dump_names(gen_cfile_e);
1746 }
1747 exit(0);
1748 return (0);
1749 }
1750