defines.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TRUE   1
 
#define FALSE   0
 
#define BUFSIZ   4096 /* make unreasonable guess */
 
#define BROWSERNAMELEN   128
 
#define ACL_SUNDAY   0x01
 
#define ACL_MONDAY   0x02
 
#define ACL_TUESDAY   0x04
 
#define ACL_WEDNESDAY   0x08
 
#define ACL_THURSDAY   0x10
 
#define ACL_FRIDAY   0x20
 
#define ACL_SATURDAY   0x40
 
#define ACL_ALLWEEK   0x7F
 
#define ACL_WEEKDAYS   0x3E
 
#define COMM_SELECT_READ   (0x1)
 
#define COMM_SELECT_WRITE   (0x2)
 
#define DISK_OK   (0)
 
#define DISK_ERROR   (-1)
 
#define DISK_EOF   (-2)
 
#define DISK_NO_SPACE_LEFT   (-6)
 
#define DNS_INBUF_SZ   4096
 
#define FD_DESC_SZ   64
 
#define FQDN_LOOKUP_IF_MISS   0x01
 
#define FQDN_MAX_NAMES   5
 
#define HTTP_REPLY_FIELD_SZ   128
 
#define BUF_TYPE_8K   1
 
#define BUF_TYPE_MALLOC   2
 
#define ANONYMIZER_NONE   0
 
#define ANONYMIZER_STANDARD   1
 
#define ANONYMIZER_PARANOID   2
 
#define USER_IDENT_SZ   64
 
#define IDENT_NONE   0
 
#define IDENT_PENDING   1
 
#define IDENT_DONE   2
 
#define IP_LOOKUP_IF_MISS   0x01
 
#define MAX_MIME   4096
 
#define HIER_MAX_DEFICIT   20
 
#define ICP_FLAG_HIT_OBJ   0x80000000ul
 
#define ICP_FLAG_SRC_RTT   0x40000000ul
 
#define ICP_VERSION_2   2
 
#define ICP_VERSION_3   3
 
#define ICP_VERSION_CURRENT   ICP_VERSION_2
 
#define DIRECT_UNKNOWN   0
 
#define DIRECT_NO   1
 
#define DIRECT_MAYBE   2
 
#define DIRECT_YES   3
 
#define REDIRECT_AV_FACTOR   1000
 
#define REDIRECT_NONE   0
 
#define REDIRECT_PENDING   1
 
#define REDIRECT_DONE   2
 
#define AUTHENTICATE_AV_FACTOR   1000
 
#define NTLM_CHALLENGE_SZ   300
 
#define current_stacksize(stack)   ((stack)->top - (stack)->base)
 
#define LOG_ENABLE   1
 
#define LOG_DISABLE   0
 
#define SM_PAGE_SIZE   4096
 
#define MAX_CLIENT_BUF_SZ   4096
 
#define EBIT_SET(flag, bit)   ((void)((flag) |= ((1L<<(bit)))))
 
#define EBIT_CLR(flag, bit)   ((void)((flag) &= ~((1L<<(bit)))))
 
#define EBIT_TEST(flag, bit)   ((flag) & ((1L<<(bit))))
 
#define CBIT_BIT(bit)   (1<<((bit)%8))
 
#define CBIT_BIN(mask, bit)   (mask)[(bit)>>3]
 
#define CBIT_SET(mask, bit)   ((void)(CBIT_BIN(mask, bit) |= CBIT_BIT(bit)))
 
#define CBIT_CLR(mask, bit)   ((void)(CBIT_BIN(mask, bit) &= ~CBIT_BIT(bit)))
 
#define CBIT_TEST(mask, bit)   (CBIT_BIN(mask, bit) & CBIT_BIT(bit))
 
#define MAX_FILES_PER_DIR   (1<<20)
 
#define MAX_URL   8192
 
#define MAX_LOGIN_SZ   128
 
#define PEER_MAX_ADDRESSES   10
 
#define RTT_AV_FACTOR   50
 
#define RTT_BACKGROUND_AV_FACTOR   25 /* Background pings need a smaller factor since they are sent less frequently */
 
#define PEER_DEAD   0
 
#define PEER_ALIVE   1
 
#define AUTH_MSG_SZ   4096
 
#define HTTP_REPLY_BUF_SZ   4096
 
#define CLIENT_REQ_BUF_SZ   4096
 
#define ERROR_BUF_SZ   (MAX_URL << 2)
 
#define VIEWINCLUDED   1
 
#define VIEWEXCLUDED   2
 
#define STORE_META_OK   0x03
 
#define STORE_META_DIRTY   0x04
 
#define STORE_META_BAD   0x05
 
#define IPC_NONE   0
 
#define IPC_TCP_SOCKET   1
 
#define IPC_UDP_SOCKET   2
 
#define IPC_FIFO   3
 
#define IPC_UNIX_STREAM   4
 
#define IPC_UNIX_DGRAM   5
 
#define IPC_STREAM   IPC_TCP_SOCKET
 
#define IPC_DGRAM   IPC_UDP_SOCKET
 
#define STORE_META_KEY   STORE_META_KEY_MD5
 
#define STORE_META_TLD_START   sizeof(int)+sizeof(char)
 
#define STORE_META_TLD_SIZE   STORE_META_TLD_START
 
#define SwapMetaType(x)   (char)x[0]
 
#define SwapMetaSize(x)   &x[sizeof(char)]
 
#define SwapMetaData(x)   &x[STORE_META_TLD_START]
 
#define STORE_HDR_METASIZE   (4*sizeof(time_t)+2*sizeof(uint16_t)+sizeof(uint64_t))
 
#define STORE_HDR_METASIZE_OLD   (4*sizeof(time_t)+2*sizeof(uint16_t)+sizeof(size_t))
 
#define COUNT_INTERVAL   60
 
#define N_COUNT_HIST   (3600 / COUNT_INTERVAL) + 1
 
#define N_COUNT_HOUR_HIST   (86400 * 3) / (60 * COUNT_INTERVAL)
 
#define countof(arr)   (sizeof(arr)/sizeof(*arr))
 
#define PEER_TCP_MAGIC_COUNT   10
 
#define URI_WHITESPACE_STRIP   0
 
#define URI_WHITESPACE_ALLOW   1
 
#define URI_WHITESPACE_ENCODE   2
 
#define URI_WHITESPACE_CHOP   3
 
#define URI_WHITESPACE_DENY   4
 
#define O_TEXT   0
 
#define O_BINARY   0
 
#define FILE_MODE(x)   ((x)&(O_RDONLY|O_WRONLY|O_RDWR))
 
#define HTTP_REQBUF_SZ   4096
 

Macro Definition Documentation

#define ACL_ALLWEEK   0x7F

Definition at line 32 of file defines.h.

Referenced by ACLTimeData::parse().

#define ACL_FRIDAY   0x20

Definition at line 30 of file defines.h.

Referenced by ACLTimeData::dump(), and ACLTimeData::parse().

#define ACL_MONDAY   0x02

Definition at line 26 of file defines.h.

Referenced by ACLTimeData::dump(), and ACLTimeData::parse().

#define ACL_SATURDAY   0x40

Definition at line 31 of file defines.h.

Referenced by ACLTimeData::dump(), and ACLTimeData::parse().

#define ACL_SUNDAY   0x01

Definition at line 25 of file defines.h.

Referenced by ACLTimeData::dump(), and ACLTimeData::parse().

#define ACL_THURSDAY   0x10

Definition at line 29 of file defines.h.

Referenced by ACLTimeData::dump(), and ACLTimeData::parse().

#define ACL_TUESDAY   0x04

Definition at line 27 of file defines.h.

Referenced by ACLTimeData::dump(), and ACLTimeData::parse().

#define ACL_WEDNESDAY   0x08

Definition at line 28 of file defines.h.

Referenced by ACLTimeData::dump(), and ACLTimeData::parse().

#define ACL_WEEKDAYS   0x3E

Definition at line 33 of file defines.h.

Referenced by ACLTimeData::parse().

#define ANONYMIZER_NONE   0

Definition at line 56 of file defines.h.

#define ANONYMIZER_PARANOID   2

Definition at line 58 of file defines.h.

#define ANONYMIZER_STANDARD   1

Definition at line 57 of file defines.h.

#define AUTH_MSG_SZ   4096

Definition at line 128 of file defines.h.

#define AUTHENTICATE_AV_FACTOR   1000

Definition at line 91 of file defines.h.

#define BROWSERNAMELEN   128

Definition at line 23 of file defines.h.

#define BUF_TYPE_8K   1

Definition at line 53 of file defines.h.

#define BUF_TYPE_MALLOC   2

Definition at line 54 of file defines.h.

#define CBIT_BIN (   mask,
  bit 
)    (mask)[(bit)>>3]

Definition at line 111 of file defines.h.

#define CBIT_BIT (   bit)    (1<<((bit)%8))

Definition at line 110 of file defines.h.

#define CBIT_CLR (   mask,
  bit 
)    ((void)(CBIT_BIN(mask, bit) &= ~CBIT_BIT(bit)))
#define CBIT_SET (   mask,
  bit 
)    ((void)(CBIT_BIN(mask, bit) |= CBIT_BIT(bit)))
#define CLIENT_REQ_BUF_SZ   4096

Definition at line 130 of file defines.h.

Referenced by Server::maybeMakeSpaceAvailable().

#define COUNT_INTERVAL   60

Definition at line 175 of file defines.h.

Referenced by statAvgTick(), and statInit().

#define countof (   arr)    (sizeof(arr)/sizeof(*arr))

Definition at line 186 of file defines.h.

#define current_stacksize (   stack)    ((stack)->top - (stack)->base)

Definition at line 96 of file defines.h.

#define DIRECT_MAYBE   2

Definition at line 82 of file defines.h.

Referenced by peerSelectFoo().

#define DIRECT_UNKNOWN   0

Definition at line 80 of file defines.h.

Referenced by peerSelectFoo().

#define DISK_EOF   (-2)

Definition at line 41 of file defines.h.

Referenced by diskHandleRead(), BlockingFile::readDone(), and DiskThreadsDiskFile::readDone().

#define DISK_NO_SPACE_LEFT   (-6)
#define DNS_INBUF_SZ   4096

Definition at line 44 of file defines.h.

#define EBIT_TEST (   flag,
  bit 
)    ((flag) & ((1L<<(bit))))

Definition at line 107 of file defines.h.

Referenced by asHandleReply(), clientReplyContext::buildReplyHeader(), clientReplyContext::cacheHit(), Store::Disk::canLog(), Store::Disk::canStore(), StoreEntry::checkCachable(), StoreMetaMD5::checkConsistency(), StoreEntry::checkNegativeHit(), CheckQuickAbortIsReasonable(), StoreEntry::checkTooSmall(), StoreEntry::clearPublicKeyScope(), StoreEntry::complete(), FwdState::completed(), store_client::copy(), MemStore::copyToShm(), Ftp::Client::dataRead(), Store::Controller::dereferenceIdle(), errorAppendEntry(), clientReplyContext::errorInStream(), StoreEntry::flush(), Ftp::Gateway::ftpAcceptDataConnection(), Transients::get(), gopherReadReply(), Store::Controller::handleIdleEntry(), clientReplyContext::handleIMSReply(), Http::One::Server::handleReply(), Ftp::Gateway::haveParsedReplyHeaders(), heap_add(), httpMaybeRemovePublic(), clientReplyContext::identifyFoundObject(), StoreEntry::isAccepting(), HttpHdrScTarget::isSet(), HttpHdrCc::isSet(), StoreEntry::locked(), StoreEntry::makePublic(), StoreEntry::mayStartHitting(), StoreEntry::mayStartSwapOut(), neighborsHtcpReply(), neighborsUdpAck(), netdbExchangeHandleReply(), operator<<(), peerDigestFetchedEnough(), peerDigestRequest(), peerSelectIcpPing(), clientReplyContext::processExpired(), Ftp::Gateway::processHeadResponse(), clientReplyContext::processMiss(), Ftp::Relay::processReplyBody(), HttpStateData::processReplyBody(), Ftp::Gateway::processReplyBody(), clientReplyContext::purgeFoundObject(), Ftp::Client::readControlReply(), HttpStateData::readReply(), Fs::Ufs::RebuildState::rebuildFromSwapLog(), Store::Controller::referenceBusy(), FwdState::reforward(), refreshCheck(), StoreEntry::release(), StoreEntry::releaseRequest(), clientReplyContext::replyStatus(), HttpStateData::reusableReply(), clientReplyContext::sendClientOldEntry(), clientReplyContext::sendClientUpstreamResponse(), Client::sentRequestBody(), Client::setFinalReply(), StoreEntry::setMemStatus(), StoreEntry::setPrivateKey(), StoreEntry::setPublicKey(), StoreEntry::setReleaseFlag(), MemStore::shouldCache(), statObjects(), storeCleanup(), storeClientCopy2(), StoreEntry::storeClientType(), storeDigestAddable(), storeDigestDel(), storeDirSwapLog(), storeEntryFlags(), storeRebuildParseEntry(), storeSwapInStart(), StoreEntry::swapOut(), StoreEntry::trimMemory(), StoreEntry::unlock(), Store::Controller::updateOnNotModified(), urnHandleReply(), StoreEntry::validToSend(), and StoreEntry::write().

