diff options
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r-- | usr.sbin/ospfd/control.c | 10 | ||||
-rw-r--r-- | usr.sbin/ospfd/ospfd.c | 22 | ||||
-rw-r--r-- | usr.sbin/ospfd/ospfe.c | 26 | ||||
-rw-r--r-- | usr.sbin/ospfd/rde.c | 22 |
4 files changed, 40 insertions, 40 deletions
diff --git a/usr.sbin/ospfd/control.c b/usr.sbin/ospfd/control.c index 75f639fca4c..d325c17b452 100644 --- a/usr.sbin/ospfd/control.c +++ b/usr.sbin/ospfd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.50 2024/11/21 13:16:07 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.51 2024/11/21 13:17:02 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -176,7 +176,7 @@ control_accept(int listenfd, short event, void *bula) return; } - imsg_init(&c->iev.ibuf, connfd); + imsgbuf_init(&c->iev.ibuf, connfd); c->iev.handler = control_dispatch_imsg; c->iev.events = EV_READ; event_set(&c->iev.ev, c->iev.ibuf.fd, c->iev.events, @@ -252,14 +252,14 @@ control_dispatch_imsg(int fd, short event, void *bula) } if (event & EV_READ) { - if (((n = imsg_read(&c->iev.ibuf)) == -1 && errno != EAGAIN) || - n == 0) { + if (((n = imsgbuf_read(&c->iev.ibuf)) == -1 && + errno != EAGAIN) || n == 0) { control_close(fd); return; } } if (event & EV_WRITE) { - if (imsg_write(&c->iev.ibuf) == -1) { + if (imsgbuf_write(&c->iev.ibuf) == -1) { control_close(fd); return; } diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c index e2d9567f1eb..84489f26132 100644 --- a/usr.sbin/ospfd/ospfd.c +++ b/usr.sbin/ospfd/ospfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfd.c,v 1.119 2024/11/21 13:16:07 claudio Exp $ */ +/* $OpenBSD: ospfd.c,v 1.120 2024/11/21 13:17:02 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -260,9 +260,9 @@ main(int argc, char *argv[]) if ((iev_ospfe = malloc(sizeof(struct imsgev))) == NULL || (iev_rde = malloc(sizeof(struct imsgev))) == NULL) fatal(NULL); - imsg_init(&iev_ospfe->ibuf, pipe_parent2ospfe[0]); + imsgbuf_init(&iev_ospfe->ibuf, pipe_parent2ospfe[0]); iev_ospfe->handler = main_dispatch_ospfe; - imsg_init(&iev_rde->ibuf, pipe_parent2rde[0]); + imsgbuf_init(&iev_rde->ibuf, pipe_parent2rde[0]); iev_rde->handler = main_dispatch_rde; /* setup event handler */ @@ -358,17 +358,17 @@ main_dispatch_ospfe(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) - fatal("imsg_read error"); + if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + fatal("imsgbuf_read error"); if (n == 0) /* connection closed */ shut = 1; } if (event & EV_WRITE) { - if (imsg_write(ibuf) == -1) { + if (imsgbuf_write(ibuf) == -1) { if (errno == EPIPE) /* connection closed */ shut = 1; else - fatal("imsg_write"); + fatal("imsgbuf_write"); } } @@ -446,17 +446,17 @@ main_dispatch_rde(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) - fatal("imsg_read error"); + if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + fatal("imsgbuf_read error"); if (n == 0) /* connection closed */ shut = 1; } if (event & EV_WRITE) { - if (imsg_write(ibuf) == -1) { + if (imsgbuf_write(ibuf) == -1) { if (errno == EPIPE) /* connection closed */ shut = 1; else - fatal("imsg_write"); + fatal("imsgbuf_write"); } } diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c index 6ee806c4000..68ad5c02d9b 100644 --- a/usr.sbin/ospfd/ospfe.c +++ b/usr.sbin/ospfd/ospfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfe.c,v 1.116 2024/11/21 13:16:07 claudio Exp $ */ +/* $OpenBSD: ospfe.c,v 1.117 2024/11/21 13:17:02 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -155,9 +155,9 @@ ospfe(struct ospfd_conf *xconf, int pipe_parent2ospfe[2], int pipe_ospfe2rde[2], if ((iev_rde = malloc(sizeof(struct imsgev))) == NULL || (iev_main = malloc(sizeof(struct imsgev))) == NULL) fatal(NULL); - imsg_init(&iev_rde->ibuf, pipe_ospfe2rde[0]); + imsgbuf_init(&iev_rde->ibuf, pipe_ospfe2rde[0]); iev_rde->handler = ospfe_dispatch_rde; - imsg_init(&iev_main->ibuf, pipe_parent2ospfe[1]); + imsgbuf_init(&iev_main->ibuf, pipe_parent2ospfe[1]); iev_main->handler = ospfe_dispatch_main; /* setup event handler */ @@ -210,10 +210,10 @@ ospfe_shutdown(void) struct iface *iface; /* close pipes */ - imsg_write(&iev_rde->ibuf); + imsgbuf_write(&iev_rde->ibuf); msgbuf_clear(&iev_rde->ibuf.w); close(iev_rde->ibuf.fd); - imsg_write(&iev_main->ibuf); + imsgbuf_write(&iev_main->ibuf); msgbuf_clear(&iev_main->ibuf.w); close(iev_main->ibuf.fd); @@ -272,17 +272,17 @@ ospfe_dispatch_main(int fd, short event, void *bula) int n, link_ok, stub_changed, shut = 0; if (event & EV_READ) { - if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) - fatal("imsg_read error"); + if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + fatal("imsgbuf_read error"); if (n == 0) /* connection closed */ shut = 1; } if (event & EV_WRITE) { - if (imsg_write(ibuf) == -1) { + if (imsgbuf_write(ibuf) == -1) { if (errno == EPIPE) /* connection closed */ shut = 1; else - fatal("imsg_write"); + fatal("imsgbuf_write"); } } @@ -496,17 +496,17 @@ ospfe_dispatch_rde(int fd, short event, void *bula) u_int16_t l, age; if (event & EV_READ) { - if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) - fatal("imsg_read error"); + if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + fatal("imsgbuf_read error"); if (n == 0) /* connection closed */ shut = 1; } if (event & EV_WRITE) { - if (imsg_write(ibuf) == -1) { + if (imsgbuf_write(ibuf) == -1) { if (errno == EPIPE) /* connection closed */ shut = 1; else - fatal("imsg_write"); + fatal("imsgbuf_write"); } } diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c index dc995cbd730..5ec05f2d079 100644 --- a/usr.sbin/ospfd/rde.c +++ b/usr.sbin/ospfd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.114 2024/11/21 13:16:07 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.115 2024/11/21 13:17:02 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -161,9 +161,9 @@ rde(struct ospfd_conf *xconf, int pipe_parent2rde[2], int pipe_ospfe2rde[2], if ((iev_ospfe = malloc(sizeof(struct imsgev))) == NULL || (iev_main = malloc(sizeof(struct imsgev))) == NULL) fatal(NULL); - imsg_init(&iev_ospfe->ibuf, pipe_ospfe2rde[1]); + imsgbuf_init(&iev_ospfe->ibuf, pipe_ospfe2rde[1]); iev_ospfe->handler = rde_dispatch_imsg; - imsg_init(&iev_main->ibuf, pipe_parent2rde[1]); + imsgbuf_init(&iev_main->ibuf, pipe_parent2rde[1]); iev_main->handler = rde_dispatch_parent; /* setup event handler */ @@ -266,17 +266,17 @@ rde_dispatch_imsg(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) - fatal("imsg_read error"); + if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + fatal("imsgbuf_read error"); if (n == 0) /* connection closed */ shut = 1; } if (event & EV_WRITE) { - if (imsg_write(ibuf) == -1) { + if (imsgbuf_write(ibuf) == -1) { if (errno == EPIPE) /* connection closed */ shut = 1; else - fatal("imsg_write"); + fatal("imsgbuf_write"); } } @@ -651,17 +651,17 @@ rde_dispatch_parent(int fd, short event, void *bula) ibuf = &iev->ibuf; if (event & EV_READ) { - if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) - fatal("imsg_read error"); + if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN) + fatal("imsgbuf_read error"); if (n == 0) /* connection closed */ shut = 1; } if (event & EV_WRITE) { - if (imsg_write(ibuf) == -1) { + if (imsgbuf_write(ibuf) == -1) { if (errno == EPIPE) /* connection closed */ shut = 1; else - fatal("imsg_write"); + fatal("imsgbuf_write"); } } |