diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-02-09 13:43:24 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-02-09 13:43:24 +0000 |
commit | 81c31b63b705feb4a31a6626e5dafca4ed356f82 (patch) | |
tree | 70c0173f7cb45fe083fc6f2eb14edd1eb7dcb3be /usr.sbin/bgpd/bgpd.h | |
parent | f56eae5e594cf44f63de7c66400d0bcd9edb75f9 (diff) |
Instead of relaying struct peer from the SE to the RDE to fill out 10
stat numbers, just send the peerid and have the RDE response with the
stats. The control code will then merge these counters into the real
peer struct and send that to bgpctl. This reduces the number of bytes
sent around a fair bit.
OK tb@
Diffstat (limited to 'usr.sbin/bgpd/bgpd.h')
-rw-r--r-- | usr.sbin/bgpd/bgpd.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index 99ffdc1bb30..989f1d36eb2 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.460 2023/01/24 14:13:11 claudio Exp $ */ +/* $OpenBSD: bgpd.h,v 1.461 2023/02/09 13:43:23 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -480,6 +480,19 @@ struct peer_config { #define PEERFLAG_EVALUATE_ALL 0x04 #define PEERFLAG_NO_AS_SET 0x08 +struct rde_peer_stats { + uint64_t prefix_rcvd_update; + uint64_t prefix_rcvd_withdraw; + uint64_t prefix_rcvd_eor; + uint64_t prefix_sent_update; + uint64_t prefix_sent_withdraw; + uint64_t prefix_sent_eor; + uint32_t prefix_cnt; + uint32_t prefix_out_cnt; + uint32_t pending_update; + uint32_t pending_withdraw; +}; + enum network_type { NETWORK_DEFAULT, /* from network statements */ NETWORK_STATIC, @@ -1301,7 +1314,7 @@ void set_pollfd(struct pollfd *, struct imsgbuf *); int handle_pollfd(struct pollfd *, struct imsgbuf *); /* control.c */ -int control_imsg_relay(struct imsg *); +int control_imsg_relay(struct imsg *, struct peer *); /* config.c */ struct bgpd_config *new_config(void); |