TcpAcceptor.cc
Go to the documentation of this file.
41 Comm::TcpAcceptor::TcpAcceptor(const Comm::ConnectionPointer &newConn, const char *, const Subscription::Pointer &aSub) :
49 Comm::TcpAcceptor::TcpAcceptor(const AnyP::PortCfgPointer &p, const char *, const Subscription::Pointer &aSub) :
156 debugs(50, DBG_CRITICAL, "ERROR: listen(..., " << (Squid_MaxFD >> 2) << ") system call failed: " << xstrerr(errcode));
164 debugs(5, DBG_IMPORTANT, "Installing accept filter '" << Config.accept_filter << "' on " << conn);
168 debugs(5, DBG_CRITICAL, "WARNING: SO_ACCEPTFILTER '" << Config.accept_filter << "': '" << xstrerr(xerrno));
176 debugs(5, DBG_CRITICAL, "WARNING: TCP_DEFER_ACCEPT '" << Config.accept_filter << "': '" << xstrerr(xerrno));
314 Comm::TcpAcceptor::notify(const Comm::Flag flag, const Comm::ConnectionPointer &newConnDetails) const
364 debugs(50, DBG_IMPORTANT, "ERROR: failed to accept an incoming connection: " << xstrerr(errcode));
386 debugs(50, DBG_IMPORTANT, "ERROR: getsockname() failed to locate local-IP on " << details << ": " << xstrerr(xerrno));
394 if (conn->flags&(COMM_TRANSPARENT|COMM_INTERCEPTION) && !Ip::Interceptor.Lookup(details, conn)) {
395 debugs(50, DBG_IMPORTANT, "ERROR: NAT/TPROXY lookup failed to locate original IPs on " << details);
413 debugs(50, DBG_IMPORTANT, "WARNING: " << details->remote << " attempting more than " << Config.client_ip_max_connections << " connections.");
struct StatCounters::@135::@140 sock
Definition: AsyncJob.h:32
AsyncCall::Pointer comm_add_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:921
Definition: FilledChecklist.h:33
int incoming_sockets_accepted
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
Definition: CommCalls.h:98
Definition: getnameinfo.cc:127
void enterOrphanage()
close the still-open connection when its last reference is gone
Definition: Connection.h:88
struct StatCounters::@135 syscalls
AnyP::PortCfgPointer port
the configuration listening port this call relates to (may be nil)
Definition: CommCalls.h:105
void handleClosure(const CommCloseCbParams &io)
Definition: TcpAcceptor.cc:191
void setVirginUrlForMissingRequest(const SBuf &vu)
Remember Client URI (or equivalent) when there is no HttpRequest.
Definition: AccessLogEntry.h:258
int clientdbEstablished(const Ip::Address &addr, int delta)
Definition: client_db.cc:182
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
Definition: AcceptLimiter.h:17
Definition: opensolaris_10_netdb.h:121
AccessLogEntry::Pointer al
info for the future access.log, and external ACL
Definition: FilledChecklist.h:101
void accessLogLog(const AccessLogEntryPointer &, ACLChecklist *)
Definition: access_log.cc:147
Definition: AccessLogEntry.h:41
Comm::Flag oldAccept(Comm::ConnectionPointer &details)
Definition: TcpAcceptor.cc:344
char * toStr(char *buf, const unsigned int blen, int force=AF_UNSPEC) const
Definition: Address.cc:792
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Definition: forward.h:25
static void Reset()
forgets the current context, setting it to nil/unknown
Definition: CodeContext.cc:75
TcpAcceptor(const TcpAcceptor &)
virtual const char * status() const
internal cleanup; do not call directly
Definition: TcpAcceptor.cc:124
Definition: MemBuf.h:24
Comm::ConnectionPointer tcpClient
TCP/IP level details about the client connection.
Definition: AccessLogEntry.h:83
void ApplyTcpKeepAlive(int fd, const TcpKeepAlive &)
apply configured TCP keep-alive settings to the given FD socket
Definition: Tcp.cc:53
Definition: CommCalls.h:181
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
Definition: AsyncJobCalls.h:69
Definition: TcpAcceptor.h:39
void notify(const Comm::Flag flag, const Comm::ConnectionPointer &details) const
Call the subscribed callback handler with details about a new connection.
Definition: TcpAcceptor.cc:314
bool Lookup(const Comm::ConnectionPointer &newConn, const Comm::ConnectionPointer &listenConn)
Definition: Intercept.cc:380
void setEmpty()
Fast reset of the stored content to what would be after default constructor.
Definition: Address.cc:184
int Squid_MaxFD
CBDATA_NAMESPACED_CLASS_INIT(Comm, TcpAcceptor)
virtual const char * status() const
internal cleanup; do not call directly
Definition: AsyncJob.cc:167
void defer(const TcpAcceptor::Pointer &afd)
Definition: AcceptLimiter.cc:25
static void doAccept(int fd, void *data)
Method callback for whenever an FD is ready to accept a client connection.
Definition: TcpAcceptor.cc:211
nfmark_t getNfConnmark(const Comm::ConnectionPointer &conn, const ConnectionDirection connDir)
Definition: QosConfig.cc:146
void SetSelect(int, unsigned int, PF *, void *, time_t)
Mark an FD to be watched for its IO status.
Definition: ModDevPoll.cc:223
int RESERVED_FD
Definition: CommCalls.h:133
void removeDead(const TcpAcceptor::Pointer &afd)
Definition: AcceptLimiter.cc:32
void logAcceptError(const ConnectionPointer &tcpClient) const
Definition: TcpAcceptor.cc:249
void subscribe(const Subscription::Pointer &aSub)
Definition: TcpAcceptor.cc:58
void comm_remove_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:950