# 2.11BSD#431 - /usr/src/sys/h/select.h

##### Macros

    FD_CLR            X
    FD_ISSET          X
    FD_SET            X
    FD_SETSIZE        X
    FD_ZERO           X
    NFDBITS           X
    _SYS_SELECT_H_    X

##### struct's

    fd_set            X

##### typedef's

    fd_mask           X
    fd_set            X

       1: /*-
       2:  * Copyright (c) 1992, 1993
       3:  *	The Regents of the University of California.  All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms, with or without
       6:  * modification, are permitted provided that the following conditions
       7:  * are met:
       8:  * 1. Redistributions of source code must retain the above copyright
       9:  *    notice, this list of conditions and the following disclaimer.
      10:  * 2. Redistributions in binary form must reproduce the above copyright
      11:  *    notice, this list of conditions and the following disclaimer in the
      12:  *    documentation and/or other materials provided with the distribution.
      13:  * 3. All advertising materials mentioning features or use of this software
      14:  *    must display the following acknowledgement:
      15:  *	This product includes software developed by the University of
      16:  *	California, Berkeley and its contributors.
      17:  * 4. Neither the name of the University nor the names of its contributors
      18:  *    may be used to endorse or promote products derived from this software
      19:  *    without specific prior written permission.
      20:  *
      21:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
      22:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      23:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
      24:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
      25:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
      26:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
      27:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      28:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
      29:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
      30:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
      31:  * SUCH DAMAGE.
      32:  *
      33:  *	@(#)select.h	8.2.1 (2.11BSD) 2000/2/28
      34:  */
      35:
      36: #ifndef _SYS_SELECT_H_
      37: #define _SYS_SELECT_H_
      38:
      39: #include <sys/types.h>
      40:
      41: /*
      42:  * Select uses bit masks of file descriptors in longs.
      43:  * These macros manipulate such bit fields (the filesystem macros use chars).
      44:  * FD_SETSIZE may be defined by the user, but the default here
      45:  * should be >= NOFILE (param.h).
      46:  */
      47: #ifndef FD_SETSIZE
      48: #define FD_SETSIZE  32
      49: #endif
      50:
      51: typedef long    fd_mask;
      52: #define NFDBITS (sizeof(fd_mask) * NBBY)    /* bits per mask */
      53:
      54: typedef struct fd_set {
      55:     fd_mask fds_bits[1];
      56: } fd_set;
      57:
      58: #define FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
      59: #define FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
      60: #define FD_ISSET(n, p)  ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
      61: #define FD_ZERO(p)  bzero((char *)(p), sizeof(*(p)))
      62:
      63: #ifndef KERNEL
      64: int select();
      65: int pselect();
      66: #endif /* !KERNEL */
      67:
      68: #endif /* !_SYS_SELECT_H_ */

#### Defined struct's

fd_set defined in line 54; used 12 times

- in /usr/src/ucb/ftp/ftp.c line 428(2), 435(4), 707(2), 1336(2), 1642(2)

#### Defined typedef's

fd_mask defined in line 51; used 7 times

- in line 52-55(2)
- in /usr/src/sys/sys/sys_generic.c line 343, 441, 461
- in /usr/src/ucb/ftp/ftp.c line 63-64(2)

fd_set defined in line 56; used 108 times

