49 UcxMap *objects; // contains UcxList of ServerConfigObject |
49 UcxMap *objects; // contains UcxList of ServerConfigObject |
50 // parser temp vars |
50 // parser temp vars |
51 ServerConfigObject *obj; |
51 ServerConfigObject *obj; |
52 } ServerConfig; |
52 } ServerConfig; |
53 |
53 |
54 // server.conf objects |
|
55 |
|
56 typedef struct _cfg_listener { |
|
57 ServerConfigObject *cfgobj; |
|
58 sstr_t name; |
|
59 sstr_t vs; |
|
60 sstr_t threadpool; |
|
61 sstr_t address; |
|
62 int port; |
|
63 int nacceptors; |
|
64 int cfg_correct; |
|
65 } CfgListener; |
|
66 |
|
67 typedef struct _cfg_keyfile_authdb { |
|
68 sstr_t file; |
|
69 } CfgKeyfileAuthDB; |
|
70 |
|
71 typedef struct _cfg_ldap_authdb { |
|
72 sstr_t host; |
|
73 int port; |
|
74 sstr_t basedn; |
|
75 sstr_t binddn; |
|
76 sstr_t bindpw; |
|
77 } CfgLDAPAuthDB; |
|
78 |
|
79 union authdb { |
|
80 CfgKeyfileAuthDB keyfile; |
|
81 CfgLDAPAuthDB ldap; |
|
82 }; |
|
83 |
|
84 enum authdb_type { |
|
85 AUTHDB_TYPE_KEYFILE, |
|
86 AUTHDB_TYPE_LDAP |
|
87 }; |
|
88 |
|
89 typedef struct _cfg_authdb { |
|
90 sstr_t name; |
|
91 enum authdb_type type; |
|
92 union authdb cfg; |
|
93 int cfg_correct; |
|
94 } CfgAuthDB; |
|
95 |
54 |
96 |
55 |
97 /* |
56 /* |
98 * Loads and parses a server configuration file. The function only structures |
57 * Loads and parses a server configuration file. The function only structures |
99 * the file content to configuration objects with directives. The semantics |
58 * the file content to configuration objects with directives. The semantics |