Home
last modified time | relevance | path

Searched refs:rfd (Results 1 – 25 of 51) sorted by relevance

123

/freebsd/contrib/netbsd-tests/lib/libc/sys/
H A Dt_posix_fadvise.c130 int rfd, ret; in ATF_TC_BODY() local
133 RL(rfd = rump_sys_open("/a_file", O_CREAT, 0666)); in ATF_TC_BODY()
135 CE(rump_sys_posix_fadvise(rfd, 0, 0, POSIX_FADV_NORMAL), 0); in ATF_TC_BODY()
136 CE(rump_sys_posix_fadvise(rfd, 0, 0, POSIX_FADV_SEQUENTIAL), 0); in ATF_TC_BODY()
137 CE(rump_sys_posix_fadvise(rfd, 0, 0, POSIX_FADV_RANDOM), 0); in ATF_TC_BODY()
138 CE(rump_sys_posix_fadvise(rfd, 0, 0, POSIX_FADV_WILLNEED), 0); in ATF_TC_BODY()
139 CE(rump_sys_posix_fadvise(rfd, 0, 0, POSIX_FADV_NOREUSE), 0); in ATF_TC_BODY()
141 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY()
143 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY()
145 CE(rump_sys_posix_fadvise(rfd, in ATF_TC_BODY()
[all …]
/freebsd/contrib/blocklist/lib/
H A Dblacklist.c50 blacklist_sa(int action, int rfd, const struct sockaddr *sa, socklen_t salen, in blacklist_sa() argument
57 rv = blacklist_sa_r(bl, action, rfd, sa, salen, msg); in blacklist_sa()
63 blacklist_sa_r(struct blacklist *bl, int action, int rfd, in blacklist_sa_r() argument
86 return bl_send(bl, internal_action, rfd, sa, slen, msg); in blacklist_sa_r()
90 blacklist(int action, int rfd, const char *msg) in blacklist() argument
92 return blacklist_sa(action, rfd, NULL, 0, msg); in blacklist()
96 blacklist_r(struct blacklist *bl, int action, int rfd, const char *msg) in blacklist_r() argument
98 return blacklist_sa_r(bl, action, rfd, NULL, 0, msg); in blacklist_r()
H A Dblocklist.c50 blocklist_sa(int action, int rfd, const struct sockaddr *sa, socklen_t salen, in blocklist_sa() argument
57 rv = blocklist_sa_r(bl, action, rfd, sa, salen, msg); in blocklist_sa()
63 blocklist_sa_r(struct blocklist *bl, int action, int rfd, in blocklist_sa_r() argument
86 return bl_send(bl, internal_action, rfd, sa, slen, msg); in blocklist_sa_r()
90 blocklist(int action, int rfd, const char *msg) in blocklist() argument
92 return blocklist_sa(action, rfd, NULL, 0, msg); in blocklist()
96 blocklist_r(struct blocklist *bl, int action, int rfd, const char *msg) in blocklist_r() argument
98 return blocklist_sa_r(bl, action, rfd, NULL, 0, msg); in blocklist_r()
/freebsd/crypto/openssl/ssl/rio/
H A Drio_notifier.c149 int rc, lfd = -1, rfd = -1, wfd = -1; in ossl_rio_notifier_init() local
225 rfd = accept(lfd, (struct sockaddr *)&accept_sa, &accept_sa_len); in ossl_rio_notifier_init()
226 if (rfd == INVALID_SOCKET) { in ossl_rio_notifier_init()
254 if (!BIO_socket_nbio(rfd, 1)) { in ossl_rio_notifier_init()
266 nfy->rfd = rfd; in ossl_rio_notifier_init()
275 if (rfd != INVALID_SOCKET) in ossl_rio_notifier_init()
276 BIO_closesocket(rfd); in ossl_rio_notifier_init()
323 nfy->rfd = fds[0]; in ossl_rio_notifier_init()
337 if (nfy->rfd < 0) in ossl_rio_notifier_cleanup()
341 BIO_closesocket(nfy->rfd); in ossl_rio_notifier_cleanup()
[all …]
H A Dpoll_builder.c22 FD_ZERO(&rpb->rfd); in OSSL_SAFE_MATH_UNSIGNED()
96 openssl_fdset(fd, &rpb->rfd); in ossl_rio_poll_builder_add_fd()
161 rc = select(rpb->hwm_fd + 1, &rpb->rfd, &rpb->wfd, &rpb->efd, p_timeout); in ossl_rio_poll_builder_poll()
/freebsd/crypto/openssl/ssl/quic/
H A Dquic_reactor.c251 static int poll_two_fds(int rfd, int rfd_want_read, in poll_two_fds() argument
268 if (rfd >= FD_SETSIZE || wfd >= FD_SETSIZE) in poll_two_fds()
276 if (rfd != INVALID_SOCKET && rfd_want_read) in poll_two_fds()
277 openssl_fdset(rfd, &rfd_set); in poll_two_fds()
282 if (rfd != INVALID_SOCKET) in poll_two_fds()
283 openssl_fdset(rfd, &efd_set); in poll_two_fds()
293 maxfd = rfd; in poll_two_fds()
299 if (!ossl_assert(rfd != INVALID_SOCKET || wfd != INVALID_SOCKET in poll_two_fds()
349 if (rfd == wfd) { in poll_two_fds()
350 pfds[npfd].fd = rfd; in poll_two_fds()
[all …]
/freebsd/crypto/krb5/src/plugins/kdb/db2/libdb2/recno/
H A Drec_open.c66 int rfd = -1, sverrno; in __rec_open() local
69 if (fname != NULL && (rfd = open(fname, flags | O_BINARY, mode)) < 0) in __rec_open()
72 if (fname != NULL && fcntl(rfd, F_SETFD, 1) == -1) { in __rec_open()
73 close(rfd); in __rec_open()
119 t->bt_rfd = rfd; in __rec_open()
128 if (lseek(rfd, (off_t)0, SEEK_CUR) == -1 && errno == ESPIPE) { in __rec_open()
136 slow: if ((t->bt_rfp = fdopen(rfd, "rb")) == NULL) in __rec_open()
152 if (fstat(rfd, &sb)) in __rec_open()
176 PROT_READ, MAP_PRIVATE, rfd, in __rec_open()
221 (void)close(rfd); in __rec_open()
/freebsd/share/examples/ipfilter/samples/
H A Drelay.c30 int relay(ifd, ofd, rfd) in relay() argument
31 int ifd, ofd, rfd; in relay()
43 if (nfd < rfd)
44 nfd = rfd;
50 FD_SET(rfd, &wfds);
56 FD_SET(rfd, &rfds);
80 if (n && FD_ISSET(rfd, &rfds)) {
81 rw = read(rfd, iwh, obuff + RELAY_BUFSZ - iwh);
89 if (n && FD_ISSET(rfd, &wfds)) {
90 rw = write(rfd, irt, irh - irt);
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/
H A Dseekflood.c138 int h = 0, i, j, rfd, wfd; in main() local
143 rfd = _open_file(h, 0); in main()
145 count += _seek_file(h, rfd); in main()
147 close(rfd); in main()
151 rfd = _open_file(i, 0); in main()
153 count += _seek_file(i, rfd); in main()
155 close(rfd); in main()
/freebsd/lib/libc/db/recno/
H A Drec_open.c60 int rfd, sverrno; in __rec_open() local
63 if (fname != NULL && (rfd = _open(fname, flags | O_CLOEXEC, mode)) < 0) in __rec_open()
108 t->bt_rfd = rfd; in __rec_open()
117 if (lseek(rfd, (off_t)0, SEEK_CUR) == -1 && errno == ESPIPE) { in __rec_open()
125 slow: if ((t->bt_rfp = fdopen(rfd, "r")) == NULL) in __rec_open()
141 if (_fstat(rfd, &sb)) in __rec_open()
165 PROT_READ, MAP_PRIVATE, rfd, in __rec_open()
210 (void)_close(rfd); in __rec_open()
/freebsd/usr.sbin/bhyve/
H A Duart_backend.c58 int rfd; /* fd for reading */ member
101 tcgetattr(tf->rfd, &orig); in ttyopen()
105 tcsetattr(tf->rfd, TCSANOW, &new); in ttyopen()
119 len = read(tf->rfd, &rb, 1); in ttyread()
252 nread = read(sc->tty.rfd, flushbuf, sizeof(flushbuf)); in uart_rxfifo_reset()
316 sc->tty.rfd = sc->tty.wfd = conn_fd; in uart_tcp_listener()
318 sc->mev = mevent_add(sc->tty.rfd, EVF_READ, socket_softc->drain, in uart_tcp_listener()
343 sc->tty.rfd = sc->tty.wfd = -1; in uart_tcp_disconnect()
357 sc->tty.rfd = STDIN_FILENO; in uart_stdio_backend()
361 if (fcntl(sc->tty.rfd, F_SETFL, O_NONBLOCK) != 0) in uart_stdio_backend()
[all …]
/freebsd/contrib/sendmail/src/
H A Dsfsasl.c571 tls_retry(ssl, rfd, wfd, tlsstart, timeout, err, where) in tls_retry() argument
573 int rfd;
612 where, rfd, wfd, err);
615 if ((err == SSL_ERROR_WANT_READ && !SM_FD_OK_SELECT(rfd)) ||
622 where, rfd, wfd);
633 FD_SET(rfd, &ssl_maskr);
635 FD_SET(rfd, &ssl_maskx);
638 ret = select(rfd + 1, &ssl_maskr, NULL, &ssl_maskx,
653 FD_SET(rfd, &ssl_maskx);
718 int r, rfd, wfd, try, ssl_err; local
[all …]
/freebsd/usr.sbin/bluetooth/hccontrol/
H A Dsend_recv.c150 fd_set rfd; in hci_recv() local
158 FD_ZERO(&rfd); in hci_recv()
159 FD_SET(s, &rfd); in hci_recv()
164 n = select(s + 1, &rfd, NULL, NULL, &tv); in hci_recv()
175 assert(FD_ISSET(s, &rfd)); in hci_recv()
/freebsd/tools/test/stress2/misc/
H A Dmmap28.sh77 int fd, rfd;
83 if ((rfd = open("/dev/random", O_RDONLY)) == -1)
112 if (read(rfd, &indx, sizeof(indx)) != sizeof(indx))
116 close(rfd);
H A Dpddupfd.sh41 int error, f, pp, rfd, status, workfd;
49 while ((rfd = (int)atomic_load_int(comm)) == -1)
51 if (rfd == -2)
53 workfd = my_pddupfd(fd, rfd, 0);
H A Dcluster.sh73 int rfd;
83 read(rfd, &v, sizeof(v));
249 if ((rfd = open("/dev/random", O_RDONLY)) == -1)
H A Dpmc4.sh69 void *rfd;
72 if ((rfd = pmclog_open(kq)) == NULL)
/freebsd/usr.bin/bluetooth/rfcomm_sppd/
H A Drfcomm_sppd.c83 fd_set rfd; in main() local
298 FD_ZERO(&rfd); in main()
299 FD_SET(amaster, &rfd); in main()
300 FD_SET(s, &rfd); in main()
302 n = select(max(amaster, s) + 1, &rfd, NULL, NULL, NULL); in main()
315 if (FD_ISSET(amaster, &rfd)) { in main()
334 if (FD_ISSET(s, &rfd)) { in main()
/freebsd/crypto/openssh/
H A Dchannels.c439 channel_register_fds(struct ssh *ssh, Channel *c, int rfd, int wfd, int efd, in channel_register_fds() argument
444 if (rfd != -1) in channel_register_fds()
445 (void)fcntl(rfd, F_SETFD, FD_CLOEXEC); in channel_register_fds()
446 if (wfd != -1 && wfd != rfd) in channel_register_fds()
448 if (efd != -1 && efd != rfd && efd != wfd) in channel_register_fds()
451 c->rfd = rfd; in channel_register_fds()
453 c->sock = (rfd == wfd) ? rfd : -1; in channel_register_fds()
458 debug2("channel %d: rfd %d isatty", c->self, c->rfd); in channel_register_fds()
473 if (rfd != -1 && !isatty(rfd) && in channel_register_fds()
474 (val = fcntl(rfd, F_GETFL)) != -1 && !(val & O_NONBLOCK)) { in channel_register_fds()
[all …]
/freebsd/crypto/openssl/include/internal/
H A Drio_notifier.h37 int rfd, wfd; member
66 return nfy->rfd; in ossl_rio_notifier_as_fd()
/freebsd/contrib/wpa/src/common/
H A Dwpa_helpers.c104 fd_set rfd; in get_wpa_cli_event2() local
118 FD_ZERO(&rfd); in get_wpa_cli_event2()
119 FD_SET(fd, &rfd); in get_wpa_cli_event2()
122 ret = select(fd + 1, &rfd, NULL, NULL, &tv); in get_wpa_cli_event2()
/freebsd/usr.bin/script/
H A Dscript.c110 fd_set rfd, wfd; in main() local
299 FD_ZERO(&rfd); in main()
301 FD_SET(master, &rfd); in main()
303 FD_SET(STDIN_FILENO, &rfd); in main()
318 n = pselect(master + 1, &rfd, &wfd, NULL, tvp, pselmask); in main()
328 if (n > 0 && FD_ISSET(STDIN_FILENO, &rfd)) { in main()
376 if (n > 0 && FD_ISSET(master, &rfd)) { in main()
/freebsd/tools/build/options/
H A Dmakeman.lua415 local rfd, wfd = assert(unistd.pipe())
422 unistd.close(rfd)
456 children[pid] = {name, rfd}
471 local rfd = info[2]
476 rbuf = unistd.read(rfd, 512)
479 rbuf = unistd.read(rfd, 512)
482 unistd.close(rfd)
/freebsd/contrib/netbsd-tests/include/sys/
H A Dt_socket.c90 int rfd, fd[2], storage; in ATF_TC_BODY() local
170 rfd = *(int *)CMSG_DATA(cmp); in ATF_TC_BODY()
174 if (rump_sys_read(rfd, buf, sizeof(buf)) == -1) in ATF_TC_BODY()
/freebsd/usr.sbin/usbdump/
H A Dusbdump.c86 int rfd; member
677 while ((ret = read(p->rfd, &datalen, sizeof(int))) == sizeof(int)) { in read_file()
682 ret = read(p->rfd, data, datalen); in read_file()
729 p->rfd = open(r_arg, O_RDONLY); in init_rfile()
730 if (p->rfd < 0) { in init_rfile()
734 ret = read(p->rfd, &uf, sizeof(uf)); in init_rfile()
996 if (p->rfd > 0) in main()
997 close(p->rfd); in main()

123