ConnMark.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_ACLCONNMARK_H
10 #define SQUID_ACLCONNMARK_H
11 
12 #include "acl/Acl.h"
13 #include "ip/forward.h"
14 #include "parser/Tokenizer.h"
15 
16 #include <vector>
17 
18 namespace Acl {
19 
20 class ConnMark : public ACL
21 {
23 
24 public:
25  /* ACL API */
26  virtual char const *typeString() const override;
27  virtual void parse() override;
28  virtual int match(ACLChecklist *checklist) override;
29  virtual SBufList dump() const override;
30  virtual bool empty() const override;
31 
33  typedef std::pair<nfmark_t, nfmark_t> ConnMarkQuery;
34 
35 private:
36  nfmark_t getNumber(Parser::Tokenizer &tokenizer, const SBuf &token) const;
37  std::vector<ConnMarkQuery> marks;
38 };
39 
40 } // namespace Acl
41 
42 #endif /* SQUID_ACLCONNMARK_H */
43 
MEMPROXY_CLASS(ConnMark)
virtual void parse() override
parses node represenation in squid.conf; dies on failures
Definition: ConnMark.cc:50
Definition: SBuf.h:87
Definition: Acl.h:39
virtual int match(ACLChecklist *checklist) override
Matches the actual data in checklist against this ACL.
Definition: ConnMark.cc:74
std::vector< ConnMarkQuery > marks
mark/mask pairs in configured order
Definition: ConnMark.h:37
virtual char const * typeString() const override
Definition: ConnMark.cc:100
nfmark_t getNumber(Parser::Tokenizer &tokenizer, const SBuf &token) const
Definition: ConnMark.cc:36
std::list< SBuf > SBufList
Definition: forward.h:22
virtual bool empty() const override
Definition: ConnMark.cc:20
virtual SBufList dump() const override
Definition: ConnMark.cc:90
std::pair< nfmark_t, nfmark_t > ConnMarkQuery
a mark/mask pair for matching CONNMARKs
Definition: ConnMark.h:33
uint32_t nfmark_t
Definition: forward.h:25

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors