summaryrefslogtreecommitdiff
path: root/usr.sbin/relayctl/parser.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2007-02-22 03:32:41 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2007-02-22 03:32:41 +0000
commitb8b5308cae709adc7b92263ac61594c76949364e (patch)
tree2bac390064e9007c688d03c0520127876862c33e /usr.sbin/relayctl/parser.c
parent28be4aaf667d9ad44c93bdc68b15a111e28fe396 (diff)
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/relayctl/parser.c')
-rw-r--r--usr.sbin/relayctl/parser.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/relayctl/parser.c b/usr.sbin/relayctl/parser.c
index 12ce147835f..3490043d865 100644
--- a/usr.sbin/relayctl/parser.c
+++ b/usr.sbin/relayctl/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},