-.\" $OpenBSD: bgplgd.8,v 1.8 2024/01/26 18:11:49 job Exp $
+.\" $OpenBSD: bgplgd.8,v 1.9 2024/08/15 09:13:13 claudio Exp $
.\"
.\" Copyright (c) 2021 Claudio Jeker <claudio@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: January 26 2024 $
+.Dd $Mdocdate: August 15 2024 $
.Dt BGPLGD 8
.Os
.Sh NAME
Show only selected routes.
.It Cm error Ns = Ns 1
Show only prefixes which are marked invalid and were treated as withdrawn.
+.It Cm filtered Ns = Ns 1
+Show only prefixes which are marked filtered by the input filter.
.It Cm invalid Ns = Ns 1
Show only prefixes which are not eligible.
.It Cm leaked Ns = Ns 1
-/* $OpenBSD: bgplgd.h,v 1.3 2023/03/13 17:31:28 claudio Exp $ */
+/* $OpenBSD: bgplgd.h,v 1.4 2024/08/15 09:13:13 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
*
#define QS_AVS 15
#define QS_INVALID 16
#define QS_LEAKED 17
-#define QS_MAX 18
+#define QS_FILTERED 18
+#define QS_MAX 19
/* too add: empty-as, in, out, peer-as, source-as, transit-as */
(1 << QS_AF) | (1 << QS_RIB) | (1 << QS_OVS) | \
(1 << QS_BEST) | (1 << QS_ALL) | (1 << QS_SHORTER) | \
(1 << QS_ERROR) | (1 << QS_AVS) | (1 << QS_INVALID) | \
- (1 << QS_LEAKED))
+ (1 << QS_LEAKED) | (1 << QS_FILTERED))
struct cmd;
struct lg_ctx {
-/* $OpenBSD: qs.c,v 1.5 2023/05/09 14:35:45 claudio Exp $ */
+/* $OpenBSD: qs.c,v 1.6 2024/08/15 09:13:13 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
*
{ QS_AVS, "avs", AVS },
{ QS_INVALID, "invalid", ONE },
{ QS_LEAKED, "leaked", ONE },
+ { QS_FILTERED, "filtered", ONE },
{ 0, NULL }
};
if (argc < len)
argv[argc++] = ctx->qs_args[QS_AVS].string;
}
- /* BEST, ERROR, INVALID and LEAKED are exclusive */
+ /* BEST, ERROR, FILTERED, INVALID and LEAKED are exclusive */
if (ctx->qs_args[QS_BEST].one) {
if (argc < len)
argv[argc++] = "best";
} else if (ctx->qs_args[QS_ERROR].one) {
if (argc < len)
argv[argc++] = "error";
+ } else if (ctx->qs_args[QS_FILTERED].one) {
+ if (argc < len)
+ argv[argc++] = "filtered";
} else if (ctx->qs_args[QS_INVALID].one) {
if (argc < len)
argv[argc++] = "disqualified";