#include "squid.h"
#include "acl/Acl.h"
#include "acl/Asn.h"
#include "acl/Checklist.h"
#include "acl/DestinationAsn.h"
#include "acl/DestinationIp.h"
#include "acl/SourceAsn.h"
#include "acl/Strategised.h"
#include "FwdState.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "ipcache.h"
#include "MasterXaction.h"
#include "mgr/Registration.h"
#include "radix.h"
#include "RequestFlags.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 |
Macros | |
#define | AS_REQBUF_SZ 4096 |
Functions | |
CBDATA_CLASS_INIT (ASState) | |
static int | asnAddNet (char *, 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 |
Macro Definition Documentation
◆ AS_REQBUF_SZ
Function Documentation
◆ asHandleReply()
|
static |
Definition at line 266 of file Asn.cc.
References ASState::as_number, AS_REQBUF_SZ, asHandleReply, asnAddNet(), assert, MemObject::baseReply(), StoreIOBuffer::data, ASState::dataRead, DBG_IMPORTANT, debugs, EBIT_TEST, ASState::entry, ENTRY_ABORTED, StoreIOBuffer::error, StoreEntry::flags, StoreIOBuffer::flags, StoreIOBuffer::length, StoreEntry::mem(), ASState::offset, StoreIOBuffer::offset, ASState::reqbuf, ASState::reqofs, ASState::sc, Http::scOkay, HttpReply::sline, Http::StatusLine::status(), STORE_PENDING, StoreEntry::store_status, storeClientCopy(), StoreEntry::url(), and xisspace.
◆ asnAclInitialize()
void asnAclInitialize | ( | ACL * | acls | ) |
◆ asnAddNet()
add a network (addr, mask) to the radix tree, with matching AS number
Definition at line 378 of file Asn.cc.
References m_ADDR::addr, Ip::Address::applyMask(), as_info::as_number, AS_tree_head, assert, debugs, rtentry_t::e_addr, rtentry_t::e_info, rtentry_t::e_mask, rtentry_t::e_nodes, CbDataList< C >::find(), CbDataList< C >::next, Ip::Address::setNoAddr(), squid_rn_addroute(), squid_rn_lookup(), squid_rn_match(), xcalloc(), xfree, and xmalloc.
Referenced by asHandleReply().
◆ asnCacheStart()
|
static |
Definition at line 227 of file Asn.cc.
References AnyP::Uri::absolute(), SBuf::appendf(), ASState::as_number, AS_REQBUF_SZ, SquidConfig::as_whois_server, asHandleReply, SBuf::c_str(), Config, debugs, AnyP::Uri::defaultPort(), ASState::entry, FwdState::fwdStart(), RefCount< C >::getRaw(), AnyP::Uri::host(), HttpRequest::method, Http::METHOD_GET, ASState::offset, AnyP::Uri::path(), AnyP::PROTO_WHOIS, ASState::reqbuf, 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 132 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 184 of file Asn.cc.
References asnStats, and Mgr::RegisterAction().
Referenced by asnInit().
◆ asnStats()
|
static |
Definition at line 218 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 459 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 480 of file Asn.cc.
References as_info::as_number, and CbDataList< C >::next.
Referenced by destroyRadixNode().
◆ printRadixNode()
|
static |
Definition at line 493 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 51 of file Asn.cc.
Referenced by asnAddNet(), asnFreeMemory(), asnInit(), asnMatchIp(), and asnStats().
◆ asHandleReply
|
static |
Definition at line 110 of file Asn.cc.
Referenced by asHandleReply(), and asnCacheStart().
◆ asnStats
|
static |
Definition at line 127 of file Asn.cc.
Referenced by asnRegisterWithCacheManager().
◆ squid_max_keylen
SQUIDCEXTERN int squid_max_keylen |