summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ospfctl/parser.c
diff options
context:
space:
mode:
authornorby <norby@openbsd.org>2006-03-23 18:37:34 +0000
committernorby <norby@openbsd.org>2006-03-23 18:37:34 +0000
commit12bb42a032f143779040de9df46f46432573ad97 (patch)
tree2efa003e359836851dace2b163d20d9ba4957d77 /usr.sbin/ospfctl/parser.c
parentkill evil \r; from cedric (diff)
downloadwireguard-openbsd-12bb42a032f143779040de9df46f46432573ad97.tar.xz
wireguard-openbsd-12bb42a032f143779040de9df46f46432573ad97.zip
List interfaces they way we list neighbors etc.
This makes it much easier to grep in the output. The original format of "show interface" can be seen with "show interface detail". help and ok claudio@
Diffstat (limited to 'usr.sbin/ospfctl/parser.c')
-rw-r--r--usr.sbin/ospfctl/parser.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/ospfctl/parser.c b/usr.sbin/ospfctl/parser.c
index 72ce75bc635..11babc4a357 100644
--- a/usr.sbin/ospfctl/parser.c
+++ b/usr.sbin/ospfctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.10 2006/03/22 15:37:44 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.11 2006/03/23 18:37:34 norby Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -84,9 +84,10 @@ static const struct token t_show[] = {
};
static const struct token t_show_iface[] = {
- {NOTOKEN, "", NONE, NULL},
- {IFNAME, "", NONE, NULL},
- {ENDTOKEN, "", NONE, NULL}
+ {NOTOKEN, "", NONE, NULL},
+ {KEYWORD, "detail", SHOW_IFACE_DTAIL, NULL},
+ {IFNAME, "", SHOW_IFACE_DTAIL, NULL},
+ {ENDTOKEN, "", NONE, NULL}
};
static const struct token t_show_db[] = {
@@ -219,6 +220,8 @@ match_token(const char *word, const struct token table[])
err(1, "interface name too long");
match++;
t = &table[i];
+ if (t->value)
+ res.action = t->value;
}
break;