Searched refs:fds (Results 26 - 50 of 113) sorted by relevance

12345

/openbsd-current/sbin/isakmpd/
H A Dtransport.c179 transport_fd_set(fd_set * fds) argument
187 n = t->vtbl->fd_set(t, fds, 1);
205 transport_pending_wfd_set(fd_set * fds) argument
214 n = t->vtbl->fd_set(t, fds, 1);
231 transport_handle_messages(fd_set *fds) argument
237 (*t->vtbl->fd_isset)(t, fds)) {
239 (*t->vtbl->fd_set)(t, fds, 0);
254 transport_send_messages(fd_set * fds) argument
274 t->vtbl->fd_isset(t, fds)) {
276 t->vtbl->fd_set(t, fds,
[all...]
/openbsd-current/bin/csh/
H A Dmisc.c156 int fds[] = { SHIN, SHOUT, SHERR, OLDSTD, FSHTTY }; local
160 for (i = 0; i < sizeof(fds)/sizeof(fds[0]); i++) {
161 if (fd == fds[i])
163 if (fds[i] > max)
164 max = fds[i];
/openbsd-current/regress/lib/libc/explicit_bzero/
H A Dexplicit_bzero.c128 int i, fds[2]; local
129 ASSERT_EQ(0, pipe(fds));
132 ASSERT_EQ(sizeof(secret), write(fds[1], secret, sizeof(secret)));
133 ASSERT_EQ(0, close(fds[1]));
135 ASSERT_EQ(len, read(fds[0], buf, len));
136 ASSERT_EQ(0, close(fds[0]));
/openbsd-current/regress/lib/libpthread/socket/3/
H A Dsocket3.c50 struct pollfd fds; local
89 fds.fd = listen_fd;
90 fds.events = POLLIN;
91 CHECKe(poll(&fds, 1, INFTIM));
/openbsd-current/usr.sbin/mopd/common/
H A Dloop-bsd.c88 fd_set fds, listeners; local
111 FD_ZERO(&fds);
114 FD_SET(ii->fd, &fds);
120 listeners = fds;
/openbsd-current/lib/libcurses/tty/
H A Dlib_twait.c194 struct pollfd *fds = fd_list; local
245 if (fds == fd_list)
246 fds = typeMalloc(struct pollfd, MIN_FDS + evl->count);
247 if (fds == 0)
253 fds[count].fd = sp->_ifd;
254 fds[count].events = POLLIN;
259 fds[count].fd = fd;
260 fds[count].events = POLLIN;
270 fds[count].fd = ev->data.fev.fd;
271 fds[coun
[all...]
/openbsd-current/regress/lib/libpthread/dlopen/
H A Ddlopen.c297 int fds[2]; local
302 if (pipe(fds))
308 close(fds[0]);
309 close(fds[1]);
313 close(fds[1]);
314 read(fds[0], buf, 1);
315 close(fds[0]);
350 int fds[2]; local
355 if (pipe(fds))
361 close(fds[
[all...]
/openbsd-current/usr.sbin/unbound/util/
H A Dmini_event.c111 base->fds = (struct event**)calloc((size_t)base->capfd,
113 if(!base->fds) {
205 if(!base->fds[i] || !(FD_ISSET(i, &base->ready))) {
216 bits &= base->fds[i]->ev_events;
219 base->fds[i]->ev_callback));
220 (*base->fds[i]->ev_callback)(base->fds[i]->ev_fd,
221 bits, base->fds[i]->ev_arg);
265 free(base->fds);
299 ev->ev_base->fds[e
[all...]
H A Dtube.c96 /* close fds after deleting commpoints, to be sure.
406 struct pollfd fds; local
409 memset(&fds, 0, sizeof(fds));
410 fds.fd = fd;
411 fds.events = POLLIN | POLLERR | POLLHUP;
417 pret = poll(&fds, 1, msec);
443 struct pollfd fds; local
444 memset(&fds, 0, sizeof(fds));
[all...]
/openbsd-current/sbin/unwind/libunbound/util/
H A Dmini_event.c111 base->fds = (struct event**)calloc((size_t)base->capfd,
113 if(!base->fds) {
205 if(!base->fds[i] || !(FD_ISSET(i, &base->ready))) {
216 bits &= base->fds[i]->ev_events;
219 base->fds[i]->ev_callback));
220 (*base->fds[i]->ev_callback)(base->fds[i]->ev_fd,
221 bits, base->fds[i]->ev_arg);
265 free(base->fds);
299 ev->ev_base->fds[e
[all...]
H A Dtube.c96 /* close fds after deleting commpoints, to be sure.
406 struct pollfd fds; local
409 memset(&fds, 0, sizeof(fds));
410 fds.fd = fd;
411 fds.events = POLLIN | POLLERR | POLLHUP;
417 pret = poll(&fds, 1, msec);
443 struct pollfd fds; local
444 memset(&fds, 0, sizeof(fds));
[all...]
/openbsd-current/regress/sys/netinet6/rip6cksum/
H A Drip6cksum.c145 fd_set fds; local
149 FD_ZERO(&fds);
150 FD_SET(s, &fds);
154 n = select(s + 1, &fds, NULL, NULL, &to);
/openbsd-current/usr.sbin/nsd/
H A Dmini_event.c126 base->fds = (struct event**)calloc((size_t)base->capfd,
128 if(!base->fds) {
226 if(!base->fds[i] || !(FD_ISSET(i, &base->ready))) {
237 bits &= base->fds[i]->ev_flags;
239 (*base->fds[i]->ev_callback)(base->fds[i]->ev_fd,
240 bits, base->fds[i]->ev_arg);
313 if(base->fds)
314 free(base->fds);
352 ev->ev_base->fds[e
[all...]
H A Dmini_event.h39 * The back end is only select. Max number of fds is limited.
43 * Although limited to select() and a max (1024) open fds, it
46 * o handler calling takes time ~ to the number of fds.
92 struct event** fds; member in struct:event_base
95 /** capacity - size of the fds array */
97 /* fdset for read write, for fds ready, and added */
99 /** fds for reading */
101 /** fds for writing */
103 /** fds determined ready for use */
/openbsd-current/regress/sys/kern/kqueue/
H A Dkqueue-regress.c198 int fds[2], i, kq = -1, prev; local
211 if (pipe(fds) == -1)
215 for (i = 0, prev = fds[0]; i < nkqueues; i++, prev = kq) {
230 write(fds[1], "x", 1);
253 int fds[2], kq, ret; local
255 if (pipe(fds) == -1)
261 EV_SET(&kev[0], fds[0], EVFILT_READ, EV_ADD, 0, 0, NULL);
285 write(fds[1], "x", 1);
/openbsd-current/regress/lib/libc/sys/
H A Dt_write.c111 int fds[2]; local
113 ATF_REQUIRE(pipe(fds) == 0);
116 ATF_REQUIRE(write(fds[1], "x", 1) != -1);
117 ATF_REQUIRE(close(fds[0]) == 0);
122 if (write(fds[1], "x", 1) != -1 || errno != EPIPE)
125 ATF_REQUIRE(close(fds[1]) == 0);
H A Dt_mmap.c107 int fds[2]; local
115 if (socketpair(AF_LOCAL, SOCK_STREAM, PF_UNSPEC, fds) != 0)
120 if (setsockopt(fds[1], SOL_SOCKET, SO_RCVBUF, &val, sizeof(val)) != 0)
125 if (setsockopt(fds[0], SOL_SOCKET, SO_SNDBUF, &val, sizeof(val)) != 0)
128 if (fcntl(fds[0], F_SETFL, O_NONBLOCK) != 0)
131 nwritten = write(fds[0], (char *)vp + page, BUFSIZE - page);
139 nread = read(fds[1], buf + page, BUFSIZE - page);
150 ATF_REQUIRE(close(fds[0]) == 0);
151 ATF_REQUIRE(close(fds[1]) == 0);
/openbsd-current/gnu/llvm/lldb/examples/interposing/darwin/fd_interposing/
H A DFDInterposing.cpp555 int fds[2]) {
559 fds[0] = -1;
560 fds[1] = -1;
561 const int err = socketpair(domain, type, protocol, fds);
566 pid, domain, type, protocol, fds[0], fds[1], err));
569 if (fds[0] >= 0)
570 save_backtrace(fds[0], err_errno.get_errno(), description_sp, true);
571 if (fds[1] >= 0)
572 save_backtrace(fds[
554 socketpair$__interposed__(int domain, int type, int protocol, int fds[2]) argument
858 pipe$__interposed__(int fds[2]) argument
[all...]
/openbsd-current/usr.sbin/dhcrelay/
H A Ddispatch.c254 struct pollfd *fds; local
261 fds = calloc(nfds, sizeof(struct pollfd));
262 if (fds == NULL)
302 fds[i].fd = l->fd;
303 fds[i].events = POLLIN;
304 fds[i].revents = 0;
313 count = poll(fds, nfds, to_msec);
332 if ((fds[i].revents & (POLLIN | POLLHUP))) {
333 fds[i].revents = 0;
/openbsd-current/usr.sbin/dhcrelay6/
H A Ddispatch.c277 struct pollfd *fds; local
284 fds = calloc(nfds, sizeof(struct pollfd));
285 if (fds == NULL)
325 fds[i].fd = l->fd;
326 fds[i].events = POLLIN;
327 fds[i].revents = 0;
336 count = poll(fds, nfds, to_msec);
355 if ((fds[i].revents & (POLLIN | POLLHUP))) {
356 fds[i].revents = 0;
/openbsd-current/usr.sbin/sasyncd/
H A Dpfkey.c366 pfkey_set_rfd(fd_set *fds) argument
369 FD_SET(cfgstate.pfkey_socket, fds);
373 pfkey_set_pending_wfd(fd_set *fds) argument
376 FD_SET(cfgstate.pfkey_socket, fds);
380 pfkey_read_message(fd_set *fds) argument
383 if (FD_ISSET(cfgstate.pfkey_socket, fds))
388 pfkey_send_message(fd_set *fds) argument
392 if (!pmsg || !FD_ISSET(cfgstate.pfkey_socket, fds))
H A Dcarp.c190 carp_set_rfd(fd_set *fds) argument
193 FD_SET(cfgstate.route_socket, fds);
218 carp_read_message(fd_set *fds) argument
221 if (FD_ISSET(cfgstate.route_socket, fds))
/openbsd-current/usr.bin/kdump/
H A Dktrstruct.c343 ktrfdset(struct fd_set *fds, int len) argument
351 if (i != nfds && FD_ISSET(i, fds)) {
493 int i, count, *fds; local
517 fds = (int *)CMSG_DATA(cmsg);
520 && (char *)fds + (i + 1) * sizeof(int) <=
523 printf("%s%d", i ? "," : "", fds[i]);
646 } else if (strcmp(name, "fds") == 0) {
651 struct fd_set *fds; local
653 if ((fds = malloc(datalen)) == NULL)
655 memcpy(fds, dat
[all...]
/openbsd-current/usr.sbin/dhcpd/
H A Ddispatch.c306 static struct pollfd *fds; local
315 fds = reallocarray(fds, nfds, sizeof(struct pollfd));
316 if (fds == NULL)
357 fds[i].fd = l->fd;
358 fds[i].events = POLLIN;
368 fds[i].fd = syncfd;
369 fds[i].events = POLLIN;
373 switch (poll(fds, nfds, to_msec)) {
386 if ((fds[
[all...]
/openbsd-current/usr.bin/cvs/
H A Ddiff3.c154 static int fds[5]; variable
183 fds[2] = buf_write_stmp(b1, path1, NULL);
186 fds[3] = rcs_rev_write_stmp(cf->file_rcs, d3rev1, path2, 0);
189 fds[4] = rcs_rev_write_stmp(cf->file_rcs, d3rev2, path3, 0);
191 diffreg(path1, path3, fds[2], fds[4], d1, D_FORCEASCII);
192 diffreg(path2, path3, fds[3], fds[4], d2, D_FORCEASCII);
195 fds[0] = buf_write_stmp(d1, dp13, NULL);
199 fds[
[all...]

Completed in 190 milliseconds

12345