-/* $OpenBSD: bgplg.c,v 1.16 2016/04/05 21:57:58 sthen Exp $ */
+/* $OpenBSD: bgplg.c,v 1.17 2017/12/17 18:41:17 job Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
printf("<option value='%s'>%s</option>\n",
cmds[i].name, cmds[i].name);
}
+
+ if ((req = lg_getarg("req=", query, query_length)) != NULL) {
+ /* Could be NULL */
+ argv = lg_arg2argv(req, &argc);
+ }
+
printf("</select>\n"
- "<input type='text' name='req'/>\n"
+ "<input type='text' value='%s' name='req'/>\n"
"<input type='submit' value='submit'/>\n"
"</div>\n"
"</form>\n"
- "<pre>\n");
+ "<pre>\n", req ? req : "");
fflush(stdout);
#ifdef DEBUG
printf("unspecified command\n");
goto err;
}
- if ((req = lg_getarg("req=", query, query_length)) != NULL) {
- /* Could be NULL */
- argv = lg_arg2argv(req, &argc);
- }
for (i = 0; cmds[i].name != NULL; i++) {
if (strcmp(cmd, cmds[i].name) == 0) {
-/* $OpenBSD: bgplg.h,v 1.11 2017/08/09 19:15:18 phessler Exp $ */
+/* $OpenBSD: bgplg.h,v 1.12 2017/12/17 18:41:17 job Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
{ BGPCTL, "show", "ip", "bgp", "empty-as", NULL } }, \
{ "show ip bgp summary", 0, 0, NULL, \
{ BGPCTL, "show", "ip", "bgp", "summary", NULL } }, \
+ { "show ip bgp community", 1, 1, "<community>", \
+ { BGPCTL, "show","ip", "bgp", "community", NULL } }, \
+ { "show ip bgp detail community", 1, 1, "<community>", \
+ { BGPCTL, "show","ip", "bgp", "detail", "community", NULL } },\
+ { "show ip bgp large-community", 1, 1, "<large-community>",\
+ { BGPCTL, "show","ip", "bgp", "large-community", NULL } }, \
+ { "show ip bgp detail large-community", 1, 1, "<large-community>",\
+ { BGPCTL, "show","ip", "bgp", "detail", "large-community", NULL } },\
{ "show ip bgp detail", 1, 1, "<prefix>", \
{ BGPCTL, "show","ip", "bgp", "detail", NULL } }, \
{ "show ip bgp detail as", 1, 1, "<prefix>", \