-/* $OpenBSD: bgpctl.c,v 1.287 2022/10/18 09:30:29 job Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.288 2023/01/17 16:09:34 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
fmt_set_type(struct ctl_show_set *set)
{
switch (set->type) {
+ case ASPA_SET:
+ return "ASPA";
case ROA_SET:
return "ROA";
case PREFIX_SET:
-/* $OpenBSD: output.c,v 1.32 2022/11/09 14:20:11 claudio Exp $ */
+/* $OpenBSD: output.c,v 1.33 2023/01/17 16:09:34 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
{
char buf[64];
- if (set->type == ASNUM_SET)
+ if (set->type == ASNUM_SET || set->type == ASPA_SET)
snprintf(buf, sizeof(buf), "%7s %7s %6zu",
"-", "-", set->as_cnt);
else
-/* $OpenBSD: output_json.c,v 1.27 2022/12/28 21:30:15 jmc Exp $ */
+/* $OpenBSD: output_json.c,v 1.28 2023/01/17 16:09:34 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
json_do_printf("type", "%s", fmt_set_type(set));
json_do_printf("last_change", "%s", fmt_monotime(set->lastchange));
json_do_int("last_change_sec", get_monotime(set->lastchange));
- if (set->type == ASNUM_SET) {
+ if (set->type == ASNUM_SET || set->type == ASPA_SET) {
json_do_uint("num_ASnum", set->as_cnt);
} else {
json_do_uint("num_IPv4", set->v4_cnt);