~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to src/PeerDigest.h

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2009-09-24 14:51:06 UTC
  • mfrom: (1.1.12 upstream)
  • mto: (20.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090924145106-38jgrzmj0d73pha5
Tags: 3.1.0.13-1
* Upload to experimental

* New upstream release
  - Fixes Follow-X-Forwarded-For support (Closes: #523943)
  - Adds IPv6 support (Closes: #432351)

* debian/rules
  - Removed obsolete configuration options
  - Enable db and radius basic authentication modules

* debian/patches/01-cf.data.debian
  - Adapted to new upstream version

* debian/patches/02-makefile-defaults
  - Adapted to new upstream version

* debian/{squid.postinst,squid.rc,README.Debian,watch}
  - Updated references to squid 3.1

* debian/squid3.install
  - Install CSS file for error pages
  - Install manual pages for new authentication modules

* debian/squid3-common.install
  - Install documented version of configuration file in /usr/share/doc/squid3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
 
 * $Id: PeerDigest.h,v 1.4 2007/09/21 11:41:52 amosjeffries Exp $
 
3
 * $Id$
4
4
 *
5
5
 *
6
6
 * SQUID Web Proxy Cache          http://www.squid-cache.org/
19
19
 *  it under the terms of the GNU General Public License as published by
20
20
 *  the Free Software Foundation; either version 2 of the License, or
21
21
 *  (at your option) any later version.
22
 
 *  
 
22
 *
23
23
 *  This program is distributed in the hope that it will be useful,
24
24
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
25
25
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
26
 *  GNU General Public License for more details.
27
 
 *  
 
27
 *
28
28
 *  You should have received a copy of the GNU General Public License
29
29
 *  along with this program; if not, write to the Free Software
30
30
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
40
40
 
41
41
#include "cbdata.h"
42
42
 
43
 
struct _Version
44
 
{
 
43
struct _Version {
45
44
    short int current;          /* current version */
46
45
    short int required;         /* minimal version that can safely handle current version */
47
46
};
50
49
 
51
50
class StoreDigestCBlock
52
51
{
53
 
  public:
 
52
public:
54
53
    Version ver;
55
54
    int capacity;
56
55
    int count;
62
61
    int reserved[32 - 6];
63
62
};
64
63
 
65
 
struct _DigestFetchState
66
 
{
 
64
struct _DigestFetchState {
67
65
    PeerDigest *pd;
68
66
    StoreEntry *entry;
69
67
    StoreEntry *old_entry;
76
74
    time_t resp_time;
77
75
    time_t expires;
78
76
 
79
 
    struct
80
 
    {
 
77
    struct {
81
78
        int msg;
82
79
        int bytes;
83
80
    }
95
92
    void *operator new (size_t);
96
93
    void operator delete(void *);
97
94
 
98
 
    struct _peer *peer;         /* pointer back to peer structure, argh */
99
 
    CacheDigest *cd;            /* actual digest structure */
100
 
    String host;                /* copy of peer->host */
101
 
    const char *req_result;     /* text status of the last request */
102
 
 
103
 
    struct
104
 
    {
105
 
 
106
 
unsigned int needed:
107
 
        1;      /* there were requests for this digest */
108
 
 
109
 
unsigned int usable:
110
 
        1;      /* can be used for lookups */
111
 
 
112
 
unsigned int requested:
113
 
        1;      /* in process of receiving [fresh] digest */
114
 
    }
115
 
 
116
 
    flags;
117
 
 
118
 
    struct
119
 
    {
 
95
    struct peer *peer;          /**< pointer back to peer structure, argh */
 
96
    CacheDigest *cd;            /**< actual digest structure */
 
97
    String host;                /**< copy of peer->host */
 
98
    const char *req_result;     /**< text status of the last request */
 
99
 
 
100
    struct {
 
101
        unsigned int needed:1;          /**< there were requests for this digest */
 
102
        unsigned int usable:1;          /**< can be used for lookups */
 
103
        unsigned int requested:1;       /**< in process of receiving [fresh] digest */
 
104
    } flags;
 
105
 
 
106
    struct {
120
107
        /* all times are absolute unless augmented with _delay */
121
108
        time_t initialized;     /* creation */
122
109
        time_t needed;          /* first lookup/use by a peer */
126
113
        time_t req_delay;       /* last request response time */
127
114
        time_t received;        /* received the current copy of a digest */
128
115
        time_t disabled;        /* disabled for good */
129
 
    }
130
 
 
131
 
    times;
132
 
 
133
 
    struct
134
 
    {
 
116
    } times;
 
117
 
 
118
    struct {
135
119
        cd_guess_stats guess;
136
120
        int used_count;
137
121
 
138
 
        struct
139
 
        {
 
122
        struct {
140
123
            int msgs;
141
124
            kb_t kbytes;
142
 
        }
143
 
 
144
 
        sent, recv;
145
 
    }
146
 
 
147
 
    stats;
 
125
        } sent, recv;
 
126
    } stats;
148
127
 
149
128
private:
150
129
    CBDATA_CLASS(PeerDigest);
151
130
};
152
131
 
153
132
extern const Version CacheDigestVer;
154
 
#endif
 
133
 
 
134
#endif /* USE_CACHE_DIGESTS */
155
135
 
156
136
#endif /* SQUID_PEERDIGEST_H */