From 02d3a3cfb9a2f15691ac239c00c0dbc365806bd8 Mon Sep 17 00:00:00 2001 From: Mathieu Sauve-Frankel Date: Tue, 12 Jun 2007 15:16:11 +0000 Subject: put the fd passing from bgpd back in to hoststated's version of imsg, needed for layer 7 reload support. ok pyr@ --- usr.sbin/relayd/relayd.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'usr.sbin/relayd/relayd.h') diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index cfb5eda0533..d7b4ab7b293 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.51 2007/05/31 03:24:05 pyr Exp $ */ +/* $OpenBSD: relayd.h,v 1.52 2007/06/12 15:16:10 msf Exp $ */ /* * Copyright (c) 2006, 2007 Pierre-Yves Ritschard @@ -62,6 +62,7 @@ struct buf { size_t max; size_t wpos; size_t rpos; + int fd; }; struct msgbuf { @@ -79,6 +80,11 @@ struct buf_read { size_t wpos; }; +struct imsg_fd { + TAILQ_ENTRY(imsg_fd) entry; + int fd; +}; + struct imsgbuf { TAILQ_HEAD(, imsg_fd) fds; struct buf_read r; @@ -645,13 +651,14 @@ void imsg_init(struct imsgbuf *, int, void (*)(int, short, void *)); ssize_t imsg_read(struct imsgbuf *); ssize_t imsg_get(struct imsgbuf *, struct imsg *); int imsg_compose(struct imsgbuf *, enum imsg_type, u_int32_t, pid_t, - void *, u_int16_t); + int, void *, u_int16_t); struct buf *imsg_create(struct imsgbuf *, enum imsg_type, u_int32_t, pid_t, u_int16_t); int imsg_add(struct buf *, void *, u_int16_t); int imsg_close(struct imsgbuf *, struct buf *); void imsg_free(struct imsg *); void imsg_event_add(struct imsgbuf *); /* needs to be provided externally */ +int imsg_get_fd(struct imsgbuf *); /* pfe.c */ pid_t pfe(struct hoststated *, int [2], int [2], int [RELAY_MAXPROC][2], -- cgit v1.2.3