Searched refs:NFDBITS (Results 1 - 25 of 41) sorted by relevance

12

/macosx-10.9.5/ntp-88/include/
H A Dntp_select.h21 #define NFDBITS 32 macro
23 #define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
24 #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
25 #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
/macosx-10.9.5/apache-786.1/httpd/os/tpf/
H A Dos.h47 #define NFDBITS (sizeof(fd_mask) * NBBY) macro
51 fd_mask fds_bits [howmany(FD_SETSIZE, NFDBITS)];
54 #define FD_CLR(n, p)((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
55 #define FD_ISSET(n, p)((p)->fds_bits[(n)/NFDBITS] & (1 <<((n) % NFDBITS)))
/macosx-10.9.5/passwordserver_sasl-170/cyrus_sasl/mac/CommonKClient/mac_kclient3/Headers/KerberosSupport/
H A DSockets.h148 /* $Copyright: * * Copyright 1998-2000 by the Massachusetts Institute of Technology. * * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and that * both that copyright notice and this permission notice appear in * supporting documentation, and that the name of M.I.T. not be used in * advertising or publicity pertaining to distribution of the software * without specific, written prior permission. Furthermore if you modify * this software you must label your software as modified software and not * distribute it in such a fashion that it might be confused with the * original MIT software. M.I.T. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * Individual source code files are copyright MIT, Cygnus Support, * OpenVision, Oracle, Sun Soft, FundsXpress, and others. * * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, * and Zephyr are trademarks of the Massachusetts Institute of Technology * (MIT). No commercial use of these trademarks may be made without prior * written permission of MIT. * * "Commercial use" means use of a name in a product or other for-profit * manner. It does NOT prevent a commercial firm from referring to the MIT * trademarks in order to convey information (although in doing so, * recognition of their trademark status should be given). * $ */ /* $Header: /Volumes/backup/dsmigrate/Dumps/../CVS/passwordserver_sasl/cyrus_sasl/mac/CommonKClient/mac_kclient3/Headers/KerberosSupport/Sockets.h,v 1.4 2005/01/10 19:10:48 snsimon Exp $ */ /* * * Sockets.h -- Main external header file for the sockets library. * */ #include <KerberosSupport/ErrorLib.h> #include <KerberosSupport/Utilities.h> #include <KerberosSupport/SocketErrors.h> #include <unix.h> #include <MacTypes.h> #include <Events.h> #include <OpenTptInternet.h> #ifndef _SOCKETS_ #define _SOCKETS_ #ifdef __cplusplus extern "C" { #endif #if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__) # pragma import on #endif /*******************/ /* API Definitions */ /*******************/ #define FD_SETSIZE 256 /* The maximum # of sockets -- cannot be changed */ /* socket types */ #define SOCK_STREAM 0 /* stream socket -- connection oriented */ #define SOCK_DGRAM 1 /* datagram socket -- connectionless */ #define SOCK_RAW 2 /* raw socket */ #define SOCK_SEQPACKET 3 /* sequenced packet socket */ #define SOCK_RDM 4 /* reliably delivered message socket */ /* address families -- get AF_INET from OpenTptInternet.h */ #define AF_UNSPEC 0 /* Unspecified */ #define AF_UNIX 1 /* Unix internal protocols */ /* protocol families */ #define PF_UNSPEC AF_UNSPEC /* Unspecified */ #define PF_UNIX AF_UNIX /* Unix internal protocols */ #define PF_INET AF_INET /* Internet protocols */ /* IP Address Wildcard */ #define INADDR_ANY kOTAnyInetAddress #define INADDR_NONE 0xffffffff /* recv and send flags */ #define MSG_DONTROUTE 1 #define MSG_DONTWAIT 2 #define MSG_OOB 4 #define MSG_PEEK 8 #define MSG_WAITALL 16 #define NUMBITSPERBYTE 8 /* Number of bits per byte */ /* socket_fnctl() requests */ #define F_GETFL 3 /* Get file flags */ #define F_SETFL 4 /* Set file flags */ /* shutdown() flags */ #define SHUT_RD 0 /* Shutdown read side of the connection */ #define SHUT_WR 1 /* Shutdown write side of the connection */ #define SHUT_RDWR 2 /* Shutdown read and write sides of the connection */ /* IP address sizes */ #define INET_ADDRSTRLEN 16 /* for IPv4 dotted decimal */ #define INET6_ADDRSTRLEN 46 /* for IPv6 dhex string */ #define INADDRSZ 4 /* size of IPv4 addr in bytes */ #define IN6ADDRSZ 16 /* size of IPv6 addr in bytes */ /* host name size */ #define MAXHOSTNAMESIZE kMaxHostNameLen #define MAXHOSTNAMELEN kMaxHostNameLen #ifdef USE_STREAMS /* Constants for poll() */ #define POLLIN 0x001 /* A non-priority message is available */ #define POLLPRI 0x002 /* A high priority message is available */ #define POLLOUT 0x004 /* The stream is writable for non-priority messages */ #define POLLERR 0x008 /* A error message has arrived */ #define POLLHUP 0x010 /* A hangup has occurred */ #define POLLNVAL 0x020 /* This fd is bogus */ #define POLLRDNORM 0x040 /* A non-priority message is available */ #define POLLRDBAND 0x080 /* A priority message (band > 0) message is available */ #define POLLWRNORM 0x100 /* Same as POLLOUT */ #define POLLWRBAND 0x200 /* A priority band exists and is writable */ #define POLLMSG 0x400 /* A signal message has reached the front of the queue */ #endif /* USE_STREAMS */ /**********/ /* Macros */ /**********/ /* network byte order conversion [none since we're already big-endian] */ #define ntohl(x) (x) #define ntohs(x) (x) #define htonl(x) (x) #define htons(x) (x) /* macros for select */ #define FD_SET(fd, fdset) ((fdset)->fds_bits[(fd) / NFDBITS] |= ((unsigned)1 << ((fd) % NFDBITS))) #define FD_CLR(fd, fdset) ((fdset)->fds_bits[(fd) / NFDBITS] &= ~((unsigned)1 << ((fd) % NFDBITS))) #define FD_ISSET(fd, fdset) ((fdset)->fds_bits[(fd) / NFDBITS] & ((unsigned)1 << ((fd) % NFDBITS))) #define FD_ZERO(fdset) memset((char *)(fdset), 0, sizeof(*(fdset))) /****************************/ /* API Structures and Types */ /****************************/ /* An internet address */ typedef UInt32 in_addr_t; /* size of address structures */ typedef UInt32 socklen_t; /* structure used to store addresses */ struct sockaddr { u_short sa_family; char sa_data[14]; }; /* INET protocol structures */ struct in_addr { in_addr_t s_addr; }; /* A TCP address -- the same as a OT InetAddress */ struct sockaddr_in { /* struct InetAddress { */ u_short sin_family; /* OTAddressType fAddressType */ u_short sin_port; /* InetPort fPort */ struct in_addr sin_addr; /* InetHost fHost */ char sin_zero[8]; /* UInt8 fUnused */ }; /* }; */ /* structures for select */ typedef long fd_mask; #define NFDBITS (sizeof(fd_mask) * NUMBITSPERBYTE) /* bits per mask */ typedef struct fd_set { fd_mask fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS]; } fd_set; /* Structure for non-contiguous data */ struct iovec { struct iovec *next; /* For (…)
/macosx-10.9.5/Security-55471.14.18/include/security_utilities/
H A Dfdsel.h66 inline static int words(int fd) { return (fd - 1) / NFDBITS + 1; }
H A Dselector.cpp44 fdSetSize = FD_SETSIZE / NFDBITS;
66 unsigned int pos = fd / NFDBITS;
68 int newSize = (fd - 1) / NFDBITS + 2; // as much as needed + 1 spare word
/macosx-10.9.5/Security-55471.14.18/libsecurity_utilities/lib/
H A Dfdsel.h66 inline static int words(int fd) { return (fd - 1) / NFDBITS + 1; }
H A Dselector.cpp44 fdSetSize = FD_SETSIZE / NFDBITS;
66 unsigned int pos = fd / NFDBITS;
68 int newSize = (fd - 1) / NFDBITS + 2; // as much as needed + 1 spare word
/macosx-10.9.5/tcl-102/tk/tk/macosx/
H A DtkMacOSXPort.h107 #ifndef NFDBITS
108 # define NFDBITS NBBY*sizeof(fd_mask) macro
110 #define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
/macosx-10.9.5/tcl-102/tk84/tk/macosx/
H A DtkMacOSXPort.h104 #ifndef NFDBITS
105 # define NFDBITS NBBY*sizeof(fd_mask) macro
107 #define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
/macosx-10.9.5/tcl-102/tk/tk/unix/
H A DtkUnixPort.h120 #ifndef NFDBITS
121 # define NFDBITS NBBY*sizeof(fd_mask) macro
123 #define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
/macosx-10.9.5/tcl-102/tk84/tk/unix/
H A DtkUnixPort.h117 #ifndef NFDBITS
118 # define NFDBITS NBBY*sizeof(fd_mask) macro
120 #define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
/macosx-10.9.5/tcl-102/tcl/tcl/unix/
H A DtclUnixPort.h424 #ifndef NFDBITS
425 # define NFDBITS NBBY*sizeof(fd_mask) macro
426 #endif /* NFDBITS */
427 #define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
/macosx-10.9.5/tcl-102/tcl84/tcl/unix/
H A DtclUnixPort.h462 #ifndef NFDBITS
463 # define NFDBITS NBBY*sizeof(fd_mask) macro
464 #endif /* NFDBITS */
465 #define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
/macosx-10.9.5/OpenSSH-186/openssh/openbsd-compat/
H A Dbsd-poll.c57 nmemb = howmany(maxfd + 1 , NFDBITS);
/macosx-10.9.5/sudo-72/src/
H A Dexec.c386 fdsr = emalloc2(howmany(maxfd + 1, NFDBITS), sizeof(fd_mask));
387 fdsw = emalloc2(howmany(maxfd + 1, NFDBITS), sizeof(fd_mask));
389 memset(fdsw, 0, howmany(maxfd + 1, NFDBITS) * sizeof(fd_mask));
390 memset(fdsr, 0, howmany(maxfd + 1, NFDBITS) * sizeof(fd_mask));
H A Dexec_pty.c917 fdsr = ecalloc(howmany(maxfd + 1, NFDBITS), sizeof(fd_mask));
1028 fdsr = emalloc2(howmany(maxfd + 1, NFDBITS), sizeof(fd_mask));
1029 fdsw = emalloc2(howmany(maxfd + 1, NFDBITS), sizeof(fd_mask));
1031 memset(fdsw, 0, howmany(maxfd + 1, NFDBITS) * sizeof(fd_mask));
1032 memset(fdsr, 0, howmany(maxfd + 1, NFDBITS) * sizeof(fd_mask));
/macosx-10.9.5/xnu-2422.115.4/bsd/sys/
H A Dtypes.h183 #define NFDBITS __DARWIN_NFDBITS /* bits per mask */ macro
/macosx-10.9.5/xnu-2422.115.4/bsd/kern/
H A Dsys_generic.c978 nw = howmany(uap->nd, NFDBITS);
1244 nw = howmany(uap->nd, NFDBITS);
1313 nw = howmany(nfd, NFDBITS);
1324 for (i = 0; i < nfd; i += NFDBITS) {
1325 bits = iptr[i/NFDBITS];
1362 optr[fd/NFDBITS] |= (1 << (fd % NFDBITS));
1643 nw = howmany(nfd, NFDBITS);
1648 for (i = 0; i < nfd; i += NFDBITS) {
1649 bits = iptr[i/NFDBITS];
[all...]
/macosx-10.9.5/dcerpc-58/dcerpc/ncklib/
H A Dcomnlsn.c132 # define RPC_C_SELECT_NFDBITS NFDBITS
/macosx-10.9.5/Libinfo-449.1.3/rpc.subproj/
H A Dsvc.c461 for (sock = 0; sock <= svc_maxfd; sock += NFDBITS) {
/macosx-10.9.5/OpenSSH-186/openssh/
H A Dssh-pkcs11-helper.c300 set_size = howmany(max + 1, NFDBITS) * sizeof(fd_mask);
H A Ddefines.h176 # define NFDBITS (8 * sizeof(unsigned long)) macro
H A Dpacket.c1052 NFDBITS), sizeof(fd_mask));
1077 NFDBITS) * sizeof(fd_mask));
1739 NFDBITS), sizeof(fd_mask));
1743 NFDBITS) * sizeof(fd_mask));
H A Dsshconnect.c277 fdset = (fd_set *)xcalloc(howmany(sockfd + 1, NFDBITS),
475 fdsetsz = howmany(connection_in + 1, NFDBITS) * sizeof(fd_mask);
/macosx-10.9.5/CF-855.17/
H A DCFSocket.c980 #define NFDBITS (sizeof(int32_t) * NBBY) macro
1033 CFIndex oldSize = numFds / NFDBITS, newSize = (sock + NFDBITS) / NFDBITS, changeInBytes = (newSize - oldSize) * sizeof(fd_mask);
2029 if (maxnrfds > fdentries * (int)NFDBITS) {
2030 fdentries = (maxnrfds + NFDBITS - 1) / NFDBITS;
2932 CFIndex oldSize = numFds / NFDBITS, newSize = (sock + NFDBITS) / NFDBITS, changeInByte
[all...]

Completed in 157 milliseconds

12