#define ERROR_BUF_SZ   (MAX_URL << 2)

Definition at line 133 of file defines.h.

Referenced by setSystemLimits().

#define FALSE   0

Definition at line 16 of file defines.h.

#define FD_DESC_SZ   64
#define FILE_MODE (   x)    ((x)&(O_RDONLY|O_WRONLY|O_RDWR))
#define FQDN_MAX_NAMES   5

Definition at line 49 of file defines.h.

Referenced by fqdncacheAddEntryFromHosts(), and fqdncacheParse().

#define HIER_MAX_DEFICIT   20

Definition at line 70 of file defines.h.

#define HTTP_REPLY_BUF_SZ   4096

Definition at line 129 of file defines.h.

#define HTTP_REPLY_FIELD_SZ   128

Definition at line 51 of file defines.h.

#define ICP_FLAG_HIT_OBJ   0x80000000ul

Definition at line 72 of file defines.h.

#define ICP_FLAG_SRC_RTT   0x40000000ul

Definition at line 73 of file defines.h.

Referenced by doV2Query(), neighborsUdpPing(), and peerIcpParentMiss().

#define ICP_VERSION_2   2

Definition at line 76 of file defines.h.

Referenced by icpHandleUdp(), and neighborsUdpPing().

#define ICP_VERSION_3   3

Definition at line 77 of file defines.h.

Referenced by icpHandleUdp().

#define ICP_VERSION_CURRENT   ICP_VERSION_2

Definition at line 78 of file defines.h.

Referenced by _icp_common_t::createMessage().

#define IDENT_DONE   2

Definition at line 63 of file defines.h.

#define IDENT_NONE   0

Definition at line 61 of file defines.h.

#define IDENT_PENDING   1

Definition at line 62 of file defines.h.

#define IP_LOOKUP_IF_MISS   0x01
#define IPC_DGRAM   IPC_UDP_SOCKET

Definition at line 162 of file defines.h.

#define IPC_FIFO   3

Definition at line 148 of file defines.h.

Referenced by ipcCreate(), and unlinkdInit().

#define IPC_NONE   0

Definition at line 145 of file defines.h.

Referenced by ipcCreate().

#define IPC_TCP_SOCKET   1

Definition at line 146 of file defines.h.

Referenced by externalAclInit(), ipc_thread_1(), ipc_thread_2(), ipcCreate(), and unlinkdInit().

#define IPC_UDP_SOCKET   2

Definition at line 147 of file defines.h.

Referenced by ipc_thread_1(), ipc_thread_2(), ipcCreate(), and IcmpSquid::Open().

#define IPC_UNIX_DGRAM   5

Definition at line 150 of file defines.h.

Referenced by ipcCreate().

#define IPC_UNIX_STREAM   4

Definition at line 149 of file defines.h.

Referenced by ipcCreate().

#define LOG_DISABLE   0

Definition at line 100 of file defines.h.

#define LOG_ENABLE   1
#define MAX_CLIENT_BUF_SZ   4096

Definition at line 103 of file defines.h.

#define MAX_FILES_PER_DIR   (1<<20)

Definition at line 116 of file defines.h.

#define MAX_MIME   4096

Definition at line 67 of file defines.h.

