Transport.cc File Reference
#include "squid.h"
#include "ip/Address.h"
#include "ip/tools.h"
#include "tools/squidclient/Ping.h"
#include "tools/squidclient/Transport.h"
#include <iostream>
Include dependency graph for Transport.cc:

Go to the source code of this file.

Functions

static int client_comm_bind (int sock, const Ip::Address &addr)
 Set up the source socket address from which to send. More...
 
static void resolveDestination (Ip::Address &iaddr)
 
static int client_comm_connect (int sock, const Ip::Address &addr)
 Set up the destination socket address for message to send to. More...
 
static int verifyByCA (gnutls_session_t session)
 
static int verifyTlsCertificate (gnutls_session_t session)
 
static void gnutlsDebugHandler (int level, const char *msg)
 
static bool doTlsHandshake (const char *type)
 
static bool loadTlsParameters ()
 
static bool tryTlsAnonymous ()
 
static bool tryTlsCertificate (const char *hostname)
 

Variables

int conn = -1
 the current server connection FD More...
 

Function Documentation

◆ client_comm_bind()

static int client_comm_bind ( int  sock,
const Ip::Address addr 
)
static

Definition at line 138 of file Transport.cc.

References Ip::Address::FreeAddr(), and Ip::Address::getAddrInfo().

Referenced by resolveDestination().

◆ client_comm_connect()

static int client_comm_connect ( int  sock,
const Ip::Address addr 
)
static

Definition at line 203 of file Transport.cc.

References Ip::Address::FreeAddr(), Ip::Address::getAddrInfo(), and Ping::TimerStart().

Referenced by Transport::Connect().

◆ doTlsHandshake()

static bool doTlsHandshake ( const char *  type)
static

Definition at line 403 of file Transport.cc.

References Transport::Config, conn, and debugVerbose.

Referenced by tryTlsAnonymous(), and tryTlsCertificate().

◆ gnutlsDebugHandler()

static void gnutlsDebugHandler ( int  level,
const char *  msg 
)
static

Definition at line 346 of file Transport.cc.

References debugVerbose.

Referenced by Transport::InitTls().

◆ loadTlsParameters()

static bool loadTlsParameters ( )
static

Definition at line 432 of file Transport.cc.

References Transport::Config.

Referenced by tryTlsAnonymous(), and tryTlsCertificate().

◆ resolveDestination()

◆ tryTlsAnonymous()

static bool tryTlsAnonymous ( )
static

Definition at line 449 of file Transport.cc.

References Transport::Config, doTlsHandshake(), and loadTlsParameters().

Referenced by Transport::MaybeStartTls().

◆ tryTlsCertificate()

static bool tryTlsCertificate ( const char *  hostname)
static

Definition at line 468 of file Transport.cc.

References Transport::Config, conn, doTlsHandshake(), and loadTlsParameters().

Referenced by Transport::MaybeStartTls().

◆ verifyByCA()

static int verifyByCA ( gnutls_session_t  session)
static

Definition at line 296 of file Transport.cc.

Referenced by verifyTlsCertificate().

◆ verifyTlsCertificate()

static int verifyTlsCertificate ( gnutls_session_t  session)
static

Definition at line 328 of file Transport.cc.

References verifyByCA().

Referenced by Transport::InitTls().

Variable Documentation

◆ conn

int conn = -1

Definition at line 26 of file Transport.cc.

