Home
last modified time | relevance | path

Searched refs:nfd (Results 1 – 25 of 38) sorted by relevance

12

/freebsd/sbin/ipf/ipsend/
H A Diptests.c102 int nfd, i = 0, len, id = getpid(); in ip_test1() local
119 nfd = initdevice(dev, 1); in ip_test1()
120 if (nfd == -1) in ip_test1()
131 (void) send_ip(nfd, 1500, ip, gwip, 1); in ip_test1()
147 (void) send_ip(nfd, 1500, ip, gwip, 1); in ip_test1()
164 (void) send_ip(nfd, 1500, ip, gwip, 1); in ip_test1()
180 (void) send_ip(nfd, 1500, ip, gwip, 1); in ip_test1()
200 (void) send_ether(nfd, (char *)ip, i, gwip); in ip_test1()
212 (void) send_ether(nfd, (char *)ip, len, gwip); in ip_test1()
231 (void) send_ether(nfd, (char *)ip, len, gwip); in ip_test1()
[all …]
H A Dip.c44 send_ether(int nfd, char *buf, int len, struct in_addr gwip) in send_ether() argument
69 err = sendip(nfd, s, sizeof(*eh) + len); in send_ether()
77 send_ip(int nfd, int mtu, ip_t *ip, struct in_addr gwip, int frag) in send_ip() argument
138 err = sendip(nfd, ipbuf, sizeof(*eh) + iplen); in send_ip()
211 err = sendip(nfd, ipbuf, sizeof(*eh) + ts); in send_ip()
235 send_tcp(int nfd, int mtu, ip_t *ip, struct in_addr gwip) in send_tcp() argument
278 return (send_ip(nfd, mtu, ip, gwip, 1)); in send_tcp()
286 send_udp(int nfd, int mtu, ip_t *ip, struct in_addr gwip) in send_udp() argument
308 return (send_ip(nfd, mtu, ip, gwip, 1)); in send_udp()
316 send_icmp(int nfd, int mtu, ip_t *ip, in_addr gwip) in send_icmp() argument
[all …]
H A Dsock.c248 int fd, nfd; in do_socket() local
280 nfd = initdevice(dev, 1); in do_socket()
281 if (nfd == -1) in do_socket()
303 if (send_tcp(nfd, mtu, (ip_t *)ti, gwip) == -1) in do_socket()
/freebsd/contrib/tcsh/
H A Ded.refresh.c588 Char *ofd, *ols, *oe, *nfd, *nls, *ne; in update_line() local
598 nfd = n; in update_line()
623 while (nfd < n) { in update_line()
635 if (*ofd == '\0' && *nfd == '\0') { in update_line()
645 while ((o > ofd) && (n > nfd) && (*--o == *--n)) in update_line()
670 for (c = *ofd, n = nfd; n < nls; n++) { in update_line()
678 if (((nse - nsb) < (p - n)) && (2 * (p - n) > n - nfd)) { in update_line()
691 if (*nfd) { in update_line()
692 for (c = *nfd, o = ofd; o < ols; o++) { in update_line()
694 for (n = nfd, p = o; p < ols && n < nls && *p == *n; p++, n++) in update_line()
[all …]
/freebsd/contrib/libedit/
H A Drefresh.c544 wchar_t *ofd, *ols, *oe, *nfd, *nls, *ne; in re_update_line() local
555 nfd = n; in re_update_line()
578 while (nfd < n) { in re_update_line()
589 if (*ofd == '\0' && *nfd == '\0') { in re_update_line()
596 while ((o > ofd) && (n > nfd) && (*--o == *--n)) in re_update_line()
613 for (c = *ofd, n = nfd; n < nls; n++) { in re_update_line()
624 (2 * (p - n) > n - nfd)) { in re_update_line()
636 if (*nfd) { in re_update_line()
637 for (c = *nfd, o = ofd; o < ols; o++) { in re_update_line()
639 for (n = nfd, p = o; in re_update_line()
[all …]
/freebsd/sbin/ipf/ipfsync/
H A Dipfsyncd.c56 int nfd = -1; variable
171 if (nfd != -1) {
172 close(nfd);
173 nfd = -1;
204 if (nfd != -1)
205 close(nfd);
227 FD_SET(nfd, &mrd); in do_io()
228 maxfd = nfd; in do_io()
231 debug(2, "nfd %d lfd %d maxfd %d\n", nfd, lfd, maxfd); in do_io()
284 if (FD_ISSET(nfd, &rd)) { in do_io()
[all …]
H A Dipsyncs.c55 int nfd = -1 , lfd = -1; local
109 if (nfd != -1)
110 close(nfd);
118 nfd = socket(AF_INET, SOCK_DGRAM, 0);
119 if (nfd == -1) {
125 setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, &n1, sizeof(n1));
127 if (bind(nfd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
142 n1 = read(nfd, buff+inbuf, BUFFERLEN-inbuf);
263 if (nfd != -1)
264 close(nfd);
H A Dipsyncm.c59 int nfd = -1, lfd = -1, n1, n2, n3, len; local
98 if (nfd != -1)
99 close(nfd);
107 nfd = socket(AF_INET, SOCK_DGRAM, 0);
108 if (nfd == -1) {
113 if (connect(nfd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
204 n3 = write(nfd, buff, n2);
244 if (nfd != -1)
245 close(nfd);
/freebsd/contrib/libarchive/libarchive/test/
H A Dtest_archive_string_conversion.c311 char nfc[80], nfd[80]; in test_archive_string_normalization_nfc() local
337 strncpy(nfd, e, sizeof(nfd)-1); in test_archive_string_normalization_nfc()
338 nfd[sizeof(nfd)-1] = '\0'; in test_archive_string_normalization_nfc()
350 nfd, 0); in test_archive_string_normalization_nfc()
359 nfd, nfc, line); in test_archive_string_normalization_nfc()
386 nfd, nfc, line); in test_archive_string_normalization_nfc()
395 nfd, nfc, line); in test_archive_string_normalization_nfc()
415 "to WCS NFC(%s):%d", nfd, nfc, line); in test_archive_string_normalization_nfc()
426 "to WCS NFC(%s):%d", nfd, nfc, line); in test_archive_string_normalization_nfc()
437 "to WCS NFC(%s):%d", nfd, nfc, line); in test_archive_string_normalization_nfc()
[all …]
/freebsd/usr.sbin/bluetooth/btpand/
H A Devent.c88 int nfd; in __event_dispatch() local
95 nfd = 0; in __event_dispatch()
129 nfd = (nfd > ev->fd) ? nfd : ev->fd; in __event_dispatch()
134 nfd = (nfd > ev->fd) ? nfd : ev->fd; in __event_dispatch()
143 nfd = select(nfd + 1, &r, &w, NULL, &timeout); in __event_dispatch()
144 if (nfd < 0) in __event_dispatch()
160 if (nfd > 0 && ev->fd >= 0) { in __event_dispatch()
169 nfd --; in __event_dispatch()
/freebsd/contrib/netbsd-tests/lib/libc/c063/
H A Dt_linkat.c63 int ofd, nfd, fd; in ATF_TC_BODY() local
72 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
73 ATF_REQUIRE(linkat(ofd, BASEFILE, nfd, BASETARGET, 0) == 0); in ATF_TC_BODY()
75 ATF_REQUIRE(close(nfd) == 0); in ATF_TC_BODY()
149 int ofd, nfd, fd; in ATF_TC_BODY() local
159 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
160 ATF_REQUIRE(linkat(ofd, BASELINK, nfd, BASETARGET, in ATF_TC_BODY()
163 ATF_REQUIRE(close(nfd) == 0); in ATF_TC_BODY()
182 int ofd, nfd, fd; in ATF_TC_BODY() local
192 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
[all …]
H A Dt_renameat.c61 int ofd, nfd, fd; in ATF_TC_BODY() local
72 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
73 ATF_REQUIRE(renameat(ofd, BASEFILE, nfd, BASETARGET) == 0); in ATF_TC_BODY()
75 ATF_REQUIRE(close(nfd) == 0); in ATF_TC_BODY()
/freebsd/contrib/sendmail/libmilter/
H A Dworker.c381 int nfd, r, i; local
434 nfd = 0;
437 pfd[nfd].fd = RD_PIPE;
438 pfd[nfd].events = MI_POLL_RD_FLAGS;
439 pfd[nfd].revents = 0;
440 nfd++;
461 if (nfd >= dim_pfd)
484 if (nfd < dim_pfd)
487 pfd[nfd].fd = ctx->ctx_sd;
488 pfd[nfd].events = MI_POLL_RD_FLAGS;
[all …]
/freebsd/sbin/ipf/ipfs/
H A Dipfs.c538 int nfd, i; in readnat() local
543 nfd = -1; in readnat()
551 nfd = open(file, O_RDONLY); in readnat()
552 if (nfd == -1) { in readnat()
564 i = read(nfd, &ipn, sizeof(ipn)); in readnat()
587 i = read(nfd, s, n); in readnat()
630 close(nfd); in readnat()
631 nfd = -1; in readnat()
673 if (nfd != -1) in readnat()
674 close(nfd); in readnat()
[all …]
/freebsd/lib/libcasper/libcasper/
H A Dlibcasper_impl.c51 int nullfd, nfd; in fd_fix_environment() local
61 nfd = dup(*fdp); in fd_fix_environment()
62 if (nfd == -1) in fd_fix_environment()
66 *fdp = nfd; in fd_fix_environment()
/freebsd/contrib/blocklist/bin/
H A Dblacklistd.c334 addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, in addfd() argument
340 if (*nfd >= *maxfd) { in addfd()
350 (*pfdp)[*nfd].fd = bl_getfd(bl); in addfd()
351 (*pfdp)[*nfd].events = POLLIN; in addfd()
352 (*blp)[*nfd] = bl; in addfd()
353 *nfd += 1; in addfd()
507 size_t nfd = 0; in main() local
511 addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]); in main()
521 addfd(&pfd, &bl, &nfd, &maxfd, line); in main()
524 if (nfd == 0) in main()
[all …]
/freebsd/share/examples/ipfilter/samples/
H A Drelay.c36 int nfd, n, rw; local
40 nfd = ifd;
41 if (nfd < ofd)
42 nfd = ofd;
43 if (nfd < rfd)
44 nfd = rfd;
58 switch ((n = select(nfd + 1, &rfds, &wfds, NULL, NULL)))
/freebsd/usr.sbin/ppp/
H A Dbundle.c1378 int niov, expect, f, *fd, nfd, onfd; in bundle_ReceiveDatalink() local
1447 nfd = ((caddr_t)cmsg + cmsg->cmsg_len - (caddr_t)fd) / sizeof(int); in bundle_ReceiveDatalink()
1449 if (nfd < 2) { in bundle_ReceiveDatalink()
1451 nfd, nfd == 1 ? "" : "s"); in bundle_ReceiveDatalink()
1452 while (nfd--) in bundle_ReceiveDatalink()
1453 close(fd[nfd]); in bundle_ReceiveDatalink()
1468 while (nfd--) in bundle_ReceiveDatalink()
1469 close(fd[nfd]); in bundle_ReceiveDatalink()
1487 while (nfd--) in bundle_ReceiveDatalink()
1488 close(fd[nfd]); in bundle_ReceiveDatalink()
[all …]
/freebsd/lib/libc/tests/stdio/
H A Dgets_s_test.c60 int nfd; in ATF_TC_BODY() local
70 nfd = dup2(fd[0], 0); in ATF_TC_BODY()
72 stdin = fdopen(nfd, "r"); in ATF_TC_BODY()
/freebsd/lib/libc/rpc/
H A Dclnt_generic.c421 int nfd; in __rpc_raise_fd() local
426 if ((nfd = _fcntl(fd, F_DUPFD, __rpc_minfd)) == -1) in __rpc_raise_fd()
429 if (_fsync(nfd) == -1) { in __rpc_raise_fd()
430 _close(nfd); in __rpc_raise_fd()
440 return (nfd); in __rpc_raise_fd()
/freebsd/usr.sbin/ipfwpcap/
H A Dipfwpcap.c158 int nfd; in main() local
227 nfd = sd + 1; in main()
232 r = select(nfd, &rds, NULL, NULL, NULL); in main()
/freebsd/sbin/mdmfs/
H A Dmdmfs.c731 int nfd; /* Null (/dev/null) file descriptor. */ in run() local
792 nfd = open(_PATH_DEVNULL, O_RDWR); in run()
793 if (nfd == -1) in run()
795 if (dup2(nfd, STDIN_FILENO) < 0) in run()
798 if (dup2(nfd, STDOUT_FILENO) < 0) in run()
800 if (dup2(nfd, STDERR_FILENO) < 0) in run()
/freebsd/sbin/swapon/
H A Dswapon.c605 int pfd[2], nfd, dup2dn; in swap_on_off_md()
652 nfd = open(_PATH_DEVNULL, O_RDWR); in swap_on_off_md()
653 if (nfd == -1) in swap_on_off_md()
655 if (dup2(nfd, STDIN_FILENO) < 0) in swap_on_off_md()
657 if (dup2dn && dup2(nfd, STDOUT_FILENO) < 0) in swap_on_off_md()
659 if (dup2(nfd, STDERR_FILENO) < 0)
665 int pfd[2], nfd, dup2dn; run_cmd() local
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_platform_linux.cpp429 int ExtractResolvFDs(void *state, int *fds, int nfd) { in ExtractResolvFDs() argument
433 for (int i = 0; i < MAXNS && cnt < nfd; i++) { in ExtractResolvFDs()
446 int ExtractRecvmsgFDs(void *msgp, int *fds, int nfd) { in ExtractRecvmsgFDs() argument
456 if (res == nfd) in ExtractRecvmsgFDs()
/freebsd/contrib/tnftp/src/
H A Dftp.c520 int nr, nfd; in empty() local
523 nfd = 0; in empty()
525 pfd[nfd].fd = fileno(ecin); in empty()
526 pfd[nfd++].events = POLLIN; in empty()
530 pfd[nfd].fd = fileno(din); in empty()
531 pfd[nfd++].events = POLLIN; in empty()
534 if ((nr = ftp_poll(pfd, nfd, sec * 1000)) <= 0) in empty()
538 nfd = 0; in empty()
540 nr |= (pfd[nfd++].revents & POLLIN) ? 1 : 0; in empty()
542 nr |= (pfd[nfd++].revents & POLLIN) ? 2 : 0; in empty()

12