Use msgbuf_queuelen() instead of accessing wbuf.queue for msgbuf structs.
authorclaudio <claudio@openbsd.org>
Tue, 20 Aug 2024 11:59:39 +0000 (11:59 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 20 Aug 2024 11:59:39 +0000 (11:59 +0000)
commitdb359c8123a878f8bca2d016ff1167942bca8dd9
tree9ee414f1e3b271c7d76110cdcada99c30507e329
parent46c0d5d12ecd7808a3eddef011c06e241054e295
Use msgbuf_queuelen() instead of accessing wbuf.queue for msgbuf structs.

Also export the msgbuf queue len as a stats member so bgpctl does not need
to dig into the msgbuf structure inside struct peer.
This skips imsg related msgbuf since that will be handled by a imsgbuf
specific function.
OK tb@
usr.sbin/bgpd/control.c
usr.sbin/bgpd/rde.c
usr.sbin/bgpd/rtr_proto.c
usr.sbin/bgpd/session.c
usr.sbin/bgpd/session.h