mirror of
https://github.com/openbsd/src.git
synced 2025-01-04 23:35:36 -08:00
Implement "log verbose" and "log brief" to enable or disable verbose debug
logging. henning, sthen, michele like the idea
This commit is contained in:
parent
636d06c3c3
commit
c331907069
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: bgpctl.8,v 1.50 2009/09/08 16:11:36 sthen Exp $
|
||||
.\" $OpenBSD: bgpctl.8,v 1.51 2009/11/02 20:38:45 claudio Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
|
||||
.\"
|
||||
@ -14,7 +14,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: September 8 2009 $
|
||||
.Dd $Mdocdate: November 2 2009 $
|
||||
.Dt BGPCTL 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -84,6 +84,10 @@ Fetch only IPv4 prefixes from the registry.
|
||||
.It Fl 6
|
||||
Fetch only IPv6 prefixes from the registry.
|
||||
.El
|
||||
.It Cm log verbose
|
||||
Enable verbose debug logging.
|
||||
.It Cm log brief
|
||||
Disable verbose debug logging.
|
||||
.It Cm neighbor Ar peer Cm up
|
||||
Take the BGP session to the specified neighbor up.
|
||||
.Ar peer
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: bgpctl.c,v 1.148 2009/10/23 16:00:28 claudio Exp $ */
|
||||
/* $OpenBSD: bgpctl.c,v 1.149 2009/11/02 20:38:45 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
|
||||
@ -98,7 +98,7 @@ int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct sockaddr_un sun;
|
||||
int fd, n, done, ch, nodescr = 0;
|
||||
int fd, n, done, ch, nodescr = 0, verbose = 0;
|
||||
struct imsg imsg;
|
||||
struct network_config net;
|
||||
struct parse_result *res;
|
||||
@ -296,6 +296,15 @@ main(int argc, char *argv[])
|
||||
&ribreq, sizeof(ribreq));
|
||||
show_network_head();
|
||||
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;
|
||||
}
|
||||
|
||||
while (ibuf->w.queued)
|
||||
@ -373,6 +382,8 @@ main(int argc, char *argv[])
|
||||
case NETWORK_REMOVE:
|
||||
case NETWORK_FLUSH:
|
||||
case IRRFILTER:
|
||||
case LOG_VERBOSE:
|
||||
case LOG_BRIEF:
|
||||
break;
|
||||
}
|
||||
imsg_free(&imsg);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.c,v 1.56 2009/09/08 16:11:36 sthen Exp $ */
|
||||
/* $OpenBSD: parser.c,v 1.57 2009/11/02 20:38:45 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
|
||||
@ -97,6 +97,7 @@ static const struct token t_prepself[];
|
||||
static const struct token t_weight[];
|
||||
static const struct token t_irrfilter[];
|
||||
static const struct token t_irrfilter_opts[];
|
||||
static const struct token t_log[];
|
||||
|
||||
static const struct token t_main[] = {
|
||||
{ KEYWORD, "reload", RELOAD, NULL},
|
||||
@ -105,6 +106,7 @@ static const struct token t_main[] = {
|
||||
{ KEYWORD, "neighbor", NEIGHBOR, t_neighbor},
|
||||
{ KEYWORD, "network", NONE, t_network},
|
||||
{ KEYWORD, "irrfilter", IRRFILTER, t_irrfilter},
|
||||
{ KEYWORD, "log", NONE, t_log},
|
||||
{ ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
@ -311,6 +313,12 @@ static const struct token t_irrfilter_opts[] = {
|
||||
{ ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static const struct token t_log[] = {
|
||||
{ KEYWORD, "verbose", LOG_VERBOSE, NULL},
|
||||
{ KEYWORD, "brief", LOG_BRIEF, NULL},
|
||||
{ ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static struct parse_result res;
|
||||
|
||||
const struct token *match_token(int *argc, char **argv[],
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.h,v 1.19 2009/06/06 06:05:41 claudio Exp $ */
|
||||
/* $OpenBSD: parser.h,v 1.20 2009/11/02 20:38:45 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
|
||||
@ -37,6 +37,8 @@ enum actions {
|
||||
FIB,
|
||||
FIB_COUPLE,
|
||||
FIB_DECOUPLE,
|
||||
LOG_VERBOSE,
|
||||
LOG_BRIEF,
|
||||
NEIGHBOR,
|
||||
NEIGHBOR_UP,
|
||||
NEIGHBOR_DOWN,
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: dvmrpctl.8,v 1.6 2009/10/22 15:02:12 sobrado Exp $
|
||||
.\" $OpenBSD: dvmrpctl.8,v 1.7 2009/11/02 20:32:17 claudio Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
|
||||
.\"
|
||||
@ -14,7 +14,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: October 22 2009 $
|
||||
.Dd $Mdocdate: November 2 2009 $
|
||||
.Dt DVMRPCTL 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -33,6 +33,10 @@ daemon.
|
||||
.Pp
|
||||
The following commands are available:
|
||||
.Bl -tag -width Ds
|
||||
.It Cm log verbose
|
||||
Enable verbose debug logging.
|
||||
.It Cm log brief
|
||||
Disable verbose debug logging.
|
||||
.It Cm show igmp
|
||||
Show IGMP status for all interfaces.
|
||||
.It Cm show interfaces Op Ar interface
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: dvmrpctl.c,v 1.8 2009/09/14 11:49:25 claudio Exp $ */
|
||||
/* $OpenBSD: dvmrpctl.c,v 1.9 2009/11/02 20:32:17 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
|
||||
@ -79,7 +79,7 @@ main(int argc, char *argv[])
|
||||
struct imsg imsg;
|
||||
unsigned int ifidx = 0;
|
||||
int ctl_sock;
|
||||
int done = 0;
|
||||
int done = 0, verbose = 0;
|
||||
int n;
|
||||
|
||||
/* parse options */
|
||||
@ -155,6 +155,15 @@ main(int argc, char *argv[])
|
||||
case SHOW_MFC_DTAIL:
|
||||
imsg_compose(ibuf, IMSG_CTL_SHOW_MFC, 0, 0, -1, NULL, 0);
|
||||
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");
|
||||
@ -210,6 +219,8 @@ main(int argc, char *argv[])
|
||||
done = show_mfc_detail_msg(&imsg);
|
||||
break;
|
||||
case NONE:
|
||||
case LOG_VERBOSE:
|
||||
case LOG_BRIEF:
|
||||
case RELOAD:
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.c,v 1.2 2007/01/26 09:55:02 claudio Exp $ */
|
||||
/* $OpenBSD: parser.c,v 1.3 2009/11/02 20:32:17 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
|
||||
@ -55,10 +55,12 @@ static const struct token t_show_nbr[];
|
||||
static const struct token t_show_mfc[];
|
||||
static const struct token t_show_rib[];
|
||||
static const struct token t_show_fib[];
|
||||
static const struct token t_log[];
|
||||
|
||||
static const struct token t_main[] = {
|
||||
/* {KEYWORD, "reload", RELOAD, NULL}, */
|
||||
{KEYWORD, "show", SHOW, t_show},
|
||||
{KEYWORD, "log", NONE, t_log},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
@ -98,6 +100,13 @@ static const struct token t_show_rib[] = {
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static const struct token t_log[] = {
|
||||
{KEYWORD, "verbose", LOG_VERBOSE, NULL},
|
||||
{KEYWORD, "brief", LOG_BRIEF, NULL},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
|
||||
static struct parse_result res;
|
||||
|
||||
struct parse_result *
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.h,v 1.1 2006/06/01 14:21:28 norby Exp $ */
|
||||
/* $OpenBSD: parser.h,v 1.2 2009/11/02 20:32:17 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
|
||||
@ -37,6 +37,8 @@ enum actions {
|
||||
SHOW_RIB_DTAIL,
|
||||
SHOW_MFC,
|
||||
SHOW_MFC_DTAIL,
|
||||
LOG_VERBOSE,
|
||||
LOG_BRIEF,
|
||||
RELOAD
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: ldpctl.8,v 1.2 2009/10/27 16:22:15 sobrado Exp $
|
||||
.\" $OpenBSD: ldpctl.8,v 1.3 2009/11/02 20:35:20 claudio Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
|
||||
.\" Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
|
||||
@ -15,7 +15,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: October 27 2009 $
|
||||
.Dd $Mdocdate: November 2 2009 $
|
||||
.Dt LDPCTL 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -40,6 +40,10 @@ the kernel routing table.
|
||||
.It Cm lfib decouple
|
||||
Remove the learned routes from the Label Forwarding Information Base a.k.a.
|
||||
the kernel routing table.
|
||||
.It Cm log verbose
|
||||
Enable verbose debug logging.
|
||||
.It Cm log brief
|
||||
Disable verbose debug logging.
|
||||
.It Cm show lfib Op Ar destination | filter
|
||||
Show the Label Forwarding Information Base.
|
||||
.Ar destination
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ldpctl.c,v 1.5 2009/09/14 11:49:25 claudio Exp $
|
||||
/* $OpenBSD: ldpctl.c,v 1.6 2009/11/02 20:35:20 claudio Exp $
|
||||
*
|
||||
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
|
||||
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
|
||||
@ -71,7 +71,7 @@ main(int argc, char *argv[])
|
||||
struct imsg imsg;
|
||||
unsigned int ifidx = 0;
|
||||
int ctl_sock;
|
||||
int done = 0;
|
||||
int done = 0, verbose = 0;
|
||||
int n;
|
||||
|
||||
/* parse options */
|
||||
@ -151,6 +151,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");
|
||||
@ -194,6 +203,8 @@ main(int argc, char *argv[])
|
||||
case LFIB:
|
||||
case LFIB_COUPLE:
|
||||
case LFIB_DECOUPLE:
|
||||
case LOG_VERBOSE:
|
||||
case LOG_BRIEF:
|
||||
case RELOAD:
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.c,v 1.1 2009/06/01 20:59:45 michele Exp $ */
|
||||
/* $OpenBSD: parser.c,v 1.2 2009/11/02 20:35:20 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
|
||||
@ -59,11 +59,13 @@ static const struct token t_show_area[];
|
||||
static const struct token t_show_nbr[];
|
||||
static const struct token t_show_lib[];
|
||||
static const struct token t_show_lfib[];
|
||||
static const struct token t_log[];
|
||||
|
||||
static const struct token t_main[] = {
|
||||
/* {KEYWORD, "reload", RELOAD, NULL}, */
|
||||
{KEYWORD, "lfib", LFIB, t_lfib},
|
||||
{KEYWORD, "show", SHOW, t_show},
|
||||
{KEYWORD, "log", NONE, t_log},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
@ -97,6 +99,12 @@ static const struct token t_show_lib[] = {
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static const struct token t_log[] = {
|
||||
{KEYWORD, "verbose", LOG_VERBOSE, NULL},
|
||||
{KEYWORD, "brief", LOG_BRIEF, NULL},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static const struct token t_show_lfib[] = {
|
||||
{NOTOKEN, "", NONE, NULL},
|
||||
{KEYWORD, "interface", SHOW_LFIB_IFACE, t_show_iface},
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.h,v 1.1 2009/06/01 20:59:45 michele Exp $ */
|
||||
/* $OpenBSD: parser.h,v 1.2 2009/11/02 20:35:20 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
|
||||
@ -30,6 +30,8 @@ enum actions {
|
||||
LFIB,
|
||||
LFIB_COUPLE,
|
||||
LFIB_DECOUPLE,
|
||||
LOG_VERBOSE,
|
||||
LOG_BRIEF,
|
||||
SHOW,
|
||||
SHOW_IFACE,
|
||||
SHOW_NBR,
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: ospf6ctl.8,v 1.4 2009/10/22 15:02:12 sobrado Exp $
|
||||
.\" $OpenBSD: ospf6ctl.8,v 1.5 2009/11/02 20:25:27 claudio Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2004, 2005, 2007 Esben Norby <norby@openbsd.org>
|
||||
.\"
|
||||
@ -14,7 +14,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: October 22 2009 $
|
||||
.Dd $Mdocdate: November 2 2009 $
|
||||
.Dt OSPF6CTL 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -41,6 +41,10 @@ Remove the learned routes from the FIB.
|
||||
Decoupling the FIB from an OSPF router may create routing loops and could cause
|
||||
major routing issues in the complete OSPF cloud.
|
||||
Only routers with just one link to the OSPF cloud can safely decouple the FIB.
|
||||
.It Cm log verbose
|
||||
Enable verbose debug logging.
|
||||
.It Cm log brief
|
||||
Disable verbose debug logging.
|
||||
.It Cm reload
|
||||
Reload the configuration file.
|
||||
.It Cm show database Op Ar filter
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ospf6ctl.c,v 1.29 2009/09/14 11:49:25 claudio Exp $ */
|
||||
/* $OpenBSD: ospf6ctl.c,v 1.30 2009/11/02 20:25:27 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
|
||||
@ -87,7 +87,7 @@ main(int argc, char *argv[])
|
||||
struct imsg imsg;
|
||||
unsigned int ifidx = 0;
|
||||
int ctl_sock;
|
||||
int done = 0;
|
||||
int done = 0, verbose = 0;
|
||||
int n;
|
||||
|
||||
/* parse options */
|
||||
@ -199,6 +199,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");
|
||||
@ -265,6 +274,8 @@ main(int argc, char *argv[])
|
||||
case FIB:
|
||||
case FIB_COUPLE:
|
||||
case FIB_DECOUPLE:
|
||||
case LOG_VERBOSE:
|
||||
case LOG_BRIEF:
|
||||
case RELOAD:
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.c,v 1.6 2009/01/28 22:51:26 stsp Exp $ */
|
||||
/* $OpenBSD: parser.c,v 1.7 2009/11/02 20:25:27 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
|
||||
@ -59,11 +59,13 @@ static const struct token t_show_area[];
|
||||
static const struct token t_show_nbr[];
|
||||
static const struct token t_show_rib[];
|
||||
static const struct token t_show_fib[];
|
||||
static const struct token t_log[];
|
||||
|
||||
static const struct token t_main[] = {
|
||||
{KEYWORD, "reload", RELOAD, NULL},
|
||||
{KEYWORD, "fib", FIB, t_fib},
|
||||
{KEYWORD, "show", SHOW, t_show},
|
||||
{KEYWORD, "log", NONE, t_log},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
@ -131,6 +133,12 @@ static const struct token t_show_fib[] = {
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static const struct token t_log[] = {
|
||||
{KEYWORD, "verbose", LOG_VERBOSE, NULL},
|
||||
{KEYWORD, "brief", LOG_BRIEF, NULL},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static struct parse_result res;
|
||||
|
||||
struct parse_result *
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.h,v 1.5 2009/01/28 22:51:26 stsp Exp $ */
|
||||
/* $OpenBSD: parser.h,v 1.6 2009/11/02 20:25:27 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
|
||||
@ -29,6 +29,8 @@ enum actions {
|
||||
FIB,
|
||||
FIB_COUPLE,
|
||||
FIB_DECOUPLE,
|
||||
LOG_VERBOSE,
|
||||
LOG_BRIEF,
|
||||
SHOW,
|
||||
SHOW_SUM,
|
||||
SHOW_IFACE,
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: ospfctl.8,v 1.22 2009/10/22 15:02:12 sobrado Exp $
|
||||
.\" $OpenBSD: ospfctl.8,v 1.23 2009/11/02 20:23:29 claudio Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
|
||||
.\"
|
||||
@ -14,7 +14,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: October 22 2009 $
|
||||
.Dd $Mdocdate: November 2 2009 $
|
||||
.Dt OSPFCTL 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -54,6 +54,10 @@ a.k.a. the kernel routing table.
|
||||
Decoupling the FIB from an OSPF router may create routing loops and could cause
|
||||
major routing issues in the complete OSPF cloud.
|
||||
Only routers with just one link to the OSPF cloud can safely decouple the FIB.
|
||||
.It Cm log verbose
|
||||
Enable verbose debug logging.
|
||||
.It Cm log brief
|
||||
Disable verbose debug logging.
|
||||
.It Cm reload
|
||||
Reload the configuration file.
|
||||
.It Cm show database Op Ar filter
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.c,v 1.15 2007/10/14 01:28:08 deraadt Exp $ */
|
||||
/* $OpenBSD: parser.c,v 1.16 2009/11/02 20:23:29 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
|
||||
@ -58,11 +58,13 @@ static const struct token t_show_area[];
|
||||
static const struct token t_show_nbr[];
|
||||
static const struct token t_show_rib[];
|
||||
static const struct token t_show_fib[];
|
||||
static const struct token t_log[];
|
||||
|
||||
static const struct token t_main[] = {
|
||||
{KEYWORD, "reload", RELOAD, NULL},
|
||||
{KEYWORD, "fib", FIB, t_fib},
|
||||
{KEYWORD, "show", SHOW, t_show},
|
||||
{KEYWORD, "log", NONE, t_log},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
@ -129,6 +131,12 @@ static const struct token t_show_fib[] = {
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static const struct token t_log[] = {
|
||||
{KEYWORD, "verbose", LOG_VERBOSE, NULL},
|
||||
{KEYWORD, "brief", LOG_BRIEF, NULL},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static struct parse_result res;
|
||||
|
||||
struct parse_result *
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.h,v 1.8 2006/03/23 18:37:34 norby Exp $ */
|
||||
/* $OpenBSD: parser.h,v 1.9 2009/11/02 20:23:29 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
|
||||
@ -29,6 +29,8 @@ enum actions {
|
||||
FIB,
|
||||
FIB_COUPLE,
|
||||
FIB_DECOUPLE,
|
||||
LOG_VERBOSE,
|
||||
LOG_BRIEF,
|
||||
SHOW,
|
||||
SHOW_SUM,
|
||||
SHOW_IFACE,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.c,v 1.2 2007/01/26 10:04:56 claudio Exp $ */
|
||||
/* $OpenBSD: parser.c,v 1.3 2009/11/02 20:29:17 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
|
||||
@ -59,11 +59,13 @@ static const struct token t_show_area[];
|
||||
static const struct token t_show_nbr[];
|
||||
static const struct token t_show_rib[];
|
||||
static const struct token t_show_fib[];
|
||||
static const struct token t_log[];
|
||||
|
||||
static const struct token t_main[] = {
|
||||
/* {KEYWORD, "reload", RELOAD, NULL}, */
|
||||
{KEYWORD, "fib", FIB, t_fib},
|
||||
{KEYWORD, "show", SHOW, t_show},
|
||||
{KEYWORD, "log", NONE, t_log},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
@ -107,6 +109,12 @@ static const struct token t_show_fib[] = {
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static const struct token t_log[] = {
|
||||
{KEYWORD, "verbose", LOG_VERBOSE, NULL},
|
||||
{KEYWORD, "brief", LOG_BRIEF, NULL},
|
||||
{ENDTOKEN, "", NONE, NULL}
|
||||
};
|
||||
|
||||
static struct parse_result res;
|
||||
|
||||
struct parse_result *
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parser.h,v 1.1 2006/10/18 16:15:25 norby Exp $ */
|
||||
/* $OpenBSD: parser.h,v 1.2 2009/11/02 20:29:17 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
|
||||
@ -30,6 +30,8 @@ enum actions {
|
||||
FIB,
|
||||
FIB_COUPLE,
|
||||
FIB_DECOUPLE,
|
||||
LOG_VERBOSE,
|
||||
LOG_BRIEF,
|
||||
SHOW,
|
||||
SHOW_IFACE,
|
||||
SHOW_NBR,
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: ripctl.8,v 1.7 2009/10/22 15:02:12 sobrado Exp $
|
||||
.\" $OpenBSD: ripctl.8,v 1.8 2009/11/02 20:29:17 claudio Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
|
||||
.\" Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
|
||||
@ -15,7 +15,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: October 22 2009 $
|
||||
.Dd $Mdocdate: November 2 2009 $
|
||||
.Dt RIPCTL 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -42,6 +42,10 @@ Remove the learned routes from the Forward Information Base a.k.a. the kernel
|
||||
routing table.
|
||||
Decoupling the FIB from an RIP router may create routing loops and could cause
|
||||
major routing issues.
|
||||
.It Cm log verbose
|
||||
Enable verbose debug logging.
|
||||
.It Cm log brief
|
||||
Disable verbose debug logging.
|
||||
.It Cm show fib Op Ar destination | filter
|
||||
Show the Forwarding Information Base.
|
||||
.Ar destination
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ripctl.c,v 1.9 2009/09/14 11:49:25 claudio Exp $
|
||||
/* $OpenBSD: ripctl.c,v 1.10 2009/11/02 20:29:17 claudio Exp $
|
||||
*
|
||||
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
|
||||
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
|
||||
@ -70,7 +70,7 @@ main(int argc, char *argv[])
|
||||
struct imsg imsg;
|
||||
unsigned int ifidx = 0;
|
||||
int ctl_sock;
|
||||
int done = 0;
|
||||
int done = 0, verbose = 0;
|
||||
int n;
|
||||
|
||||
/* parse options */
|
||||
@ -150,6 +150,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");
|
||||
@ -193,6 +202,8 @@ main(int argc, char *argv[])
|
||||
case FIB:
|
||||
case FIB_COUPLE:
|
||||
case FIB_DECOUPLE:
|
||||
case LOG_VERBOSE:
|
||||
case LOG_BRIEF:
|
||||
case RELOAD:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user