PortCfg.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_SRC_ANYP_PORTCFG_H
10 #define SQUID_SRC_ANYP_PORTCFG_H
11 
12 #include "anyp/forward.h"
13 #include "anyp/ProtocolVersion.h"
14 #include "anyp/TrafficMode.h"
15 #include "base/CodeContext.h"
16 #include "comm/Connection.h"
17 #include "comm/Tcp.h"
18 #include "security/ServerOptions.h"
19 
20 namespace AnyP
21 {
22 
23 class PortCfg : public CodeContext
24 {
25 public:
26  PortCfg();
27  // no public copying/moving but see ipV4clone()
28  PortCfg(PortCfg &&) = delete;
29  ~PortCfg() override;
30 
32  PortCfg *ipV4clone() const;
33 
34  /* CodeContext API */
35  ScopedId codeContextGist() const override;
36  std::ostream &detailCodeContext(std::ostream &os) const override;
37 
39 
42  char *name; /* visible name */
43  char *defaultsite; /* default web site */
44 
46 
47  bool allow_direct;
48  bool vhost;
49  bool actAsOrigin;
50  bool ignore_cc;
51 
53 
55 
56  int vport;
58  bool workerQueues;
59 
61 
68 
71 
72 private:
73  explicit PortCfg(const PortCfg &other); // for ipV4clone() needs only!
74 };
75 
76 } // namespace AnyP
77 
80 
83 
84 #if !defined(MAXTCPLISTENPORTS)
85 // Max number of TCP listening ports
86 #define MAXTCPLISTENPORTS 128
87 #endif
88 
89 // TODO: kill this global array. Need to check performance of array vs list though.
90 extern int NHttpSockets;
91 extern int HttpSockets[MAXTCPLISTENPORTS];
92 
93 #endif /* SQUID_SRC_ANYP_PORTCFG_H */
94 
~PortCfg() override
Definition: PortCfg.cc:48
Security::ServerOptions secure
TLS configuration options for this listening port.
Definition: PortCfg.h:70
ScopedId codeContextGist() const override
Definition: PortCfg.cc:95
int HttpSockets[MAXTCPLISTENPORTS]
Definition: PortCfg.cc:26
int vport
virtual port support. -1 if dynamic, >0 static
Definition: PortCfg.h:56
bool connection_auth_disabled
Don't support connection oriented auth.
Definition: PortCfg.h:52
bool ignore_cc
Ignore request Cache-Control directives.
Definition: PortCfg.h:50
char * name
Definition: PortCfg.h:42
int disable_pmtu_discovery
Definition: PortCfg.h:57
std::ostream & detailCodeContext(std::ostream &os) const override
appends human-friendly context description line(s) to a cache.log record
Definition: PortCfg.cc:103
AnyP::PortCfgPointer HttpPortList
list of Squid http(s)_port configured
Definition: PortCfg.cc:22
bool actAsOrigin
update replies to conform with RFC 2616
Definition: PortCfg.h:49
Ip::Address s
Definition: PortCfg.h:40
bool workerQueues
whether listening queues should be worker-specific
Definition: PortCfg.h:58
bool allow_direct
Allow direct forwarding in accelerator mode.
Definition: PortCfg.h:47
Definition: forward.h:14
Configuration settings for the TCP keep-alive feature.
Definition: Tcp.h:16
Comm::TcpKeepAlive tcp_keepalive
Definition: PortCfg.h:60
PortCfg * ipV4clone() const
creates the same port configuration but listening on any IPv4 address
Definition: PortCfg.cc:85
AnyP::ProtocolVersion transport
transport protocol and version received by this port
Definition: PortCfg.h:41
char * defaultsite
Definition: PortCfg.h:43
AnyP::PortCfgPointer FtpPortList
list of Squid ftp_port configured
Definition: PortCfg.cc:23
TLS squid.conf settings for a listening port.
Definition: ServerOptions.h:25
bool vhost
uses host header
Definition: PortCfg.h:48
Comm::ConnectionPointer listenConn
Definition: PortCfg.h:67
PortCfgPointer next
Definition: PortCfg.h:38
int NHttpSockets
Definition: PortCfg.cc:25
#define MAXTCPLISTENPORTS
Definition: PortCfg.h:86
bool ftp_track_dirs
whether transactions should track FTP directories
Definition: PortCfg.h:54
TrafficMode flags
flags indicating what type of traffic to expect via this port.
Definition: PortCfg.h:45

 

Introduction

Documentation

Support

Miscellaneous