-/* $OpenBSD: control.c,v 1.79 2015/10/24 15:15:55 benno Exp $ */
+/* $OpenBSD: control.c,v 1.80 2015/10/25 18:49:01 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
break;
}
if (!neighbor->show_timers) {
- imsg_compose_rde(imsg.hdr.type,
+ imsg_ctl_rde(imsg.hdr.type,
imsg.hdr.pid,
p, sizeof(struct peer));
- imsg_compose_rde(IMSG_CTL_END,
+ imsg_ctl_rde(IMSG_CTL_END,
imsg.hdr.pid, NULL, 0);
} else {
u_int i;
}
} else {
for (p = peers; p != NULL; p = p->next)
- imsg_compose_rde(imsg.hdr.type,
+ imsg_ctl_rde(imsg.hdr.type,
imsg.hdr.pid,
p, sizeof(struct peer));
- imsg_compose_rde(IMSG_CTL_END, imsg.hdr.pid,
+ imsg_ctl_rde(IMSG_CTL_END, imsg.hdr.pid,
NULL, 0);
}
break;
break;
case IMSG_CTL_FIB_COUPLE:
case IMSG_CTL_FIB_DECOUPLE:
- imsg_compose_parent(imsg.hdr.type, imsg.hdr.peerid,
+ imsg_ctl_parent(imsg.hdr.type, imsg.hdr.peerid,
0, NULL, 0);
break;
case IMSG_CTL_NEIGHBOR_UP:
case IMSG_CTL_SHOW_INTERFACE:
case IMSG_CTL_SHOW_FIB_TABLES:
c->ibuf.pid = imsg.hdr.pid;
- imsg_compose_parent(imsg.hdr.type, 0, imsg.hdr.pid,
+ imsg_ctl_parent(imsg.hdr.type, 0, imsg.hdr.pid,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
break;
case IMSG_CTL_KROUTE:
case IMSG_CTL_KROUTE_ADDR:
case IMSG_CTL_SHOW_NEXTHOP:
c->ibuf.pid = imsg.hdr.pid;
- imsg_compose_parent(imsg.hdr.type, imsg.hdr.peerid,
+ imsg_ctl_parent(imsg.hdr.type, imsg.hdr.peerid,
imsg.hdr.pid, imsg.data, imsg.hdr.len -
IMSG_HEADER_SIZE);
break;
break;
}
c->ibuf.pid = imsg.hdr.pid;
- imsg_compose_rde(imsg.hdr.type, imsg.hdr.pid,
+ imsg_ctl_rde(imsg.hdr.type, imsg.hdr.pid,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
} else
log_warnx("got IMSG_CTL_SHOW_RIB with "
case IMSG_CTL_SHOW_RIB_COMMUNITY:
case IMSG_CTL_SHOW_NETWORK:
c->ibuf.pid = imsg.hdr.pid;
- imsg_compose_rde(imsg.hdr.type, imsg.hdr.pid,
+ imsg_ctl_rde(imsg.hdr.type, 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_compose_rde(imsg.hdr.type, 0,
+ imsg_ctl_rde(imsg.hdr.type, 0,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
break;
case IMSG_CTL_LOG_VERBOSE:
break;
/* forward to other processes */
- imsg_compose_parent(imsg.hdr.type, 0, imsg.hdr.pid,
+ imsg_ctl_parent(imsg.hdr.type, 0, imsg.hdr.pid,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
- imsg_compose_rde(imsg.hdr.type, 0,
+ imsg_ctl_rde(imsg.hdr.type, 0,
imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE);
memcpy(&verbose, imsg.data, sizeof(verbose));
-/* $OpenBSD: session.c,v 1.344 2015/10/09 01:37:09 deraadt Exp $ */
+/* $OpenBSD: session.c,v 1.345 2015/10/25 18:49:01 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
}
int
-imsg_compose_parent(int type, u_int32_t peerid, pid_t pid, void *data,
+imsg_ctl_parent(int type, u_int32_t peerid, pid_t pid, void *data,
u_int16_t datalen)
{
return (imsg_compose(ibuf_main, type, peerid, pid, -1, data, datalen));
}
int
-imsg_compose_rde(int type, pid_t pid, void *data, u_int16_t datalen)
+imsg_ctl_rde(int type, pid_t pid, void *data, u_int16_t datalen)
{
- return (imsg_compose(ibuf_rde, type, 0, pid, -1, data, datalen));
+ /*
+ * 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));
}
void
-/* $OpenBSD: session.h,v 1.120 2015/10/11 19:25:06 phessler Exp $ */
+/* $OpenBSD: session.h,v 1.121 2015/10/25 18:49:01 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
int session_neighbor_rrefresh(struct peer *p);
struct peer *getpeerbyaddr(struct bgpd_addr *);
struct peer *getpeerbydesc(const char *);
-int imsg_compose_parent(int, u_int32_t, pid_t, void *, u_int16_t);
-int imsg_compose_rde(int, pid_t, void *, u_int16_t);
+int imsg_ctl_parent(int, u_int32_t, pid_t, void *, u_int16_t);
+int imsg_ctl_rde(int, pid_t, void *, u_int16_t);
void session_stop(struct peer *, u_int8_t);
/* timer.c */