#include "base/AsyncCall.h"
#include "base/InstanceId.h"
#include "cbdata.h"
#include "comm/forward.h"
#include "dlink.h"
#include "helper/ChildConfig.h"
#include "helper/forward.h"
#include "helper/Reply.h"
#include "helper/Request.h"
#include "helper/ReservationId.h"
#include "ip/Address.h"
#include "sbuf/SBuf.h"
#include <list>
#include <map>
#include <queue>
#include <unordered_map>


Go to the source code of this file.
Classes | |
class | Helper::Xaction |
Holds the required data to serve a helper request. More... | |
class | helper |
struct | helper::_stats |
class | statefulhelper |
class | HelperServerBase |
represents a single helper process abstraction More... | |
struct | HelperServerBase::_helper_flags |
class | helper_server |
represents a single "stateless helper" process More... | |
class | helper_stateful_server |
represents a single "stateful helper" process More... | |
Namespaces | |
namespace | Helper |
helper protocol primitives | |
Functions | |
void | helperOpenServers (helper *hlp) |
void | helperStatefulOpenServers (statefulhelper *hlp) |
void | helperSubmit (helper *hlp, const char *buf, HLPCB *callback, void *data) |
void | helperStatefulSubmit (statefulhelper *hlp, const char *buf, HLPCB *callback, void *data, uint64_t reservation) |
void | helperShutdown (helper *hlp) |
void | helperStatefulShutdown (statefulhelper *hlp) |
Function Documentation
◆ helperOpenServers()
void helperOpenServers | ( | helper * | hlp | ) |
Definition at line 201 of file helper.cc.
References helper::addr, HelperServerBase::addr, assert, asyncCall(), cbdataDialer(), cbdataReference, helper::childs, helper::cmdline, comm_add_close_handler(), comm_read(), commCbCall(), commSetConnTimeout(), commSetNonBlocking(), Helper::ChildConfig::concurrency, DBG_IMPORTANT, debugs, dlinkAddTail(), Comm::Connection::fd, FD_DESC_SZ, fd_note(), getCurrentTime(), HELPER_MAX_ARGS, helperHandleRead, helperKickQueue(), helper_server::HelperServerClosed(), HelperServerBase::hIpc, hIpc, helper_server::ignoreToEom, Important, HelperServerBase::initStats(), helper::ipc_type, ipcCreate(), wordlist::key, helper::last_restart, HelperServerBase::link, memAllocBuf(), Helper::ChildConfig::n_active, Helper::ChildConfig::n_max, Helper::ChildConfig::n_running, Helper::ChildConfig::needNew(), wordlist::next, helper_server::nextRequestId, helper_server::parent, HelperServerBase::pid, pid, progname, HelperServerBase::rbuf, HelperServerBase::rbuf_sz, ReadBufSize(), HelperServerBase::readPipe, helper_server::replyXaction, helper_server::requestTimeout(), HelperServerBase::roffset, safe_free, helper::servers, squid_curtime, helper::timeout, helper_server::wqueue, HelperServerBase::writePipe, xmalloc, and xstrdup.
Referenced by Enqueue(), externalAclInit(), helper_server::HelperServerClosed(), Ssl::Helper::Init(), Ssl::CertValidationHelper::Init(), and redirectInit().
◆ helperShutdown()
void helperShutdown | ( | helper * | hlp | ) |
Definition at line 740 of file helper.cc.
References assert, helper::childs, HelperServerBase::closePipesSafely(), HelperServerBase::_helper_flags::closing, dlink_node::data, debugs, HelperServerBase::flags, dlink_list::head, helper::id_name, HelperServerBase::index, Helper::ChildConfig::n_active, dlink_node::next, HelperServerBase::pending, helper::servers, HelperServerBase::_helper_flags::shutdown, and HelperServerBase::stats.
Referenced by external_acl::~external_acl(), externalAclShutdown(), redirectShutdown(), Ssl::Helper::Shutdown(), and Ssl::CertValidationHelper::Shutdown().
◆ helperStatefulOpenServers()
void helperStatefulOpenServers | ( | statefulhelper * | hlp | ) |
DPW 2007-05-08
helperStatefulOpenServers: create the stateful child helper processes
Definition at line 332 of file helper.cc.
References helper::addr, HelperServerBase::addr, assert, asyncCall(), cbdataDialer(), cbdataReference, helper::childs, helper::cmdline, comm_add_close_handler(), comm_read(), commCbCall(), commSetNonBlocking(), Helper::ChildConfig::concurrency, DBG_CRITICAL, DBG_IMPORTANT, debugs, dlinkAddTail(), Comm::Connection::fd, FD_DESC_SZ, fd_note(), getCurrentTime(), HELPER_MAX_ARGS, helper_stateful_server::HelperServerClosed(), helperStatefulHandleRead, helperStatefulKickQueue(), HelperServerBase::hIpc, hIpc, HelperServerBase::initStats(), helper::ipc_type, ipcCreate(), wordlist::key, helper::last_restart, HelperServerBase::link, memAllocBuf(), Helper::ChildConfig::n_active, Helper::ChildConfig::n_max, Helper::ChildConfig::n_running, Helper::ChildConfig::needNew(), wordlist::next, helper_stateful_server::parent, HelperServerBase::pid, pid, progname, HelperServerBase::rbuf, HelperServerBase::rbuf_sz, ReadBufSize(), HelperServerBase::readPipe, helper_stateful_server::reservationStart, HelperServerBase::roffset, safe_free, helper::servers, squid_curtime, HelperServerBase::writePipe, xmalloc, and xstrdup.
Referenced by helper_stateful_server::HelperServerClosed(), and StatefulEnqueue().
◆ helperStatefulShutdown()
void helperStatefulShutdown | ( | statefulhelper * | hlp | ) |
Definition at line 777 of file helper.cc.
References assert, helper::childs, HelperServerBase::closePipesSafely(), HelperServerBase::_helper_flags::closing, dlink_node::data, debugs, HelperServerBase::flags, dlink_list::head, helper::id_name, HelperServerBase::index, Helper::ChildConfig::n_active, dlink_node::next, HelperServerBase::pending, helper_stateful_server::reserved(), helper::servers, HelperServerBase::_helper_flags::shutdown, shutting_down, and HelperServerBase::stats.
◆ helperStatefulSubmit()
void helperStatefulSubmit | ( | statefulhelper * | hlp, |
const char * | buf, | ||
HLPCB * | callback, | ||
void * | data, | ||
uint64_t | reservation | ||
) |
◆ helperSubmit()
Definition at line 133 of file helper.cc.
References Helper::Request::callback, Helper::Xaction::reply, Helper::Xaction::request, Helper::Reply::result, and Helper::Unknown.
Referenced by constructHelperQuery().