summaryrefslogtreecommitdiffstats
path: root/lib/imsg.h
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-03-06 20:02:52 +0100
committerLou Berger <lberger@labn.net>2018-03-06 20:04:32 +0100
commit996c93142d3abfab0f6d6c800474e22a8cfbdbc5 (patch)
tree2b28846d256c84cf7b7f1a8988fb3267c8611722 /lib/imsg.h
parentbgpd: another change to keep indent.py happy (diff)
downloadfrr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.tar.xz
frr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.zip
*: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'lib/imsg.h')
-rw-r--r--lib/imsg.h110
1 files changed, 55 insertions, 55 deletions
diff --git a/lib/imsg.h b/lib/imsg.h
index d053d0195..ddaf71344 100644
--- a/lib/imsg.h
+++ b/lib/imsg.h
@@ -26,87 +26,87 @@
#define MAX_IMSGSIZE 16384
struct ibuf {
- TAILQ_ENTRY(ibuf) entry;
- u_char *buf;
- size_t size;
- size_t max;
- size_t wpos;
- size_t rpos;
- int fd;
+ TAILQ_ENTRY(ibuf) entry;
+ u_char *buf;
+ size_t size;
+ size_t max;
+ size_t wpos;
+ size_t rpos;
+ int fd;
};
struct msgbuf {
- TAILQ_HEAD(, ibuf) bufs;
- u_int32_t queued;
- int fd;
+ TAILQ_HEAD(, ibuf) bufs;
+ u_int32_t queued;
+ int fd;
};
struct ibuf_read {
- u_char buf[IBUF_READ_SIZE];
- u_char *rptr;
- size_t wpos;
+ u_char buf[IBUF_READ_SIZE];
+ u_char *rptr;
+ size_t wpos;
};
struct imsg_fd {
- TAILQ_ENTRY(imsg_fd) entry;
- int fd;
+ TAILQ_ENTRY(imsg_fd) entry;
+ int fd;
};
struct imsgbuf {
- TAILQ_HEAD(, imsg_fd) fds;
- struct ibuf_read r;
- struct msgbuf w;
- int fd;
- pid_t pid;
+ TAILQ_HEAD(, imsg_fd) fds;
+ struct ibuf_read r;
+ struct msgbuf w;
+ int fd;
+ pid_t pid;
};
#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;
+ u_int32_t type;
+ u_int16_t len;
+ u_int16_t flags;
+ u_int32_t peerid;
+ u_int32_t pid;
};
struct imsg {
- struct imsg_hdr hdr;
- int fd;
- void *data;
+ struct imsg_hdr hdr;
+ int fd;
+ void *data;
};
/* buffer.c */
-struct ibuf *ibuf_open(size_t);
-struct ibuf *ibuf_dynamic(size_t, size_t);
-int ibuf_add(struct ibuf *, const void *, size_t);
-void *ibuf_reserve(struct ibuf *, size_t);
-void *ibuf_seek(struct ibuf *, size_t, size_t);
-size_t ibuf_size(struct ibuf *);
-size_t ibuf_left(struct ibuf *);
-void ibuf_close(struct msgbuf *, struct ibuf *);
-int ibuf_write(struct msgbuf *);
-void ibuf_free(struct ibuf *);
-void msgbuf_init(struct msgbuf *);
-void msgbuf_clear(struct msgbuf *);
-int msgbuf_write(struct msgbuf *);
-void msgbuf_drain(struct msgbuf *, size_t);
+struct ibuf *ibuf_open(size_t);
+struct ibuf *ibuf_dynamic(size_t, size_t);
+int ibuf_add(struct ibuf *, const void *, size_t);
+void *ibuf_reserve(struct ibuf *, size_t);
+void *ibuf_seek(struct ibuf *, size_t, size_t);
+size_t ibuf_size(struct ibuf *);
+size_t ibuf_left(struct ibuf *);
+void ibuf_close(struct msgbuf *, struct ibuf *);
+int ibuf_write(struct msgbuf *);
+void ibuf_free(struct ibuf *);
+void msgbuf_init(struct msgbuf *);
+void msgbuf_clear(struct msgbuf *);
+int msgbuf_write(struct msgbuf *);
+void msgbuf_drain(struct msgbuf *, size_t);
/* imsg.c */
-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);
+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);
-void imsg_close(struct imsgbuf *, struct ibuf *);
-void imsg_free(struct imsg *);
-int imsg_flush(struct imsgbuf *);
-void imsg_clear(struct imsgbuf *);
+ 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 *);
+void imsg_clear(struct imsgbuf *);
#endif