ModSelectWin32.cc File Reference
#include "squid.h"
#include "anyp/PortCfg.h"
#include "comm/Connection.h"
#include "comm/Loops.h"
#include "fde.h"
#include "ICP.h"
#include "mgr/Registration.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "StatHist.h"
#include "Store.h"
#include <cerrno>
Include dependency graph for ModSelectWin32.cc:

Go to the source code of this file.

Macros

#define howmany(x, y)   (((x)+((y)-1))/(y))
 
#define NBBY   8
 
#define FD_MASK_BYTES   sizeof(fd_mask)
 
#define FD_MASK_BITS   (FD_MASK_BYTES*NBBY)
 
#define MAX_INCOMING_INTEGER   256
 
#define INCOMING_FACTOR   5
 
#define MAX_INCOMING_INTERVAL   (MAX_INCOMING_INTEGER << INCOMING_FACTOR)
 
#define commCheckUdpIncoming   (++udp_io_events > (incoming_udp_interval>> INCOMING_FACTOR))
 
#define commCheckDnsIncoming   (++dns_io_events > (incoming_dns_interval>> INCOMING_FACTOR))
 
#define commCheckTcpIncoming   (++tcp_io_events > (incoming_tcp_interval>> INCOMING_FACTOR))
 
#define DEBUG_FDBITS   0
 

Functions

static int examine_select (fd_set *, fd_set *)
 
static int fdIsTcpListener (int fd)
 
static int fdIsUdpListener (int fd)
 
static int fdIsDns (int fd)
 
static int comm_check_incoming_select_handlers (int nfds, int *fds)
 
static void comm_select_dns_incoming (void)
 
static void commUpdateReadBits (int fd, PF *handler)
 
static void commUpdateWriteBits (int fd, PF *handler)
 
static void comm_select_udp_incoming (void)
 
static void comm_select_tcp_incoming (void)
 
static void commIncomingStats (StoreEntry *sentry)
 

Variables

static int MAX_POLL_TIME = 1000
 
static OBJH commIncomingStats
 
static struct timeval zero_tv
 
static fd_set global_readfds
 
static fd_set global_writefds
 
static int nreadfds
 
static int nwritefds
 
static int udp_io_events = 0
 
static int dns_io_events = 0
 
static int tcp_io_events = 0
 
static int incoming_udp_interval = 16 << INCOMING_FACTOR
 
static int incoming_dns_interval = 16 << INCOMING_FACTOR
 
static int incoming_tcp_interval = 16 << INCOMING_FACTOR
 

Macro Definition Documentation

◆ commCheckDnsIncoming

#define commCheckDnsIncoming   (++dns_io_events > (incoming_dns_interval>> INCOMING_FACTOR))

Definition at line 113 of file ModSelectWin32.cc.

◆ commCheckTcpIncoming

#define commCheckTcpIncoming   (++tcp_io_events > (incoming_tcp_interval>> INCOMING_FACTOR))

Definition at line 114 of file ModSelectWin32.cc.

◆ commCheckUdpIncoming

#define commCheckUdpIncoming   (++udp_io_events > (incoming_udp_interval>> INCOMING_FACTOR))

Definition at line 112 of file ModSelectWin32.cc.

◆ DEBUG_FDBITS

#define DEBUG_FDBITS   0

Definition at line 314 of file ModSelectWin32.cc.

◆ FD_MASK_BITS

#define FD_MASK_BITS   (FD_MASK_BYTES*NBBY)

Definition at line 36 of file ModSelectWin32.cc.

◆ FD_MASK_BYTES

#define FD_MASK_BYTES   sizeof(fd_mask)

Definition at line 35 of file ModSelectWin32.cc.

◆ howmany

#define howmany (   x,
 
)    (((x)+((y)-1))/(y))

Definition at line 30 of file ModSelectWin32.cc.

◆ INCOMING_FACTOR

#define INCOMING_FACTOR   5

Definition at line 104 of file ModSelectWin32.cc.

Referenced by commIncomingStats().

◆ MAX_INCOMING_INTEGER

#define MAX_INCOMING_INTEGER   256

Definition at line 103 of file ModSelectWin32.cc.

◆ MAX_INCOMING_INTERVAL

#define MAX_INCOMING_INTERVAL   (MAX_INCOMING_INTEGER << INCOMING_FACTOR)

◆ NBBY

#define NBBY   8

Definition at line 33 of file ModSelectWin32.cc.

Function Documentation

◆ comm_check_incoming_select_handlers()

◆ comm_select_dns_incoming()

◆ comm_select_tcp_incoming()

◆ comm_select_udp_incoming()

◆ commIncomingStats()

◆ commUpdateReadBits()

void commUpdateReadBits ( int  fd,
PF handler 
)
static

Definition at line 771 of file ModSelectWin32.cc.

References global_readfds, and nreadfds.

Referenced by comm_check_incoming_select_handlers().

◆ commUpdateWriteBits()

void commUpdateWriteBits ( int  fd,
PF handler 
)
static

◆ examine_select()

◆ fdIsDns()

static int fdIsDns ( int  fd)
static

Definition at line 155 of file ModSelectWin32.cc.

References DnsSocketA, and DnsSocketB.

◆ fdIsTcpListener()

static int fdIsTcpListener ( int  fd)
static

Definition at line 167 of file ModSelectWin32.cc.

References HttpPortList, and NULL.

◆ fdIsUdpListener()

static int fdIsUdpListener ( int  fd)
static

Definition at line 143 of file ModSelectWin32.cc.

References Comm::Connection::fd, icpIncomingConn, icpOutgoingConn, and NULL.

Variable Documentation

◆ commIncomingStats

OBJH commIncomingStats
static

Definition at line 43 of file ModSelectWin32.cc.

Referenced by comm_select_dns_incoming().

◆ dns_io_events

int dns_io_events = 0
static

Definition at line 107 of file ModSelectWin32.cc.

Referenced by comm_select_dns_incoming().

◆ global_readfds

fd_set global_readfds
static

Definition at line 50 of file ModSelectWin32.cc.

Referenced by comm_select_dns_incoming(), and commUpdateReadBits().

◆ global_writefds

fd_set global_writefds
static

Definition at line 51 of file ModSelectWin32.cc.

Referenced by comm_select_dns_incoming(), and commUpdateWriteBits().

◆ incoming_dns_interval

int incoming_dns_interval = 16 << INCOMING_FACTOR
static

Definition at line 110 of file ModSelectWin32.cc.

Referenced by comm_select_dns_incoming(), and commIncomingStats().

◆ incoming_tcp_interval

int incoming_tcp_interval = 16 << INCOMING_FACTOR
static

Definition at line 111 of file ModSelectWin32.cc.

Referenced by comm_select_tcp_incoming(), and commIncomingStats().

◆ incoming_udp_interval

int incoming_udp_interval = 16 << INCOMING_FACTOR
static

Definition at line 109 of file ModSelectWin32.cc.

Referenced by comm_select_udp_incoming(), and commIncomingStats().

◆ MAX_POLL_TIME

int MAX_POLL_TIME = 1000
static

Definition at line 27 of file ModSelectWin32.cc.

Referenced by commUpdateWriteBits().

◆ nreadfds

int nreadfds
static

Definition at line 52 of file ModSelectWin32.cc.

Referenced by comm_select_dns_incoming(), and commUpdateReadBits().

◆ nwritefds

int nwritefds
static

Definition at line 53 of file ModSelectWin32.cc.

Referenced by comm_select_dns_incoming(), and commUpdateWriteBits().

◆ tcp_io_events

int tcp_io_events = 0
static

Definition at line 108 of file ModSelectWin32.cc.

Referenced by comm_select_tcp_incoming().

◆ udp_io_events

int udp_io_events = 0
static

Definition at line 106 of file ModSelectWin32.cc.

Referenced by comm_select_udp_incoming().

◆ zero_tv

struct timeval zero_tv
static

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors