-/* $OpenBSD: mrtparser.c,v 1.19 2022/10/18 09:30:29 job Exp $ */
+/* $OpenBSD: mrtparser.c,v 1.20 2023/11/20 14:18:21 claudio Exp $ */
/*
* Copyright (c) 2011 Claudio Jeker <claudio@openbsd.org>
*
if ((aid = mrt_afi2aid(afi, safi, verbose)) == AID_UNSPEC)
goto fail;
-
+
/* prefix */
ret = mrt_extract_prefix(b, len, aid, &r->prefix,
&r->prefixlen, verbose);
-/* $OpenBSD: output.c,v 1.41 2023/04/28 13:24:25 claudio Exp $ */
+/* $OpenBSD: output.c,v 1.42 2023/11/20 14:18:21 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
if (rtr->local_addr.aid != AID_UNSPEC)
printf(" Local Address: %s\n", log_addr(&rtr->local_addr));
if (rtr->session_id != -1)
- printf (" Session ID: %d Serial #: %u\n",
+ printf(" Session ID: %d Serial #: %u\n",
rtr->session_id, rtr->serial);
printf(" Refresh: %u, Retry: %u, Expire: %u\n",
rtr->refresh, rtr->retry, rtr->expire);
if (rtr->last_sent_error != NO_ERROR) {
printf(" Last sent error: %s\n",
- log_rtr_error(rtr->last_sent_error));
+ log_rtr_error(rtr->last_sent_error));
if (rtr->last_sent_msg[0])
printf(" with reason \"%s\"",
log_reason(rtr->last_sent_msg));
}
if (rtr->last_recv_error != NO_ERROR) {
printf(" Last received error: %s\n",
- log_rtr_error(rtr->last_recv_error));
+ log_rtr_error(rtr->last_recv_error));
if (rtr->last_recv_msg[0])
printf(" with reason \"%s\"",
log_reason(rtr->last_recv_msg));
-/* $OpenBSD: output_json.c,v 1.35 2023/06/05 16:24:05 claudio Exp $ */
+/* $OpenBSD: output_json.c,v 1.36 2023/11/20 14:18:21 claudio Exp $ */
/*
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
if (kf->flags & F_MPLS) {
json_do_array("mplslabel");
- json_do_uint("mplslabel",
+ json_do_uint("mplslabel",
ntohl(kf->mplslabel) >> MPLS_LABEL_OFFSET);
json_do_end();
}
stats->attr_cnt * sizeof(struct attr), stats->attr_refs);
json_rib_mem_element("attributes", stats->attr_dcnt,
stats->attr_data, UINT64_MAX);
- json_rib_mem_element("total", UINT64_MAX,
+ json_rib_mem_element("total", UINT64_MAX,
pts + stats->prefix_cnt * sizeof(struct prefix) +
stats->rib_cnt * sizeof(struct rib_entry) +
stats->path_cnt * sizeof(struct rde_aspath) +
UINT64_MAX);
json_rib_mem_element("prefix_set", stats->pset_cnt, stats->pset_size,
UINT64_MAX);
- json_rib_mem_element("total", UINT64_MAX,
+ json_rib_mem_element("total", UINT64_MAX,
stats->aset_size + stats->pset_size, UINT64_MAX);
json_do_end();
}
-/* $OpenBSD: output_ometric.c,v 1.11 2023/03/28 12:07:09 claudio Exp $ */
+/* $OpenBSD: output_ometric.c,v 1.12 2023/11/20 14:18:21 claudio Exp $ */
/*
* Copyright (c) 2022 Claudio Jeker <claudio@openbsd.org>
ometric_rib_mem_element("attributes", stats->attr_dcnt,
stats->attr_data, UINT64_MAX);
- ometric_rib_mem_element("total", UINT64_MAX,
+ ometric_rib_mem_element("total", UINT64_MAX,
pts + stats->prefix_cnt * sizeof(struct prefix) +
stats->rib_cnt * sizeof(struct rib_entry) +
stats->path_cnt * sizeof(struct rde_aspath) +
OKV("type"), OKV("prefix_set"), NULL);
ometric_set_int_with_labels(rde_set_count, stats->pset_cnt,
OKV("type"), OKV("prefix_set"), NULL);
- ometric_rib_mem_element("set_total", UINT64_MAX,
+ ometric_rib_mem_element("set_total", UINT64_MAX,
stats->aset_size + stats->pset_size, UINT64_MAX);
}
-/* $OpenBSD: parser.c,v 1.133 2023/05/09 13:26:27 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.134 2023/11/20 14:18:21 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
static const struct token t_show_prefix[] = {
{ FLAG, "all", F_LONGER, t_show_rib},
{ FLAG, "longer-prefixes", F_LONGER, t_show_rib},
- { FLAG, "or-longer", F_LONGER, t_show_rib},
- { FLAG, "or-shorter", F_SHORTER, t_show_rib},
+ { FLAG, "or-longer", F_LONGER, t_show_rib},
+ { FLAG, "or-shorter", F_SHORTER, t_show_rib},
{ ANYTOKEN, "", NONE, t_show_rib},
{ ENDTOKEN, "", NONE, NULL}
};