summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/control.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-01-24 15:28:04 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-01-24 15:28:04 +0000
commitded54983abd2d80d7f83c9e2e0ac5aa51217b971 (patch)
tree3a49f75279d2582c27b57dcf271b40afc2925c60 /usr.sbin/bgpd/control.c
parent55ed7191539b1e13751499710c9b27d872808d52 (diff)
introduce "bgpctl show summary terse", shows summary in an easy to parse
format, intended for monitoring puposes. claudio ok
Diffstat (limited to 'usr.sbin/bgpd/control.c')
-rw-r--r--usr.sbin/bgpd/control.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c
index a9e043990f2..a22d3629cc4 100644
--- a/usr.sbin/bgpd/control.c
+++ b/usr.sbin/bgpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.48 2006/01/24 10:04:36 henning Exp $ */
+/* $OpenBSD: control.c,v 1.49 2006/01/24 15:28:03 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -232,6 +232,7 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt)
case IMSG_CTL_SHOW_RIB_PREFIX:
case IMSG_CTL_SHOW_RIB_MEM:
case IMSG_CTL_SHOW_NETWORK:
+ case IMSG_CTL_SHOW_TERSE:
break;
default:
/* clear imsg type to prevent processing */
@@ -264,6 +265,12 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt)
p, sizeof(struct peer));
imsg_compose_rde(IMSG_CTL_END, imsg.hdr.pid, NULL, 0);
break;
+ case IMSG_CTL_SHOW_TERSE:
+ for (p = peers; p != NULL; p = p->next)
+ imsg_compose(&c->ibuf, IMSG_CTL_SHOW_NEIGHBOR,
+ 0, 0, -1, p, sizeof(struct peer));
+ imsg_compose(&c->ibuf, IMSG_CTL_END, 0, 0, -1, NULL, 0);
+ break;
case IMSG_CTL_RELOAD:
case IMSG_CTL_FIB_COUPLE:
case IMSG_CTL_FIB_DECOUPLE: