#include "squid.h"
#include "acl/Acl.h"
#include "acl/Asn.h"
#include "acl/DestinationAsn.h"
#include "acl/DestinationIp.h"
#include "acl/FilledChecklist.h"
#include "acl/SourceAsn.h"
#include "base/CharacterSet.h"
#include "FwdState.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "ipcache.h"
#include "MasterXaction.h"
#include "mgr/Registration.h"
#include "parser/Tokenizer.h"
#include "radix.h"
#include "RequestFlags.h"
#include "sbuf/SBuf.h"
#include "SquidConfig.h"
#include "Store.h"
#include "StoreClient.h"
Go to the source code of this file.
Classes | |
class | m_ADDR |
struct | as_info |
class | ASState |
struct | rtentry_t |
Functions | |
CBDATA_CLASS_INIT (ASState) | |
static int | asnAddNet (const SBuf &, int) |
static void | asnCacheStart (int as) |
static int | destroyRadixNode (struct squid_radix_node *rn, void *w) |
static int | printRadixNode (struct squid_radix_node *rn, void *sentry) |
void | asnAclInitialize (ACL *acls) |
static void | destroyRadixNodeInfo (as_info *) |
int | asnMatchIp (CbDataList< int > *data, Ip::Address &addr) |
static void | asnRegisterWithCacheManager (void) |
void | asnInit (void) |
void | asnFreeMemory (void) |
static void | asnStats (StoreEntry *sentry) |
static void | asHandleReply (void *data, StoreIOBuffer result) |
Variables | |
struct squid_radix_node_head * | AS_tree_head |
static STCB | asHandleReply |
static OBJH | asnStats |
SQUIDCEXTERN int | squid_max_keylen |
Function Documentation
◆ asHandleReply()
|
static |
Definition at line 261 of file Asn.cc.
References Store::ParsingBuffer::appended(), ASState::as_number, asHandleReply, asnAddNet(), Assure, store_client::atEof(), MemObject::baseReply(), Store::ParsingBuffer::consume(), Store::ParsingBuffer::content(), Store::ParsingBuffer::contentSize(), StoreIOBuffer::data, DBG_IMPORTANT, debugs, EBIT_TEST, ASState::entry, ENTRY_ABORTED, StoreIOBuffer::error, StoreEntry::flags, StoreIOBuffer::flags, StoreIOBuffer::length, StoreEntry::mem(), StoreIOBuffer::offset, ASState::parsingBuffer, StoreIOBuffer::positionAt(), ASState::sc, Http::scOkay, HttpReply::sline, Store::ParsingBuffer::space(), Http::StatusLine::status(), storeClientCopy(), and tok::token.
◆ asnAclInitialize()
void asnAclInitialize | ( | ACL * | acls | ) |
◆ asnAddNet()
add a network (addr, mask) to the radix tree, with matching AS number
Definition at line 331 of file Asn.cc.
References m_ADDR::addr, Ip::Address::applyMask(), as_info::as_number, AS_tree_head, assert, SBuf::c_str(), CharacterSet::complement(), debugs, rtentry_t::e_addr, rtentry_t::e_info, rtentry_t::e_mask, rtentry_t::e_nodes, CbDataList< C >::find(), SBuf::find(), CbDataList< C >::next, SBuf::npos, Ip::Address::setNoAddr(), squid_rn_addroute(), squid_rn_lookup(), squid_rn_match(), xcalloc(), xfree, and xmalloc.
Referenced by asHandleReply().
◆ asnCacheStart()
|
static |
Definition at line 223 of file Asn.cc.
References AnyP::Uri::absolute(), SBuf::appendf(), ASState::as_number, SquidConfig::as_whois_server, asHandleReply, SBuf::c_str(), Config, debugs, AnyP::Uri::defaultPort(), ASState::entry, FwdState::fwdStart(), RefCount< C >::getRaw(), AnyP::Uri::host(), Store::ParsingBuffer::makeInitialSpace(), HttpRequest::method, Http::METHOD_GET, ASState::parsingBuffer, AnyP::Uri::path(), AnyP::PROTO_WHOIS, ASState::request, ASState::sc, storeClientCopy(), storeClientListAdd(), storeCreateEntry(), storeGetPublic(), HttpRequest::url, xfree, and xstrdup.
Referenced by ACLASN::prepareForUse().
◆ asnMatchIp()
int asnMatchIp | ( | CbDataList< int > * | data, |
Ip::Address & | addr | ||
) |
Definition at line 128 of file Asn.cc.
References m_ADDR::addr, as_info::as_number, AS_tree_head, assert, debugs, CbDataList< C >::element, Ip::Address::isAnyAddr(), Ip::Address::isNoAddr(), CbDataList< C >::next, and squid_rn_match().
Referenced by ACLASN::match().
◆ asnRegisterWithCacheManager()
|
static |
Definition at line 180 of file Asn.cc.
References asnStats, and Mgr::RegisterAction().
Referenced by asnInit().
◆ asnStats()
|
static |
Definition at line 214 of file Asn.cc.
References AS_tree_head, printRadixNode(), squid_rn_walktree(), and storeAppendPrintf().
◆ CBDATA_CLASS_INIT()
CBDATA_CLASS_INIT | ( | ASState | ) |
◆ destroyRadixNode()
|
static |
Definition at line 405 of file Asn.cc.
References debugs, destroyRadixNodeInfo(), rtentry_t::e_info, squid_radix_node::rn_flags, RNF_ROOT, squid_rn_delete(), and xfree.
Referenced by asnFreeMemory().
◆ destroyRadixNodeInfo()
|
static |
Definition at line 426 of file Asn.cc.
References as_info::as_number, and CbDataList< C >::next.
Referenced by destroyRadixNode().
◆ printRadixNode()
|
static |
Definition at line 439 of file Asn.cc.
References m_ADDR::addr, as_info::as_number, assert, Ip::Address::cidr(), rtentry_t::e_addr, rtentry_t::e_info, rtentry_t::e_mask, CbDataList< C >::element, MAX_IPSTRLEN, CbDataList< C >::next, storeAppendPrintf(), and Ip::Address::toStr().
Referenced by asnStats().
Variable Documentation
◆ AS_tree_head
struct squid_radix_node_head* AS_tree_head |
Definition at line 49 of file Asn.cc.
Referenced by asnAddNet(), asnFreeMemory(), asnInit(), asnMatchIp(), and asnStats().
◆ asHandleReply
|
static |
Definition at line 106 of file Asn.cc.
Referenced by asHandleReply(), and asnCacheStart().
◆ asnStats
|
static |
Definition at line 123 of file Asn.cc.
Referenced by asnRegisterWithCacheManager().
◆ squid_max_keylen
SQUIDCEXTERN int squid_max_keylen |