#define N_COUNT_HOUR_HIST   (86400 * 3) / (60 * COUNT_INTERVAL)

Definition at line 183 of file defines.h.

Referenced by GetAvgStat(), statAvgTick(), statFreeMemory(), and statInit().

#define NTLM_CHALLENGE_SZ   300

Definition at line 94 of file defines.h.

#define PEER_ALIVE   1

Definition at line 126 of file defines.h.

Referenced by neighborsUdpPing(), and peerAlive().

#define PEER_DEAD   0

Definition at line 125 of file defines.h.

Referenced by neighborsUdpPing(), peerAlive(), and peerConnectFailedSilent().

#define PEER_MAX_ADDRESSES   10

Definition at line 121 of file defines.h.

Referenced by peerDNSConfigure().

#define PEER_TCP_MAGIC_COUNT   10

Definition at line 192 of file defines.h.

Referenced by dump_peer_options().

#define REDIRECT_AV_FACTOR   1000

Definition at line 85 of file defines.h.

Referenced by helperReturnBuffer(), and helperStatefulHandleRead().

#define REDIRECT_DONE   2
#define REDIRECT_NONE   0

Definition at line 87 of file defines.h.

#define REDIRECT_PENDING   1
#define RTT_AV_FACTOR   50

Definition at line 122 of file defines.h.

Referenced by neighborUpdateRtt(), and peerCountHandleIcpReply().

#define RTT_BACKGROUND_AV_FACTOR   25 /* Background pings need a smaller factor since they are sent less frequently */

Definition at line 123 of file defines.h.

Referenced by neighborUpdateRtt(), and peerCountHandleIcpReply().

#define STORE_HDR_METASIZE   (4*sizeof(time_t)+2*sizeof(uint16_t)+sizeof(uint64_t))
#define STORE_HDR_METASIZE_OLD   (4*sizeof(time_t)+2*sizeof(uint16_t)+sizeof(size_t))

Definition at line 173 of file defines.h.

Referenced by InitStoreEntry::operator()(), and StoreMetaSTD::validLength().

#define STORE_META_BAD   0x05

Definition at line 143 of file defines.h.

#define STORE_META_DIRTY   0x04

Definition at line 142 of file defines.h.

#define STORE_META_OK   0x03

Definition at line 141 of file defines.h.

Referenced by StoreMetaUnpacker::checkBuffer(), and storeSwapMetaPack().

#define STORE_META_TLD_SIZE   STORE_META_TLD_START

Definition at line 168 of file defines.h.

#define STORE_META_TLD_START   sizeof(int)+sizeof(char)

Definition at line 167 of file defines.h.

#define SwapMetaData (   x)    &x[STORE_META_TLD_START]

Definition at line 171 of file defines.h.

#define SwapMetaSize (   x)    &x[sizeof(char)]

Definition at line 170 of file defines.h.

#define SwapMetaType (   x)    (char)x[0]

Definition at line 169 of file defines.h.

#define TRUE   1

Definition at line 13 of file defines.h.

#define URI_WHITESPACE_ALLOW   1

Definition at line 195 of file defines.h.

Referenced by dump_uri_whitespace(), URL::parse(), parse_uri_whitespace(), and setLogUri().

#define URI_WHITESPACE_CHOP   3

Definition at line 197 of file defines.h.

Referenced by dump_uri_whitespace(), URL::parse(), parse_uri_whitespace(), and setLogUri().

#define URI_WHITESPACE_DENY   4

Definition at line 198 of file defines.h.

Referenced by dump_uri_whitespace(), URL::parse(), parse_uri_whitespace(), and setLogUri().

#define URI_WHITESPACE_ENCODE   2

Definition at line 196 of file defines.h.

Referenced by dump_uri_whitespace(), URL::parse(), parse_uri_whitespace(), and setLogUri().

#define URI_WHITESPACE_STRIP   0

Definition at line 194 of file defines.h.

Referenced by URL::parse(), parse_uri_whitespace(), and setLogUri().

#define USER_IDENT_SZ   64
#define VIEWEXCLUDED   2

Definition at line 138 of file defines.h.

#define VIEWINCLUDED   1

Definition at line 137 of file defines.h.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors