Home
last modified time | relevance | path

Searched refs:maxfd (Results 1 – 25 of 43) sorted by relevance

12

/freebsd-11-stable/lib/libcasper/libcasper/
HDservice.c329 fd_add(fd_set *fdsp, int maxfd, int fd) in fd_add() argument
333 return (fd > maxfd ? fd : maxfd); in fd_add()
370 int fd, maxfd, minfd; in service_clean() local
384 maxfd = *procfdp; in service_clean()
387 maxfd = *sockp; in service_clean()
391 for (fd = STDERR_FILENO + 1; fd < maxfd; fd++) { in service_clean()
395 closefrom(maxfd + 1); in service_clean()
404 int maxfd, nfds; in service_start() local
416 maxfd = -1; in service_start()
419 maxfd = fd_add(&fds, maxfd, in service_start()
[all …]
HDlibcasper_service.c216 int sock, maxfd, ret; in casper_main_loop() local
229 maxfd = -1; in casper_main_loop()
239 maxfd = sock > maxfd ? sock : maxfd; in casper_main_loop()
242 if (maxfd == -1) { in casper_main_loop()
246 maxfd++; in casper_main_loop()
249 assert(maxfd <= (int)FD_SETSIZE); in casper_main_loop()
250 ret = select(maxfd, &fds, NULL, NULL, NULL); in casper_main_loop()
/freebsd-11-stable/contrib/openbsm/compat/
HDclosefrom.h38 int error, fd, maxfd; in closefrom() local
42 maxfd = sysconf(_SC_OPEN_MAX); in closefrom()
43 if (maxfd < 0) in closefrom()
44 maxfd = 16384; in closefrom()
45 for (fd = lowfd; fd <= maxfd; fd++) in closefrom()
/freebsd-11-stable/crypto/openssh/openbsd-compat/
HDbsd-closefrom.c71 long fd, maxfd; in closefrom() local
97 maxfd = sysconf(_SC_OPEN_MAX); in closefrom()
99 maxfd = getdtablesize(); in closefrom()
101 if (maxfd < 0) in closefrom()
102 maxfd = OPEN_MAX; in closefrom()
104 for (fd = lowfd; fd < maxfd; fd++) in closefrom()
HDbsd-poll.c44 int saved_errno, ret, fd, maxfd = 0; in poll() local
55 maxfd = MAX(maxfd, fd); in poll()
58 nmemb = howmany(maxfd + 1 , NFDBITS); in poll()
89 ret = select(maxfd + 1, readfds, writefds, exceptfds, tvp); in poll()
/freebsd-11-stable/contrib/apr/poll/unix/
HDselect.c38 int maxfd = -1; in apr_poll() local
123 if ((int) fd > maxfd) { in apr_poll()
124 maxfd = (int) fd; in apr_poll()
130 rv = pipe_select(maxfd + 1, &readset, &writeset, &exceptset, tvptr); in apr_poll()
135 rv = select(maxfd + 1, &readset, &writeset, &exceptset, tvptr); in apr_poll()
188 int maxfd; member
216 pollset->p->maxfd = 0; in impl_pollset_create()
287 if ((int) fd > pollset->p->maxfd) { in impl_pollset_add()
288 pollset->p->maxfd = (int) fd; in impl_pollset_add()
329 if (((int) fd == pollset->p->maxfd) && (pollset->p->maxfd > 0)) { in impl_pollset_remove()
[all …]
/freebsd-11-stable/usr.sbin/bluetooth/bthidd/
HDsession.c160 if (s->srv->maxfd == s->intr) in session_close()
161 s->srv->maxfd --; in session_close()
169 if (s->srv->maxfd == s->ctrl) in session_close()
170 s->srv->maxfd --; in session_close()
177 if (s->srv->maxfd == s->vkbd) in session_close()
178 s->srv->maxfd --; in session_close()
HDserver.c147 srv->maxfd = max(srv->ctrl, srv->intr); in server_init()
191 n = select(srv->maxfd + 1, &rfdset, &wfdset, NULL, &tv); in server_do()
197 srv->maxfd + 1, &rfdset, &wfdset, strerror(errno), errno); in server_do()
203 for (fd = 0; fd < srv->maxfd + 1 && n > 0; fd ++) { in server_do()
278 if (new_fd > srv->maxfd) in server_accept()
279 srv->maxfd = new_fd; in server_accept()
290 if (s->vkbd > srv->maxfd) in server_accept()
291 srv->maxfd = s->vkbd; in server_accept()
HDclient.c108 if (s->ctrl > srv->maxfd) in client_rescan()
109 srv->maxfd = s->ctrl; in client_rescan()
177 if (s->intr > srv->maxfd) in client_connect()
178 srv->maxfd = s->intr; in client_connect()
196 if (s->vkbd > srv->maxfd) in client_connect()
197 srv->maxfd = s->vkbd; in client_connect()
/freebsd-11-stable/contrib/ntp/lib/isc/unix/
HDentropy.c392 int maxfd, fd; in wait_for_sources() local
397 maxfd = -1; in wait_for_sources()
406 maxfd = ISC_MAX(maxfd, fd); in wait_for_sources()
419 maxfd = ISC_MAX(maxfd, fd); in wait_for_sources()
424 maxfd = ISC_MAX(maxfd, fd); in wait_for_sources()
433 if (maxfd < 0) in wait_for_sources()
436 cc = select(maxfd + 1, &reads, &writes, NULL, NULL); in wait_for_sources()
/freebsd-11-stable/contrib/dma/
HDlocal.c59 long maxfd; in create_mbox() local
76 maxfd = sysconf(_SC_OPEN_MAX); in create_mbox()
77 if (maxfd == -1) in create_mbox()
78 maxfd = 1024; /* what can we do... */ in create_mbox()
80 for (i = 3; i <= maxfd; ++i) in create_mbox()
/freebsd-11-stable/crypto/openssh/
HDssh-keyscan.c73 int maxfd; variable
74 #define MAXCON (maxfd - 10)
410 if (s >= maxfd) in conalloc()
437 if (s >= maxfd || fdcon[s].c_status == CS_UNUSED) in confree()
630 while (select(maxfd, r, NULL, e, &seltime) == -1 && in conloop()
634 for (i = 0; i < maxfd; i++) { in conloop()
799 maxfd = fdlim_get(1); in main()
800 if (maxfd < 0) in main()
802 if (maxfd > MAXMAXFD) in main()
803 maxfd = MAXMAXFD; in main()
[all …]
/freebsd-11-stable/contrib/ipfilter/samples/
HDproxy.c237 int i, n, maxfd; local
240 maxfd = in;
241 if (out > maxfd)
242 maxfd = out;
243 if (net > maxfd)
244 maxfd = net;
267 n = select(maxfd + 1, &rd, &wr, NULL, NULL);
/freebsd-11-stable/contrib/blacklist/bin/
HDblacklistd.c340 addfd(struct pollfd **pfdp, bl_t **blp, size_t *nfd, size_t *maxfd, in addfd() argument
346 if (*nfd >= *maxfd) { in addfd()
347 *maxfd += 10; in addfd()
348 *blp = realloc(*blp, sizeof(**blp) * *maxfd); in addfd()
351 *pfdp = realloc(*pfdp, sizeof(**pfdp) * *maxfd); in addfd()
514 size_t maxfd = 0; in main() local
517 addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]); in main()
527 addfd(&pfd, &bl, &nfd, &maxfd, line); in main()
531 addfd(&pfd, &bl, &nfd, &maxfd, _PATH_BLSOCK); in main()
/freebsd-11-stable/contrib/openbsm/bin/auditdistd/
HDauditdistd.c502 int fd, maxfd, ret; in main_loop() local
515 maxfd = -1; in main_loop()
522 maxfd = fd > maxfd ? fd : maxfd; in main_loop()
531 maxfd = fd > maxfd ? fd : maxfd; in main_loop()
537 PJDLOG_ASSERT(maxfd + 1 <= (int)FD_SETSIZE); in main_loop()
538 ret = select(maxfd + 1, &rfds, NULL, NULL, &seltimeout); in main_loop()
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/
HDserver.c197 srv->maxfd = (unsock > l2sock)? unsock : l2sock; in server_init()
235 for (fd = 0; fd < srv->maxfd + 1; fd ++) in server_shutdown()
259 n = select(srv->maxfd + 1, &fdset, NULL, NULL, NULL); in server_do()
265 srv->maxfd + 1, &fdset, strerror(errno), errno); in server_do()
271 for (fd = 0; fd < srv->maxfd + 1 && n > 0; fd ++) { in server_do()
391 if (srv->maxfd < cfd) in server_accept_client()
392 srv->maxfd = cfd; in server_accept_client()
575 if (fd == srv->maxfd) in server_close_fd()
576 srv->maxfd --; in server_close_fd()
/freebsd-11-stable/contrib/opie/
HDopieauto.c329 int maxfd = parents; in main() local
338 if (select(maxfd + 1, &rfds, NULL, NULL, NULL) < 0) in main()
349 if (s[i] == maxfd) in main()
350 maxfd--; in main()
374 if (s[i] > maxfd) in main()
375 maxfd = s[i]; in main()
/freebsd-11-stable/contrib/nvi/cl/
HDcl_read.c154 int maxfd, nr, term_reset; in cl_read() local
229 maxfd = STDIN_FILENO; in cl_read()
232 if (sp->script->sh_master > maxfd) in cl_read()
233 maxfd = sp->script->sh_master; in cl_read()
235 switch (select(maxfd + 1, &rdfd, NULL, NULL, NULL)) { in cl_read()
/freebsd-11-stable/sbin/hastd/
HDhastd.c172 long maxfd; in descriptors_assert() local
184 maxfd = sysconf(_SC_OPEN_MAX); in descriptors_assert()
185 if (maxfd == -1) { in descriptors_assert()
191 maxfd = 16384; in descriptors_assert()
193 for (fd = 0; fd <= maxfd; fd++) { in descriptors_assert()
1073 int fd, maxfd, ret; in main_loop() local
1086 maxfd = fd = proto_descriptor(cfg->hc_controlconn); in main_loop()
1095 maxfd = MAX(fd, maxfd); in main_loop()
1103 maxfd = MAX(fd, maxfd); in main_loop()
1110 maxfd = MAX(fd, maxfd); in main_loop()
[all …]
/freebsd-11-stable/contrib/telnet/telnet/
HDsys_bsd.c850 int maxfd = -1; in process_rings() local
853 if ((netout || netin || netex) && net > maxfd) in process_rings()
854 maxfd = net; in process_rings()
856 if (ttyout && tout > maxfd) in process_rings()
857 maxfd = tout; in process_rings()
858 if (ttyin && tin > maxfd) in process_rings()
859 maxfd = tin; in process_rings()
860 tmp = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask); in process_rings()
891 if ((c = select(maxfd + 1, ibitsp, obitsp, xbitsp, in process_rings()
/freebsd-11-stable/usr.sbin/rrenumd/
HDrrenumd.c534 int ch, i, maxfd = 0, send_counter = 0; in main() local
622 if (s6 > maxfd) in main()
623 maxfd = s6; in main()
627 if (s4 > maxfd) in main()
628 maxfd = s4; in main()
640 if ((i = select(maxfd + 1, &select_fd, NULL, NULL, in main()
/freebsd-11-stable/contrib/ipfilter/tools/
HDipfsyncd.c224 int maxfd; in do_io() local
232 maxfd = nfd; in do_io()
233 if (lfd > maxfd) in do_io()
234 maxfd = lfd; in do_io()
235 debug(2, "nfd %d lfd %d maxfd %d\n", nfd, lfd, maxfd); in do_io()
248 n = select(maxfd + 1, &rd, NULL, NULL, NULL); in do_io()
/freebsd-11-stable/usr.sbin/ngctl/
HDmain.c244 const int maxfd = MAX(csock, dsock) + 1; in Monitor() local
260 if (select(maxfd, &rfds, NULL, NULL, NULL) <= 0) { in Monitor()
350 const int maxfd = MAX(csock, dsock) + 1; in DoInteractive() local
362 if (select(maxfd, &rfds, NULL, NULL, &tv) <= 0) { in DoInteractive()
371 if (select(maxfd, &rfds, NULL, NULL, NULL) < 0) in DoInteractive()
/freebsd-11-stable/contrib/unbound/util/
HDmini_event.c191 if((ret = select(base->maxfd+1, &r, &w, NULL, wait)) == -1) { in handle_select()
203 for(i=0; i<base->maxfd+1; i++) { in handle_select()
308 if(ev->ev_fd > ev->ev_base->maxfd) in event_add()
309 ev->ev_base->maxfd = ev->ev_fd; in event_add()
/freebsd-11-stable/contrib/nvi/ex/
HDex_script.c379 int maxfd; in sscr_input() local
383 loop: maxfd = 0; in sscr_input()
392 if (sp->script->sh_master > maxfd) in sscr_input()
393 maxfd = sp->script->sh_master; in sscr_input()
397 switch (select(maxfd + 1, &rdfd, NULL, NULL, &poll)) { in sscr_input()

12