- in /usr/src/bin/date.c line 254, 320(2)
- in /usr/src/bin/ping/ping.c line 349-350(3)
- in /usr/src/lib/libc/net/rcmd.c line 49
- in /usr/src/lib/libc/net/res_send.c line 59, 249-250(2)
- in /usr/src/libexec/identd/src/identd.c line 626
- in /usr/src/libexec/rexecd/rexecd.c line 157-158(2)
- in /usr/src/libexec/rlogind/rlogind.c line 371
- in /usr/src/libexec/rshd/rshd.c line 132, 337-338(2)
- in /usr/src/libexec/telnetd/telnetd.c line 359, 365(2), 443
- in /usr/src/new/kermit5.188/ckutio.c line 4893-4896(6)
- in /usr/src/new/nntp/xfer/nntpxfer.c line 397, 415(3)
- in /usr/src/sys/sys/sys_generic.c line 276-278(3), 292, 327, 457
- in /usr/src/ucb/telnet.c line 286, 292(2), 743
- in /usr/src/ucb/tn3270/tn3270.c line 525, 568, 1277, 1287(2), 1306, 1312-1317(4)
- in /usr/src/ucb/window/wwiomux.c line 29, 65(2)
- in /usr/src/usr.lib/libident/id_open.c line 47
- in /usr/src/usr.lib/libident/id_parse.c line 50, 80(2)
- in /usr/src/usr.lib/libident/id_query.c line 51, 63(2)
- in /usr/src/usr.sbin/inetd/inetd.c line 124, 307, 316-317(2)
- in /usr/src/usr.sbin/named/named/ns_main.c line 119, 149, 644(2), 1093
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 101, 396-397(2)
- in /usr/src/usr.sbin/ntp/ntp.c line 139, 224-225(3)
- in /usr/src/usr.sbin/ntp/ntpd.c line 177, 388(2)
- in /usr/src/usr.sbin/ntp/ntpdc.c line 192, 209-210(2)
- in /usr/src/usr.sbin/ntp/read_psti.c line 161
- in /usr/src/usr.sbin/syslogd/syslogd.c line 299-300(3)
- in /usr/src/usr.sbin/timed/cmds.c line 122, 165(2), 263, 309(2)
- in /usr/src/usr.sbin/timed/measure.c line 42, 61(2), 108-109(2)
- in /usr/src/usr.sbin/timed/readmsg.c line 61, 150(2)
- in /usr/src/usr.sbin/timed/slave.c line 547(3)
- in /usr/src/usr.sbin/traceroute/traceroute.c line 215, 527, 536(2)

#### Defined macros

FD_CLR defined in line 59; used 11 times

- in /usr/src/libexec/rlogind/rlogind.c line 403
- in /usr/src/libexec/rshd/rshd.c line 342, 351
- in /usr/src/ucb/telnet.c line 803, 814, 891, 989, 995
- in /usr/src/usr.sbin/inetd/inetd.c line 396, 663
- in /usr/src/usr.sbin/named/named/ns_main.c line 1108

FD_ISSET defined in line 60; used 37 times

- in /usr/src/bin/date.c line 329
- in /usr/src/lib/libc/net/rcmd.c line 129
- in /usr/src/libexec/rlogind/rlogind.c line 396, 407, 437, 445, 463
- in /usr/src/libexec/rshd/rshd.c line 340, 346, 355-356(2)
- in /usr/src/libexec/telnetd/telnetd.c line 371, 483, 490, 561(2), 596-600(2)
- in /usr/src/ucb/ftp/ftp.c line 1065
- in /usr/src/ucb/telnet.c line 299, 802, 811, 890, 988, 994
- in /usr/src/ucb/tn3270/tn3270.c line 583, 601, 638, 657
- in /usr/src/ucb/window/wwiomux.c line 75
- in /usr/src/usr.lib/libident/id_open.c line 145-148(3)
- in /usr/src/usr.sbin/inetd/inetd.c line 324
- in /usr/src/usr.sbin/named/named/ns_main.c line 660, 694, 756

FD_SET defined in line 58; used 73 times

- in /usr/src/bin/date.c line 319
- in /usr/src/lib/libc/net/rcmd.c line 125-126(2)
- in /usr/src/lib/libc/net/res_send.c line 37, 248
- in /usr/src/libexec/ftpd/ftpd.c line 60
- in /usr/src/libexec/identd/src/identd.c line 85, 667
- in /usr/src/libexec/rlogind/rlogind.c line 376-384(5), 433, 454
- in /usr/src/libexec/rshd/rshd.c line 331-332(2)
- in /usr/src/libexec/telnetd/telnetd.c line 364, 457-467(5)
- in /usr/src/new/nntp/xfer/nntpxfer.c line 411
- in /usr/src/sys/sys/sys_generic.c line 485
- in /usr/src/ucb/ftp/ftp.c line 51, 1054-1056(2), 1483, 1514, 1558, 1589, 1604, 1647
- in /usr/src/ucb/telnet.c line 291, 771-781(5)
- in /usr/src/ucb/tn3270/tn3270.c line 539-558(8), 1286, 1309
- in /usr/src/ucb/window/wwiomux.c line 46
- in /usr/src/usr.lib/libident/id_open.c line 123-125(3)
- in /usr/src/usr.lib/libident/id_parse.c line 75
- in /usr/src/usr.lib/libident/id_query.c line 58
- in /usr/src/usr.sbin/inetd/inetd.c line 487, 644
- in /usr/src/usr.sbin/named/named/ns_main.c line 69, 584-587(3), 739-740(2)
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 395
- in /usr/src/usr.sbin/ntp/read_psti.c line 169
- in /usr/src/usr.sbin/timed/cmds.c line 164, 308
- in /usr/src/usr.sbin/timed/measure.c line 60, 107
- in /usr/src/usr.sbin/timed/readmsg.c line 149
- in /usr/src/usr.sbin/traceroute/traceroute.c line 214, 533

FD_SETSIZE defined in line 48; used 21 times

- in line 47
- in /usr/include/ident.h line 102
- in /usr/src/bin/date.c line 320
- in /usr/src/libexec/identd/src/identd.c line 81, 675-678(2), 685-687(2)
- in /usr/src/ucb/ftp/ftp.c line 59
- in /usr/src/ucb/telnet.c line 43
- in /usr/src/usr.lib/libident/id_open.c line 128-130(2)
- in /usr/src/usr.lib/libident/ident.h line 102
- in /usr/src/usr.sbin/named/named/ns_main.c line 130, 575-576(2)
- in /usr/src/usr.sbin/timed/cmds.c line 165, 309
- in /usr/src/usr.sbin/timed/measure.c line 61, 108
- in /usr/src/usr.sbin/timed/readmsg.c line 150

FD_ZERO defined in line 61; used 43 times

- in /usr/src/bin/date.c line 318
- in /usr/src/lib/libc/net/rcmd.c line 124
- in /usr/src/lib/libc/net/res_send.c line 247
- in /usr/src/libexec/identd/src/identd.c line 92, 666
- in /usr/src/libexec/rlogind/rlogind.c line 373-374(2)
- in /usr/src/libexec/rshd/rshd.c line 330
- in /usr/src/libexec/telnetd/telnetd.c line 363, 449-451(3)
- in /usr/src/new/nntp/xfer/nntpxfer.c line 410
- in /usr/src/ucb/ftp/ftp.c line 1053, 1482, 1513, 1557, 1588, 1603, 1645
- in /usr/src/ucb/telnet.c line 290, 749-751(3)
- in /usr/src/ucb/tn3270/tn3270.c line 534-535(2), 1285, 1308
- in /usr/src/ucb/window/wwiomux.c line 40
- in /usr/src/usr.lib/libident/id_open.c line 119-121(3)
- in /usr/src/usr.lib/libident/id_parse.c line 74
- in /usr/src/usr.lib/libident/id_query.c line 57
- in /usr/src/usr.sbin/named/named/ns_main.c line 583
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 394
- in /usr/src/usr.sbin/ntp/read_psti.c line 168
- in /usr/src/usr.sbin/timed/cmds.c line 163, 307
- in /usr/src/usr.sbin/timed/measure.c line 57, 86
- in /usr/src/usr.sbin/timed/readmsg.c line 133
- in /usr/src/usr.sbin/traceroute/traceroute.c line 532

NFDBITS defined in line 52; used 37 times

- in line 58-60(6)
- in /usr/src/lib/libc/net/res_send.c line 40-42(6)
- in /usr/src/libexec/identd/src/identd.c line 86-89(3)
- in /usr/src/sys/sys/sys_generic.c line 338, 477-478(2)
- in /usr/src/ucb/ftp/ftp.c line 69-71(6)
- in /usr/src/usr.sbin/named/named/ns_main.c line 72-74(6)
- in /usr/src/usr.sbin/traceroute/traceroute.c line 216-219(7)

_SYS_SELECT_H_ defined in line 37; used 1 times

- in line 36

#### Usage of this include

select.h used 9 times

- in /usr/include/ident.h line 93
- in /usr/src/libexec/identd/src/identd.c line 62
- in /usr/src/sys/h/types.h line 58
- in /usr/src/usr.lib/libident/id_open.c line 37
- in /usr/src/usr.lib/libident/id_parse.c line 28-32(2)
- in /usr/src/usr.lib/libident/id_query.c line 26-30(2)
- in /usr/src/usr.lib/libident/ident.h line 93

Last modified: 2000-02-29 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 706 |