Referenced by Mgr::ActionWriter::ActionWriter(), Mgr::Filler::Filler(), Mgr::Request::Request(), Ident::IdentStateData::~IdentStateData(), Comm::TcpAcceptor::acceptInto(), Comm::TcpAcceptor::acceptNext(), Comm::TcpAcceptor::acceptOne(), AddOpenedHttpSocket(), FwdState::advanceDestination(), TunnelStateData::advanceDestination(), Format::Format::assemble(), Auth::UserRequest::authenticate(), authenticateAuthenticateUser(), authTryGetUser(), clientReplyContext::buildReplyHeader(), buildUrlFromHost(), Security::PeerConnector::callBack(), IdentLookup::checkForAsync(), checkTimeouts(), Mgr::Inquirer::cleanup(), Snmp::Inquirer::cleanup(), Ftp::Channel::clear(), IdleConnList::clearHandlers(), Ipc::UdsOp::clearTimeout(), clientAclChecklistFill(), clientBuildError(), clientFollowXForwardedForCheck(), clientIdentDone(), clientNegotiateSSL(), clientProcessRequest(), clientProcessRequestFinished(), ClientSocketContextPushDeferredIfNeeded(), Ftp::Channel::close(), Transport::CloseConnection(), IdleConnList::closeN(), FwdState::closePendingConnection(), TunnelStateData::closePendingConnection(), comm_import_opened(), comm_init_opened(), comm_open_listener(), comm_openex(), comm_read(), comm_read_base(), comm_reset_close(), commHalfClosedReader(), TunnelStateData::commitToServer(), commSetConnTimeout(), commUnsetConnTimeout(), Transport::Connect(), Ftp::Client::connectDataChannel(), TunnelStateData::connectDone(), Log::TcpLogger::connectDone(), TunnelStateData::connectedToPeer(), FwdState::connectingTimeout(), ResolvedPeers::ConnectionFamily(), TunnelStateData::connectToPeer(), Ftp::Server::createDataConnection(), CreateSession(), Log::TcpLogger::delayedReconnect(), Log::TcpLogger::disconnect(), Adaptation::Icap::Xaction::dnsLookupDone(), Log::TcpLogger::doConnect(), clientReplyContext::doGetMoreData(), Ipc::Port::doListen(), Comm::TcpAcceptor::doneAll(), Log::TcpLogger::doneAll(), Ip::Qos::doNfmarkLocalHit(), Ip::Qos::doNfmarkLocalMiss(), doTlsHandshake(), Ip::Qos::doTosLocalHit(), Ip::Qos::doTosLocalMiss(), TunnelStateData::Connection::error(), errorSend(), errorSendComplete(), FwdState::establishTunnelThruProxy(), TunnelStateData::establishTunnelThruProxy(), PeerConnectionPointer::finalize(), IdleConnList::findAndClose(), FindGoodListeningPortAddressInConn(), IdleConnList::findIndexOf(), Comm::IoCallback::finish(), Http::Stream::finished(), Ftp::Channel::forget(), HappyConnOpener::futureAnswer(), GetMarkingsToServer(), Ip::Qos::getNfConnmark(), GetNfmarkToServer(), getOutgoingAddress(), GetTosToServer(), Comm::TcpAcceptor::handleClosure(), Log::TcpLogger::handleClosure(), Mgr::Forwarder::handleException(), helperHandleRead(), helperStatefulHandleRead(), htcpIncomingConnectionOpened(), httpsCreate(), icpIncomingConnectionOpened(), idnsInitVC(), idnsInitVCConnected(), idnsReadVC(), idnsReadVCHeader(), idnsSentQueryVC(), Ipc::ImportFdIntoComm(), TunnelStateData::Connection::initConnection(), IdleConnList::isAvailable(), Comm::IsConnOpen(), Ftp::Gateway::listenForDataChannel(), Ftp::Server::listenForDataConnection(), main(), Acl::AnnotateClientCheck::match(), Acl::ServerNameCheck::match(), Acl::ConnMark::match(), ACLDestinationIP::match(), TunnelStateData::Connection::noteClosure(), Mgr::Forwarder::noteCommClosed(), Mgr::Inquirer::noteCommClosed(), Snmp::Inquirer::noteCommClosed(), Adaptation::Icap::ServiceRep::noteConnectionUse(), Ftp::Server::notePeerConnection(), TunnelStateData::notePeerReadyToShovel(), Mgr::Inquirer::noteWroteHeader(), Comm::TcpAcceptor::notify(), Ftp::Channel::opened(), HappyConnOpener::openFreshConnection(), PeerPoolMgr::openNewConnection(), Comm::operator<<(), Mgr::Request::pack(), peerProbeConnect(), peerProbeConnectDone(), prepareAcceleratedURL(), prepareTransparentURL(), clientReplyContext::processExpired(), clientReplyContext::processMiss(), IdleConnList::push(), PconnPool::push(), PeerPoolMgr::pushNewConnection(), Adaptation::Icap::ServiceRep::putConnection(), Comm::Read(), Transport::Read(), WhoisState::readReply(), Mgr::Inquirer::removeCloseHandler(), Comm::IoCallback::reset(), ResetMarkingsToServer(), resolveDestination(), FwdState::secureConnectionToPeer(), TunnelStateData::secureConnectionToPeer(), FwdState::secureConnectionToPeerIfNeeded(), Comm::IoCallback::selectOrQueueWrite(), clientReplyContext::sendMoreData(), Client::sendMoreRequestBody(), Mgr::Inquirer::sendResponse(), Snmp::Inquirer::sendResponse(), HappyConnOpener::sendSuccess(), Comm::TcpAcceptor::setListen(), Ip::Qos::setNfConnmark(), clientReplyContext::setReplyToError(), Ip::Qos::setSockNfmark(), Ip::Qos::setSockTos(), Ipc::UdsOp::setTimeout(), Ipc::SharedListenJoined(), snmpPortOpened(), Comm::TcpAcceptor::start(), Mgr::Inquirer::start(), Snmp::Inquirer::start(), Ident::Start(), statClientRequests(), Comm::TcpAcceptor::status(), FwdState::successfullyConnectedToPeer(), Comm::TcpAcceptor::swanSong(), Mgr::Forwarder::swanSong(), switchToTunnel(), TunnelStateData::syncHierNote(), FwdState::syncWithServerConn(), tryTlsCertificate(), Auth::UserRequest::tryToAuthenticateAndSetAuthUser(), tunnelConnectedWriteDone(), FwdState::unregister(), Adaptation::Icap::Xaction::useIcapConnection(), Adaptation::Icap::Xaction::useTransportConnection(), whoisReadReply(), Ipc::UdsSender::write(), TunnelStateData::Connection::write(), Comm::Write(), Transport::Write(), Log::TcpLogger::writeIfPossible(), and Ipc::UdsSender::wrote().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors