summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-04 19:44:28 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-04 19:44:28 +0000
commit6d1ad67dd0d54c5bb92330932aa6f70acacc404f (patch)
tree06203ac04a6332ea27d42d4e2d87ca6822c5fd2e /usr.sbin/bgpctl
parent5b0dae60071f3691da10254fc987c1f5f086e9ad (diff)
new command "reload"
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r--usr.sbin/bgpctl/bgpctl.85
-rw-r--r--usr.sbin/bgpctl/bgpctl.c14
2 files changed, 16 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.8 b/usr.sbin/bgpctl/bgpctl.8
index d2b34249a69..d8232a11e58 100644
--- a/usr.sbin/bgpctl/bgpctl.8
+++ b/usr.sbin/bgpctl/bgpctl.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: bgpctl.8,v 1.2 2004/01/04 19:01:12 henning Exp $
+.\" $OpenBSD: bgpctl.8,v 1.3 2004/01/04 19:44:27 henning Exp $
.\"
.\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
.\"
@@ -40,6 +40,9 @@ and message counters.
.It Li show neighbor Ar address
Show detailed information about the neighbor identified by
.Ar address .
+.Pp
+.It Li reload
+Reload the configuration file.
.El
.Sh SEE ALSO
.Xr bgpd 8
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index 39033abc062..5a0490b56d2 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.11 2004/01/04 18:51:23 henning Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.12 2004/01/04 19:44:27 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -31,7 +31,8 @@
enum actions {
SHOW,
SHOW_SUMMARY,
- SHOW_NEIGHBOR
+ SHOW_NEIGHBOR,
+ RELOAD
};
struct keywords {
@@ -40,6 +41,7 @@ struct keywords {
};
static const struct keywords keywords_main[] = {
+ { "reload", RELOAD},
{ "show", SHOW}
};
@@ -112,6 +114,12 @@ again:
} else
imsg_compose(&ibuf, IMSG_CTL_SHOW_NEIGHBOR, 0, NULL, 0);
break;
+ case RELOAD:
+ if (argc >= 3)
+ errx(1, "\"reload\" takes no options");
+ imsg_compose(&ibuf, IMSG_CTL_RELOAD, 0, NULL, 0);
+ printf("reload request sent.\n");
+ done = 1;
}
while (!done) {
@@ -135,6 +143,8 @@ again:
case SHOW_NEIGHBOR:
done = show_neighbor_msg(&imsg);
break;
+ case RELOAD:
+ break;
}
imsg_free(&imsg);
}