Intercept.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 /* DEBUG: section 89 NAT / IP Interception */
10 
11 #ifndef SQUID_IP_IPINTERCEPT_H
12 #define SQUID_IP_IPINTERCEPT_H
13 
14 /* for time_t */
15 #include "SquidTime.h"
16 
17 namespace Ip
18 {
19 
20 class Address;
21 
30 class Intercept
31 {
32 public:
34  ~Intercept() {};
35 
37  bool Lookup(const Comm::ConnectionPointer &newConn, const Comm::ConnectionPointer &listenConn);
38 
48  bool ProbeForTproxy(Address &test);
49 
54  inline int TransparentActive() { return transparentActive_; };
55 
61  inline void StartTransparency() { transparentActive_=1; };
62 
69  void StopTransparency(const char *str);
70 
75  inline int InterceptActive() { return interceptActive_; };
76 
82  inline void StartInterception() { interceptActive_=1; };
83 
90  inline void StopInterception(const char *str);
91 
92 private:
93 
102  bool TproxyTransparent(const Comm::ConnectionPointer &newConn, int silent);
103 
111  bool NetfilterInterception(const Comm::ConnectionPointer &newConn, int silent);
112 
120  bool IpfwInterception(const Comm::ConnectionPointer &newConn, int silent);
121 
129  bool IpfInterception(const Comm::ConnectionPointer &newConn, int silent);
130 
138  bool PfInterception(const Comm::ConnectionPointer &newConn, int silent);
139 
142  time_t lastReported_;
143 };
144 
145 #if LINUX_NETFILTER && !defined(IP_TRANSPARENT)
146 #define IP_TRANSPARENT 19
148 #endif
149 
155 
156 } // namespace Ip
157 
158 #endif /* SQUID_IP_IPINTERCEPT_H */
159 
bool Lookup(const Comm::ConnectionPointer &newConn, const Comm::ConnectionPointer &listenConn)
Definition: Intercept.cc:390
int TransparentActive()
Definition: Intercept.h:54
void StartTransparency()
Definition: Intercept.h:61
bool ProbeForTproxy(Address &test)
Definition: Intercept.cc:433
bool IpfwInterception(const Comm::ConnectionPointer &newConn, int silent)
Definition: Intercept.cc:181
bool PfInterception(const Comm::ConnectionPointer &newConn, int silent)
Definition: Intercept.cc:314
void StartInterception()
Definition: Intercept.h:82
bool TproxyTransparent(const Comm::ConnectionPointer &newConn, int silent)
Definition: Intercept.cc:163
bool NetfilterInterception(const Comm::ConnectionPointer &newConn, int silent)
Definition: Intercept.cc:132
void StopInterception(const char *str)
Definition: Intercept.cc:123
int interceptActive_
Definition: Intercept.h:141
int transparentActive_
Definition: Intercept.h:140
void StopTransparency(const char *str)
Definition: Intercept.cc:114
bool IpfInterception(const Comm::ConnectionPointer &newConn, int silent)
Definition: Intercept.cc:196
int InterceptActive()
Definition: Intercept.h:75
time_t lastReported_
Definition: Intercept.h:142
Intercept Interceptor
Definition: Intercept.h:154
Definition: Address.cc:190

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors