* A keyword list. It is a NULL-terminated array of keywords. It embeds a
* struct list in order to be linked to other lists, allowing it to easily
* be declared where it is needed, and linked without duplicating data nor
- * allocating memory.
+ * allocating memory. It is also possible to indicate a scope for the keywords.
*/
struct bind_kw_list {
+ const char *scope;
struct list list;
struct bind_kw kw[VAR_ARRAY];
};
for (index = 0; kwl->kw[index].kw != NULL; index++) {
if (kwl->kw[index].parse ||
bind_find_kw(kwl->kw[index].kw) == &kwl->kw[index]) {
- memprintf(out, "%s%s %s\n", *out ? *out : "",
+ memprintf(out, "%s[%4s] %s%s%s\n", *out ? *out : "",
+ kwl->scope,
kwl->kw[index].kw,
- kwl->kw[index].parse ? "" : "(not supported)");
+ kwl->kw[index].skip ? " <arg>" : "",
+ kwl->kw[index].parse ? "" : " (not supported)");
}
}
}
* the config parser can report an appropriate error when a known keyword was
* not enabled.
*/
-static struct bind_kw_list bind_kws = {{ },{
+static struct bind_kw_list bind_kws = { "ALL", { }, {
{ "accept-proxy", bind_parse_accept_proxy, 0 }, /* enable PROXY protocol */
{ "backlog", bind_parse_backlog, 1 }, /* set backlog of listening socket */
{ "id", bind_parse_id, 1 }, /* set id of listening socket */
* the config parser can report an appropriate error when a known keyword was
* not enabled.
*/
-static struct bind_kw_list bind_kws = {{ },{
+static struct bind_kw_list bind_kws = { "TCP", { }, {
#ifdef TCP_DEFER_ACCEPT
{ "defer-accept", bind_parse_defer_accept, 0 }, /* wait for some data for 1 second max before doing accept */
#endif
* the config parser can report an appropriate error when a known keyword was
* not enabled.
*/
-static struct bind_kw_list bind_kws = {{ },{
+static struct bind_kw_list bind_kws = { "UNIX", { }, {
{ "gid", bind_parse_gid, 1 }, /* set the socket's gid */
{ "group", bind_parse_group, 1 }, /* set the socket's gid from the group name */
{ "mode", bind_parse_mode, 1 }, /* set the socket's mode (eg: 0644)*/
* the config parser can report an appropriate error when a known keyword was
* not enabled.
*/
-static struct bind_kw_list bind_kws = {{ },{
+static struct bind_kw_list bind_kws = { "SSL", { }, {
{ "ciphers", bind_parse_ciphers, 1 }, /* set SSL cipher suite */
{ "crt", bind_parse_crt, 1 }, /* load SSL certificates from this location */
{ "nosslv3", bind_parse_nosslv3, 0 }, /* disable SSLv3 */