Major code reorganization
[people/meteger/rom-o-matic/.git] / flag_table.php
1 <?php // -*- Mode: PHP; -*-
2
3 $flag_table = array (
4
5         // Begin Console Options:
6         
7         "HDR_CONSOLE_OPTIONS"
8         => array ( 
9            "flag" => "HDR_CONSOLE_OPTIONS",
10            "type" => "header",
11            "label" => "Console Options" 
12                 ),
13         
14         "CONSOLE_FIRMWARE"
15         => array (
16            "flag" => "CONSOLE_FIRMWARE",
17            "arch" => "all",
18            "type" => "on/off",
19            "value" => "on",
20            "cfgsec" => "general"
21            ),
22         
23         "CONSOLE_SERIAL"
24         => array (
25            "flag" => "CONSOLE_SERIAL",
26            "arch" => "all",
27            "type" => "on/off",
28            "value" => "off",
29            "cfgsec" => "general"
30            ),
31         
32         // End Console Options
33         
34         // Begin Timer Options:
35         
36         "HDR_TIMER_OPTIONS"
37         => array ( 
38            "flag" => "HDR_TIMER_OPTIONS",
39            "hide_from_user" => "yes",  // Hide even the header
40            "type" => "header",
41            "label" => "Timer Options" 
42                 ),
43         
44         "TIMER_BIOS"
45         => array (
46            "flag" => "TIMER_BIOS",
47            "arch" => "all",
48            "type" => "on/off",
49            "value" => "on",
50            "hide_from_user" => "yes",
51            "cfgsec" => "general"
52            ),
53         
54         "TIMER_RDTSC"
55         => array (
56            "flag" => "TIMER_RDTSC",
57            "arch" => "all",
58            "type" => "on/off",
59            "value" => "on",
60            "hide_from_user" => "yes",
61            "cfgsec" => "general"
62            ),
63         
64         "BANNER_TIMEOUT"
65         => array (
66            "flag" => "BANNER_TIMEOUT",
67            "arch" => "all",
68            "type" => "integer",
69            "value" => "20",
70            "cfgsec" => "general"
71            ),
72         
73         // End Timer Options
74         
75         // Begin Network Protocol Options:
76         
77         "HDR_NETWORK_PROTOCOL_OPTIONS"
78         => array ( 
79            "flag" => "HDR_NETWORK_PROTOCOL_OPTIONS",
80            "hide_from_user" => "yes",  // Hide even the header
81            "type" => "header",
82            "label" => "Network Protocol Options" 
83                 ),
84         
85         "NET_PROTO_IPV4"
86         => array (
87            "flag" => "NET_PROTO_IPV4",
88            "arch" => "all",
89            "type" => "on/off",
90            "value" => "on",
91            "hide_from_user" => "yes",
92            "cfgsec" => "general"
93            ),
94         
95         // End Network Protocol Options
96         
97         // Begin Serial Port configuration
98         
99         "HDR_SERIAL_PORT_OPTIONS"
100         => array ( 
101            "flag" => "HDR_SERIAL_PORT_OPTIONS",
102            "type" => "header",
103            "label" => "Serial Port Options" 
104                 ),
105         
106         "COMCONSOLE"
107         => array ( 
108            "flag" => "COMCONSOLE",
109            "arch" => "all",
110            "type" => "integer", // usually hex, e.g. 0x378
111            "value" => "0x3F8",
112            "cfgsec" => "serial"
113                 ),
114         
115         "COMPRESERVE"
116         => array (
117            "flag" => "COMPRESERVE",
118            "type" => "on/off",
119            "arch" => "all",
120            "value" => "off",
121            "cfgsec" => "serial"
122            ),
123         
124         "COMSPEED"
125         => array (
126            "flag" => "COMSPEED",
127            "type" => "integer",
128            "arch" => "all",
129            "value" => "9600",
130            "cfgsec" => "serial"
131            ),
132         
133         "COMDATA"
134         => array (
135            "flag" => "COMDATA",
136            "type" => "integer",
137            "arch" => "all",
138            "value" => "8",
139            "cfgsec" => "serial"
140            ),
141         
142         "COMPARITY"
143         => array (
144            "flag" => "COMPARITY",
145            "type" => "integer",
146            "arch" => "all",
147            "value" => "0",
148            "cfgsec" => "serial"
149            ),
150         
151         "COMSTOP"
152         => array (
153            "flag" => "COMSTOP",
154            "type" => "integer",
155            "arch" => "all",
156            "value" => "1",
157            "cfgsec" => "serial"
158            ),
159         
160         // End Serial Options
161         
162         // Begin Download Protocols
163         
164         "HDR_DOWNLOAD_PROTOCOLS"
165         => array ( 
166            "flag" => "HDR_DOWNLOAD_PROTOCOLS",
167            "type" => "header",
168            "label" => "Download Protocols"
169                 ),
170         
171         "DOWNLOAD_PROTO_TFTP"
172         => array (
173            "flag" => "DOWNLOAD_PROTO_TFTP",
174            "type" => "on/off",
175            "arch" => "all",
176            "value" => "on",
177            "cfgsec" => "general"
178            ),
179         
180         "DOWNLOAD_PROTO_HTTP"
181         => array (
182            "flag" => "DOWNLOAD_PROTO_HTTP",
183            "type" => "on/off",
184            "arch" => "all",
185            "value" => "on",
186            "cfgsec" => "general"
187            ),
188         
189         "DOWNLOAD_PROTO_FTP"
190         => array (
191            "flag" => "DOWNLOAD_PROTO_FTP",
192            "type" => "on/off",
193            "arch" => "all",
194            "value" => "off",
195            "cfgsec" => "general"
196            ),
197         
198         // End Download Protocols
199         
200         // Begin Name resolution modules
201         
202         "HDR_NAME_RESOLUTION_MODULES"
203         => array (
204            "flag" => "HDR_NAME_RESOLUTION_MODULES",
205            "type" => "header",
206            "label" => "Name Resolution Modules"
207            ),
208         
209         "DNS_RESOLVER"
210         => array ( 
211            "flag" => "DNS_RESOLVER",
212            "type" => "on/off",
213            "arch" => "all",
214            "value" => "on",
215            "cfgsec" => "general"
216                 ),
217         
218         //      "NMB_RESOLVER"
219         //      => array (
220         //                "flag" => "NMB_RESOLVER",
221         //                "type" => "on/off",
222         //                "arch" => "all",
223         //                "value" => "off",
224         //                "cfgsec" => "general"
225         //                ),
226         
227         // End Name resolution modules
228         
229         // Begin Image types
230         
231         "HDR_IMAGE_TYPES"
232         => array (
233            "flag" => "HDR_IMAGE_TYPES",
234            "type" => "header",
235            "label" => "Image Types",
236            ),
237         
238         "IMAGE_ELF"
239         => array (
240            "flag" => "IMAGE_ELF",
241            "type" => "on/off",
242            "arch" => "all",
243            "value" => "on",
244            "cfgsec" => "general"
245            ),
246         
247         "IMAGE_NBI"
248         => array ( 
249            "flag" => "IMAGE_NBI",
250            "type" => "on/off",
251            "arch" => "all",
252            "value" => "on",
253            "cfgsec" => "general"
254                 ),
255         
256         "IMAGE_MULTIBOOT"
257         => array (
258            "flag" => "IMAGE_MULTIBOOT",
259            "type" => "on/off",
260            "arch" => "all",
261            "value" => "on",
262            "cfgsec" => "general"
263            ),
264         
265         "IMAGE_PXE"
266         => array (
267            "flag" => "IMAGE_PXE",
268            "type" => "on/off",
269            "arch" => "all",
270            "value" => "on",
271            "cfgsec" => "general"
272            ),
273         
274         "IMAGE_SCRIPT"
275         => array (
276            "flag" => "IMAGE_SCRIPT",
277            "type" => "on/off",
278            "arch" => "all",
279            "value" => "on",
280            "cfgsec" => "general"
281            ),
282         
283         "IMAGE_BZIMAGE"
284         => array (
285            "flag" => "IMAGE_BZIMAGE",
286            "type" => "on/off",
287            "arch" => "all",
288            "value" => "on",
289            "cfgsec" => "general"
290            ),
291         
292         // End Image types
293         
294         // Begin Command-line commands to include
295         
296         "HDR_COMMAND_LINE_OPTIONS"
297         => array (
298            "flag" => "HDR_COMMAND_LINE_OPTIONS",
299            "type" => "header",
300            "label" => "Command Line Options",
301            ),
302         
303         "IMAGE_CMD"
304         => array (
305            "flag" => "IMAGE_CMD",
306            "type" => "on/off",
307            "arch" => "all",
308            "value" => "on",
309            "cfgsec" => "general"
310            ),
311         
312         "AUTOBOOT_CMD"
313         => array (
314            "flag" => "AUTOBOOT_CMD",
315            "type" => "on/off",
316            "arch" => "all",
317            "value" => "on",
318            "cfgsec" => "general"
319            ),
320         
321         "NVO_CMD"
322         => array (
323            "flag" => "NVO_CMD",
324            "type" => "on/off",
325            "arch" => "all",
326            "value" => "on",
327            "cfgsec" => "general"
328            ),
329         
330         "CONFIG_CMD"
331         => array (
332            "flag" => "CONFIG_CMD",
333            "type" => "on/off",
334            "arch" => "all",
335            "value" => "on",
336            "cfgsec" => "general"
337            ),
338         
339         "IFMGMT_CMD"
340         => array (
341            "flag" => "IFMGMT_CMD",
342            "type" => "on/off",
343            "arch" => "all",
344            "value" => "on",
345            "cfgsec" => "general"
346            ),
347         
348         "ROUTE_CMD"
349         => array (
350            "flag" => "ROUTE_CMD",
351            "type" => "on/off",
352            "arch" => "all",
353            "value" => "on",
354            "cfgsec" => "general"
355            ),
356         
357         "DHCP_CMD"
358         => array ( 
359            "flag" => "DHCP_CMD",
360            "type" => "on/off",
361            "arch" => "all",
362            "value" => "on",
363            "cfgsec" => "general"
364                 ),
365         
366         "SANBOOT_CMD"
367         => array ( 
368            "flag" => "SANBOOT_CMD",
369            "type" => "on/off",
370            "arch" => "all",
371            "value" => "on",
372            "cfgsec" => "general"
373                 ),
374         
375         // End Command-line commands to include
376         
377 );
378
379 $flag_codes = array ();
380
381 function init_flag_tables () 
382 {
383     global $flag_table;
384
385     reset($flag_table);
386     $i = 1;
387     while ( list ( $key, $props ) = each ( $flag_table ) ) {
388         $is = ( string ) $i;
389
390         if ( $i < 10 )
391             $is = "0" . $is;
392
393         $props["code"] = $is;
394         $props["flag"] = $key;
395
396         $flag_table[$key] = $props;
397         $flag_codes[$is] = $props;
398         
399         $i = $i + 1;
400     }
401 }
402
403 init_flag_tables ();
404
405 // For emacs:
406 // Local variables:
407 //  c-basic-offset: 4
408 //  c-indent-level: 4
409 //  tab-width: 4
410 // End:
411
412 ?>