Ip.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2019 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_ACLIP_H
10 #define SQUID_ACLIP_H
11 
12 #include "acl/Acl.h"
13 #include "acl/Data.h"
14 #include "ip/Address.h"
15 #include "splay.h"
16 
18 {
20 
21 public:
22  static acl_ip_data *FactoryParse(char const *);
23  static int NetworkCompare(acl_ip_data * const & a, acl_ip_data * const &b);
24 
25  acl_ip_data ();
26 
27  acl_ip_data (Ip::Address const &, Ip::Address const &, Ip::Address const &, acl_ip_data *);
28  void toStr(char *buf, int len) const;
29  SBuf toSBuf() const;
30 
32 
34 
39 private:
40 
41  static bool DecodeMask(const char *asc, Ip::Address &mask, int string_format_type);
42 };
43 
44 class ACLIP : public ACL
45 {
46 public:
47  void *operator new(size_t);
48  void operator delete(void *);
49 
50  ACLIP() : data(NULL) {}
51  ~ACLIP();
52 
54 
55  virtual char const *typeString() const = 0;
56  virtual void parse();
57  // virtual bool isProxyAuth() const {return true;}
58  virtual int match(ACLChecklist *checklist) = 0;
59  virtual SBufList dump() const;
60  virtual bool empty () const;
61 
62 protected:
63 
64  int match(const Ip::Address &);
65  IPSplay *data;
66 
67 };
68 
69 #endif /* SQUID_ACLIP_H */
70 
static bool DecodeMask(const char *asc, Ip::Address &mask, int string_format_type)
Definition: Ip.cc:156
Definition: SBuf.h:86
Splay< acl_ip_data * > IPSplay
Definition: Ip.h:53
Definition: Acl.h:39
static struct node * parse(FILE *fp)
Definition: parse.c:995
Definition: splay.h:56
void toStr(char *buf, int len) const
Definition: Ip.cc:41
void const char HLPCB void * data
Definition: stub_helper.cc:16
SBuf toSBuf() const
Definition: Ip.cc:72
acl_ip_data * next
Definition: Ip.h:37
MEMPROXY_CLASS(acl_ip_data)
IPSplay * data
Definition: Ip.h:65
Ip::Address mask
Definition: Ip.h:35
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
std::list< SBuf > SBufList
Definition: forward.h:22
Definition: Ip.h:44
void const char * buf
Definition: stub_helper.cc:16
static acl_ip_data * FactoryParse(char const *)
Definition: Ip.cc:209
int const char size_t
Definition: stub_liblog.cc:86
ACLIP()
Definition: Ip.h:50
int a
Definition: membanger.c:50
Ip::Address addr1
Definition: Ip.h:31
acl_ip_data()
Definition: Ip.cc:542
bool match(const char *fn, const REList *list)
Definition: purge.cc:398
Definition: Ip.h:17
static int NetworkCompare(acl_ip_data *const &a, acl_ip_data *const &b)
Definition: Ip.cc:121
#define NULL
Definition: types.h:166
Ip::Address addr2
Definition: Ip.h:33

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors