FilledChecklist.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_ACLFILLED_CHECKLIST_H
10#define SQUID_ACLFILLED_CHECKLIST_H
11
12#include "AccessLogEntry.h"
13#include "acl/Checklist.h"
14#include "acl/forward.h"
15#include "base/CbcPointer.h"
16#include "error/forward.h"
17#include "HttpRequest.h"
18#include "ip/Address.h"
19#if USE_AUTH
20#include "auth/UserRequest.h"
21#endif
22#include "security/CertError.h"
23
24class CachePeer;
25class ConnStateData;
26
32{
34
35public:
37 ACLFilledChecklist(const acl_access *, HttpRequest *, const char *ident = nullptr);
38 ~ACLFilledChecklist() override;
39
41 void setRequest(HttpRequest *);
43 void setIdent(const char *userIdentity);
44
45public:
47 ConnStateData * conn() const;
48
50 int fd() const;
51
53 void setConn(ConnStateData *);
55 void fd(int aDescriptor);
56
57 //int authenticated();
58
59 bool destinationDomainChecked() const;
61 bool sourceDomainChecked() const;
63
64 // ACLChecklist API
65 bool hasRequest() const override { return request != nullptr; }
66 bool hasReply() const override { return reply != nullptr; }
67 bool hasAle() const override { return al != nullptr; }
68 void syncAle(HttpRequest *adaptedRequest, const char *logUri) const override;
69 void verifyAle() const override;
70
71public:
76 char *dst_rdns;
77
80
82#if USE_AUTH
84#endif
85#if SQUID_SNMP
87#endif
88
89 // TODO: RefCount errors; do not ignore them because their "owner" is gone!
95
100
102
104
106
107private:
109 int fd_;
116};
117
119inline
121{
122 // this should always be safe because ACLChecklist is an abstract class
123 // and ACLFilledChecklist is its only [concrete] child
124 return dynamic_cast<ACLFilledChecklist*>(checklist);
125}
126
127#endif /* SQUID_ACLFILLED_CHECKLIST_H */
128
ACLFilledChecklist * Filled(ACLChecklist *checklist)
convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
#define acl_access
Definition: forward.h:45
CBDATA_CLASS(ACLFilledChecklist)
bool destinationDomainChecked() const
void setIdent(const char *userIdentity)
configure rfc931 user identity for the first time
ConnStateData * conn_
ConnStateData * conn() const
The client connection manager.
Ip::Address dst_addr
void setRequest(HttpRequest *)
configure client request-related fields for the first time
~ACLFilledChecklist() override
ACLFilledChecklist(const ACLFilledChecklist &)
not implemented; will cause link failures if used
void setConn(ConnStateData *)
set either conn
Security::CertPointer serverCert
int fd() const
The client side fd. It uses conn() if available.
char rfc931[USER_IDENT_SZ]
Ip::Address src_addr
ACLFilledChecklist & operator=(const ACLFilledChecklist &)
not implemented; will cause link failures if used
void verifyAle() const override
warns if there are uninitialized ALE components and fills them
CbcPointer< Security::CertErrors > sslErrors
void markDestinationDomainChecked()
bool hasAle() const override
bool sourceDomainChecked() const
AccessLogEntry::Pointer al
info for the future access.log, and external ACL
Auth::UserRequest::Pointer auth_user_request
bool hasRequest() const override
ExternalACLEntryPointer extacl_entry
void syncAle(HttpRequest *adaptedRequest, const char *logUri) const override
assigns uninitialized adapted_request and url ALE components
HttpRequest::Pointer request
bool hasReply() const override
Definition: SBuf.h:94
#define USER_IDENT_SZ
Definition: defines.h:37
err_type
Definition: forward.h:14

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors