Home
last modified time | relevance | path

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

12

/freebsd-13.1/contrib/capsicum-test/
H A Dselect.cc15 if (fd > maxfd) maxfd = fd; in AddFDToSet()
16 return maxfd; in AddFDToSet()
21 int maxfd = -1; in InitFDSet() local
23 maxfd = AddFDToSet(fset, fds[ii], maxfd); in InitFDSet()
25 return maxfd; in InitFDSet()
60 maxfd = AddFDToSet(&rset, fd, maxfd);
68 AddFDToSet(&rset, fd, maxfd);
69 maxfd = AddFDToSet(&rset, cap_rw, maxfd);
71 AddFDToSet(&wset, fd, maxfd);
82 maxfd = AddFDToSet(&rset, fd, maxfd);
[all …]
/freebsd-13.1/usr.sbin/bluetooth/bthidd/
H A Dsession.c119 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 Dserver.c149 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 Dclient.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()
/freebsd-13.1/contrib/openbsm/compat/
H A Dclosefrom.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-13.1/lib/libcasper/libcasper/
H A Dservice.c336 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
405 maxfd = *procfdp; in service_clean()
408 maxfd = *sockp; in service_clean()
416 closefrom(maxfd + 1); in service_clean()
425 int maxfd, nfds; in service_start() local
437 maxfd = -1; in service_start()
440 maxfd = fd_add(&fds, maxfd, in service_start()
444 assert(maxfd >= 0); in service_start()
[all …]
H A Dlibcasper_service.c231 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-13.1/contrib/apr/poll/unix/
H A Dselect.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-13.1/crypto/openssh/openbsd-compat/
H A Dbsd-closefrom.c68 long fd, maxfd; in closefrom_fallback() local
76 maxfd = sysconf(_SC_OPEN_MAX); in closefrom_fallback()
78 maxfd = getdtablesize(); in closefrom_fallback()
80 if (maxfd < 0) in closefrom_fallback()
81 maxfd = OPEN_MAX; in closefrom_fallback()
83 for (fd = lowfd; fd < maxfd; fd++) in closefrom_fallback()
H A Dbsd-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-13.1/tools/build/cross-build/
H A Dclosefrom.c81 long fd, maxfd; in closefrom_fallback() local
89 maxfd = sysconf(_SC_OPEN_MAX); in closefrom_fallback()
91 maxfd = getdtablesize(); in closefrom_fallback()
93 if (maxfd < 0) in closefrom_fallback()
94 maxfd = OPEN_MAX; in closefrom_fallback()
96 for (fd = lowfd; fd < maxfd; fd++) in closefrom_fallback()
/freebsd-13.1/sys/contrib/openzfs/cmd/zed/
H A Dzed_file.c122 int maxfd = 0; in zed_file_close_from() local
130 if (fd > maxfd && fd != dirfd(fddir)) in zed_file_close_from()
131 maxfd = fd; in zed_file_close_from()
135 maxfd = sysconf(_SC_OPEN_MAX); in zed_file_close_from()
137 for (fd = lowfd; fd < maxfd; fd++) in zed_file_close_from()
/freebsd-13.1/contrib/dma/
H A Dlocal.c61 long maxfd; in create_mbox() local
78 maxfd = sysconf(_SC_OPEN_MAX); in create_mbox()
79 if (maxfd == -1) in create_mbox()
80 maxfd = 1024; /* what can we do... */ in create_mbox()
82 for (i = 3; i <= maxfd; ++i) in create_mbox()
/freebsd-13.1/contrib/ntp/lib/isc/unix/
H A Dentropy.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-13.1/crypto/openssh/
H A Dssh-keyscan.c84 int maxfd; variable
85 #define MAXCON (maxfd - 10)
399 if (s >= maxfd) in conalloc()
600 for (i = 0; i < maxfd; i++) { in conloop()
771 maxfd = fdlim_get(1); in main()
772 if (maxfd < 0) in main()
774 if (maxfd > MAXMAXFD) in main()
775 maxfd = MAXMAXFD; in main()
778 if (maxfd > fdlim_get(0)) in main()
779 fdlim_set(maxfd); in main()
[all …]
/freebsd-13.1/share/examples/ipfilter/samples/
H A Dproxy.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-13.1/contrib/blacklist/bin/
H A Dblacklistd.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-13.1/contrib/openbsm/bin/auditdistd/
H A Dauditdistd.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-13.1/usr.sbin/bluetooth/sdpd/
H A Dserver.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-13.1/contrib/unbound/util/
H A Dmini_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()
340 if(ev->ev_fd == ev->ev_base->maxfd) { in event_del()
341 int i = ev->ev_base->maxfd - 1; in event_del()
347 ev->ev_base->maxfd = i; in event_del()
/freebsd-13.1/contrib/opie/
H A Dopieauto.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-13.1/contrib/nvi/cl/
H A Dcl_read.c151 int maxfd, nr, term_reset; in cl_read() local
226 maxfd = STDIN_FILENO; in cl_read()
229 if (sp->script->sh_master > maxfd) in cl_read()
230 maxfd = sp->script->sh_master; in cl_read()
232 switch (select(maxfd + 1, &rdfd, NULL, NULL, NULL)) { in cl_read()
/freebsd-13.1/sbin/hastd/
H A Dhastd.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-13.1/contrib/telnet/telnet/
H A Dsys_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-13.1/usr.sbin/rrenumd/
H A Drrenumd.c536 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()

12