-.\" $OpenBSD: bgpctl.8,v 1.98 2021/05/20 10:03:43 claudio Exp $
+.\" $OpenBSD: bgpctl.8,v 1.99 2021/06/16 16:24:12 job Exp $
.\"
.\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 20 2021 $
+.Dd $Mdocdate: June 16 2021 $
.Dt BGPCTL 8
.Os
.Sh NAME
.Nd control the Border Gateway Protocol daemon
.Sh SYNOPSIS
.Nm bgpctl
-.Op Fl jn
+.Op Fl jnV
.Op Fl s Ar socket
.Ar command
.Op Ar argument ...
in a different routing domain, run
.Nm
in said routing domain.
+.It Fl V
+Show the version and exit.
.El
.Pp
The commands are as follows:
-/* $OpenBSD: bgpctl.c,v 1.268 2021/05/27 08:29:06 claudio Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.269 2021/06/16 16:24:11 job Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
#include "bgpd.h"
#include "session.h"
#include "rde.h"
+#include "version.h"
#include "bgpctl.h"
#include "parser.h"
if (asprintf(&sockname, "%s.%d", SOCKET_NAME, tableid) == -1)
err(1, "asprintf");
- while ((ch = getopt(argc, argv, "jns:")) != -1) {
+ while ((ch = getopt(argc, argv, "jns:V")) != -1) {
switch (ch) {
case 'n':
if (++nodescr > 1)
case 's':
sockname = optarg;
break;
+ case 'V':
+ fprintf(stderr, "OpenBGPD %s\n", BGPD_VERSION);
+ return 0;
default:
usage();
/* NOTREACHED */
-.\" $OpenBSD: bgpd.8,v 1.67 2021/05/25 14:18:44 claudio Exp $
+.\" $OpenBSD: bgpd.8,v 1.68 2021/06/16 16:24:12 job Exp $
.\"
.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 25 2021 $
+.Dd $Mdocdate: June 16 2021 $
.Dt BGPD 8
.Os
.Sh NAME
.Sh SYNOPSIS
.Nm bgpd
.Bk -words
-.Op Fl cdnv
+.Op Fl cdnvV
.Op Fl D Ar macro Ns = Ns Ar value
.Op Fl f Ar file
.Ek
Only check the configuration file for validity.
.It Fl v
Produce more verbose output.
+.It Fl V
+Show the version and exit.
.El
.Sh FILES
.Bl -tag -width "/var/run/bgpd.sock.<rdomain>" -compact
-/* $OpenBSD: bgpd.c,v 1.237 2021/05/17 10:47:07 claudio Exp $ */
+/* $OpenBSD: bgpd.c,v 1.238 2021/06/16 16:24:12 job Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
#include "bgpd.h"
#include "session.h"
#include "log.h"
+#include "version.h"
void sighdlr(int);
__dead void usage(void);
if (saved_argv0 == NULL)
saved_argv0 = "bgpd";
- while ((ch = getopt(argc, argv, "cdD:f:nRSTv")) != -1) {
+ while ((ch = getopt(argc, argv, "cdD:f:nRSTvV")) != -1) {
switch (ch) {
case 'c':
cmd_opts |= BGPD_OPT_FORCE_DEMOTE;
case 'T':
proc = PROC_RTR;
break;
+ case 'V':
+ fprintf(stderr, "OpenBGPD %s\n", BGPD_VERSION);
+ return 0;
default:
usage();
/* NOTREACHED */
--- /dev/null
+
+#define BGPD_VERSION "7.0"