summaryrefslogtreecommitdiffstats
path: root/usr.sbin/hoststatectl/parser.c
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2007-02-22 03:32:39 +0000
committerreyk <reyk@openbsd.org>2007-02-22 03:32:39 +0000
commit2edd718bd68a9c827be137ebb51a319071210c69 (patch)
tree8c1c5b888f71aa148d70db79b9527a623ad5e0be /usr.sbin/hoststatectl/parser.c
parentExpand description. (diff)
downloadwireguard-openbsd-2edd718bd68a9c827be137ebb51a319071210c69.tar.xz
wireguard-openbsd-2edd718bd68a9c827be137ebb51a319071210c69.zip
Add layer 7 functionality to hoststated used for layer 7
loadbalancing, SSL acceleration, general-purpose TCP relaying, and transparent proxying. see hoststated.conf(5) and my upcoming article on undeadly.org for details. ok to commit deraadt@ pyr@
Diffstat (limited to 'usr.sbin/hoststatectl/parser.c')
-rw-r--r--usr.sbin/hoststatectl/parser.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/hoststatectl/parser.c b/usr.sbin/hoststatectl/parser.c
index 12ce147835f..3490043d865 100644
--- a/usr.sbin/hoststatectl/parser.c
+++ b/usr.sbin/hoststatectl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.9 2007/02/06 16:24:14 pyr Exp $ */
+/* $OpenBSD: parser.c,v 1.10 2007/02/22 03:32:40 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -55,6 +55,7 @@ struct token {
};
static const struct token t_main[];
+static const struct token t_show[];
static const struct token t_service[];
static const struct token t_table[];
static const struct token t_host[];
@@ -64,7 +65,7 @@ static const struct token t_host_id[];
static const struct token t_main[] = {
{KEYWORD, "monitor", MONITOR, NULL},
- {KEYWORD, "show", SHOW_SUM, NULL},
+ {KEYWORD, "show", NULL, t_show},
{KEYWORD, "stop", SHUTDOWN, NULL},
{KEYWORD, "service", NONE, t_service},
{KEYWORD, "table", NONE, t_table},
@@ -72,6 +73,13 @@ static const struct token t_main[] = {
{ENDTOKEN, "", NONE, NULL}
};
+static const struct token t_show[] = {
+ {KEYWORD, "summary", SHOW_SUM, NULL},
+ {KEYWORD, "hosts", SHOW_HOSTS, NULL},
+ {KEYWORD, "relays", SHOW_RELAYS, NULL},
+ {ENDTOKEN, "", NONE, NULL}
+};
+
static const struct token t_service[] = {
{NOTOKEN, "", NONE, NULL},
{KEYWORD, "disable", SERV_DISABLE, t_service_id},