Ip::Qos Namespace Reference

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 getNfmarkFromConnection (const Comm::ConnectionPointer &conn, const ConnectionDirection connDir)
 
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)
 
void getTosFromServer (fde *, const int)
 
void getNfmarkFromServer (const fde *, const fde *, const int)
 
tos_t doTosLocalMiss (const int, const hier_code) STUB_RETVAL(-1) int doNfmarkLocalMiss(const int
 
tos_t const hier_code STUB_RETVAL (-1) int doTosLocalHit(const int) STUB_RETVAL(-1) int doNfmarkLocalHit(const int) STUB_RETVAL(-1) void parseConfigLine() STUB void dumpConfigLine(char *
 

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

Enumerator
dirAccepted 

accepted (from a client by Squid)

dirOpened 

opened (by Squid to an origin server or peer)

Definition at line 65 of file QosConfig.h.

Function Documentation

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
connDescriptor of socket to set the mark for

Definition at line 202 of file QosConfig.cc.

References debugs, setSockNfmark(), and TheConfig.

Referenced by clientReplyContext::doGetMoreData().

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
connDescriptor of socket to set the mark for
hierCodeHier code of request

Definition at line 174 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().

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
connDescriptor of socket to set the TOS for

Definition at line 195 of file QosConfig.cc.

References debugs, setSockTos(), and TheConfig.

Referenced by clientReplyContext::doGetMoreData().

tos_t Ip::Qos::doTosLocalMiss ( const int  ,
const hier_code   
) const
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
connDescriptor of socket to set the TOS for
hierCodeHier code of request

Definition at line 153 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().

nfmark_t Ip::Qos::getNfmarkFromConnection ( const Comm::ConnectionPointer conn,
const ConnectionDirection  connDir 
)

Function to retrieve the netfilter mark value of the connection. Called by FwdState::dispatch if QOS options are enabled or by Comm::TcpAcceptor::acceptOne

Parameters
connPointer to connection to get mark for
connDirSpecifies connection type (incoming or outgoing)

Definition at line 81 of file QosConfig.cc.

References debugs, dirAccepted, Ip::EnableIpv6, Comm::Connection::local, Comm::Connection::remote, and xstrerr().

Referenced by Comm::TcpAcceptor::acceptOne(), and FwdState::dispatch().

void Ip::Qos::getNfmarkFromServer ( const fde ,
const fde ,
const int   
)

Definition at line 25 of file stub_libip.cc.

References STUB.

void Ip::Qos::getTosFromServer ( fde ,
const int   
)

Definition at line 20 of file stub_libip.cc.

References STUB.

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
serverServer side descriptor of connection to get TOS for
clientFdePointer to client side fde instance to set tosFromServer in

Definition at line 41 of file QosConfig.cc.

References buf, cmsghdr::cmsg_len, CMSG_LEN, cmsghdr::cmsg_level, cmsghdr::cmsg_type, DBG_IMPORTANT, debugs, Comm::Connection::fd, len, SQUID_CMSG_DATA, fde::tosFromServer, and xstrerr().

Referenced by FwdState::dispatch().

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
connDescriptor of socket to set the mark for

Definition at line 525 of file QosConfig.cc.

References Comm::Connection::fd, and Comm::Connection::nfmark.

Referenced by Comm::ConnOpener::createFd(), ClientHttpRequest::doCallouts(), doNfmarkLocalHit(), doNfmarkLocalMiss(), Comm::TcpAcceptor::setListen(), and FwdState::syncWithServerConn().

int Ip::Qos::setSockNfmark ( const int  fd,
nfmark_t  mark 
)

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
fdDescriptor of socket to set the mark for

Definition at line 505 of file QosConfig.cc.

References DBG_IMPORTANT, debugs, and xstrerr().

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
connDescriptor of socket to set the TOS for

Definition at line 497 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(), Comm::TcpAcceptor::setListen(), and FwdState::syncWithServerConn().

int Ip::Qos::setSockTos ( const int  fd,
tos_t  tos,
int  type 
)

The low level variant of setSockTos function to set TOS value of packets. Avoid if you can use the Connection-based setSockTos().

Parameters
fdDescriptor of socket to set the TOS for
typeThe socket family, AF_INET or AF_INET6

Definition at line 457 of file QosConfig.cc.

References DBG_IMPORTANT, debugs, and xstrerr().

tos_t const hier_code Ip::Qos::STUB_RETVAL ( 1) const

Variable Documentation

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors