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