Classes | |
class | Config |
Enumerations | |
enum | ConnectionDirection { dirAccepted, dirOpened } |
Possible Squid roles in connection handling. More... | |
Functions | |
void | getTosFromServer (const Comm::ConnectionPointer &server, fde *clientFde) |
nfmark_t | getNfConnmark (const Comm::ConnectionPointer &conn, const ConnectionDirection connDir) |
bool | setNfConnmark (Comm::ConnectionPointer &conn, const ConnectionDirection connDir, const NfMarkConfig &cm) |
int | doTosLocalMiss (const Comm::ConnectionPointer &conn, const hier_code hierCode) |
int | doNfmarkLocalMiss (const Comm::ConnectionPointer &conn, const hier_code hierCode) |
int | doTosLocalHit (const Comm::ConnectionPointer &conn) |
int | doNfmarkLocalHit (const Comm::ConnectionPointer &conn) |
int | setSockTos (const Comm::ConnectionPointer &conn, tos_t tos) |
int | setSockTos (const int fd, tos_t tos, int type) |
int | setSockNfmark (const Comm::ConnectionPointer &conn, nfmark_t mark) |
int | setSockNfmark (const int fd, nfmark_t mark) |
Variables | |
Config | TheConfig |
Globally available instance of Qos::Config. More... | |
Detailed Description
QOS namespace contains all the QOS functionality: global functions within the namespace and the configuration parameters within a config class.
Enumeration Type Documentation
◆ ConnectionDirection
Enumerator | |
---|---|
dirAccepted | accepted (from a client by Squid) |
dirOpened | opened (by Squid to an origin server or peer) |
Definition at line 70 of file QosConfig.h.
Function Documentation
◆ doNfmarkLocalHit()
int Ip::Qos::doNfmarkLocalHit | ( | const Comm::ConnectionPointer & | conn | ) |
Function to work out and then apply to the socket the appropriate netfilter mark value to set on packets when items have been retrieved from local cache. Called by clientReplyContext::doGetMoreData if QOS is enabled for TOS.
- Parameters
-
conn Descriptor of socket to set the mark for
Definition at line 279 of file QosConfig.cc.
References debugs, setSockNfmark(), and TheConfig.
Referenced by clientReplyContext::doGetMoreData().
◆ doNfmarkLocalMiss()
int Ip::Qos::doNfmarkLocalMiss | ( | const Comm::ConnectionPointer & | conn, |
const hier_code | hierCode | ||
) |
Function to work out and then apply to the socket the appropriate netfilter mark value to set on packets when items have not been retrieved from local cache. Called by clientReplyContext::sendMoreData if QOS is enabled for TOS.
- Parameters
-
conn Descriptor of socket to set the mark for hierCode Hier code of request
Definition at line 251 of file QosConfig.cc.
References debugs, Comm::Connection::fd, fd_table, Ip::Qos::Config::markMiss, Ip::Qos::Config::markMissMask, Ip::Qos::Config::markParentHit, Ip::Qos::Config::markSiblingHit, PARENT_HIT, Ip::Qos::Config::preserveMissMarkMask, setSockNfmark(), SIBLING_HIT, Adaptation::Ecap::TheConfig, and TheConfig.
Referenced by clientReplyContext::sendMoreData().
◆ doTosLocalHit()
int Ip::Qos::doTosLocalHit | ( | const Comm::ConnectionPointer & | conn | ) |
Function to work out and then apply to the socket the appropriate TOS value to set on packets when items have been retrieved from local cache. Called by clientReplyContext::doGetMoreData if QOS is enabled for TOS.
- Parameters
-
conn Descriptor of socket to set the TOS for
Definition at line 272 of file QosConfig.cc.
References debugs, setSockTos(), and TheConfig.
Referenced by clientReplyContext::doGetMoreData().
◆ doTosLocalMiss()
int Ip::Qos::doTosLocalMiss | ( | const Comm::ConnectionPointer & | conn, |
const hier_code | hierCode | ||
) |
Function to work out and then apply to the socket the appropriate TOS value to set on packets when items have not been retrieved from local cache. Called by clientReplyContext::sendMoreData if QOS is enabled for TOS.
- Parameters
-
conn Descriptor of socket to set the TOS for hierCode Hier code of request
Definition at line 230 of file QosConfig.cc.
References debugs, Comm::Connection::fd, fd_table, PARENT_HIT, Ip::Qos::Config::preserveMissTosMask, setSockTos(), SIBLING_HIT, Adaptation::Ecap::TheConfig, TheConfig, Ip::Qos::Config::tosMiss, Ip::Qos::Config::tosMissMask, Ip::Qos::Config::tosParentHit, and Ip::Qos::Config::tosSiblingHit.
Referenced by clientReplyContext::sendMoreData().
◆ getNfConnmark()
nfmark_t Ip::Qos::getNfConnmark | ( | const Comm::ConnectionPointer & | conn, |
const ConnectionDirection | connDir | ||
) |
Function to retrieve the netfilter CONNMARK value of the connection. Called by FwdState::dispatch if QOS options are enabled or by Comm::TcpAcceptor::acceptOne
- Parameters
-
conn Pointer to connection to get mark for connDir Specifies connection type (incoming or outgoing)
Definition at line 150 of file QosConfig.cc.
References debugs, dirAccepted, Comm::Connection::local, Comm::Connection::remote, and xstrerr().
Referenced by Comm::TcpAcceptor::acceptInto(), and FwdState::dispatch().
◆ getTosFromServer()
void Ip::Qos::getTosFromServer | ( | const Comm::ConnectionPointer & | server, |
fde * | clientFde | ||
) |
Function to retrieve the TOS value of the inbound packet. Called by FwdState::dispatch if QOS options are enabled. Bug 2537: This part of ZPH only applies to patched Linux kernels
- Parameters
-
server Server side descriptor of connection to get TOS for clientFde Pointer to client side fde instance to set tosFromServer in
Definition at line 47 of file QosConfig.cc.
References cmsghdr::cmsg_len, CMSG_LEN, cmsghdr::cmsg_level, cmsghdr::cmsg_type, DBG_IMPORTANT, debugs, server, SQUID_CMSG_DATA, fde::tosFromServer, and xstrerr().
Referenced by FwdState::dispatch().
◆ setNfConnmark()
bool Ip::Qos::setNfConnmark | ( | Comm::ConnectionPointer & | conn, |
const ConnectionDirection | connDir, | ||
const NfMarkConfig & | cm | ||
) |
Function to set the netfilter CONNMARK value on the connection. Called by ClientHttpRequest::doCallouts.
- Parameters
-
conn Pointer to connection to set mark on connDir Specifies connection type (incoming or outgoing) @cm Netfilter mark configuration (mark and mask)
Referenced by ClientHttpRequest::doCallouts().
◆ setSockNfmark() [1/2]
int Ip::Qos::setSockNfmark | ( | const Comm::ConnectionPointer & | conn, |
nfmark_t | mark | ||
) |
Function to set the netfilter mark value of packets. Sets the value on the socket which then gets copied to the packets. Called from Ip::Qos::doNfmarkLocalMiss
- Parameters
-
conn Descriptor of socket to set the mark for
Definition at line 589 of file QosConfig.cc.
References Comm::Connection::fd, and Comm::Connection::nfmark.
Referenced by Comm::ConnOpener::createFd(), ClientHttpRequest::doCallouts(), doNfmarkLocalHit(), doNfmarkLocalMiss(), and ResetMarkingsToServer().
◆ setSockNfmark() [2/2]
The low level variant of setSockNfmark function to set the netfilter mark value of packets. Avoid if you can use the Connection-based setSockNfmark().
- Parameters
-
fd Descriptor of socket to set the mark for
Definition at line 565 of file QosConfig.cc.
References DBG_IMPORTANT, debugs, and xstrerr().
◆ setSockTos() [1/2]
int Ip::Qos::setSockTos | ( | const Comm::ConnectionPointer & | conn, |
tos_t | tos | ||
) |
Function to set the TOS value of packets. Sets the value on the socket which then gets copied to the packets.
- Parameters
-
conn Descriptor of socket to set the TOS for
Definition at line 557 of file QosConfig.cc.
References Comm::Connection::fd, Ip::Address::isIPv4(), Comm::Connection::remote, and Comm::Connection::tos.
Referenced by Comm::ConnOpener::createFd(), ClientHttpRequest::doCallouts(), doTosLocalHit(), doTosLocalMiss(), and ResetMarkingsToServer().
◆ setSockTos() [2/2]
The low level variant of setSockTos function to set TOS value of packets. Avoid if you can use the Connection-based setSockTos().
- Parameters
-
fd Descriptor of socket to set the TOS for type The socket family, AF_INET or AF_INET6
Definition at line 517 of file QosConfig.cc.
References DBG_IMPORTANT, debugs, and xstrerr().
Variable Documentation
◆ TheConfig
Ip::Qos::Config Ip::Qos::TheConfig |
Definition at line 287 of file QosConfig.cc.
Referenced by FwdState::dispatch(), ClientHttpRequest::doCallouts(), clientReplyContext::doGetMoreData(), doNfmarkLocalHit(), doNfmarkLocalMiss(), doTosLocalHit(), doTosLocalMiss(), GetNfmarkToServer(), GetTosToServer(), restoreCapabilities(), and clientReplyContext::sendMoreData().
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products