summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-03 22:27:07 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-03 22:27:07 +0000
commit00ae60cf6c832000dece2dbaf23ca62e0779f624 (patch)
tree944dc40e790e5f86637a4ce5bbaa7d0a32fbf1ba /usr.sbin/bgpctl
parentc4462c7bc108c51066adbc597288b3881d031fb9 (diff)
print message counters
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r--usr.sbin/bgpctl/bgpctl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index 2e67a5e0b55..4a2b083f0d4 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.6 2004/01/03 20:39:51 henning Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.7 2004/01/03 22:27:06 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -103,7 +103,8 @@ main(int argc, char *argv[])
void
summary_head(void)
{
- printf("%-15s %-5s %s\n", "Neighbor", "AS", "State");
+ printf("%-15s %-5s %-10s %-10s %s\n", "Neighbor", "AS", "MsgRcvd",
+ "MsgSent", "State");
}
int
@@ -114,9 +115,10 @@ summary_msg(struct imsg *imsg)
switch (imsg->hdr.type) {
case IMSG_CTL_SHOW_NEIGHBOR:
p = imsg->data;
- printf("%-15s %5u %s\n",
+ printf("%-15s %5u %10llu %10llu %s\n",
inet_ntoa(p->conf.remote_addr.sin_addr),
- p->conf.remote_as, statenames[p->state]);
+ p->conf.remote_as, p->stats.msg_rcvd,
+ p->stats.msg_send, statenames[p->state]);
break;
case IMSG_CTL_END:
return (1);