FilledChecklist.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 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 "err_type.h"
17 #include "ip/Address.h"
18 #if USE_AUTH
19 #include "auth/UserRequest.h"
20 #endif
21 #include "security/CertError.h"
22 
23 class CachePeer;
24 class ConnStateData;
25 class HttpRequest;
26 class HttpReply;
27 
33 {
35 
36 public:
38  ACLFilledChecklist(const acl_access *, HttpRequest *, const char *ident = nullptr);
40 
42  void setRequest(HttpRequest *);
44  void setIdent(const char *userIdentity);
45 
46 public:
48  ConnStateData * conn() const;
49 
51  int fd() const;
52 
54  void conn(ConnStateData *);
56  void fd(int aDescriptor);
57 
58  //int authenticated();
59 
60  bool destinationDomainChecked() const;
62  bool sourceDomainChecked() const;
64 
65  // ACLChecklist API
66  virtual bool hasRequest() const { return request != NULL; }
67  virtual bool hasReply() const { return reply != NULL; }
68  virtual bool hasAle() const { return al != NULL; }
69  virtual void syncAle(HttpRequest *adaptedRequest, const char *logUri) const;
70  virtual void verifyAle() const;
71 
72 public:
77  char *dst_rdns;
78 
81 
83 #if USE_AUTH
85 #endif
86 #if SQUID_SNMP
88 #endif
89 
93  Security::CertPointer serverCert;
94 
96 
98 
100 
101 private:
103  int fd_;
110 };
111 
113 inline
115 {
116  // this should always be safe because ACLChecklist is an abstract class
117  // and ACLFilledChecklist is its only [concrete] child
118  return dynamic_cast<ACLFilledChecklist*>(checklist);
119 }
120 
121 #endif /* SQUID_ACLFILLED_CHECKLIST_H */
122 
bool sourceDomainChecked() const
virtual bool hasRequest() const
Ip::Address dst_addr
Definition: SBuf.h:86
ExternalACLEntryPointer extacl_entry
Ip::Address src_addr
ACLFilledChecklist * Filled(ACLChecklist *checklist)
convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
AccessLogEntry::Pointer al
info for the future access.log, and external ACL
ConnStateData * conn() const
The client connection manager.
bool destinationDomainChecked() const
CBDATA_CLASS(ACLFilledChecklist)
void setIdent(const char *userIdentity)
configure rfc931 user identity for the first time
#define USER_IDENT_SZ
Definition: defines.h:60
Security::CertPointer serverCert
The peer certificate.
int fd() const
The client side fd. It uses conn() if available.
char rfc931[USER_IDENT_SZ]
virtual bool hasAle() const
ACLFilledChecklist & operator=(const ACLFilledChecklist &)
not implemented; will cause link failures if used
HttpRequest * request
ConnStateData * conn_
virtual void verifyAle() const
warns if there are uninitialized ALE components and fills them
const Security::CertErrors * sslErrors
SSL [certificate validation] errors, in undefined order.
void setRequest(HttpRequest *)
configure client request-related fields for the first time
void markDestinationDomainChecked()
#define acl_access
Definition: forward.h:44
virtual bool hasReply() const
#define NULL
Definition: types.h:166
Auth::UserRequest::Pointer auth_user_request
virtual void syncAle(HttpRequest *adaptedRequest, const char *logUri) const
assigns uninitialized adapted_request and url ALE components
err_type
Definition: err_type.h:12

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors