summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl/bgpctl.c
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/bgpctl.c
parent5b0dae60071f3691da10254fc987c1f5f086e9ad (diff)
new command "reload"
Diffstat (limited to 'usr.sbin/bgpctl/bgpctl.c')
-rw-r--r--usr.sbin/bgpctl/bgpctl.c14
1 files changed, 12 insertions, 2 deletions
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);
}