| /freebsd-12.1/usr.sbin/bluetooth/bthidd/ |
| H A D | session.c | 119 if (s->vkbd > s->srv->maxfd) in session_run() 120 s->srv->maxfd = s->vkbd; in session_run() 149 if (s->ukbd > s->srv->maxfd) in session_run() 150 s->srv->maxfd = s->ukbd; in session_run() 211 if (s->srv->maxfd == s->intr) in session_close() 212 s->srv->maxfd --; in session_close() 220 if (s->srv->maxfd == s->ctrl) in session_close() 221 s->srv->maxfd --; in session_close() 228 if (s->srv->maxfd == s->vkbd) in session_close() 229 s->srv->maxfd --; in session_close() [all …]
|
| H A D | server.c | 149 srv->maxfd = max(srv->ctrl, srv->intr); in server_init() 193 n = select(srv->maxfd + 1, &rfdset, &wfdset, NULL, &tv); in server_do() 199 srv->maxfd + 1, &rfdset, &wfdset, strerror(errno), errno); in server_do() 205 for (fd = 0; fd < srv->maxfd + 1 && n > 0; fd ++) { in server_do() 280 if (new_fd > srv->maxfd) in server_accept() 281 srv->maxfd = new_fd; in server_accept()
|
| H A D | client.c | 108 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()
|
| /freebsd-12.1/lib/libcasper/libcasper/ |
| H A D | service.c | 336 fd_add(fd_set *fdsp, int maxfd, int fd) in fd_add() argument 340 return (fd > maxfd ? fd : maxfd); in fd_add() 391 int fd, maxfd, minfd; in service_clean() local 402 maxfd = procfd; in service_clean() 405 maxfd = sock; in service_clean() 413 closefrom(maxfd + 1); in service_clean() 422 int maxfd, nfds; in service_start() local 434 maxfd = -1; in service_start() 437 maxfd = fd_add(&fds, maxfd, in service_start() 441 assert(maxfd >= 0); in service_start() [all …]
|
| H A D | libcasper_service.c | 231 int sock, maxfd, ret; in casper_main_loop() local 244 maxfd = -1; in casper_main_loop() 254 maxfd = sock > maxfd ? sock : maxfd; in casper_main_loop() 257 if (maxfd == -1) { in casper_main_loop() 261 maxfd++; in casper_main_loop() 264 assert(maxfd <= (int)FD_SETSIZE); in casper_main_loop() 265 ret = select(maxfd, &fds, NULL, NULL, NULL); in casper_main_loop()
|
| /freebsd-12.1/contrib/openbsm/compat/ |
| H A D | closefrom.h | 38 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-12.1/crypto/openssh/openbsd-compat/ |
| H A D | bsd-closefrom.c | 71 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()
|
| H A D | bsd-poll.c | 44 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-12.1/contrib/apr/poll/unix/ |
| H A D | select.c | 38 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-12.1/contrib/ntp/lib/isc/unix/ |
| H A D | entropy.c | 392 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-12.1/contrib/dma/ |
| H A D | local.c | 60 long maxfd; in create_mbox() local 77 maxfd = sysconf(_SC_OPEN_MAX); in create_mbox() 78 if (maxfd == -1) in create_mbox() 79 maxfd = 1024; /* what can we do... */ in create_mbox() 81 for (i = 3; i <= maxfd; ++i) in create_mbox()
|
| /freebsd-12.1/crypto/openssh/ |
| H A D | ssh-keyscan.c | 78 int maxfd; variable 79 #define MAXCON (maxfd - 10) 377 if (s >= maxfd) in conalloc() 586 for (i = 0; i < maxfd; i++) { in conloop() 752 maxfd = fdlim_get(1); in main() 753 if (maxfd < 0) in main() 755 if (maxfd > MAXMAXFD) in main() 756 maxfd = MAXMAXFD; in main() 759 if (maxfd > fdlim_get(0)) in main() 760 fdlim_set(maxfd); in main() [all …]
|
| /freebsd-12.1/contrib/ipfilter/samples/ |
| H A D | proxy.c | 237 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-12.1/contrib/blacklist/bin/ |
| H A D | blacklistd.c | 340 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-12.1/contrib/openbsm/bin/auditdistd/ |
| H A D | auditdistd.c | 502 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-12.1/usr.sbin/bluetooth/sdpd/ |
| H A D | server.c | 197 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-12.1/contrib/opie/ |
| H A D | opieauto.c | 329 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-12.1/contrib/nvi/cl/ |
| H A D | cl_read.c | 154 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-12.1/sbin/hastd/ |
| H A D | hastd.c | 172 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-12.1/contrib/telnet/telnet/ |
| H A D | sys_bsd.c | 850 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-12.1/usr.sbin/rrenumd/ |
| H A D | rrenumd.c | 536 int ch, i, maxfd = 0, send_counter = 0; in main() local 624 if (s6 > maxfd) in main() 625 maxfd = s6; in main() 629 if (s4 > maxfd) in main() 630 maxfd = s4; in main() 642 if ((i = select(maxfd + 1, &select_fd, NULL, NULL, in main()
|
| /freebsd-12.1/contrib/ipfilter/tools/ |
| H A D | ipfsyncd.c | 224 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-12.1/usr.sbin/ngctl/ |
| H A D | main.c | 244 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-12.1/contrib/unbound/util/ |
| H A D | mini_event.c | 191 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-12.1/contrib/nvi/ex/ |
| H A D | ex_script.c | 379 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()
|