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

12

/freebsd-current/lib/libcasper/libcasper/
H A Dlibcasper_impl.c51 int nullfd, nfd; local
61 nfd = dup(*fdp);
62 if (nfd == -1)
66 *fdp = nfd;
/freebsd-current/sbin/ipf/ipsend/
H A Diptests.c102 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 Dip.c44 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 Dsock.c248 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 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);
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);
228 maxfd = nfd;
231 debug(2, "nfd %d lfd %d maxfd %d\n", nfd, lf
[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);
[all...]
/freebsd-current/contrib/tcsh/
H A Ded.refresh.c588 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 Devent.c88 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 Dtest_archive_string_conversion.c311 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 Dt_linkat.c63 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 Dt_renameat.c61 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 Drefresh.c544 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 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]
[all...]
/freebsd-current/contrib/blocklist/bin/
H A Dblacklistd.c334 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 Dipfs.c538 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 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-current/lib/libc/tests/stdio/
H A Dgets_s_test.c60 int nfd; local
70 nfd = dup2(fd[0], 0);
72 stdin = fdopen(nfd, "r");
/freebsd-current/lib/libc/rpc/
H A Dclnt_generic.c421 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 Dipfwpcap.c158 int nfd; local
227 nfd = sd + 1;
232 r = select(nfd, &rds, NULL, NULL, NULL);
/freebsd-current/usr.sbin/ppp/
H A Dbundle.c1378 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 Dmdmfs.c724 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 Dswapon.c605 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 Dtsan_platform_linux.cpp407 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 Dftp.c520 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...]

Completed in 162 milliseconds

12