struct fd_set

From: Evgeny Kotsuba <evgen__k@dont-contact.us>
Date: Sun, 27 Apr 2003 16:43:43 +0400

Hi,

IBM's OS/2 Toolkit has two definitions for struct fd_set
============
one - old for TCP/IP 16 bit stack

typedef struct fd_set {
         fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
} fd_set;

and one for 32 bit TCP/IP stack

typedef struct fd_set {
         u_short fd_count; /* how many are SET? */
         SOCKET fd_array[FD_SETSIZE]; /* an array of SOCKETs */
} fd_set;

================
So that things like in comm_select():

        maxindex = howmany(maxfd, FD_MASK_BITS);
        fdsp = (fd_mask *) & readfds;
        for (j = 0; j < maxindex; j++) {
            if ((tmask = fdsp[j]) == 0)

looks not very nice for 32bit stack.

Is it only my case ?

PS:
Also it seems that all this stuff in squid is limits to 64K of
sockets+filedeskriptors.

SY,
Evgeny Kotsuba

___________________
Лучшие туры на ближайшие даты. Сеть магазинов горящих путевок.
www.tournews.ru
Received on Sun Apr 27 2003 - 06:43:18 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:43 MST