2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
25 * - generates System Configuration header/cfile
26 * - invoke with "header" to generate the header
27 * - invoke with "cfile" to generate the cfile
31 * Modification History
33 * June 1, 2001 Allan Nathanson <ajn@apple.com>
34 * - public API conversion
36 * 27 Apr 2001 Allan Nathanson (ajn@apple.com)
37 * - switch from "extern const CFStringRef ..." to "#define ..."
39 * 3 Nov 2000 Dieter Siegmund (dieter@apple)
45 #include <mach/boolean.h>
47 char copyright_string
[] =
49 " * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n"
51 " * @APPLE_LICENSE_HEADER_START@\n"
53 " * The contents of this file constitute Original Code as defined in and\n"
54 " * are subject to the Apple Public Source License Version 1.1 (the\n"
55 " * \"License\"). You may not use this file except in compliance with the\n"
56 " * License. Please obtain a copy of the License at\n"
57 " * http://www.apple.com/publicsource and read it before using this file.\n"
59 " * This Original Code and all software distributed under the License are\n"
60 " * distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n"
61 " * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n"
62 " * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n"
63 " * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the\n"
64 " * License for the specific language governing rights and limitations\n"
65 " * under the License.\n"
67 " * @APPLE_LICENSE_HEADER_END@\n"
80 #define KEY_PREFIX "kSC"
83 #define DYNAMICSTORE "DynamicStore"
87 #define NETENT "EntNet"
88 #define NETPROP "PropNet"
89 #define NETVAL "ValNet"
90 #define SETUPENT "EntSetup"
91 #define SETUPPROP "PropSetup"
92 #define SYSTEMENT "EntSystem"
93 #define SYSTEMPROP "PropSystem"
95 #define USERSENT "EntUsers"
96 #define USERSPROP "PropUsers"
97 #define VERSION "Version"
99 #define CFARRAY_CFNUMBER "CFArray[CFNumber]"
100 #define CFARRAY_CFSTRING "CFArray[CFString]"
101 #define CFBOOLEAN "CFBoolean"
102 #define CFDICTIONARY "CFDictionary"
103 #define CFNUMBER "CFNumber"
104 #define CFNUMBER_BOOL "CFNumber (0 or 1)"
105 #define CFSTRING "CFString"
107 #define ACTIVE "Active"
108 #define ADDRESSES "Addresses"
109 #define AIRPORT "AirPort"
110 #define ALERT "Alert"
111 #define ALTERNATEREMOTEADDRESS "AlternateRemoteAddress"
112 #define ANYREGEX "AnyRegex"
113 #define APPLETALK "AppleTalk"
115 #define AUTOMATIC "Automatic"
116 #define BINDINGMETHODS "BindingMethods"
117 #define BOOTP "BOOTP"
118 #define BROADCAST "Broadcast"
119 #define BROADCASTADDRESSES "BroadcastAddresses"
120 #define BROADCASTSERVERTAG "BroadcastServerTag"
123 #define COMPRESSIONACFIELD "CompressionACField"
124 #define COMPRESSIONPFIELD "CompressionPField"
125 #define COMPRESSIONVJ "CompressionVJ"
126 #define COMPUTERNAME "ComputerName"
127 #define CONFIGMETHOD "ConfigMethod"
128 #define CONNECTDELAY "ConnectDelay"
129 #define CONNECTIONSCRIPT "ConnectionScript"
130 #define CONSOLEUSER "ConsoleUser"
131 #define CURRENTSET "CurrentSet"
132 #define DATACOMPRESSION "DataCompression"
133 #define DEFAULTSERVERTAG "DefaultServerTag"
134 #define DEFAULTZONE "DefaultZone"
135 #define DESTADDRESSES "DestAddresses"
136 #define DEVICENAME "DeviceName"
138 #define DHCPCLIENTID "DHCPClientID"
139 #define DIALMODE "DialMode"
140 #define DIALONDEMAND "DialOnDemand"
141 #define DISCONNECTONIDLE "DisconnectOnIdle"
142 #define DISCONNECTONIDLETIMER "DisconnectOnIdleTimer"
143 #define DISCONNECTONLOGOUT "DisconnectOnLogout"
144 #define DISPLAYTERMINALWINDOW "DisplayTerminalWindow"
146 #define DOMAIN "Domain"
147 #define DOMAINNAME "DomainName"
148 #define DOMAINSEPARATOR "DomainSeparator"
149 #define ECHOENABLED "EchoEnabled"
150 #define ECHOFAILURE "EchoFailure"
151 #define ECHOINTERVAL "EchoInterval"
152 #define ENCODING "Encoding"
153 #define ENCRYPTION "Encryption"
154 #define ERRORCORRECTION "ErrorCorrection"
155 #define ETHERNET "Ethernet"
156 #define EXCEPTIONSLIST "ExceptionsList"
158 #define FTPENABLE "FTPEnable"
159 #define FTPPASSIVE "FTPPassive"
160 #define FTPPORT "FTPPort"
161 #define FTPPROXY "FTPProxy"
163 #define GLOBAL "Global"
164 #define GOPHERENABLE "GopherEnable"
165 #define GOPHERPORT "GopherPort"
166 #define GOPHERPROXY "GopherProxy"
167 #define HARDWARE "Hardware"
168 #define HTTPENABLE "HTTPEnable"
169 #define HTTPPORT "HTTPPort"
170 #define HTTPPROXY "HTTPProxy"
171 #define HTTPSENABLE "HTTPSEnable"
172 #define HTTPSPORT "HTTPSPort"
173 #define HTTPSPROXY "HTTPSProxy"
174 #define IDLEREMINDER "IdleReminder"
175 #define IDLEREMINDERTIMER "IdleReminderTimer"
176 #define IGNOREDIALTONE "IgnoreDialTone"
177 #define INACTIVE "Inactive"
178 #define INFORM "INFORM"
179 #define INTERFACE "Interface"
180 #define INTERFACENAME "InterfaceName"
181 #define INTERFACES "Interfaces"
185 #define LASTUPDATED "LastUpdated"
188 #define LOGFILE "Logfile"
189 #define MACADDRESS "MACAddress"
190 #define MANUAL "Manual"
191 #define MEDIA "Media"
192 #define MODEM "Modem"
196 #define NETINFO "NetInfo"
197 #define NETWORK "Network"
198 #define NETWORKID "NetworkID"
199 #define NETWORKSERVICES "NetworkServices"
202 #define NODEID "NodeID"
204 #define PASSWORD "Password"
205 #define PLUGIN "Plugin"
206 #define POWERENABLED "PowerEnabled"
208 #define PPPOE "PPPoE"
209 #define PPPOVERRIDEPRIMARY "PPPOverridePrimary"
210 #define PPPSERIAL "PPPSerial"
211 #define PREFERREDNETWORK "PreferredNetwork"
212 #define PREFS "Prefs"
213 #define PRIMARYINTERFACE "PrimaryInterface"
214 #define PRIMARYSERVICE "PrimaryService"
215 #define PROTOCOL "Protocol"
216 #define PROXIES "Proxies"
217 #define PULSEDIAL "PulseDial"
218 #define RECEIVEACCM "ReceiveACCM"
219 #define REDIALCOUNT "RedialCount"
220 #define REDIALENABLED "RedialEnabled"
221 #define REDIALINTERVAL "RedialInterval"
222 #define REMOTEADDRESS "RemoteAddress"
223 #define ROOTSEPARATOR "RootSeparator"
224 #define ROUTER "Router"
225 #define RTSPENABLE "RTSPEnable"
226 #define RTSPPORT "RTSPPort"
227 #define RTSPPROXY "RTSPProxy"
228 #define SEARCHDOMAINS "SearchDomains"
229 #define SEEDNETWORKRANGE "SeedNetworkRange"
230 #define SEEDROUTER "SeedRouter"
231 #define SEEDZONES "SeedZones"
232 #define SERVERADDRESSES "ServerAddresses"
233 #define SERVERTAGS "ServerTags"
234 #define SERVICE "Service"
235 #define SERVICEIDS "ServiceIDs"
236 #define SERVICEORDER "ServiceOrder"
237 #define SESSIONTIMER "SessionTimer"
239 #define SETUP "Setup"
240 #define SOCKSENABLE "SOCKSEnable"
241 #define SOCKSPORT "SOCKSPort"
242 #define SOCKSPROXY "SOCKSProxy"
243 #define SORTLIST "SortList"
244 #define SPEAKER "Speaker"
245 #define SPEED "Speed"
246 #define STATE "State"
247 #define SUBNETMASKS "SubnetMasks"
248 #define SUBTYPE "SubType"
249 #define SYSTEM "System"
250 #define TERMINALSCRIPT "TerminalScript"
251 #define TRANSMITACCM "TransmitACCM"
254 #define USERDEFINEDNAME "UserDefinedName"
255 #define USERS "Users"
256 #define VERBOSELOGGING "VerboseLogging"
257 #define WAITFORDIALTONE "WaitForDialTone"
261 unsigned char * prefix
;
263 unsigned char * value
;
264 unsigned char * type
;
266 { COMMENT
, "/*\n * Reserved Keys\n */", NULL
, NULL
},
267 { REGULAR
, RESV
, LINK
, "__LINK__", CFSTRING
},
268 { REGULAR
, RESV
, INACTIVE
, "__INACTIVE__", NULL
},
269 { COMMENT
, "", NULL
, NULL
, NULL
},
271 { COMMENT
, "/*\n * Generic Keys\n */", NULL
},
272 { DEFINE
, PROP
, INTERFACENAME
, NULL
, CFSTRING
},
273 { REGULAR
, PROP
, MACADDRESS
, NULL
, CFSTRING
},
274 { REGULAR
, PROP
, USERDEFINEDNAME
, NULL
, CFSTRING
},
275 { DEFINE
, PROP
, VERSION
, NULL
, CFSTRING
},
276 { COMMENT
, "", NULL
, NULL
, NULL
},
278 { COMMENT
, "/*\n * Preference Keys\n */", NULL
},
279 { REGULAR
, PREF
, CURRENTSET
, NULL
, CFSTRING
},
280 { REGULAR
, PREF
, NETWORKSERVICES
, NULL
, CFDICTIONARY
},
281 { REGULAR
, PREF
, SETS
, NULL
, CFDICTIONARY
},
282 { REGULAR
, PREF
, SYSTEM
, NULL
, CFDICTIONARY
},
283 { COMMENT
, "", NULL
, NULL
, NULL
},
285 { COMMENT
, "/*\n * Component Keys\n */", NULL
},
286 { REGULAR
, COMP
, NETWORK
, NULL
, NULL
},
287 { REGULAR
, COMP
, SERVICE
, NULL
, NULL
},
288 { REGULAR
, COMP
, GLOBAL
, NULL
, NULL
},
289 { REGULAR
, COMP
, INTERFACE
, NULL
, NULL
},
290 { REGULAR
, COMP
, SYSTEM
, NULL
, NULL
},
291 { REGULAR
, COMP
, USERS
, NULL
, NULL
},
292 { COMMENT
, "", NULL
, NULL
, NULL
},
294 { COMMENT
, "/*\n * Regex key which matches any component\n */", NULL
},
295 { REGULAR
, COMP
, ANYREGEX
, "[^/]+", NULL
},
296 { COMMENT
, "", NULL
, NULL
, NULL
},
298 { COMMENT
, "/*\n * Network Entity Keys\n */", NULL
},
299 { REGULAR
, NETENT
, AIRPORT
, NULL
, CFDICTIONARY
},
300 { REGULAR
, NETENT
, APPLETALK
, NULL
, CFDICTIONARY
},
301 { DEFINE
, NETENT
, DHCP
, NULL
, CFDICTIONARY
},
302 { REGULAR
, NETENT
, DNS
, NULL
, CFDICTIONARY
},
303 { REGULAR
, NETENT
, ETHERNET
, NULL
, CFDICTIONARY
},
304 { REGULAR
, NETENT
, INTERFACE
, NULL
, CFDICTIONARY
},
305 { REGULAR
, NETENT
, IPV4
, NULL
, CFDICTIONARY
},
306 { REGULAR
, NETENT
, IPV6
, NULL
, CFDICTIONARY
},
307 { REGULAR
, NETENT
, LINK
, NULL
, CFDICTIONARY
},
308 { REGULAR
, NETENT
, MODEM
, NULL
, CFDICTIONARY
},
309 { REGULAR
, NETENT
, NETINFO
, NULL
, CFDICTIONARY
},
310 { FUTURE
, NETENT
, NIS
, NULL
, CFDICTIONARY
},
311 { REGULAR
, NETENT
, PPP
, NULL
, CFDICTIONARY
},
312 { REGULAR
, NETENT
, PPPOE
, NULL
, CFDICTIONARY
},
313 { REGULAR
, NETENT
, PROXIES
, NULL
, CFDICTIONARY
},
314 { COMMENT
, "", NULL
, NULL
, NULL
},
316 { COMMENT
, "/*\n * " KEY_PREFIX COMP NETWORK
" Properties\n */", NULL
},
317 { REGULAR
, NETPROP
, SERVICEORDER
, NULL
, CFARRAY_CFSTRING
},
318 { REGULAR
, NETPROP
, PPPOVERRIDEPRIMARY
, NULL
, CFNUMBER_BOOL
},
319 { COMMENT
, "", NULL
, NULL
, NULL
},
321 { COMMENT
, "/*\n * " KEY_PREFIX NETENT AIRPORT
" (Hardware) Entity Keys\n */", NULL
, NULL
, NULL
},
322 { REGULAR
, NETPROP AIRPORT
, POWERENABLED
, NULL
, CFNUMBER_BOOL
},
323 { REGULAR
, NETPROP AIRPORT
, AUTH PASSWORD
, NULL
, CFSTRING
},
324 { REGULAR
, NETPROP AIRPORT
, AUTH PASSWORD ENCRYPTION
, NULL
, CFSTRING
},
325 { REGULAR
, NETPROP AIRPORT
, PREFERREDNETWORK
, NULL
, CFSTRING
},
326 { COMMENT
, "", NULL
, NULL
, NULL
},
328 { COMMENT
, "/*\n * " KEY_PREFIX NETENT APPLETALK
" Entity Keys\n */", NULL
, NULL
, NULL
},
329 { REGULAR
, NETPROP APPLETALK
, COMPUTERNAME
, NULL
, CFSTRING
},
330 { REGULAR
, NETPROP APPLETALK
, COMPUTERNAME ENCODING
, NULL
, CFNUMBER
},
331 { REGULAR
, NETPROP APPLETALK
, CONFIGMETHOD
, NULL
, CFSTRING
},
332 { REGULAR
, NETPROP APPLETALK
, DEFAULTZONE
, NULL
, CFSTRING
},
333 { REGULAR
, NETPROP APPLETALK
, NETWORKID
, NULL
, CFNUMBER
},
334 { REGULAR
, NETPROP APPLETALK
, NODEID
, NULL
, CFNUMBER
},
335 { REGULAR
, NETPROP APPLETALK
, SEEDNETWORKRANGE
, NULL
, CFARRAY_CFNUMBER
},
336 { REGULAR
, NETPROP APPLETALK
, SEEDZONES
, NULL
, CFARRAY_CFSTRING
},
337 { COMMENT
, "", NULL
, NULL
, NULL
},
338 { COMMENT
, "/* " KEY_PREFIX NETPROP APPLETALK CONFIGMETHOD
" values */", NULL
, NULL
, NULL
},
339 { REGULAR
, NETVAL APPLETALK CONFIGMETHOD
, NODE
, NULL
, NULL
},
340 { REGULAR
, NETVAL APPLETALK CONFIGMETHOD
, ROUTER
, NULL
, NULL
},
341 { REGULAR
, NETVAL APPLETALK CONFIGMETHOD
, SEEDROUTER
, NULL
, NULL
},
342 { COMMENT
, "", NULL
, NULL
, NULL
},
344 { COMMENT
, "/*\n * " KEY_PREFIX NETENT DNS
" Entity Keys\n */", NULL
, NULL
, NULL
},
345 { REGULAR
, NETPROP DNS
, DOMAINNAME
, NULL
, CFSTRING
},
346 { REGULAR
, NETPROP DNS
, SEARCHDOMAINS
, NULL
, CFARRAY_CFSTRING
},
347 { REGULAR
, NETPROP DNS
, SERVERADDRESSES
, NULL
, CFARRAY_CFSTRING
},
348 { DEFINE
, NETPROP DNS
, SORTLIST
, NULL
, CFARRAY_CFSTRING
},
349 { COMMENT
, "", NULL
, NULL
, NULL
},
351 { COMMENT
, "/*\n * " KEY_PREFIX NETENT ETHERNET
" (Hardware) Entity Keys\n */", NULL
, NULL
, NULL
},
352 { COMMENT
, "", NULL
, NULL
, NULL
},
354 { COMMENT
, "/*\n * " KEY_PREFIX NETENT INTERFACE
" Entity Keys\n */", NULL
},
355 { REGULAR
, NETPROP INTERFACE
, DEVICENAME
, NULL
, CFSTRING
},
356 { REGULAR
, NETPROP INTERFACE
, HARDWARE
, NULL
, CFSTRING
},
357 { REGULAR
, NETPROP INTERFACE
, TYPE
, NULL
, CFSTRING
},
358 { REGULAR
, NETPROP INTERFACE
, SUBTYPE
, NULL
, CFSTRING
},
359 { COMMENT
, "", NULL
, NULL
, NULL
},
360 { COMMENT
, "/* " KEY_PREFIX NETPROP INTERFACE TYPE
" values */", NULL
, NULL
, NULL
},
361 { REGULAR
, NETVAL INTERFACE TYPE
, ETHERNET
, NULL
, NULL
},
362 { REGULAR
, NETVAL INTERFACE TYPE
, PPP
, NULL
, NULL
},
363 { COMMENT
, "", NULL
, NULL
, NULL
},
364 { COMMENT
, "/* " KEY_PREFIX NETPROP SERVICE SUBTYPE
" values (for " PPP
") */", NULL
, NULL
, NULL
},
365 { REGULAR
, NETVAL INTERFACE SUBTYPE
, PPPOE
, NULL
, NULL
},
366 { REGULAR
, NETVAL INTERFACE SUBTYPE
, PPPSERIAL
, NULL
, NULL
},
367 { COMMENT
, "", NULL
, NULL
, NULL
},
369 { COMMENT
, "/*\n * " KEY_PREFIX NETENT IPV4
" Entity Keys\n */", NULL
, NULL
, NULL
},
370 { REGULAR
, NETPROP IPV4
, ADDRESSES
, NULL
, CFARRAY_CFSTRING
},
371 { REGULAR
, NETPROP IPV4
, CONFIGMETHOD
, NULL
, CFSTRING
},
372 { REGULAR
, NETPROP IPV4
, DHCPCLIENTID
, NULL
, CFSTRING
},
373 { REGULAR
, NETPROP IPV4
, ROUTER
, NULL
, CFSTRING
},
374 { REGULAR
, NETPROP IPV4
, SUBNETMASKS
, NULL
, CFARRAY_CFSTRING
},
375 { REGULAR
, NETPROP IPV4
, DESTADDRESSES
, NULL
, CFARRAY_CFSTRING
},
376 { REGULAR
, NETPROP IPV4
, BROADCASTADDRESSES
, NULL
, CFARRAY_CFSTRING
},
377 { COMMENT
, "", NULL
, NULL
, NULL
},
378 { COMMENT
, "/* " KEY_PREFIX NETPROP IPV4 CONFIGMETHOD
" values */", NULL
, NULL
, NULL
},
379 { REGULAR
, NETVAL IPV4 CONFIGMETHOD
, BOOTP
, NULL
, NULL
},
380 { REGULAR
, NETVAL IPV4 CONFIGMETHOD
, DHCP
, NULL
, NULL
},
381 { REGULAR
, NETVAL IPV4 CONFIGMETHOD
, INFORM
, NULL
, NULL
},
382 { REGULAR
, NETVAL IPV4 CONFIGMETHOD
, MANUAL
, NULL
, NULL
},
383 { REGULAR
, NETVAL IPV4 CONFIGMETHOD
, PPP
, NULL
, NULL
},
384 { COMMENT
, "", NULL
, NULL
, NULL
},
386 { COMMENT
, "/*\n * " KEY_PREFIX NETENT IPV6
" Entity Keys\n */", NULL
, NULL
, NULL
},
387 { REGULAR
, NETPROP IPV6
, ADDRESSES
, NULL
, CFARRAY_CFSTRING
},
388 { REGULAR
, NETPROP IPV6
, CONFIGMETHOD
, NULL
, CFSTRING
},
389 { COMMENT
, "", NULL
, NULL
, NULL
},
391 { COMMENT
, "/*\n * " KEY_PREFIX NETENT LINK
" Entity Keys\n */", NULL
, NULL
, NULL
},
392 { REGULAR
, NETPROP LINK
, ACTIVE
, NULL
, CFBOOLEAN
},
393 { COMMENT
, "", NULL
, NULL
, NULL
},
395 { COMMENT
, "/*\n * " KEY_PREFIX NETENT MODEM
" (Hardware) Entity Keys\n */", NULL
, NULL
, NULL
},
396 { REGULAR
, NETPROP MODEM
, CONNECTIONSCRIPT
, NULL
, CFSTRING
},
397 { DEFINE
, NETPROP MODEM
, DATACOMPRESSION
, NULL
, CFNUMBER_BOOL
},
398 { REGULAR
, NETPROP MODEM
, DIALMODE
, NULL
, CFSTRING
},
399 { DEFINE
, NETPROP MODEM
, ERRORCORRECTION
, NULL
, CFNUMBER_BOOL
},
400 { REGULAR
, NETPROP MODEM
, PULSEDIAL
, NULL
, CFNUMBER_BOOL
},
401 { REGULAR
, NETPROP MODEM
, SPEAKER
, NULL
, CFNUMBER_BOOL
},
402 { REGULAR
, NETPROP MODEM
, SPEED
, NULL
, CFNUMBER
},
403 { COMMENT
, "", NULL
, NULL
, NULL
},
404 { COMMENT
, "/* " KEY_PREFIX NETPROP MODEM DIALMODE
" values */", NULL
, NULL
, NULL
},
405 { REGULAR
, NETVAL MODEM DIALMODE
, IGNOREDIALTONE
, NULL
, NULL
},
406 { REGULAR
, NETVAL MODEM DIALMODE
, MANUAL
, NULL
, NULL
},
407 { REGULAR
, NETVAL MODEM DIALMODE
, WAITFORDIALTONE
, NULL
, NULL
},
408 { COMMENT
, "", NULL
, NULL
, NULL
},
410 { COMMENT
, "/*\n * " KEY_PREFIX NETENT NETINFO
" Entity Keys\n */", NULL
, NULL
, NULL
},
411 { REGULAR
, NETPROP NETINFO
, BINDINGMETHODS
, NULL
, CFSTRING
},
412 { REGULAR
, NETPROP NETINFO
, SERVERADDRESSES
, NULL
, CFARRAY_CFSTRING
},
413 { REGULAR
, NETPROP NETINFO
, SERVERTAGS
, NULL
, CFARRAY_CFSTRING
},
414 { REGULAR
, NETPROP NETINFO
, BROADCASTSERVERTAG
, NULL
, CFSTRING
},
415 { COMMENT
, "", NULL
, NULL
, NULL
},
416 { COMMENT
, "/* " KEY_PREFIX NETPROP NETINFO BINDINGMETHODS
" values */", NULL
, NULL
, NULL
},
417 { REGULAR
, NETVAL NETINFO BINDINGMETHODS
, BROADCAST
, NULL
, NULL
},
418 { REGULAR
, NETVAL NETINFO BINDINGMETHODS
, DHCP
, NULL
, NULL
},
419 { REGULAR
, NETVAL NETINFO BINDINGMETHODS
, MANUAL
, NULL
, NULL
},
420 { COMMENT
, "", NULL
, NULL
, NULL
},
421 { COMMENT
, "/* " KEY_PREFIX NETPROP NETINFO BROADCASTSERVERTAG
" default value */", NULL
, NULL
, NULL
},
422 { REGULAR
, NETVAL NETINFO
, DEFAULTSERVERTAG
, "network", NULL
},
423 { COMMENT
, "", NULL
, NULL
, NULL
},
425 { COMMENT
, "/*\n * " KEY_PREFIX NETENT NIS
" Entity Keys\n */", NULL
, NULL
, NULL
},
426 { COMMENT
, "/* RESERVED FOR FUTURE USE */", NULL
, NULL
, NULL
},
427 { COMMENT
, "", NULL
, NULL
, NULL
},
429 { COMMENT
, "/*\n * " KEY_PREFIX NETENT PPP
" Entity Keys\n */", NULL
, NULL
, NULL
},
430 { REGULAR
, NETPROP PPP
, DIALONDEMAND
, NULL
, CFNUMBER_BOOL
},
431 { REGULAR
, NETPROP PPP
, DISCONNECTONIDLE
, NULL
, CFNUMBER_BOOL
},
432 { REGULAR
, NETPROP PPP
, DISCONNECTONIDLETIMER
, NULL
, CFNUMBER
},
433 { REGULAR
, NETPROP PPP
, DISCONNECTONLOGOUT
, NULL
, CFNUMBER_BOOL
},
434 { REGULAR
, NETPROP PPP
, IDLEREMINDERTIMER
, NULL
, CFNUMBER
},
435 { REGULAR
, NETPROP PPP
, IDLEREMINDER
, NULL
, CFNUMBER_BOOL
},
436 { REGULAR
, NETPROP PPP
, LOGFILE
, NULL
, CFSTRING
},
437 { DEFINE
, NETPROP PPP
, SESSIONTIMER
, NULL
, CFNUMBER
},
438 { REGULAR
, NETPROP PPP
, VERBOSELOGGING
, NULL
, CFNUMBER_BOOL
},
439 { COMMENT
, "", NULL
, NULL
, NULL
},
441 { COMMENT
, "/* " AUTH
": */", NULL
, NULL
, NULL
},
442 { REGULAR
, NETPROP PPP
, AUTH NAME
, NULL
, CFSTRING
},
443 { REGULAR
, NETPROP PPP
, AUTH PASSWORD
, NULL
, CFSTRING
},
444 { REGULAR
, NETPROP PPP
, AUTH PASSWORD ENCRYPTION
, NULL
, CFSTRING
},
445 { REGULAR
, NETPROP PPP
, AUTH PROTOCOL
, NULL
, CFARRAY_CFSTRING
},
446 { COMMENT
, "", NULL
, NULL
, NULL
},
447 { COMMENT
, "/* " KEY_PREFIX NETPROP PPP AUTH PROTOCOL
" values */", NULL
, NULL
, NULL
},
448 { REGULAR
, NETVAL PPP AUTH PROTOCOL
, CHAP
, NULL
, CFSTRING
},
449 { REGULAR
, NETVAL PPP AUTH PROTOCOL
, PAP
, NULL
, CFSTRING
},
451 { COMMENT
, "\n/* " COMM
": */", NULL
, NULL
, NULL
},
452 { REGULAR
, NETPROP PPP
, COMM ALTERNATEREMOTEADDRESS
, NULL
, CFSTRING
},
453 { REGULAR
, NETPROP PPP
, COMM CONNECTDELAY
, NULL
, CFNUMBER
},
454 { REGULAR
, NETPROP PPP
, COMM DISPLAYTERMINALWINDOW
, NULL
, CFNUMBER_BOOL
},
455 { REGULAR
, NETPROP PPP
, COMM REDIALCOUNT
, NULL
, CFNUMBER
},
456 { REGULAR
, NETPROP PPP
, COMM REDIALENABLED
, NULL
, CFNUMBER_BOOL
},
457 { REGULAR
, NETPROP PPP
, COMM REDIALINTERVAL
, NULL
, CFNUMBER
},
458 { REGULAR
, NETPROP PPP
, COMM REMOTEADDRESS
, NULL
, CFSTRING
},
459 { REGULAR
, NETPROP PPP
, COMM TERMINALSCRIPT
, NULL
, CFSTRING
},
461 { COMMENT
, "\n/* " IPCP
": */", NULL
, NULL
, NULL
},
462 { REGULAR
, NETPROP PPP
, IPCP COMPRESSIONVJ
, NULL
, CFNUMBER_BOOL
},
464 { COMMENT
, "\n/* " LCP
": */", NULL
, NULL
, NULL
},
465 { REGULAR
, NETPROP PPP
, LCP ECHOENABLED
, NULL
, CFNUMBER_BOOL
},
466 { REGULAR
, NETPROP PPP
, LCP ECHOFAILURE
, NULL
, CFNUMBER
},
467 { REGULAR
, NETPROP PPP
, LCP ECHOINTERVAL
, NULL
, CFNUMBER
},
468 { REGULAR
, NETPROP PPP
, LCP COMPRESSIONACFIELD
, NULL
, CFNUMBER_BOOL
},
469 { REGULAR
, NETPROP PPP
, LCP COMPRESSIONPFIELD
, NULL
, CFNUMBER_BOOL
},
470 { REGULAR
, NETPROP PPP
, LCP MRU
, NULL
, CFNUMBER
},
471 { REGULAR
, NETPROP PPP
, LCP MTU
, NULL
, CFNUMBER
},
472 { REGULAR
, NETPROP PPP
, LCP RECEIVEACCM
, NULL
, CFNUMBER
},
473 { REGULAR
, NETPROP PPP
, LCP TRANSMITACCM
, NULL
, CFNUMBER
},
474 { COMMENT
, "", NULL
, NULL
, NULL
},
476 { COMMENT
, "/*\n * " KEY_PREFIX NETENT PPPOE
" Entity Keys\n */", NULL
, NULL
, NULL
},
477 { COMMENT
, "/* RESERVED FOR FUTURE USE */", NULL
, NULL
, NULL
},
478 { COMMENT
, "", NULL
, NULL
, NULL
},
480 { COMMENT
, "/*\n * " KEY_PREFIX NETENT PPPSERIAL
" Entity Keys\n */", NULL
, NULL
, NULL
},
481 { COMMENT
, "/* RESERVED FOR FUTURE USE */", NULL
, NULL
, NULL
},
482 { COMMENT
, "", NULL
, NULL
, NULL
},
484 { COMMENT
, "/*\n * " KEY_PREFIX NETENT PROXIES
" Entity Keys\n */", NULL
, NULL
, NULL
},
485 { REGULAR
, NETPROP PROXIES
, EXCEPTIONSLIST
, NULL
, CFARRAY_CFSTRING
},
486 { REGULAR
, NETPROP PROXIES
, FTPENABLE
, NULL
, CFNUMBER_BOOL
},
487 { REGULAR
, NETPROP PROXIES
, FTPPASSIVE
, NULL
, CFNUMBER_BOOL
},
488 { REGULAR
, NETPROP PROXIES
, FTPPORT
, NULL
, CFNUMBER
},
489 { REGULAR
, NETPROP PROXIES
, FTPPROXY
, NULL
, CFSTRING
},
490 { REGULAR
, NETPROP PROXIES
, GOPHERENABLE
, NULL
, CFNUMBER_BOOL
},
491 { REGULAR
, NETPROP PROXIES
, GOPHERPORT
, NULL
, CFNUMBER
},
492 { REGULAR
, NETPROP PROXIES
, GOPHERPROXY
, NULL
, CFSTRING
},
493 { REGULAR
, NETPROP PROXIES
, HTTPENABLE
, NULL
, CFNUMBER_BOOL
},
494 { REGULAR
, NETPROP PROXIES
, HTTPPORT
, NULL
, CFNUMBER
},
495 { REGULAR
, NETPROP PROXIES
, HTTPPROXY
, NULL
, CFSTRING
},
496 { DEFINE
, NETPROP PROXIES
, HTTPSENABLE
, NULL
, CFNUMBER_BOOL
},
497 { DEFINE
, NETPROP PROXIES
, HTTPSPORT
, NULL
, CFNUMBER
},
498 { DEFINE
, NETPROP PROXIES
, HTTPSPROXY
, NULL
, CFSTRING
},
499 { REGULAR
, NETPROP PROXIES
, RTSPENABLE
, NULL
, CFNUMBER_BOOL
},
500 { REGULAR
, NETPROP PROXIES
, RTSPPORT
, NULL
, CFNUMBER
},
501 { REGULAR
, NETPROP PROXIES
, RTSPPROXY
, NULL
, CFSTRING
},
502 { REGULAR
, NETPROP PROXIES
, SOCKSENABLE
, NULL
, CFNUMBER_BOOL
},
503 { REGULAR
, NETPROP PROXIES
, SOCKSPORT
, NULL
, CFNUMBER
},
504 { REGULAR
, NETPROP PROXIES
, SOCKSPROXY
, NULL
, CFSTRING
},
505 { COMMENT
, "", NULL
, NULL
, NULL
},
507 { COMMENT
, "/*\n " KEY_PREFIX COMP USERS
" Entity Keys\n */", NULL
, NULL
, NULL
},
508 { REGULAR
, USERSENT
, CONSOLEUSER
, NULL
, NULL
},
509 { COMMENT
, "", NULL
, NULL
, NULL
},
511 { COMMENT
, "/*\n " KEY_PREFIX USERSPROP CONSOLEUSER
" Properties\n */", NULL
, NULL
, NULL
},
512 { REGULAR
, USERSPROP CONSOLEUSER
, NAME
, NULL
, CFSTRING
},
513 { REGULAR
, USERSPROP CONSOLEUSER
, UID
, NULL
, CFSTRING
},
514 { REGULAR
, USERSPROP CONSOLEUSER
, GID
, NULL
, CFSTRING
},
515 { COMMENT
, "", NULL
, NULL
, NULL
},
517 { COMMENT
, "/*\n * " KEY_PREFIX COMP SYSTEM
" Properties\n */", NULL
, NULL
, NULL
},
518 { REGULAR
, SYSTEMPROP
, COMPUTERNAME
, NULL
, CFSTRING
},
519 { REGULAR
, SYSTEMPROP
, COMPUTERNAME ENCODING
, NULL
, CFNUMBER
},
520 { COMMENT
, "", NULL
, NULL
, NULL
},
522 { COMMENT
, "/*\n * Configuration Store Definitions\n */", NULL
},
523 { COMMENT
, "/* domain prefixes */", NULL
},
524 { DEFINE
, DYNAMICSTORE DOMAIN
, FILE, "File:", NULL
},
525 { DEFINE
, DYNAMICSTORE DOMAIN
, PLUGIN
, "Plugin:", NULL
},
526 { DEFINE
, DYNAMICSTORE DOMAIN
, SETUP
, "Setup:", NULL
},
527 { DEFINE
, DYNAMICSTORE DOMAIN
, STATE
, "State:", NULL
},
528 { DEFINE
, DYNAMICSTORE DOMAIN
, PREFS
, "Prefs:", NULL
},
529 { COMMENT
, "", NULL
, NULL
, NULL
},
531 { COMMENT
, "/* " KEY_PREFIX DYNAMICSTORE DOMAIN SETUP
" Properties */", NULL
},
532 { DEFINE
, DYNAMICSTORE SETUPPROP
, CURRENTSET
, NULL
, CFSTRING
},
533 { DEFINE
, DYNAMICSTORE SETUPPROP
, LASTUPDATED
, NULL
, NULL
},
534 { COMMENT
, "", NULL
, NULL
, NULL
},
536 { COMMENT
, "/* Properties */", NULL
},
537 { DEFINE
, DYNAMICSTORE NETPROP
, INTERFACES
, NULL
, CFARRAY_CFSTRING
},
538 { DEFINE
, DYNAMICSTORE NETPROP
, PRIMARYINTERFACE
, NULL
, CFSTRING
},
539 { DEFINE
, DYNAMICSTORE NETPROP
, PRIMARYSERVICE
, NULL
, CFSTRING
},
540 { DEFINE
, DYNAMICSTORE NETPROP
, SERVICEIDS
, NULL
, CFARRAY_CFSTRING
},
541 { COMMENT
, "", NULL
, NULL
, NULL
},
544 { OBSOLETE
, "Cache" DOMAIN
, FILE, "File:", NULL
},
545 { OBSOLETE
, "Cache" DOMAIN
, PLUGIN
, "Plugin:", NULL
},
546 { OBSOLETE
, "Cache" DOMAIN
, SETUP
, "Setup:", NULL
},
547 { OBSOLETE
, "Cache" DOMAIN
, STATE
, "State:", NULL
},
548 { OBSOLETE
, "Cache" DOMAIN
, PREFS
, "Prefs:", NULL
},
549 { OBSOLETE
, "Cache" SETUPPROP
, CURRENTSET
, NULL
, CFSTRING
},
550 { OBSOLETE
, "Cache" SETUPPROP
, LASTUPDATED
, NULL
, NULL
},
551 { OBSOLETE
, "Cache" NETPROP
, INTERFACES
, NULL
, CFARRAY_CFSTRING
},
552 { OBSOLETE
, "Cache" NETPROP
, PRIMARYINTERFACE
, NULL
, CFSTRING
},
553 { OBSOLETE
, "Cache" NETPROP
, SERVICEIDS
, NULL
, CFARRAY_CFSTRING
},
555 { END
, NULL
, NULL
, NULL
, NULL
},
569 for (i
= 0; TRUE
; i
++) {
570 switch (names
[i
].control
) {
576 if (type
!= gen_extern_e
&& type
!= gen_init_e
) {
578 printf("%s\n", names
[i
].prefix
);
588 snprintf(kbuf
, sizeof(kbuf
), KEY_PREFIX
"%s%s",
589 names
[i
].prefix
, names
[i
].key
);
592 snprintf(vbuf
, sizeof(vbuf
), "SCSTR(\"%s\")",
595 snprintf(vbuf
, sizeof(vbuf
), "SCSTR(\"%s\")",
599 printf("#define %-40s %-40s /* %s */\n",
600 kbuf
, vbuf
, names
[i
].type
);
602 printf("#define %-40s %-40s\n",
616 snprintf(kbuf
, sizeof(kbuf
), KEY_PREFIX
"%s%s",
617 names
[i
].prefix
, names
[i
].key
);
620 snprintf(vbuf
, sizeof(vbuf
), "SCSTR(\"%s\")",
623 snprintf(vbuf
, sizeof(vbuf
), "SCSTR(\"%s\")",
627 printf("#define %-40s %-40s /* %s */\n",
628 kbuf
, vbuf
, names
[i
].type
);
630 printf("#define %-40s %-40s\n",
634 snprintf(kbuf
, sizeof(kbuf
), KEY_PREFIX
"%s%s",
635 names
[i
].prefix
, names
[i
].key
);
637 printf("volatile CFStringRef " KEY_PREFIX
"%s%s = NULL;\n",
638 names
[i
].prefix
, names
[i
].key
);
641 snprintf(kbuf
, sizeof(kbuf
), KEY_PREFIX
"%s%s",
642 names
[i
].prefix
, names
[i
].key
);
644 printf(" *((void **)&%s) = (void *)CFSTR(\"%s\");\n",
645 kbuf
, names
[i
].value
);
647 printf(" *((void **)&%s) = (void *)CFSTR(\"%s\");\n",
660 snprintf(kbuf
, sizeof(kbuf
), KEY_PREFIX
"%s%s",
661 names
[i
].prefix
, names
[i
].key
);
663 printf("volatile CFStringRef " KEY_PREFIX
"%s%s = NULL;\n",
664 names
[i
].prefix
, names
[i
].key
);
667 snprintf(kbuf
, sizeof(kbuf
), KEY_PREFIX
"%s%s",
668 names
[i
].prefix
, names
[i
].key
);
670 printf(" *((void **)&%s) = (void *)CFSTR(\"%s\");\n",
671 kbuf
, names
[i
].value
);
673 printf(" *((void **)&%s) = (void *)CFSTR(\"%s\");\n",
684 if (type
== gen_header_e
) {
685 snprintf(kbuf
, sizeof(kbuf
), KEY_PREFIX
"%s%s",
686 names
[i
].prefix
, names
[i
].key
);
688 printf("/* #define %-37s %-40s /* %s */\n",
691 "RESERVED FOR FUTURE USE");
705 main(int argc
, char * argv
[])
712 if (strcmp(type
, "header") == 0) {
713 printf("%s\n", copyright_string
);
714 printf("/*\n * This file is automatically generated\n * DO NOT EDIT!\n */\n\n");
717 printf(" * Note: For Cocoa/Obj-C/Foundation programs accessing these preference\n");
718 printf(" * keys you may want to consider the following:\n");
720 printf(" * #define SCSTR(s) (NSString *)CFSTR(s)\n");
721 printf(" * #import <SystemConfiguration/SystemConfiguration.h>\n");
724 printf("#ifndef _SCSCHEMADEFINITIONS_H\n#define _SCSCHEMADEFINITIONS_H\n\n");
726 printf("#ifndef SCSTR\n");
727 printf("#include <CoreFoundation/CFString.h>\n");
728 printf("#define SCSTR(s) CFSTR(s)\n");
732 dump_names(gen_header_e
);
733 printf("#endif /* _SCSCHEMADEFINITIONS_H */\n");
735 else if (strcmp(type
, "cfile") == 0) {
737 printf(" * This file is automatically generated\n");
738 printf(" * DO NOT EDIT!\n");
741 printf("#include <CoreFoundation/CFString.h>\n");
743 dump_names(gen_extern_e
);
745 printf("__private_extern__\nvoid\n__Initialize(void)\n");
747 printf(" static Boolean initialized = FALSE;\n");
749 printf(" if (initialized)\n");
750 printf(" return;\n");
752 dump_names(gen_init_e
);
754 printf(" initialized = TRUE;\n");
755 printf(" return;\n");