aboutsummaryrefslogtreecommitdiff
path: root/compat/imsg.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2017-03-24 10:05:53 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2017-03-24 10:05:53 +0000
commit2e5664d2df02a902300f8f67b4eefe0309bde5b9 (patch)
tree0696b121ca98ddf1f011bd307040634f9464d096 /compat/imsg.h
parente87d808594e48a4c80d201d07fb86fbb9548409e (diff)
downloadrtmux-2e5664d2df02a902300f8f67b4eefe0309bde5b9.tar.gz
rtmux-2e5664d2df02a902300f8f67b4eefe0309bde5b9.tar.bz2
rtmux-2e5664d2df02a902300f8f67b4eefe0309bde5b9.zip
Update imsg*.[ch] from OpenBSD, add some compat bits it needs and remove some
bits it doesn't.
Diffstat (limited to 'compat/imsg.h')
-rw-r--r--compat/imsg.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/compat/imsg.h b/compat/imsg.h
index 89946578..8bf94147 100644
--- a/compat/imsg.h
+++ b/compat/imsg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.h,v 1.3 2013/12/26 17:32:33 eric Exp $ */
+/* $OpenBSD: imsg.h,v 1.4 2017/03/24 09:34:12 nicm Exp $ */
/*
* Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -37,7 +37,7 @@ struct ibuf {
struct msgbuf {
TAILQ_HEAD(, ibuf) bufs;
- u_int32_t queued;
+ uint32_t queued;
int fd;
};
@@ -63,11 +63,11 @@ struct imsgbuf {
#define IMSGF_HASFD 1
struct imsg_hdr {
- u_int32_t type;
- u_int16_t len;
- u_int16_t flags;
- u_int32_t peerid;
- u_int32_t pid;
+ uint32_t type;
+ uint16_t len;
+ uint16_t flags;
+ uint32_t peerid;
+ uint32_t pid;
};
struct imsg {
@@ -97,13 +97,12 @@ void msgbuf_drain(struct msgbuf *, size_t);
void imsg_init(struct imsgbuf *, int);
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, 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 *, const void *, u_int16_t);
+int imsg_compose(struct imsgbuf *, uint32_t, uint32_t, pid_t, int,
+ const void *, uint16_t);
+int imsg_composev(struct imsgbuf *, uint32_t, uint32_t, pid_t, int,
+ const struct iovec *, int);
+struct ibuf *imsg_create(struct imsgbuf *, uint32_t, uint32_t, pid_t, uint16_t);
+int imsg_add(struct ibuf *, const void *, uint16_t);
void imsg_close(struct imsgbuf *, struct ibuf *);
void imsg_free(struct imsg *);
int imsg_flush(struct imsgbuf *);