summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-02-26 16:16:42 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-02-26 16:16:42 +0000
commit892286cd9843a11eba4c3219b764664e7129d166 (patch)
treed0026e2b88662dc74e6115e2357643330d0f351c /usr.sbin/bgpd/session.c
parente913099e805d9aa49ce0bdf297f4c0cf05465549 (diff)
show rib infrastructure. At least full dumps and per as dumps. Per prefix
dump need some more work. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 53fec83f75b..c72b899d3c1 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.120 2004/02/25 19:48:18 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.121 2004/02/26 16:16:41 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1577,11 +1577,19 @@ session_dispatch_imsg(struct imsgbuf *ibuf, int idx)
case IMSG_CTL_KROUTE_ADDR:
case IMSG_CTL_SHOW_NEXTHOP:
case IMSG_CTL_SHOW_INTERFACE:
- case IMSG_CTL_END:
if (idx != PFD_PIPE_MAIN)
fatalx("ctl kroute request not from parent");
control_imsg_relay(&imsg);
break;
+ case IMSG_CTL_SHOW_RIB:
+ case IMSG_CTL_SHOW_RIB_PREFIX:
+ if (idx != PFD_PIPE_ROUTE)
+ fatalx("ctl rib request not from RDE");
+ control_imsg_relay(&imsg);
+ break;
+ case IMSG_CTL_END:
+ control_imsg_relay(&imsg);
+ break;
case IMSG_UPDATE:
if (idx != PFD_PIPE_ROUTE)
fatalx("update request not from RDE");
@@ -1716,6 +1724,12 @@ imsg_compose_parent(int type, pid_t pid, void *data, u_int16_t datalen)
return (imsg_compose_pid(&ibuf_main, type, pid, data, datalen));
}
+int
+imsg_compose_rde(int type, pid_t pid, void *data, u_int16_t datalen)
+{
+ return (imsg_compose_pid(&ibuf_rde, type, pid, data, datalen));
+}
+
static struct sockaddr *
addr2sa(struct bgpd_addr *addr, u_int16_t port)
{