Add the ndiscvt utility from FreeBSD-5, which is used to compile windows
[dragonfly.git] / usr.sbin / ndiscvt / inf.h
1 /*
2  * $Id: inf.h,v 1.3 2003/11/30 21:58:16 winter Exp $
3  *
4  * $FreeBSD: src/usr.sbin/ndiscvt/inf.h,v 1.1 2003/12/11 22:38:14 wpaul Exp $
5  * $DragonFly: src/usr.sbin/ndiscvt/inf.h,v 1.1 2004/07/30 00:24:24 dillon Exp $
6  */
7
8 #define W_MAX   16
9
10 struct section {
11         const char *    name;
12
13         TAILQ_ENTRY(section)    link;
14 };
15 TAILQ_HEAD(section_head, section);
16
17 struct assign {
18         struct section  *section;
19
20         const char *    key;
21         const char *    vals[W_MAX];
22
23         TAILQ_ENTRY(assign)     link;
24 };
25 TAILQ_HEAD(assign_head, assign);
26
27 struct reg {
28         struct section *section;
29
30         const char *    root;
31         const char *    subkey;
32         const char *    key;
33         u_int           flags;
34         const char *    value;
35
36         TAILQ_ENTRY(reg)        link;
37 };
38 TAILQ_HEAD(reg_head, reg);
39
40 #define FLG_ADDREG_TYPE_SZ              0x00000000
41 #define FLG_ADDREG_BINVALUETYPE         0x00000001
42 #define FLG_ADDREG_NOCLOBBER            0x00000002
43 #define FLG_ADDREG_DELVAL               0x00000004
44 #define FLG_ADDREG_APPEND               0x00000008
45 #define FLG_ADDREG_KEYONLY              0x00000010
46 #define FLG_ADDREG_OVERWRITEONLY        0x00000020
47 #define FLG_ADDREG_64BITKEY             0x00001000
48 #define FLG_ADDREG_KEYONLY_COMMON       0x00002000
49 #define FLG_ADDREG_32BITKEY             0x00004000
50 #define FLG_ADDREG_TYPE_MULTI_SZ        0x00010000
51 #define FLG_ADDREG_TYPE_EXPAND_SZ       0x00020000
52 #define FLG_ADDREG_TYPE_DWORD           0x00010001
53 #define FLG_ADDREG_TYPE_NONE            0x00020001
54
55 extern void     section_add     (const char *);
56 extern void     assign_add      (const char *);
57 extern void     define_add      (const char *);
58 extern void     regkey_add      (const char *);
59
60 extern void     push_word       (const char *);
61 extern void     clear_words     (void);
62 extern int      inf_parse       (FILE *, FILE *);