]> git.ipfire.org Git - thirdparty/squid.git/blame - src/acl/ConnMark.h
Fixed Transient reader locking broken by 4310f8b (#161)
[thirdparty/squid.git] / src / acl / ConnMark.h
CommitLineData
653d9927
A
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
18namespace Acl {
19
20class ConnMark : public ACL
21{
22 MEMPROXY_CLASS(ConnMark);
23
24public:
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
32 /// a mark/mask pair for matching CONNMARKs
33 typedef std::pair<nfmark_t, nfmark_t> ConnMarkQuery;
34
35private:
36 nfmark_t getNumber(Parser::Tokenizer &tokenizer, const SBuf &token) const;
37 std::vector<ConnMarkQuery> marks; ///< mark/mask pairs in configured order
38};
39
40} // namespace Acl
41
42#endif /* SQUID_ACLCONNMARK_H */
43