]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/Asn.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / acl / Asn.h
1 /*
2 * Copyright (C) 1996-2020 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_ACLASN_H
10 #define SQUID_ACLASN_H
11
12 #include "acl/Data.h"
13 #include "base/CbDataList.h"
14 #include "ip/Address.h"
15
16 int asnMatchIp(CbDataList<int> *, Ip::Address &);
17
18 /// \ingroup ACLAPI
19 void asnInit(void);
20
21 /// \ingroup ACLAPI
22 void asnFreeMemory(void);
23
24 /// \ingroup ACLAPI
25 class ACLASN : public ACLData<Ip::Address>
26 {
27 MEMPROXY_CLASS(ACLASN);
28
29 public:
30 ACLASN() : data(nullptr) {}
31 virtual ~ACLASN();
32
33 virtual bool match(Ip::Address);
34 virtual SBufList dump() const;
35 virtual void parse();
36 bool empty() const;
37 virtual ACLData<Ip::Address> *clone() const;
38 virtual void prepareForUse();
39
40 private:
41 CbDataList<int> *data;
42 };
43
44 #endif /* SQUID_ACLASN_H */
45