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_SRC_HTCP_H
10 #define SQUID_SRC_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 
24 public:
25  HtcpReplyData();
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 
44 void neighborsHtcpReply(const cache_key *, HtcpReplyData *, const Ip::Address &);
45 
47 void htcpOpenPorts(void);
48 
49 class CachePeer;
50 
64 int htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p);
65 
67 void htcpClear(StoreEntry * e, HttpRequest * req, const HttpRequestMethod &method, CachePeer * p, htcp_clr_reason reason);
68 
70 void htcpSocketShutdown(void);
71 
73 void htcpClosePorts(void);
74 
75 #endif /* USE_HTCP */
76 
77 #endif /* SQUID_SRC_HTCP_H */
78 
void htcpClosePorts(void)
Definition: htcp.cc:1645
unsigned char cache_key
Store key.
Definition: forward.h:29
void htcpOpenPorts(void)
Definition: htcp.cc:1442
int htcpQuery(StoreEntry *e, HttpRequest *req, CachePeer *p)
Definition: htcp.cc:1515
int hit
Definition: htcp.h:30
HtcpReplyData()
Definition: htcp.cc:1068
void neighborsHtcpReply(const cache_key *, HtcpReplyData *, const Ip::Address &)
Definition: neighbors.cc:1601
bool parseHeader(const char *buffer, const size_t size)
parses request header from the buffer
Definition: htcp.cc:1075
int size
Definition: ModDevPoll.cc:69
HttpHeader hdr
Definition: htcp.h:31
struct HtcpReplyData::cto_t cto
uint32_t msg_id
Definition: htcp.h:32
void htcpSocketShutdown(void)
Definition: htcp.cc:1616
double version
Definition: htcp.h:33
void htcpClear(StoreEntry *e, HttpRequest *req, const HttpRequestMethod &method, CachePeer *p, htcp_clr_reason reason)
Definition: htcp.cc:1564
htcp_clr_reason
Definition: enums.h:234

 

Introduction

Documentation

Support

Miscellaneous