summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfctl/ospfctl.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-11-02 20:23:30 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-11-02 20:23:30 +0000
commit5dfb6db929c9e9f9ca4cb190f229e5748e0c0d74 (patch)
treef3792c3c6e5d5c654f5838e5aec17559552269d5 /usr.sbin/ospfctl/ospfctl.c
parentaa53dd77fecb39b8af5c2ae7d479db56e491f531 (diff)
Implement "log verbose" and "log brief" to enable or disable verbose debug
logging. henning, sthen, michele like the idea
Diffstat (limited to 'usr.sbin/ospfctl/ospfctl.c')
-rw-r--r--usr.sbin/ospfctl/ospfctl.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.sbin/ospfctl/ospfctl.c b/usr.sbin/ospfctl/ospfctl.c
index d770e5dbd92..af601c9fe21 100644
--- a/usr.sbin/ospfctl/ospfctl.c
+++ b/usr.sbin/ospfctl/ospfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfctl.c,v 1.49 2009/09/14 11:49:25 claudio Exp $ */
+/* $OpenBSD: ospfctl.c,v 1.50 2009/11/02 20:23:29 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
unsigned int ifidx = 0;
int ctl_sock;
int done = 0;
- int n;
+ int n, verbose = 0;
int ch;
char *sockname;
@@ -220,6 +220,15 @@ main(int argc, char *argv[])
printf("decouple request sent.\n");
done = 1;
break;
+ case LOG_VERBOSE:
+ verbose = 1;
+ /* FALLTHROUGH */
+ case LOG_BRIEF:
+ imsg_compose(ibuf, IMSG_CTL_LOG_VERBOSE, 0, 0, -1,
+ &verbose, sizeof(verbose));
+ printf("logging request sent.\n");
+ done = 1;
+ break;
case RELOAD:
imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1, NULL, 0);
printf("reload request sent.\n");
@@ -287,6 +296,8 @@ main(int argc, char *argv[])
case FIB:
case FIB_COUPLE:
case FIB_DECOUPLE:
+ case LOG_VERBOSE:
+ case LOG_BRIEF:
case RELOAD:
break;
}