]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/htcp.h
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SRC_HTCP_H
10 #define SQUID_SRC_HTCP_H
15 #include "http/forward.h"
16 #include "HttpHeader.h"
17 #include "ip/forward.h"
18 #include "store_key_md5.h"
20 /// \ingroup ServerProtocolHTCP
27 /// parses request header from the buffer
28 bool parseHeader(const char *buffer
, const size_t size
);
43 /// \ingroup ServerProtocolHTCP
44 void neighborsHtcpReply(const cache_key
*, HtcpReplyData
*, const Ip::Address
&);
46 /// \ingroup ServerProtocolHTCP
47 void htcpOpenPorts(void);
52 * \ingroup ServerProtocolHTCP
54 * Generate and Send an HTCP query to the specified peer.
59 * \retval 1 Successfully sent request.
60 * \retval 0 Unable to send request at this time. HTCP may be shutting down or starting up.
61 * Don't wait for a reply or count in stats as sent.
62 * \retval -1 Error sending request.
64 int htcpQuery(StoreEntry
* e
, HttpRequest
* req
, CachePeer
* p
);
66 /// \ingroup ServerProtocolHTCP
67 void htcpClear(StoreEntry
* e
, HttpRequest
* req
, const HttpRequestMethod
&method
, CachePeer
* p
, htcp_clr_reason reason
);
69 /// \ingroup ServerProtocolHTCP
70 void htcpSocketShutdown(void);
72 /// \ingroup ServerProtocolHTCP
73 void htcpClosePorts(void);
77 #endif /* SQUID_SRC_HTCP_H */