]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/neighbors.h
2 * DEBUG: section 15 Neighbor Routines
3 * AUTHOR: Harvest Derived
5 * SQUID Web Proxy Cache http://www.squid-cache.org/
6 * ----------------------------------------------------------
8 * Squid is the result of efforts by numerous individuals from
9 * the Internet community; see the CONTRIBUTORS file for full
10 * details. Many organizations have provided support for Squid's
11 * development; see the SPONSORS file for full details. Squid is
12 * Copyrighted (C) 2001 by the Regents of the University of
13 * California; see the COPYRIGHT file for full details. Squid
14 * incorporates software developed and/or copyrighted by other
15 * sources; see the CREDITS file for full details.
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
33 #ifndef SQUID_NEIGHBORS_H_
34 #define SQUID_NEIGHBORS_H_
41 class HttpRequestMethod
;
45 extern CachePeer
*getFirstPeer(void);
46 extern CachePeer
*getFirstUpParent(HttpRequest
*);
47 extern CachePeer
*getNextPeer(CachePeer
*);
48 extern CachePeer
*getSingleParent(HttpRequest
*);
49 extern int neighborsCount(HttpRequest
*);
50 extern int neighborsUdpPing(HttpRequest
*,
56 extern void neighborAddAcl(const char *, const char *);
58 extern void neighborsUdpAck(const cache_key
*, icp_common_t
*, const Ip::Address
&);
59 extern void neighborAdd(const char *, const char *, int, int, int, int, int);
60 extern void neighbors_init(void);
62 extern void neighborsHtcpClear(StoreEntry
*, const char *, HttpRequest
*, const HttpRequestMethod
&, htcp_clr_reason
);
64 extern CachePeer
*peerFindByName(const char *);
65 extern CachePeer
*peerFindByNameAndPort(const char *, unsigned short);
66 extern CachePeer
*getDefaultParent(HttpRequest
* request
);
67 extern CachePeer
*getRoundRobinParent(HttpRequest
* request
);
68 extern CachePeer
*getWeightedRoundRobinParent(HttpRequest
* request
);
69 extern void peerClearRRStart(void);
70 extern void peerClearRR(void);
71 extern lookup_t
peerDigestLookup(CachePeer
* p
, HttpRequest
* request
);
72 extern CachePeer
*neighborsDigestSelect(HttpRequest
* request
);
73 extern void peerNoteDigestLookup(HttpRequest
* request
, CachePeer
* p
, lookup_t lookup
);
74 extern void peerNoteDigestGone(CachePeer
* p
);
75 extern int neighborUp(const CachePeer
* e
);
76 extern CBDUNL peerDestroy
;
77 extern const char *neighborTypeStr(const CachePeer
* e
);
78 extern peer_t
neighborType(const CachePeer
*, const HttpRequest
*);
79 extern void peerConnectFailed(CachePeer
*);
80 extern void peerConnectSucceded(CachePeer
*);
81 extern void dump_peer_options(StoreEntry
*, CachePeer
*);
82 extern int peerHTTPOkay(const CachePeer
*, HttpRequest
*);
84 extern CachePeer
*whichPeer(const Ip::Address
&from
);
86 #endif /* SQUID_NEIGHBORS_H_ */