-/* $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>
#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,
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);
-/* $OpenBSD: control.c,v 1.108 2022/08/17 15:15:26 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.109 2023/02/09 13:43:23 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
control_close(struct ctl_conn *c)
{
if (c->terminate && c->ibuf.pid)
- imsg_ctl_rde(IMSG_CTL_TERMINATE, c->ibuf.pid, NULL, 0);
+ imsg_ctl_rde(IMSG_CTL_TERMINATE, 0, c->ibuf.pid, NULL, 0);
msgbuf_clear(&c->ibuf.w);
TAILQ_REMOVE(&ctl_conns, c, entry);
if (msgbuf_write(&c->ibuf.w) <= 0 && errno != EAGAIN)
return control_close(c);
if (c->throttled && c->ibuf.w.queued < CTL_MSG_LOW_MARK) {
- if (imsg_ctl_rde(IMSG_XON, c->ibuf.pid, NULL, 0) != -1)
+ if (imsg_ctl_rde(IMSG_XON, 0, c->ibuf.pid, NULL, 0) !=
+ -1)
c->throttled = 0;
}
}
matched = 1;
if (!neighbor || !neighbor->show_timers) {
- imsg_ctl_rde(imsg.hdr.type,
- imsg.hdr.pid,
- p, sizeof(struct peer));
+ imsg_ctl_rde(imsg.hdr.type, p->conf.id,
+ imsg.hdr.pid, NULL, 0);
} else {
u_int i;
time_t d;
if (!matched && RB_EMPTY(peers)) {
control_result(c, CTL_RES_NOSUCHPEER);
} else if (!neighbor || !neighbor->show_timers) {
- imsg_ctl_rde(IMSG_CTL_END, imsg.hdr.pid,
+ imsg_ctl_rde(IMSG_CTL_END, 0, imsg.hdr.pid,
NULL, 0);
} else {
imsg_compose(&c->ibuf, IMSG_CTL_END, 0, 0, -1,
c->ibuf.pid = imsg.hdr.pid;
c->terminate = 1;
- imsg_ctl_rde(imsg.hdr.type, imsg.hdr.pid,
+ imsg_ctl_rde(imsg.hdr.type, 0, imsg.hdr.pid,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
break;
case IMSG_CTL_SHOW_NETWORK:
case IMSG_CTL_SHOW_RIB_MEM:
case IMSG_CTL_SHOW_SET:
c->ibuf.pid = imsg.hdr.pid;
- imsg_ctl_rde(imsg.hdr.type, imsg.hdr.pid,
+ imsg_ctl_rde(imsg.hdr.type, 0, imsg.hdr.pid,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
break;
case IMSG_NETWORK_ADD:
case IMSG_NETWORK_FLUSH:
case IMSG_NETWORK_DONE:
case IMSG_FILTER_SET:
- imsg_ctl_rde(imsg.hdr.type, 0,
+ imsg_ctl_rde(imsg.hdr.type, 0, 0,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
break;
case IMSG_CTL_LOG_VERBOSE:
/* forward to other processes */
imsg_ctl_parent(imsg.hdr.type, 0, imsg.hdr.pid,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
- imsg_ctl_rde(imsg.hdr.type, 0,
+ imsg_ctl_rde(imsg.hdr.type, 0, imsg.hdr.pid,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
memcpy(&verbose, imsg.data, sizeof(verbose));
}
int
-control_imsg_relay(struct imsg *imsg)
+control_imsg_relay(struct imsg *imsg, struct peer *p)
{
struct ctl_conn *c;
if ((c = control_connbypid(imsg->hdr.pid)) == NULL)
return (0);
+ /* special handling for peers since only the stats are sent from RDE */
+ if (imsg->hdr.type == IMSG_CTL_SHOW_NEIGHBOR) {
+ struct rde_peer_stats stats;
+
+ if (imsg->hdr.len > IMSG_HEADER_SIZE + sizeof(stats)) {
+ log_warnx("wrong imsg len");
+ return (0);
+ }
+ if (p == NULL) {
+ log_warnx("no such peer: id=%u", imsg->hdr.peerid);
+ return (0);
+ }
+ memcpy(&stats, imsg->data, sizeof(stats));
+ p->stats.prefix_cnt = stats.prefix_cnt;
+ p->stats.prefix_out_cnt = stats.prefix_out_cnt;
+ p->stats.prefix_rcvd_update = stats.prefix_rcvd_update;
+ p->stats.prefix_rcvd_withdraw = stats.prefix_rcvd_withdraw;
+ p->stats.prefix_rcvd_eor = stats.prefix_rcvd_eor;
+ p->stats.prefix_sent_update = stats.prefix_sent_update;
+ p->stats.prefix_sent_withdraw = stats.prefix_sent_withdraw;
+ p->stats.prefix_sent_eor = stats.prefix_sent_eor;
+ p->stats.pending_update = stats.pending_update;
+ p->stats.pending_withdraw = stats.pending_withdraw;
+
+ return (imsg_compose(&c->ibuf, imsg->hdr.type, 0,
+ imsg->hdr.pid, -1, p, sizeof(*p)));
+ }
+
/* if command finished no need to send exit message */
if (imsg->hdr.type == IMSG_CTL_END || imsg->hdr.type == IMSG_CTL_RESULT)
c->terminate = 0;
if (!c->throttled && c->ibuf.w.queued > CTL_MSG_HIGH_MARK) {
- if (imsg_ctl_rde(IMSG_XOFF, imsg->hdr.pid, NULL, 0) != -1)
+ if (imsg_ctl_rde(IMSG_XOFF, 0, imsg->hdr.pid, NULL, 0) != -1)
c->throttled = 1;
}
-/* $OpenBSD: rde.c,v 1.591 2023/01/24 14:13:12 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.592 2023/02/09 13:43:23 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
#include <unistd.h>
#include "bgpd.h"
-#include "rde.h"
#include "session.h"
+#include "rde.h"
#include "log.h"
#define PFD_PIPE_MAIN 0
rde_dispatch_imsg_session(struct imsgbuf *ibuf)
{
struct imsg imsg;
- struct peer p;
+ struct rde_peer_stats stats;
struct ctl_show_set cset;
struct ctl_show_rib csr;
struct ctl_show_rib_request req;
rde_dump_ctx_new(&req, imsg.hdr.pid, imsg.hdr.type);
break;
case IMSG_CTL_SHOW_NEIGHBOR:
- if (imsg.hdr.len - IMSG_HEADER_SIZE !=
- sizeof(struct peer)) {
+ if (imsg.hdr.len - IMSG_HEADER_SIZE != 0) {
log_warnx("rde_dispatch: wrong imsg len");
break;
}
- memcpy(&p, imsg.data, sizeof(struct peer));
- peer = peer_get(p.conf.id);
- if (peer != NULL) {
- p.stats.prefix_cnt = peer->prefix_cnt;
- p.stats.prefix_out_cnt = peer->prefix_out_cnt;
- p.stats.prefix_rcvd_update =
- peer->prefix_rcvd_update;
- p.stats.prefix_rcvd_withdraw =
- peer->prefix_rcvd_withdraw;
- p.stats.prefix_rcvd_eor =
- peer->prefix_rcvd_eor;
- p.stats.prefix_sent_update =
- peer->prefix_sent_update;
- p.stats.prefix_sent_withdraw =
- peer->prefix_sent_withdraw;
- p.stats.prefix_sent_eor =
- peer->prefix_sent_eor;
- p.stats.pending_update = peer->up_nlricnt;
- p.stats.pending_withdraw = peer->up_wcnt;
- }
- imsg_compose(ibuf_se_ctl, IMSG_CTL_SHOW_NEIGHBOR, 0,
- imsg.hdr.pid, -1, &p, sizeof(struct peer));
+ peer = peer_get(imsg.hdr.peerid);
+ if (peer != NULL)
+ memcpy(&stats, &peer->stats, sizeof(stats));
+ else
+ memset(&stats, 0, sizeof(stats));
+ imsg_compose(ibuf_se_ctl, IMSG_CTL_SHOW_NEIGHBOR,
+ imsg.hdr.peerid, imsg.hdr.pid, -1,
+ &stats, sizeof(stats));
break;
case IMSG_CTL_SHOW_RIB_MEM:
imsg_compose(ibuf_se_ctl, IMSG_CTL_SHOW_RIB_MEM, 0,
uint8_t roa_state, aspa_state;
const char *wmsg = "filtered, withdraw";
- peer->prefix_rcvd_update++;
+ peer->stats.prefix_rcvd_update++;
roa_state = rde_roa_validity(&rde_roa, prefix, prefixlen,
aspath_origin(in->aspath.aspath));
/* add original path to the Adj-RIB-In */
if (prefix_update(rib_byid(RIB_ADJ_IN), peer, path_id, path_id_tx,
in, prefix, prefixlen) == 1)
- peer->prefix_cnt++;
+ peer->stats.prefix_cnt++;
/* max prefix checker */
- if (peer->conf.max_prefix && peer->prefix_cnt > peer->conf.max_prefix) {
+ if (peer->conf.max_prefix &&
+ peer->stats.prefix_cnt > peer->conf.max_prefix) {
log_peer_warnx(&peer->conf, "prefix limit reached (>%u/%u)",
- peer->prefix_cnt, peer->conf.max_prefix);
+ peer->stats.prefix_cnt, peer->conf.max_prefix);
rde_update_err(peer, ERR_CEASE, ERR_CEASE_MAX_PREFIX, NULL, 0);
return (-1);
}
/* remove original path form the Adj-RIB-In */
if (prefix_withdraw(rib_byid(RIB_ADJ_IN), peer, path_id,
prefix, prefixlen))
- peer->prefix_cnt--;
+ peer->stats.prefix_cnt--;
- peer->prefix_rcvd_withdraw++;
+ peer->stats.prefix_rcvd_withdraw++;
}
/*
static void
rde_peer_recv_eor(struct rde_peer *peer, uint8_t aid)
{
- peer->prefix_rcvd_eor++;
+ peer->stats.prefix_rcvd_eor++;
peer->recv_eor |= 1 << aid;
/*
uint16_t afi;
uint8_t safi;
- peer->prefix_sent_eor++;
+ peer->stats.prefix_sent_eor++;
peer->sent_eor |= 1 << aid;
if (aid == AID_INET) {
path_id_tx = pathid_assign(peerself, 0, &nc->prefix, nc->prefixlen);
if (prefix_update(rib_byid(RIB_ADJ_IN), peerself, 0, path_id_tx,
state, &nc->prefix, nc->prefixlen) == 1)
- peerself->prefix_cnt++;
+ peerself->stats.prefix_cnt++;
for (i = RIB_LOC_START; i < rib_size; i++) {
struct rib *rib = rib_byid(i);
if (rib == NULL)
}
if (prefix_withdraw(rib_byid(RIB_ADJ_IN), peerself, 0, &nc->prefix,
nc->prefixlen))
- peerself->prefix_cnt--;
+ peerself->stats.prefix_cnt--;
}
static void
if (prefix_withdraw(rib_byid(RIB_ADJ_IN), peerself, 0, &addr,
prefixlen) == 1)
- peerself->prefix_cnt--;
+ peerself->stats.prefix_cnt--;
}
/* clean up */
-/* $OpenBSD: rde.h,v 1.281 2023/01/24 11:28:41 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.282 2023/02/09 13:43:23 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
RB_ENTRY(rde_peer) entry;
SIMPLEQ_HEAD(, iq) imsg_queue;
struct peer_config conf;
+ struct rde_peer_stats stats;
struct bgpd_addr remote_addr;
struct bgpd_addr local_v4_addr;
struct bgpd_addr local_v6_addr;
struct prefix_tree updates[AID_MAX];
struct prefix_tree withdraws[AID_MAX];
time_t staletime[AID_MAX];
- 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 remote_bgpid; /* host byte order! */
- uint32_t up_nlricnt;
- uint32_t up_wcnt;
uint32_t path_id_tx;
enum peer_state state;
enum export_type export_type;
-/* $OpenBSD: rde_peer.c,v 1.27 2023/01/24 11:28:41 claudio Exp $ */
+/* $OpenBSD: rde_peer.c,v 1.28 2023/02/09 13:43:23 claudio Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
}
prefix_destroy(p);
- peer->prefix_cnt--;
+ peer->stats.prefix_cnt--;
}
}
peer_adjout_clear_upcall, NULL, NULL) == -1)
fatal("%s: prefix_dump_new", __func__);
peer_flush(peer, AID_UNSPEC, 0);
- peer->prefix_cnt = 0;
- peer->prefix_out_cnt = 0;
+ peer->stats.prefix_cnt = 0;
+ peer->stats.prefix_out_cnt = 0;
peer->state = PEER_DOWN;
}
peer->remote_bgpid = ntohl(sup->remote_bgpid);
/* flush Adj-RIB-In */
peer_flush(peer, AID_UNSPEC, 0);
- peer->prefix_cnt = 0;
- peer->prefix_out_cnt = 0;
+ peer->stats.prefix_cnt = 0;
+ peer->stats.prefix_out_cnt = 0;
RB_REMOVE(peer_tree, &peertable, peer);
free(peer);
-/* $OpenBSD: rde_rib.c,v 1.254 2023/01/24 11:28:41 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.255 2023/02/09 13:43:23 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
/* if pending update unhook it before it is unlinked */
if (p->flags & PREFIX_FLAG_UPDATE) {
RB_REMOVE(prefix_tree, &peer->updates[prefix->aid], p);
- peer->up_nlricnt--;
+ peer->stats.pending_update--;
}
/* unlink prefix so it can be relinked below */
prefix_unlink(p);
- peer->prefix_out_cnt--;
+ peer->stats.prefix_out_cnt--;
}
if (p->flags & PREFIX_FLAG_WITHDRAW) {
RB_REMOVE(prefix_tree, &peer->withdraws[prefix->aid], p);
- peer->up_wcnt--;
+ peer->stats.pending_withdraw--;
}
/* nothing needs to be done for PREFIX_FLAG_DEAD and STALE */
prefix_link(p, NULL, p->pt, peer, 0, p->path_id_tx, asp, comm,
state->nexthop, state->nhflags, state->vstate);
- peer->prefix_out_cnt++;
+ peer->stats.prefix_out_cnt++;
if (p->flags & PREFIX_FLAG_MASK)
fatalx("%s: bad flags %x", __func__, p->flags);
p->flags |= PREFIX_FLAG_UPDATE;
if (RB_INSERT(prefix_tree, &peer->updates[prefix->aid], p) != NULL)
fatalx("%s: RB tree invariant violated", __func__);
- peer->up_nlricnt++;
+ peer->stats.pending_update++;
}
/*
/* pending update just got withdrawn */
if (p->flags & PREFIX_FLAG_UPDATE) {
RB_REMOVE(prefix_tree, &peer->updates[p->pt->aid], p);
- peer->up_nlricnt--;
+ peer->stats.pending_update--;
}
/* unlink prefix if it was linked (not a withdraw or dead) */
if ((p->flags & (PREFIX_FLAG_WITHDRAW | PREFIX_FLAG_DEAD)) == 0) {
prefix_unlink(p);
- peer->prefix_out_cnt--;
+ peer->stats.prefix_out_cnt--;
}
/* nothing needs to be done for PREFIX_FLAG_DEAD and STALE */
p->flags |= PREFIX_FLAG_WITHDRAW;
if (RB_INSERT(prefix_tree, &peer->withdraws[p->pt->aid], p) != NULL)
fatalx("%s: RB tree invariant violated", __func__);
- peer->up_wcnt++;
+ peer->stats.pending_withdraw++;
}
void
if (p->flags & PREFIX_FLAG_WITHDRAW) {
RB_REMOVE(prefix_tree, &peer->withdraws[p->pt->aid], p);
- peer->up_wcnt--;
+ peer->stats.pending_withdraw--;
}
if (p->flags & PREFIX_FLAG_UPDATE) {
RB_REMOVE(prefix_tree, &peer->updates[p->pt->aid], p);
- peer->up_nlricnt--;
+ peer->stats.pending_update--;
}
/* unlink prefix if it was linked (not a withdraw or dead) */
if ((p->flags & (PREFIX_FLAG_WITHDRAW | PREFIX_FLAG_DEAD)) == 0) {
prefix_unlink(p);
- peer->prefix_out_cnt--;
+ peer->stats.prefix_out_cnt--;
}
/* nothing needs to be done for PREFIX_FLAG_DEAD and STALE */
-/* $OpenBSD: rde_update.c,v 1.153 2023/01/24 11:28:41 claudio Exp $ */
+/* $OpenBSD: rde_update.c,v 1.154 2023/02/09 13:43:23 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
/* max prefix checker outbound */
if (peer->conf.max_out_prefix &&
- peer->prefix_out_cnt > peer->conf.max_out_prefix) {
+ peer->stats.prefix_out_cnt > peer->conf.max_out_prefix) {
log_peer_warnx(&peer->conf,
"outbound prefix limit reached (>%u/%u)",
- peer->prefix_out_cnt, peer->conf.max_out_prefix);
+ peer->stats.prefix_out_cnt,
+ peer->conf.max_out_prefix);
rde_update_err(peer, ERR_CEASE,
ERR_CEASE_MAX_SENT_PREFIX, NULL, 0);
}
/* max prefix checker outbound */
if (peer->conf.max_out_prefix &&
- peer->prefix_out_cnt > peer->conf.max_out_prefix) {
+ peer->stats.prefix_out_cnt > peer->conf.max_out_prefix) {
log_peer_warnx(&peer->conf,
"outbound prefix limit reached (>%u/%u)",
- peer->prefix_out_cnt, peer->conf.max_out_prefix);
+ peer->stats.prefix_out_cnt,
+ peer->conf.max_out_prefix);
rde_update_err(peer, ERR_CEASE,
ERR_CEASE_MAX_SENT_PREFIX, NULL, 0);
}
/* max prefix checker outbound */
if (peer->conf.max_out_prefix &&
- peer->prefix_out_cnt > peer->conf.max_out_prefix) {
+ peer->stats.prefix_out_cnt > peer->conf.max_out_prefix) {
log_peer_warnx(&peer->conf,
"outbound prefix limit reached (>%u/%u)",
- peer->prefix_out_cnt, peer->conf.max_out_prefix);
+ peer->stats.prefix_out_cnt,
+ peer->conf.max_out_prefix);
rde_update_err(peer, ERR_CEASE,
ERR_CEASE_MAX_SENT_PREFIX, NULL, 0);
}
/* max prefix checker outbound */
if (peer->conf.max_out_prefix &&
- peer->prefix_out_cnt > peer->conf.max_out_prefix) {
+ peer->stats.prefix_out_cnt > peer->conf.max_out_prefix) {
log_peer_warnx(&peer->conf,
"outbound prefix limit reached (>%u/%u)",
- peer->prefix_out_cnt, peer->conf.max_out_prefix);
+ peer->stats.prefix_out_cnt, peer->conf.max_out_prefix);
rde_update_err(peer, ERR_CEASE,
ERR_CEASE_MAX_SENT_PREFIX, NULL, 0);
}
if (withdraw) {
/* prefix no longer needed, remove it */
prefix_adjout_destroy(p);
- peer->prefix_sent_withdraw++;
+ peer->stats.prefix_sent_withdraw++;
} else {
/* prefix still in Adj-RIB-Out, keep it */
RB_REMOVE(prefix_tree, prefix_head, p);
p->flags &= ~PREFIX_FLAG_UPDATE;
- peer->up_nlricnt--;
- peer->prefix_sent_update++;
+ peer->stats.pending_update--;
+ peer->stats.prefix_sent_update++;
}
if (done)
-/* $OpenBSD: session.c,v 1.439 2023/01/04 14:33:30 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.440 2023/02/09 13:43:23 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
case IMSG_CTL_SHOW_TIMER:
if (idx != PFD_PIPE_MAIN)
fatalx("ctl kroute request not from parent");
- control_imsg_relay(&imsg);
+ control_imsg_relay(&imsg, NULL);
+ break;
+ case IMSG_CTL_SHOW_NEIGHBOR:
+ if (idx != PFD_PIPE_ROUTE_CTL)
+ fatalx("ctl rib request not from RDE");
+ p = getpeerbyid(conf, imsg.hdr.peerid);
+ control_imsg_relay(&imsg, p);
break;
case IMSG_CTL_SHOW_RIB:
case IMSG_CTL_SHOW_RIB_PREFIX:
case IMSG_CTL_SHOW_RIB_ATTR:
case IMSG_CTL_SHOW_RIB_MEM:
case IMSG_CTL_SHOW_NETWORK:
- case IMSG_CTL_SHOW_NEIGHBOR:
case IMSG_CTL_SHOW_SET:
if (idx != PFD_PIPE_ROUTE_CTL)
fatalx("ctl rib request not from RDE");
- control_imsg_relay(&imsg);
+ control_imsg_relay(&imsg, NULL);
break;
case IMSG_CTL_END:
case IMSG_CTL_RESULT:
- control_imsg_relay(&imsg);
+ control_imsg_relay(&imsg, NULL);
break;
case IMSG_UPDATE:
if (idx != PFD_PIPE_ROUTE)
imsg_ctl_parent(int type, uint32_t peerid, pid_t pid, void *data,
uint16_t datalen)
{
- return (imsg_compose(ibuf_main, type, peerid, pid, -1, data, datalen));
+ return imsg_compose(ibuf_main, type, peerid, pid, -1, data, datalen);
}
int
-imsg_ctl_rde(int type, pid_t pid, void *data, uint16_t datalen)
+imsg_ctl_rde(int type, uint32_t peerid, pid_t pid, void *data, uint16_t datalen)
{
if (ibuf_rde_ctl == NULL)
return (0);
* Use control socket to talk to RDE to bypass the queue of the
* regular imsg socket.
*/
- return (imsg_compose(ibuf_rde_ctl, type, 0, pid, -1, data, datalen));
+ return imsg_compose(ibuf_rde_ctl, type, peerid, pid, -1, data, datalen);
}
int
if (ibuf_rde == NULL)
return (0);
- return (imsg_compose(ibuf_rde, type, peerid, 0, -1, data, datalen));
+ return imsg_compose(ibuf_rde, type, peerid, 0, -1, data, datalen);
}
void
-/* $OpenBSD: session.h,v 1.158 2022/08/29 14:57:27 claudio Exp $ */
+/* $OpenBSD: session.h,v 1.159 2023/02/09 13:43:23 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
struct peer *getpeerbyid(struct bgpd_config *, uint32_t);
int peer_matched(struct peer *, struct ctl_neighbor *);
int imsg_ctl_parent(int, uint32_t, pid_t, void *, uint16_t);
-int imsg_ctl_rde(int, pid_t, void *, uint16_t);
+int imsg_ctl_rde(int, uint32_t, pid_t, void *, uint16_t);
void session_stop(struct peer *, uint8_t);
/* timer.c */