-.\" $OpenBSD: bgpctl.8,v 1.106 2023/03/13 16:59:22 claudio Exp $
+.\" $OpenBSD: bgpctl.8,v 1.107 2023/04/12 17:19:16 claudio 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: March 13 2023 $
+.Dd $Mdocdate: April 12 2023 $
.Dt BGPCTL 8
.Os
.Sh NAME
Adding a prefix will replace an existing equal prefix, including
prefixes loaded from the configuration.
.It Xo
-.Cm network bulk
+.Cm network bulk add
.Op Ar argument ...
-.Op Cm add
.Xc
Bulk add specified prefixes to the list of announced networks.
Prefixes should be sent via stdin.
It is possible to set various path attributes with additional arguments.
-If neither
-.Cm add
-or
-.Cm delete
-is given,
-.Cm add
-is the default.
.It Cm network bulk delete
Bulk remove the specified prefixes from the list of announced networks.
Prefixes should be sent via stdin.
-/* $OpenBSD: parser.c,v 1.122 2023/03/13 16:59:22 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.123 2023/04/12 17:19:16 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
static const struct token t_show_ext_subtype[];
static const struct token t_show_largecommunity[];
static const struct token t_network[];
+static const struct token t_bulk[];
static const struct token t_network_show[];
static const struct token t_prefix[];
static const struct token t_set[];
{ KEYWORD, "flush", NETWORK_FLUSH, NULL},
{ KEYWORD, "show", NETWORK_SHOW, t_network_show},
{ KEYWORD, "mrt", NETWORK_MRT, t_show_mrt},
- { KEYWORD, "bulk", NETWORK_BULK_ADD, t_set},
+ { KEYWORD, "bulk", NONE, t_bulk},
{ ENDTOKEN, "", NONE, NULL}
};
+static const struct token t_bulk[] = {
+ { KEYWORD, "add", NETWORK_BULK_ADD, t_set},
+ { KEYWORD, "delete", NETWORK_BULK_REMOVE, NULL},
+ { ENDTOKEN, "", NONE, NULL}
+};
+
static const struct token t_prefix[] = {
{ PREFIX, "", NONE, t_set},
{ ENDTOKEN, "", NONE, NULL}
{ KEYWORD, "prepend-self", NONE, t_prepself},
{ KEYWORD, "rd", NONE, t_rd},
{ KEYWORD, "weight", NONE, t_weight},
- { KEYWORD, "add", NETWORK_BULK_ADD, NULL},
- { KEYWORD, "delete", NETWORK_BULK_REMOVE, NULL},
{ ENDTOKEN, "", NONE, NULL}
};