-/* $OpenBSD: imsg.c,v 1.4 2013/02/01 15:22:18 gilles Exp $ */
+/* $OpenBSD: imsg.c,v 1.5 2013/12/26 17:32:33 eric Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
int
imsg_compose(struct imsgbuf *ibuf, u_int32_t type, u_int32_t peerid,
- pid_t pid, int fd, void *data, u_int16_t datalen)
+ pid_t pid, int fd, const void *data, u_int16_t datalen)
{
struct ibuf *wbuf;
}
int
-imsg_add(struct ibuf *msg, void *data, u_int16_t datalen)
+imsg_add(struct ibuf *msg, const void *data, u_int16_t datalen)
{
if (datalen)
if (ibuf_add(msg, data, datalen) == -1) {
-/* $OpenBSD: imsg.h,v 1.2 2010/06/23 07:53:55 nicm Exp $ */
+/* $OpenBSD: imsg.h,v 1.3 2013/12/26 17:32:33 eric Exp $ */
/*
* Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
ssize_t imsg_read(struct imsgbuf *);
ssize_t imsg_get(struct imsgbuf *, struct imsg *);
int imsg_compose(struct imsgbuf *, u_int32_t, u_int32_t, pid_t,
- int, void *, u_int16_t);
+ int, const void *, u_int16_t);
int imsg_composev(struct imsgbuf *, u_int32_t, u_int32_t, pid_t,
int, const struct iovec *, int);
struct ibuf *imsg_create(struct imsgbuf *, u_int32_t, u_int32_t, pid_t,
u_int16_t);
-int imsg_add(struct ibuf *, void *, u_int16_t);
+int imsg_add(struct ibuf *, const void *, u_int16_t);
void imsg_close(struct imsgbuf *, struct ibuf *);
void imsg_free(struct imsg *);
int imsg_flush(struct imsgbuf *);
-.\" $OpenBSD: imsg_init.3,v 1.10 2013/11/13 21:04:46 benno Exp $
+.\" $OpenBSD: imsg_init.3,v 1.11 2013/12/26 17:32:33 eric Exp $
.\"
.\" Copyright (c) 2010 Nicholas Marriott <nicm@openbsd.org>
.\"
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: November 13 2013 $
+.Dd $Mdocdate: December 26 2013 $
.Dt IMSG_INIT 3
.Os
.Sh NAME
.Fn imsg_get "struct imsgbuf *ibuf" "struct imsg *imsg"
.Ft int
.Fn imsg_compose "struct imsgbuf *ibuf" "u_int32_t type" "uint32_t peerid" \
- "pid_t pid" "int fd" "void *data" "u_int16_t datalen"
+ "pid_t pid" "int fd" "const void *data" "u_int16_t datalen"
.Ft int
.Fn imsg_composev "struct imsgbuf *ibuf" "u_int32_t type" "u_int32_t peerid" \
"pid_t pid" "int fd" "const struct iovec *iov" "int iovcnt"
.Fn imsg_create "struct imsgbuf *ibuf" "u_int32_t type" "u_int32_t peerid" \
"pid_t pid" "u_int16_t datalen"
.Ft int
-.Fn imsg_add "struct ibuf *buf" "void *data" "u_int16_t datalen"
+.Fn imsg_add "struct ibuf *buf" "const void *data" "u_int16_t datalen"
.Ft void
.Fn imsg_close "struct imsgbuf *ibuf" "struct ibuf *msg"
.Ft void