htcp.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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_HTCP_H
10#define SQUID_HTCP_H
11
12#if USE_HTCP
13
14#include "enums.h"
15#include "http/forward.h"
16#include "HttpHeader.h"
17#include "ip/forward.h"
18#include "store_key_md5.h"
19
22{
23
24public:
26
28 bool parseHeader(const char *buffer, const size_t size);
29
30 int hit;
32 uint32_t msg_id;
33 double version;
34
35 struct cto_t {
36 /* cache-to-origin */
37 double rtt;
38 int samp;
39 int hops;
40 } cto;
41};
42
45
47void htcpOpenPorts(void);
48
49class CachePeer;
50
64int htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p);
65
67void htcpClear(StoreEntry * e, HttpRequest * req, const HttpRequestMethod &method, CachePeer * p, htcp_clr_reason reason);
68
70void htcpSocketShutdown(void);
71
73void htcpClosePorts(void);
74
75#endif /* USE_HTCP */
76
77#endif /* SQUID_HTCP_H */
78
int size
Definition: ModDevPoll.cc:75
HttpHeader hdr
Definition: htcp.h:31
double version
Definition: htcp.h:33
struct HtcpReplyData::cto_t cto
int hit
Definition: htcp.h:30
HtcpReplyData()
Definition: htcp.cc:1068
uint32_t msg_id
Definition: htcp.h:32
bool parseHeader(const char *buffer, const size_t size)
parses request header from the buffer
Definition: htcp.cc:1075
htcp_clr_reason
Definition: enums.h:240
void htcpOpenPorts(void)
Definition: htcp.cc:1442
int htcpQuery(StoreEntry *e, HttpRequest *req, CachePeer *p)
Definition: htcp.cc:1515
void htcpSocketShutdown(void)
Definition: htcp.cc:1616
void neighborsHtcpReply(const cache_key *, HtcpReplyData *, const Ip::Address &)
Definition: neighbors.cc:1599
void htcpClear(StoreEntry *e, HttpRequest *req, const HttpRequestMethod &method, CachePeer *p, htcp_clr_reason reason)
Definition: htcp.cc:1564
void htcpClosePorts(void)
Definition: htcp.cc:1645
unsigned char cache_key
Store key.
Definition: forward.h:29

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors