/freebsd-current/lib/libcasper/libcasper/ |
H A D | libcasper_impl.c | 51 int nullfd, nfd; local 61 nfd = dup(*fdp); 62 if (nfd == -1) 66 *fdp = nfd;
|
/freebsd-current/sbin/ipf/ipsend/ |
H A D | iptests.c | 102 int nfd, i = 0, len, id = getpid(); local 119 nfd = initdevice(dev, 1); 120 if (nfd == -1) 131 (void) send_ip(nfd, 1500, ip, gwip, 1); 147 (void) send_ip(nfd, 1500, ip, gwip, 1); 164 (void) send_ip(nfd, 1500, ip, gwip, 1); 180 (void) send_ip(nfd, 1500, ip, gwip, 1); 200 (void) send_ether(nfd, (char *)ip, i, gwip); 212 (void) send_ether(nfd, (char *)ip, len, gwip); 231 (void) send_ether(nfd, (cha 452 int nfd; local 547 int nfd, i; local 742 int nfd, i; local 903 int nfd, i; local 1247 int nfd, i, j, k; local 1325 int nfd, i, j; local [all...] |
H A D | ip.c | 44 send_ether(int nfd, char *buf, int len, struct in_addr gwip) argument 69 err = sendip(nfd, s, sizeof(*eh) + len); 77 send_ip(int nfd, int mtu, ip_t *ip, struct in_addr gwip, int frag) argument 138 err = sendip(nfd, ipbuf, sizeof(*eh) + iplen); 211 err = sendip(nfd, ipbuf, sizeof(*eh) + ts); 235 send_tcp(int nfd, int mtu, ip_t *ip, struct in_addr gwip) argument 278 return (send_ip(nfd, mtu, ip, gwip, 1)); 286 send_udp(int nfd, int mtu, ip_t *ip, struct in_addr gwip) argument 308 return (send_ip(nfd, mtu, ip, gwip, 1)); 316 send_icmp(int nfd, in argument 331 int nfd, mtu; variable [all...] |
H A D | sock.c | 248 int fd, nfd; local 280 nfd = initdevice(dev, 1); 281 if (nfd == -1) 303 if (send_tcp(nfd, mtu, (ip_t *)ti, gwip) == -1)
|
/freebsd-current/sbin/ipf/ipfsync/ |
H A D | ipsyncm.c | 59 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);
|
H A D | ipfsyncd.c | 56 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); 228 maxfd = nfd; 231 debug(2, "nfd %d lfd %d maxfd %d\n", nfd, lf [all...] |
H A D | ipsyncs.c | 55 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); [all...] |
/freebsd-current/contrib/tcsh/ |
H A D | ed.refresh.c | 588 Char *ofd, *ols, *oe, *nfd, *nls, *ne; local 598 nfd = n; 623 while (nfd < n) { 635 if (*ofd == '\0' && *nfd == '\0') { 645 while ((o > ofd) && (n > nfd) && (*--o == *--n)) 667 * case 1: insert: scan from nfd to nls looking for *ofd 670 for (c = *ofd, n = nfd; n < nls; n++) { 678 if (((nse - nsb) < (p - n)) && (2 * (p - n) > n - nfd)) { 689 * case 2: delete: scan from ofd to ols looking for *nfd 691 if (*nfd) { [all...] |
/freebsd-current/usr.sbin/bluetooth/btpand/ |
H A D | event.c | 88 int nfd; local 95 nfd = 0; 129 nfd = (nfd > ev->fd) ? nfd : ev->fd; 134 nfd = (nfd > ev->fd) ? nfd : ev->fd; 143 nfd = select(nfd [all...] |
/freebsd-current/contrib/libarchive/libarchive/test/ |
H A D | test_archive_string_conversion.c | 311 char nfc[80], nfd[80]; local 337 strncpy(nfd, e, sizeof(nfd)-1); 338 nfd[sizeof(nfd)-1] = '\0'; 350 nfd, 0); 359 nfd, nfc, line); 386 nfd, nfc, line); 395 nfd, nfc, line); 415 "to WCS NFC(%s):%d", nfd, nf 522 char nfc[80], nfd[80]; local [all...] |
/freebsd-current/contrib/netbsd-tests/lib/libc/c063/ |
H A D | t_linkat.c | 63 int ofd, nfd, fd; local 72 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); 73 ATF_REQUIRE(linkat(ofd, BASEFILE, nfd, BASETARGET, 0) == 0); 75 ATF_REQUIRE(close(nfd) == 0); 149 int ofd, nfd, fd; local 159 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); 160 ATF_REQUIRE(linkat(ofd, BASELINK, nfd, BASETARGET, 163 ATF_REQUIRE(close(nfd) == 0); 182 int ofd, nfd, fd; local 192 ATF_REQUIRE((nfd [all...] |
H A D | t_renameat.c | 61 int ofd, nfd, fd; local 72 ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1); 73 ATF_REQUIRE(renameat(ofd, BASEFILE, nfd, BASETARGET) == 0); 75 ATF_REQUIRE(close(nfd) == 0);
|
/freebsd-current/contrib/libedit/ |
H A D | refresh.c | 544 wchar_t *ofd, *ols, *oe, *nfd, *nls, *ne; local 555 nfd = n; 578 while (nfd < n) { 589 if (*ofd == '\0' && *nfd == '\0') { 596 while ((o > ofd) && (n > nfd) && (*--o == *--n)) 610 * case 1: insert: scan from nfd to nls looking for *ofd 613 for (c = *ofd, n = nfd; n < nls; n++) { 624 (2 * (p - n) > n - nfd)) { 634 * case 2: delete: scan from ofd to ols looking for *nfd 636 if (*nfd) { [all...] |
/freebsd-current/contrib/sendmail/libmilter/ |
H A D | worker.c | 381 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] [all...] |
/freebsd-current/contrib/blocklist/bin/ |
H A D | blacklistd.c | 334 addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, argument 340 if (*nfd >= *maxfd) { 350 (*pfdp)[*nfd].fd = bl_getfd(bl); 351 (*pfdp)[*nfd].events = POLLIN; 352 (*blp)[*nfd] = bl; 353 *nfd += 1; 507 size_t nfd = 0; local 511 addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]); 521 addfd(&pfd, &bl, &nfd, &maxfd, line); 524 if (nfd [all...] |
/freebsd-current/sbin/ipf/ipfs/ |
H A D | ipfs.c | 538 int nfd, i; local 543 nfd = -1; 551 nfd = open(file, O_RDONLY); 552 if (nfd == -1) { 564 i = read(nfd, &ipn, sizeof(ipn)); 587 i = read(nfd, s, n); 630 close(nfd); 631 nfd = -1; 673 if (nfd != -1) 674 close(nfd); 683 int nfd = -1; local [all...] |
/freebsd-current/share/examples/ipfilter/samples/ |
H A D | relay.c | 36 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-current/lib/libc/tests/stdio/ |
H A D | gets_s_test.c | 60 int nfd; local 70 nfd = dup2(fd[0], 0); 72 stdin = fdopen(nfd, "r");
|
/freebsd-current/lib/libc/rpc/ |
H A D | clnt_generic.c | 421 int nfd; local 426 if ((nfd = _fcntl(fd, F_DUPFD, __rpc_minfd)) == -1) 429 if (_fsync(nfd) == -1) { 430 _close(nfd); 440 return (nfd);
|
/freebsd-current/usr.sbin/ipfwpcap/ |
H A D | ipfwpcap.c | 158 int nfd; local 227 nfd = sd + 1; 232 r = select(nfd, &rds, NULL, NULL, NULL);
|
/freebsd-current/usr.sbin/ppp/ |
H A D | bundle.c | 1378 int niov, expect, f, *fd, nfd, onfd; local 1447 nfd = ((caddr_t)cmsg + cmsg->cmsg_len - (caddr_t)fd) / sizeof(int); 1449 if (nfd < 2) { 1451 nfd, nfd == 1 ? "" : "s"); 1452 while (nfd--) 1453 close(fd[nfd]); 1468 while (nfd--) 1469 close(fd[nfd]); 1487 while (nfd 1545 int niov, f, expect, newsid, fd[SEND_MAXFD], nfd, reply[2]; local [all...] |
/freebsd-current/sbin/mdmfs/ |
H A D | mdmfs.c | 724 int nfd; /* Null (/dev/null) file descriptor. */ local 785 nfd = open(_PATH_DEVNULL, O_RDWR); 786 if (nfd == -1) 788 if (dup2(nfd, STDIN_FILENO) < 0) 791 if (dup2(nfd, STDOUT_FILENO) < 0) 793 if (dup2(nfd, STDERR_FILENO) < 0)
|
/freebsd-current/sbin/swapon/ |
H A D | swapon.c | 605 int pfd[2], nfd, dup2dn; local 652 nfd = open(_PATH_DEVNULL, O_RDWR); 653 if (nfd == -1) 655 if (dup2(nfd, STDIN_FILENO) < 0) 657 if (dup2dn && dup2(nfd, STDOUT_FILENO) < 0) 659 if (dup2(nfd, STDERR_FILENO) < 0)
|
/freebsd-current/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_platform_linux.cpp | 407 int ExtractResolvFDs(void *state, int *fds, int nfd) { argument 411 for (int i = 0; i < MAXNS && cnt < nfd; i++) { 424 int ExtractRecvmsgFDs(void *msgp, int *fds, int nfd) { argument 434 if (res == nfd)
|
/freebsd-current/contrib/tnftp/src/ |
H A D | ftp.c | 520 int nr, nfd; local 523 nfd = 0; 525 pfd[nfd].fd = fileno(ecin); 526 pfd[nfd++].events = POLLIN; 530 pfd[nfd].fd = fileno(din); 531 pfd[nfd++].events = POLLIN; 534 if ((nr = ftp_poll(pfd, nfd, sec * 1000)) <= 0) 538 nfd = 0; 540 nr |= (pfd[nfd++].revents & POLLIN) ? 1 : 0; 542 nr |= (pfd[nfd [all...] |