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

12

/freebsd-11-stable/lib/libcasper/libcasper/
H A Dlibcasper_impl.c52 int nullfd, nfd; local
62 nfd = dup(*fdp);
63 if (nfd == -1)
67 *fdp = nfd;
/freebsd-11-stable/contrib/ipfilter/ipsend/
H A Diptests.c111 int nfd, i = 0, len, id = getpid(); local
128 nfd = initdevice(dev, 1);
129 if (nfd == -1)
140 (void) send_ip(nfd, 1500, ip, gwip, 1);
156 (void) send_ip(nfd, 1500, ip, gwip, 1);
173 (void) send_ip(nfd, 1500, ip, gwip, 1);
189 (void) send_ip(nfd, 1500, ip, gwip, 1);
209 (void) send_ether(nfd, (char *)ip, i, gwip);
221 (void) send_ether(nfd, (char *)ip, len, gwip);
240 (void) send_ether(nfd, (cha
461 int nfd; local
560 int nfd, i; local
759 int nfd, i; local
924 int nfd, i; local
1272 int nfd, i, j, k; local
1354 int nfd, i, j; local
[all...]
H A Dip.c49 int send_ether(nfd, buf, len, gwip)
50 int nfd, len;
77 err = sendip(nfd, s, sizeof(*eh) + len);
84 int send_ip(nfd, mtu, ip, gwip, frag)
85 int nfd, mtu;
149 err = sendip(nfd, ipbuf, sizeof(*eh) + iplen);
222 err = sendip(nfd, ipbuf, sizeof(*eh) + ts);
245 int send_tcp(nfd, mtu, ip, gwip)
246 int nfd, mtu;
291 return send_ip(nfd, mt
[all...]
H A Dsock.c255 int fd, nfd; local
287 nfd = initdevice(dev, 1);
288 if (nfd == -1)
310 if (send_tcp(nfd, mtu, (ip_t *)ti, gwip) == -1)
/freebsd-11-stable/contrib/ipfilter/tools/
H A Dipsyncm.c64 int nfd = -1, lfd = -1, n1, n2, n3, len; local
103 if (nfd != -1)
104 close(nfd);
112 nfd = socket(AF_INET, SOCK_DGRAM, 0);
113 if (nfd == -1) {
118 if (connect(nfd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
209 n3 = write(nfd, buff, n2);
249 if (nfd != -1)
250 close(nfd);
H A Dipfsyncd.c60 int nfd = -1; variable
175 if (nfd != -1) {
176 close(nfd);
177 nfd = -1;
208 if (nfd != -1)
209 close(nfd);
231 FD_SET(nfd, &mrd);
232 maxfd = nfd;
235 debug(2, "nfd %d lfd %d maxfd %d\n", nfd, lf
[all...]
H A Dipsyncs.c60 int nfd = -1 , lfd = -1; local
114 if (nfd != -1)
115 close(nfd);
123 nfd = socket(AF_INET, SOCK_DGRAM, 0);
124 if (nfd == -1) {
130 setsockopt(nfd, SOL_SOCKET, SO_REUSEADDR, &n1, sizeof(n1));
132 if (bind(nfd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
147 n1 = read(nfd, buff+inbuf, BUFFERLEN-inbuf);
268 if (nfd != -1)
269 close(nfd);
[all...]
H A Dipfs.c555 int nfd, i; local
560 nfd = -1;
568 nfd = open(file, O_RDONLY);
569 if (nfd == -1) {
581 i = read(nfd, &ipn, sizeof(ipn));
604 i = read(nfd, s, n);
647 close(nfd);
648 nfd = -1;
690 if (nfd != -1)
691 close(nfd);
702 int nfd = -1; local
[all...]
/freebsd-11-stable/usr.sbin/bluetooth/btpand/
H A Devent.c89 int nfd; local
96 nfd = 0;
130 nfd = (nfd > ev->fd) ? nfd : ev->fd;
135 nfd = (nfd > ev->fd) ? nfd : ev->fd;
144 nfd = select(nfd
[all...]
/freebsd-11-stable/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-11-stable/contrib/libarchive/libarchive/test/
H A Dtest_archive_string_conversion.c313 char nfc[80], nfd[80]; local
339 strncpy(nfd, e, sizeof(nfd)-1);
340 nfd[sizeof(nfd)-1] = '\0';
352 nfd, 0);
361 nfd, nfc, line);
388 nfd, nfc, line);
397 nfd, nfc, line);
417 "to WCS NFC(%s):%d", nfd, nf
524 char nfc[80], nfd[80]; local
[all...]
/freebsd-11-stable/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-11-stable/lib/libedit/
H A Drefresh.c508 Char *ofd, *ols, *oe, *nfd, *nls, *ne; local
519 nfd = n;
542 while (nfd < n) {
553 if (*ofd == '\0' && *nfd == '\0') {
560 while ((o > ofd) && (n > nfd) && (*--o == *--n))
574 * case 1: insert: scan from nfd to nls looking for *ofd
577 for (c = *ofd, n = nfd; n < nls; n++) {
588 (2 * (p - n) > n - nfd)) {
598 * case 2: delete: scan from ofd to ols looking for *nfd
600 if (*nfd) {
[all...]
/freebsd-11-stable/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-11-stable/contrib/blacklist/bin/
H A Dblacklistd.c340 addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, argument
346 if (*nfd >= *maxfd) {
356 (*pfdp)[*nfd].fd = bl_getfd(bl);
357 (*pfdp)[*nfd].events = POLLIN;
358 (*blp)[*nfd] = bl;
359 *nfd += 1;
513 size_t nfd = 0; local
517 addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]);
527 addfd(&pfd, &bl, &nfd, &maxfd, line);
530 if (nfd
[all...]
/freebsd-11-stable/contrib/ipfilter/samples/
H A Drelay.c37 int nfd, n, rw; local
41 nfd = ifd;
42 if (nfd < ofd)
43 nfd = ofd;
44 if (nfd < rfd)
45 nfd = rfd;
59 switch ((n = select(nfd + 1, &rfds, &wfds, NULL, NULL)))
/freebsd-11-stable/lib/libc/tests/stdio/
H A Dgets_s_test.c63 int nfd; local
73 nfd = dup2(fd[0], 0);
75 stdin = fdopen(nfd, "r");
/freebsd-11-stable/contrib/libreadline/
H A Ddisplay.c1217 register char *ofd, *ols, *oe, *nfd, *nls, *ne; local
1317 nfd = new + temp;
1327 nfd = new + nmax;
1332 for (ofd = old, nfd = new;
1339 nfd = new + new_offset;
1346 for (ofd = old, nfd = new;
1347 (ofd - old < omax) && *ofd && (*ofd == *nfd);
1348 ofd++, nfd++)
1355 for (nd = nfd - new, ne = nfd; n
[all...]
/freebsd-11-stable/contrib/bmake/
H A Djob.h104 emul_poll(struct pollfd *fd, int nfd, int timeout);
/freebsd-11-stable/lib/libc/rpc/
H A Dclnt_generic.c428 int nfd; local
433 if ((nfd = _fcntl(fd, F_DUPFD, __rpc_minfd)) == -1)
436 if (_fsync(nfd) == -1) {
437 _close(nfd);
447 return (nfd);
/freebsd-11-stable/sbin/mdmfs/
H A Dmdmfs.c716 int nfd; /* Null (/dev/null) file descriptor. */ local
777 nfd = open(_PATH_DEVNULL, O_RDWR);
778 if (nfd == -1)
780 if (dup2(nfd, STDIN_FILENO) < 0)
783 if (dup2(nfd, STDOUT_FILENO) < 0)
785 if (dup2(nfd, STDERR_FILENO) < 0)
/freebsd-11-stable/usr.sbin/ipfwpcap/
H A Dipfwpcap.c158 int nfd; local
227 nfd = sd + 1;
232 r = select(nfd, &rds, NULL, NULL, NULL);
/freebsd-11-stable/usr.sbin/ppp/
H A Dbundle.c1383 int niov, expect, f, *fd, nfd, onfd; local
1452 nfd = ((caddr_t)cmsg + cmsg->cmsg_len - (caddr_t)fd) / sizeof(int);
1454 if (nfd < 2) {
1456 nfd, nfd == 1 ? "" : "s");
1457 while (nfd--)
1458 close(fd[nfd]);
1473 while (nfd--)
1474 close(fd[nfd]);
1492 while (nfd
1550 int niov, f, expect, newsid, fd[SEND_MAXFD], nfd, reply[2]; local
[all...]
/freebsd-11-stable/libexec/rshd/
H A Drshd.c194 int cc, nfd, pv[2], pid, s; local
439 nfd = pv[0];
441 nfd = s;
445 nfd++;
448 if (select(nfd, &ready, (fd_set *)0,

Completed in 330 milliseconds

12